Paul Graham says that
nobody loves java:
“No one
loves it. C, Perl, Python, Smalltalk, and Lisp programmers love their
languages. I’ve never heard anyone say that they loved
Java.”
I’m not so sure.
Google Says
Googling for “I love java” gives 5,400 results. Adding the word
programming to the search1 yields
2,680 results. Not all sarcastic, surely. The results include “Why I
Love Java” and a page that says that, “it makes programming quick and
fun”.
These numbers don’t tell us much. Anything as widespread as Java must
have some fans. We need something to compare with: ‘”I hate java”
programming’ gives 1,350 results. Java seems to be more loved than
hated, at least.
Paul Graham contrasts Java with C, Perl, Python and Smalltalk.
Google says:
“I love Java” programming | 2,680 |
“I hate Java” programming | 1,350 |
“I love C” programming | 872 |
“I hate C” programming | 506 |
“I love Perl” programming | 1,720 |
“I hate Perl” programming | 426 |
“I love Python” programming | 1,330 |
“I hate Python” programming | 46 |
“I love Smalltalk” programming | 57 |
“I hate Smalltalk” programming | 3 |
“I love Lisp” programming | 185 |
“I hate Lisp” programming | 77 |
So Java can claim to be the “most loved”. By the better measure
of love/hate ratio Java does approximately as well as Lisp, and better
than C.
Old and New
It is the two most established languages2 that are
most hated: Java and
C. It is this establishment that is key. Because they are established
they are forced on programmers more often, not chosen. Because they are
forced they are hated. It is harder to hate a tool that you selected
than one that is forced on you.
Python is not so well established. It finds its
place in the fringes of organisations and in the open source
community. Where it is used, it is selected. If it is not
ideally
suited for a task, it tends not to be used. Because of its
age3, if a library or feature
is missing it will be excused as “coming soon”. If a library or
feature is missing in Java it is considered a serious shortcoming.
Older languages also have more visible shortcomings. When C was young it
was the most portable language in the world. Now we say that Java
solves some of those portability problems with far greater success;
similar claims can be made for Perl, PHP and others. Older
languages also have the problem that more bad code has been written in
them – you are more likely to have wrestled with someone else’s awful C
than someone else’s awful Python simply because you are far more likely
to have had to edit someone else’s C full stop.
Newer languages seem to be loved more. This might be because a missing
library or functionality in a new language can be excused more easily –
“Generics? We’re working on that.” Also a newer language will be known in
less depth by its average user and therefore its limits will be less well
known. The problems of C and C++ are so obvious to us because hundreds of
thousands of programmers have butted up against them numerous times.
There may be terrible limitations on Python but they are less well
known.
When I wrote the first version of this article my
blog was quickly commented on by a
number of Ruby users all anxious to show that Ruby was the most loved
language. And the results for Ruby are spectacular (love: 1,450, hate: 13).
And Ruby became mainstream (if it can be said to have done so) very recently
indeed4.
It is not just that shortcomings become visible or inexcusable. The
state of the art does move on. Fortran is superior to Assembler5 and C is superior to Fortran. Perhaps it
will one day be possible to say that it is equally evident that Java is
better than C and Python is better than Java6. I suspect that these languages are too much
contemporaries for that distinction to ever be so clear.
Why Love Java?
Let’s look at what Java offers: portability, automatic garbage
collection, object orientation. Yes, Smalltalk offered the OO and the
GC in 1971 but never with such a large standard library and so many
tools, and with C-like syntax too.
If you were forced to work on somebody else’s complex C program
porting it to another OS whilst fixing memory leaks and then allowed to
switch to Java I wouldn’t be at all surprised to hear you say the words,
“I love Java”.
A previous version of this article entitled
Programming Languages That Are Loved previously appeared on this site.
Footnotes
- We add the word programming to exclude coffee-related
results. - Smalltalk and Lisp are both much older than Java but it
would be difficult to argue that they are more established. - Although Python was initially released in 1991 and Java in
1996 you can tell by the better measure of when they got their O’Reilly
books when they “hit primetime”:
Python in a Nutshell (1st Ed.)
2003;
Java in a Nutshell (1st ed.) 1996. - Ruby in a Nutshell (Nov 2001) is one of three O’Reilly Ruby
books. By contrast Java has more than 150 and Python has 25. - As a general purpose programming language.
- Not until after Python has a ternary if-else operatore
though, I hope.
You could look at Java in two different ways: the language itself, and how it is deployed.
Any additional benefits the nature of the language provides aside, the bottom line is that you need to have this
I’m working in the mobile business, and
the good thing about java is that
you can have an application up
and running quite fast (then just
copy the startup code to your
next project as usual…).
Coding the ordinary stuff is
about the same as for C++
(except all the anti-OOP things forced
on you, personally, I’m writing
in a ‘C’-like manner *shrugs*).
After that, hell begins and you have to spend
weeks to port the j2me code to
different platforms because there are
different bugs in the KVM:s (the sun one
is actually the worst) and that java isn’t
that portable after all.
Just a last word : the Garbage collector,
I think thats why I really hate java…
Nothing on earth fragments your preacious
memory faster and actually making your programs
time limited(no j2me program can run
forever, at least if you try
to get the most out ou the machine).
Java is easier to learn than C++.
Java might be faster to program
when your writing simple programs
But don’t beleive it
will lern you OOP or
good coding manners.
Just my 50 euro-cents 🙂
Here’s some figures that I pulled together today…… (BEFORE I found your site, I might add).
The text is formatted for use with mono-space fonts (courier or similar), so it PROBABLY won’t look so nice here. But here it is anyway:
Google search on “I love “:
php 19200
java 18100
python 13200
perl 10600
delphi 7890
c++ 4330
c# 828
lisp 578
visual basic 351
cobol 169
Google search on “I hate “:
php 695
java 15200
python 670
perl 792
delphi 307
c++ 1350
c# 236
lisp 272
visual basic 681
cobol 300
Love / hate ratios:
php 19200 / 695 = 27.63
delphi 7890 / 307 = 25.70
python 13200 / 670 = 19.70
perl 10600 / 792 = 13.38
c# 828 / 236 = 3.50
c++ 4330 / 1350 = 3.20
lisp 578 / 272 = 2.13
java 18100 / 15200 = 1.19
cobol 169 / 300 = 0.56
visual basic 351 / 681 = 0.52
Overall love / hate ratio in the world (“I love” / “I hate”):
97100000 / 28200000 = 3.44
Normalized love / hate ratios:
php 27.63 / 3.44 = 8.03
delphi 25.70 / 3.44 = 7.47
python 19.70 / 3.44 = 5,73
c# 3.50 / 3.44 = 1.02
c++ 3.20 / 3.44 = 0.93
lisp 2.13 / 3.44 = 0.61
java 1.19 / 3.44 = 0.34
cobol 0.56 / 3.44 = 0.16
visual basic 0.52 / 3.44 = 0.15
I must say that these tests are pretty poor in general.
Firstly, I wouldn’t say that a three-word phrase search can be comparable to a four-word phrase (‘I love java’ vs ‘I hate java programming’).
Other interesting notes:
– No information on word grouping is supplied
– No information on language/global specific searches supplied
– Google is a poor comparison tool since different data centres will return varying results (even within minutes of the same search)
– Relevance on the interesting phrases here will vary greatly from page to page due to general page relevancy
I think a much better survey would be to ask people on general programming mailinglists / IRC channels, or just through a poll.
I’m a C and perl lover myself, so people can’t really say I’m boxed-in. Java, however, is pure crap in my opinion. But hey, it’s all about what you want enjoy programming in, right?
I don’t think anyone is suggesting this is a rigorous and exacting survey with mathematically provable results. I just thought that some people somewhere probably loved Java (I think I did when I first learnt it). So I went looking for some evidence.
Also, I didn’t use the word programming with “I love” and not with “I hate”. I used it with both, or with neither.
Google may be poor for some purposes but in this case it seems like a nice, swift way of getting a ballpark figure.
Polls have their own biases and to get a poll with these kind of numbers would take a lot longer. It would not be guaranteed to return correct results either.
Perl and C have their places (actually I’m not sure Perl hasn’t been superceded in all places apart from very complex regular expressions) but I wouldn’t want to have to start my next program in either.
Its quite interesting to know how people love/hate languages.. My personal favorites are C, Scheme, Python and for a brief time Java(when i switched from C++ to Java). But one thing I believe is that, use that tool which is best suited for the application and languages are nothing but tools…
“I think I did when I first learned it”.
Mmm. That might be another thing to factor in.
Whether it’s a new romance, a new job, or a new language, there’s a honeymoon period.
Also there is a potential sampling bias: What kind of people write online about their love or hate of a programming language anyway? Are they a representative sample of all programmers? My guess would be they are not.
well all Im gona say is that Iv chosen to do my dessertation in java, lol and know im trying to back it up with good reasoning, hmm doesnt seem like this is the correct place to find it I feel. Ah well prehaps I ll try the I love Java search and see if some promising results can be obtained 🙂
Java as a language is still OK.
Easier than C/C++ but less elegant than C#.
If talking about application performance, it seems that Java has some work to do in order to catch up with its competitors:
See http://www.codeproject.com/KB/dotnet/RuntimePerformance.aspx
Java is becoming outdated when compared with C#.
Unfortunately I’m stuck with the damn thing and the legal wrangle between Oracle and Google over Java make me wish I was not in the java camp.
@Kristian Gunstone: of course just searching for ‘i love X’ and ‘i hate X’ cannot give an accurate measure of what developers think about X but it is totally useful to compare languages as the protocol is the same for each language.