Java was, in some ways, damaging to my career. Java is a simple language but the community surrounding the language seem to hate it.
The community keeps building tools that do little more than work around perceived deficiencies in the language, each replacing each other in a seemingly endless fight to add more project XML files. It seems that managing a few jar files in a lib folder was too difficult, so we got Maven and gobs of XML. Struts was the vogue web framework -- until Struts2 came out, at least. Struts2 was amazing, you know, until it wasn't. There are a thousand different Java projects with their own XML files.
Many Java users ostensibly hate the language. It is no more evident than the strange contortions some put their Java code through in order to be considered “testable.” Many have stopped using constructors and have placed that code with -- oh, joy -- more XML files. This makes it easier to test Java classes.
J2EE was happily ignorable until Spring came to replace it, bringing with it loads more XML. As much as I wanted to use simple code, many of my project's Open Source dependencies began using a number of ideas from Spring, and they eventually began introducing their own dependencies on the framework. Gobs of XML had started to become unavoidable.
My objection to XML files is not really about XML. It is removing logic from code to place in external configuration that is wrong. It makes it so much more difficult to debug and write code. Plus, while developers have lots of tools to manage code, there are few tools that can do as good of a job managing all that external configuration. Besides, if a language is worth using, developers would happily put their logic in code and not external files.
It had gotten to the point that my Java career was defined more by the things I objected to than by the things I used. Nobody is famous for not writing Spring. It might be the right decision for the project, but no résumé boasts “expert in not using Struts2.”
I had begun to think of myself too much as a contrarian, defined by what I was not doing, but the problem was not actually that I was being negative. Instead, Java just did not fit how I work. In 2011, I devoted myself to learning Python and chose Django as my web framework.
Python and the community surrounding it have been
refreshing. Configuration is typically done in code, like Django's
settings.py. Writing code is not so arduous, so there is little
temptation to reach for an external tool. Testing and writing
“testable” code in Python is so much easier and natural that it is
rarely a problem. While testing methodology is a big topic in the Java
world, Python users tend to emphasize coverage. It is more about
writing tests than re-architecting whole projects to make testing
easier. Since making the jump to Python, it has been easy to actually
get excited by projects again.
When preparing this topic, I initially thought my goal for 2012 should be to strive to be less contrarian. But on reflecting on how much happier and excited I am now, I realize I no longer spend a lot of time being contrary. Instead, my goal for 2012 should be to continue learning from the community, to trust my instincts more, and to increase my Open Source contributions in the coming year.