Does Anyone Love Java?

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

  1. We add the word programming to exclude coffee-related
    results.
  2. Smalltalk and Lisp are both much older than Java but it
    would be difficult to argue that they are more established.
  3. 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.
  4. 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.
  5. As a general purpose programming language.
  6. Not until after Python has a ternary if-else operatore
    though, I hope.

Ooooooooooooo

o.com,
oo.com,
ooo.com,
oooo.com,
ooooo.com,
oooooo.com,
oooooo.com,
oooooooo.com,
oooooooo.com,
ooooooooo.com,
oooooooooo.com,
ooooooooooo.com,
oooooooooooo.com,
ooooooooooooo.com,
and oooooooooooooo.com
are all registered domain names (although those with 12, 13 and 14 Os have expired).

I am also amused by the fact that
worldcup2006.com,
worldcup2010.com,
worldcup2014.com,
worldcup2018.com,
worldcup2022.com,
worldcup2026.com,
worldcup2030.com,
worldcup2034.com,
worldcup2038.com,
worldcup2042.com,
worldcup2046.com,
worldcup2050.com,
worldcup2054.com,
worldcup2058.com,
worldcup2062.com,
worldcup2066.com and
worldcup2070.com
are all registered too. Quick, grab worldcup 2074.com before it goes!

Lomography or Digital Photography?

The new Lomo ambassadors for London had a meeting on Tuesday night upstairs in the Griffin pub on Leonard Street. It was terribly oversubscribed with people sitting on the floor and standing on the stairs. They announced some kind of project the constitution of which was left very vague. It might have been a semipermanent Lomo wall somewhere in London? They also showed the BBC documentary about lomography.

I had a different perspective watching the documentary in 2005 instead of 2001 (when it was shown on BBC Four). Many of the virtues of the Lomo Kompact have been superseded by cheap, high-quality digital cameras. Digital cameras are smaller (“take your camera with you wherever you go”), cheaper to take lots of photos with (“don’t think just shoot” — no film to buy, cheaper processing if you want photos), better for shooting from the hip (“try the shot from the hip” — because of the viewscreen on the back). And while the lomohomes are nice I’d also say that flickr is a far bigger, better, more usable version of the same thing.

The Lomo still scores on simplicity and build quality (far less worrying to drop a Kompact than a digicam). And it still has the tunnel lens with colour effects (though I seem to get less of this in my photos than others do). But the crazy, spontaneous, shooting-from-the-hip feel of lomography is surely in the province of the digital camera now?

The Diary of a Nobody

Yesterday, inspired by Pepys Diary I thought I’d set up something else from Project Gutenburg in a similar format. I initially thought of the Diary of Anne Frank but unbelievably that is still in copyright. Then I checked out The Diary
of a Nobody
and by strange coincidence it begins on April 3rd.

One late-night coding session later and I give you thediaryofanobody.com. As it is fiction, you are unlikely to want to "dip in" so I set it up so that you can start your RSS feed on any date you like and get the diary over the next 18 months or so.