Oct 05 2009

Ruby Programming Challenge For Newbies: a chance to improve Ruby knowledge

Category: rubygiordano scalzo @ 11:05 am

Some day ago, I stumbled upon on a post by Satish Talim in his useful Ruby Learning Blog, announcing a Ruby Quiz for Newbies:
what a wonderful opportunity to learn better Ruby and Rspec!

The first challenge was proposed by a Fabio Akita, a well know Ruby and Rails evangelist, and it’s about a script that add, or subtract, an amount of time from a subtitles file.

I discovered the challenge a bit late, so I’d to rush to complete it in time, but I’m quite satisfied with the result; I don’t like the IF in main method, and it’s lack a robust correctness checking of command line’s arguments: I’ll try to remove explicit conditions and clean more in next challenge.

I pushed my attempt to GitHub, http://github.com/gscalzo/ShiftSubtitle, so I can improved it, after seeing other partecipants’ entries.

I have to credit solution to check System.exit to Charles Feduke: Thanx Charles!
Next quiz is scheduled for 9th Oct. 2009 proposed by Chris Strom: I really looking forward to it!

Update
I have to buy a mac! ;-)

Technorati Tags: , ,

Tags: , ,