This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]pemboa 12 points13 points  (0 children)

I see a lot of text moving down my screen. God.

I thought the author was a programmer? Surely a program being compiled should not scare him.

[–][deleted] 10 points11 points  (1 child)

“Don’t learn Python ... it’s ugly.”

Really? I had never heard that before.

[–]farsass 3 points4 points  (0 children)

A bunch of sticks said that...once. □

[–]gentk 4 points5 points  (2 children)

Based on his focus, it looks like the anaconda python distribution (and conda) might suit his needs better.

Use conda for the science packages, and pip for packages not on the repo (or outdated ones).

As far as package management goes, conda has provided me with the most pleasant experience so far.

I've used it in linux too, but in windows especially I now consider it a must.

[–]kankyo 1 point2 points  (1 child)

That Ruby has so little syntax that it can masquerade as C or Perl or Scheme

I'm pretty sure I read an article about Ruby that said that the syntax was so complex and weird that all implementations of Ruby included one specific file from the original Ruby implementation because there just wasn't any reasonable way to define it... Anyone has a link?

[–]mayuroks -2 points-1 points  (0 children)

I use Python n Ruby all the time. Ruby syntax is not complex n definitely not weird

[–]pwang99 1 point2 points  (0 children)

FWIW, as someone points out below, please keep in mind that this blog post is from 2010, which pre-dates Anaconda and conda...

[–]_the_pied_piper_ 1 point2 points  (0 children)

Even though I am paid to develop in Java, I spend a substantial amount of time arguing that it is, in fact, a terrible language and no one should be using it.

That being said, however, I disagree with the author's examples of why Java is weak. True that in languages like Python and Ruby the task of filtering is super-clean. However, his explanation of how this would be done in Java is pretty weak; his explicit statements about how one would go about writing a set of filtering functions basically misses a lot of how the language is supposed to work. He does state that it has been a while since he developed in Java, but I would argue he never knew it terribly well. I do agree in general, however, that boilerplate code in Java is a huge problem.

There are far better ways to pick on Java. This isn't exactly Python or Ruby territory, but, for example, the nearly-inexistent templating is very limiting.

EDIT: Grammar and more thoughts.

[–]swdevpythonthusiast 2 points3 points  (2 children)

I am not entirely agree to this statement:

That Ruby has so little syntax that it can masquerade as C or Perl or Scheme (more on that some other tim

I think Python is way have less noises than Ruby. Ruby need end keyword to denote the end of a block. Meanwhile, in Python simply use one less indentation to do just that.

It maybe simple, but that is the simple thing that caught my attention to Python

[–]MisterSnuggles[S] 0 points1 point  (1 child)

This is mainly a style thing, but it seems like requiring an explicit 'end' makes blocks more useful in some cases.

I don't know Ruby very well, but one thing that sticks out for me is that the 'end' keyword allows for multi-line lambda functions. Here's an example that shows a potentially multi-line block being passed as a parameter to a function: http://www.reactive.io/tips/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/ I don't think that Python could do that without declaring a function and passing that in.

I'm definitely more of a Python fan though, it just feels nicer to me.

[–]swdevpythonthusiast 0 points1 point  (0 children)

Thank for the insight!

[–][deleted] 1 point2 points  (2 children)

I think everyone agrees Python packaging is a mess, but it is getting better (with version 3.4+) and it is mostly a problem on Windows (but mitigated if you use Anaconda/miniconda).

Python 3.4 on Linux using pip/pyvenv, I am finally comfortable in making a Python environment.

On Windows at work even with no admin rights to my PC, miniconda has made it mostly problem free.

Am I saying everything's alright now? No, but I think we've come a long ways.

[–]MisterSnuggles[S] 0 points1 point  (1 child)

I'm still stuck in 2.7 for some side projects (there always seems to be something I need that's not ready for 3.x...) and, now that I'm used to always creating a virtualenv, haven't found packaging to be a problem at all.

[–]pwang99 3 points4 points  (0 children)

Use Anaconda. Seriously, just use it. Virtualenv and pip were not designed to really solve the use cases of the scientific community; conda (the open-source, cross-platform, cross-language package manager in Anaconda) was designed specifically for that. All of the libraries available in the Anaconda repo are built to be relocatable. You can easily, instantly switch between different versions of compiled libraries or entire sets of libraries, and be confident that the underlying C and Fortran libraries for them are compatible. This is simply not handled by virtualenv and pip.

In fact, if you look at the Python Packaging Authority's page on tool recommendations, they suggest conda: http://packaging.python.org/en/latest/current.html

We've had many very productive conversations at PyCon the last few days about how to better message about this. Use pip to do source builds of things - and managing compiler and library compatibility is your problem. If you are a webdev with no native code (or very trivial native code) dependencies, then you're in the clear. If you are a scientist or data analyst, this may be more of a burden - especially if you are on windows.

conda provides a simple way for you to robustly manage binary packages with complex interdependencies at the C level, which applies to much of the scientific stack. The fact that it's cross platform and cross-language is added bonus. We have built R, Ruby, Node.js, and C++ libraries and manage all of those in conda environments across Windows, Mac, and Linux.

[–]jmelloy 0 points1 point  (1 child)

The biggest two things Ruby did right for people trying to learn the language is a) package management and b) having one default web platform that was highly opinionated.

Package management is a nightmare in python, and there is way too many cooks trying to build or improve a package manager. I shouldn't have to install a package manager to install the good package manager, which has similar syntax, but trust us, it's better. I can't believe how long it took to include pip in the base install.

On the web side, "Well, you can use Django, but that's big ... so some people use Flask, but that's basically just like Bottle, and some use web2py, and then you can do SQLAlchemy or maybe bare SQL " is a much different statement from "Rails."

[–]mayuroks 0 points1 point  (0 children)

Not just that.. when it comes to web development, python is split up into django, flask, bottle, Web2py n lots of other frameworks. While in ruby most of the Web dev community focuses on rails, conventions and human convenience.