pythonaro.com

Pythonaro blog

29 October 2007

Pain can be useful

So, I've spent a few hours improving my little J2ME project. It's pretty much done, what I need now is a little bit of polishing and, more importantly, the server-side app, which I just started to "conjure up" in django.

I didn't remember how painful Java development can be. Fixed-size arrays, .put() and .get() every five seconds, loads of redundant declarations (if a method can only return a String, why should I also declare that a reference to the result is of type String? what else could it be?), not having an interactive environment to quickly test out ideas. Eclipse goes a long way to reduce the pain, but it's still so much more painful than doing the same thing in Python. And when everything is done... NullPointerException.

The good side is that fear of pain forces you to really think things through before you write them down. In Python, I end up re-writing things over and over again, because there's no (perceived) penalty in doing it, and I more or less "code my thoughts"; of course, I eventually end up spending lots of time on this sort of messing.
With Java, I'm forced to think about the proper structure up-front, because I dread having to write it down more than once; but this means that it's then a matter of monkey-coding a clear structure, and once it's done, it's done, and I can get on with other things.

Labels: , , , ,

posted by GiacomoL @ 2:51 PM   4 comments links to this post