Saturday, May 31, 2008

Coding in java after a two year affair with ruby

I was a professional java developer from 1996 to 2006.  From 2007 to present I've been a professional ruby developer.  This last week I've been forced to work in java again and OMG.  As a co-worker put it "java is like filling out government forms... in triplicate."

Some quick points that make ruby fundamentally better:

  1. Having to declare what type a variable is, is pointless busy work.  If I want to say username = 'andrew' it's pretty obvious username is a String.  Why oh why java do you make me fill out that G973-1 String variable requisition form?
  2. Having to put a semi-colon at the end of each line is a waste of time;
  3. begin end is sooooo much better than { }
  4. Having to enclose all if statements with ( ) is dumb.
  5. Being able to say username = 'andrew' if boolean all on one line is poetic.  No poems allow in government forms.
  6. Single quotes for non-interpolated strings and double for interpolated please!
  7. And of course no blocks, no easy loops, no easy arrays with the arrow arrow operator, no built in hash with the brackets, and you have to compile it!
Blackberries are very nice, but RIM only allows development in Java and ONLY on Windows.  I was forced to get VMWare Fusion and a copy of Vista to run on my mac.  Ugh.

The verboseness of Java doesn't prevent bugs or make more maintainable code.  There, I said it.