Friday, August 06, 2004
Great Java Hackers?
I read Paul Graham's Great Hackers essay a few days ago. He makes some interesting points, but one thing I have to disagree with is his assessment of Java, or rather Java programmers. He says:
For example, if your company wants to write some software, it might seem a prudent choice to write it in Java. But when you choose a language, you're also choosing a community. The programmers you'll be able to hire to work on a Java project won't be as smart as the ones you could get to work on a project written in Python.
The two languages I use most are Java and Python. I learned Java first (~1996, as opposed to ~1998), but these days I actually write slightly more Python code than Java. In some ways, I'm more proud of the fact that I'm a Python expert than I am about the fact that I'm a Java expert. I still disagree with the above statement. There aren't less smart Java programmers than smart Python programmers. On the contrary, I'd argue that if you were to somehow sort Java programmers and Python programmers by "smartness", and take the top-n from each set, the top-n Java programmers would probably better than the top-n Python programmers.
I think the confusion here is stemming from the fact that the median level of "smartness" for Java programmers really is much lower than the median for Python programmers. This is true largely because Python is more esoteric. Blaming Java for this is essentially blaming for being popular.
Let's analyze this a bit: assume that when a programming language comes into being, it starts off with only the language designers as its users. These are arguably going to be some pretty bright people. As time goes on, more people will become fluent in this new language. At first, most of these people are going to be "early adopters". If you're an early adopter for a programming language, chances are that you really love to program. That in turn significantly increase the chance that you're a great programmer.
After a while, the median level of ability for programmers who know a given language is going to drop simply because most of the really good programmers who were going to start using the language started using it early on. Most of the people joining later are doing so not because they want to learn another language, but because it's their first language, or because they feel that they need to learn this language to find a job.
So Java's problem isn't that there aren't any smart people using it. It's that there are a whole lot more not-so-smart people using it than there are using Python. The same thing can probably be said about any programming language which has more users than Python.
There is another effect which actually does give some credence to Paul's claim, which is the stigma of popularity. Java is popular, so a lot of otherwise great hackers assume that it must be bad. They must believe what Mark Twain said:
If you ever find yourself on the side of the majority, it is time to stop and reconsider your position.
This is unfortunate, because it means that there are a number of great hackers who will simply never bother to learn Java. Being popular doesn't make Java a bad language. While Java does have its flaws, as does any language, it has far fewer flaws than many others, and I'd argue that it has a number of strengths which Python lacks. I also don't think that the fact that some people are "programming language snobs" reduces the number of smart Java programmers to the point where Java has less smart programmers than Python.
So if there's any difficulty in finding smart Java programmers which doesn't exist when trying to find smart Python programmers it isn't that there's a shortage of smart Java programmers, but rather that there's a very large surplus of dumb Java programmers. Does that mean you shouldn't use Java? No. Instead, you just need a stricter filter that will weed out the duds as early as possible.
Paul actually mentions one pretty good metric, which is to look for people who also know Python. It doesn't have to be Python though. In fact, I'd argue that simply requiring that all applicants know and use at least one language which isn't Java, C, C++ or Perl will filter the pool pretty well. The key here isn't that the applicants know Python specifically, but that they be fluent in at least one less-popular language. Anyone who fits this criteria is much more likely to be a better programmer simply because smarter programmers tend to want to learn new programming languages, despite their popularity or lack thereof.