in

 

joeyDotNet

Doing business until He comes or calls -- Luke 19:13

Ruby, so easy a wife can do it

I just have to share this.  So my wife asks me why I'm learning this new thing called Ruby.  She's usually not interested in the specifics of the programming languages I use.  (A few years ago, she asked me, "what's that C-Pound book you're reading?"  :)

So I broke out a pen and paper and wrote these 2 lines:

  • DateTime.Now.AddHours(1)
  • 1.hour.from_now

I asked her which one did she think was easier to understand.  She said "obviously, the 2nd one".  Bingo!

Then I wrote her another couple of lines:

  • for (int i=0; i<=3; i++) { // do something }
  • 3.times.do //something

Same question and she pointed at the first one in disgust and again said the 2nd was much easier to write.  Then she asked me why I'm not doing everything using the 2nd one.  Sadly, I couldn't really come with a good answer to that one except to say that it's just now gaining traction (even though it's been around for long time), it's open source, it doesn't come from Microsoft, blah blah.

Needless to say, the fact that my wife is telling me I need to start using Ruby more is definitely a sign.  Just not sure of what it's a sign of...

Published Sep 15 2007, 08:57 PM by joeyDotNet
Filed under: ,

Comments

 

jlockwood said:

Preach it brother!

September 17, 2007 8:32 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Copyright Los Techies 2007. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems