"I plead guilty"

Note to the innocent reader: this story has already been published in a JavaLobby newsletter a few months ago. This little rant is mostly harmless but also mostly true.

I have been programming in Java for many years. I have also developed thousands of lines of code in other computing languages like Python, C++ or Visual Basic. I do really like some of them as well as I hate some others. What makes you like or dislike a given language? Does it have to do with its syntax or its standard libraries? We sure all have our own particular reasons but let me tell you why I love Java: It is all about the community.

There are many differences between the Java community and the others, we all know that. The C++ universe, for instance, is full of old-over-graduated-over-bearded-unix-lovers. On the other hand, if you ever take a trip to Python land, you’ll meet an incredible amount of latent-typing-adepts-yet-cool guys. The Java world is different, though. Does it host hordes of former salesmen who became developers to save the world from the Y2K cataclysm? I would be a liar if I said no, but let’s pretend they don’t exist. Our world has in fact been built by armies of smart guys. The problem is that those people are way too smart and love clean designs way too much. They also worship Liz, (I just came up with her name so don’t even ask) the Goddess of Complexity. As in Terry Pratchett’s Small Gods, Liz was born when one fellow programmer, let’s call him Jim, wrote the very first Java framework. To be more precise, she was born when Jim first used the word “framework” to speak about an API. Because he was a good developer, Jim convinced other fellows to use his framework. And as more and more people started to dope their products with countless frameworks, Liz began to grow and gain power. She eventually graduated as a legitimate goddess when JUnit surged in.

I’m not being harsh, the Java world is a place I like to evolve in because of all the innovation within. Despite the numerous criticisms we have to suffer from, other communities tend to follow our lead. Have you ever checked how many Java libraries are being ported to .NET or Python for instance? And last but not least, Java programmers are proud and prone to defend and protect their beloved one.

Now, I’d like to focus on Liz. During the past few years, I have read incredible number of books, tutorials, blogs and documents about Java, as so many of you surely did. Equipped with all this knowledge, a very strange feeling prevails any time I come to writing some lines of Java code: I feel guilty.

I’m perfectly aware of the fact that most documents we read about Java are meant to be read by professional developers. The readers are delivered loads of valuable and relevant advices about design patterns, good practices, frameworks, etc. While perfectly legitimate in a corporate environment, this information might overwhelm the occasional programmer. Don’t get me wrong here, we may be professionals and work in a corporate setting, but we all become “occasional” programmers when we write a simple application for personal use or a restricted public purpose. Do I have to summon complex design patterns or use heavy frameworks when I write a lightweight RSS feed reader for my very own web site? I don’t and I therefore feel guilty. Have you ever looked over your shoulder to check whether somebody is looking at you when you’re about to Break the Golden Rules of Elegant Coding? I know I do. And I always make sure that I write the Ugly Code with haste, just in case someone might catch me red-handed. Once again, I’m aware that the benefits of well designed projects are unquestionable in a professional environment, where dozens of people will maintain your work.

This is flummoxing since I never felt that guilty when writing C++ or Python code. How come Java developers are so concerned by design problems? I know people who spend so much time trying to find the right architecture, the best framework, and the most appropriate patterns, and writing the test suites that they somehow forget to write the application itself. Should a few hours of work really become weeks? That is why I very often choose other technologies, like PHP or Python, to write personal applications: the overload of work I’ll give myself with Java is disheartening. I want to get the job done. I don’t want to worship Liz. I live in a secular state and I would like to work in a secular world.

To the programmers who, like me, sometimes feel guilty, here is the ultimate advice: be vainglorious enough to follow your own way. Liz is not your shepherdess but she’s your best asset… only if you solicit her services wisely.

One Response to “"I plead guilty"”

  1. Kimberley Baldwin says: