Making the best of Java?

2 points by clubhi ↗ HN
The last few years I've been coding in a Django/Linux environment. Before that I was a .NET programmer for a few years. I love Python and the community very much.

Recently my company has decided to rewrite our server code in Java. I'm having a hard time swallowing this pill. Coding in this language just seems horrible. Obviously there are people out there that love the language.

Do you guys have any tips for making the best of a bad situation?

4 comments

[ 3.3 ms ] story [ 34.7 ms ] thread
stop hating it! Speaking of your experience it seems to me you are still young and it seems you start to work with other languages such as C# in your childhood! there are load of similarity between C# and Java!!! if this is the case then you can't count those years as your professional years of your life! cause you still have problem with a programming language whereas the concept of being a software developer says : there is no comfort zone for you!
I think you are looking at it wrong. My take is that you are trying to solve problems in java by using things that you may have picked up while you were in django and .net world. Things are different here and the best suggestion I can give is to look at other projects first, get a grasp on some frameworks like springframework, look at samples and learn the patterns others use. Compared to most other languages, java is much more mature and has survived the test of time and has been refined extensively. Have a look at dropwizard from http://dropwizard.codahale.com/ its a good starting point.
Java is pretty grim, but it seems to be a popular choice for writing server side code. Do you want to work server side? if not then maybe do something else; life is too short to do something you hate.
Nothing wrong with Java as such. The red flag is the "rewriting" part. Assuming that your current server code is running well and meeting all the requirements, the decision to rewrite has a "smell" and statistically such rewrites are doomed.

If there are good reasons for the rewrite and there are competent resources on the project, then perhaps you could consider Scala or Clojure. They allow you to use JVM and gain many other benefits. Check out the respective web sites if you are interesting in championing such an approach.

Personally, I would just find another project / company. IMHO Java language is not the issue, it is the multitude of APIs and frameworks and the inherent accidental complexity of it all that trips up projects where suitable experienced team members are not available.