Approximity blog home
1 of 1 article InfoSyndicate: full/short

It feels good to be back coding in Ruby   14 Nov 04
[print link all ]
Right now I code again in Ruby .. oh boy it feels soooo goood after a week of coding in brain-dump Java.

Frameworks in big companies: Some designers develop the specs. Then another company implements it, then a 3rd company is forced to use it .. which means make it usable first. Why don’t these designers eat their own dog food and actually implement real apps in their oh so great frameworks. Architects ..

I just now had to look sth. up about REXML. and came across this :-).

 First off, Ruby does iterators differently than Java. Java uses a lot of
 helper classes. Helper classes are exactly the kinds of things that theorists
 come up with... they look good on paper, but using them is like chewing glass.
 You find that you spend 50% of your time writing helper classes just to
 support the other 50% of the code that actually does the job you were trying
 to solve in the first place. In this case, the Java helper classes are either
 Enumerations or Iterators. Ruby, on the other hand, uses blocks, which is
 much more elegant. Rather than:

 for (Enumeration e=parent.getChildren(); e.hasMoreElements(); ) { Element child = (Element)e.nextElement(); // Do something with child }

 you get:

 parent.each_child{ |child| # Do something with child }

 Can't you feel the peace and contentment in this block of code? Ruby is the language Buddha would have programmed in.

Should I start talking about Java-Beans now?

 

Powered by Rublog