Wednesday, January 31, 2007

Well, as we close up the January contest, it's time to get a new one started. Same rules, you enter by writing a blog post responding to the question below, and linking to it in the comments section. At the end of the February, Peter Cooper (the author of Beginning Ruby: From Novice to Professional, head of Ruby Inside, and this month's guest judge), Jason Gilmore (the Apress Editor), and I will take a week to pick our favorite and announce it. The winner will win three Apress books of their choice.

With that in mind, let's move right on to this month's question:

Last month Jarkko Laine asked "How has Ruby on Rails made you a better programmer?" This month I want to ask, "How has Ruby blown or stretched your mind?" Initially you might think the same answer applies as to Jarkko's question, but what I am specifically referring to are the things in Ruby that have made your brain race and go "wow!", even if you've never bothered to go on to use that feature much (if at all!)
Most Ruby programmers have come to the language from another. I came from Perl, which had already blown my mind with its development style, having previously come from the monolithic, strict worlds of Pascal and C. At each language transition, I have initially resisted and refused to look at the new programming language with an open mind, instead comparing it to my current language. Transitions are hard, especially when you're invested many years in your current techniques, but even though it can take a real effort to start on something new, especially a programming language, I've found that once those "Wow!" moments start coming along, you rapidly become a convert.
What were your "Wow!" moments with Ruby? Do you still get them? Are you just intellectually impressed when they come along, or do you actually become truly excited (keep it clean please)? What were the moments and the things that you saw that made you want to give your first-born to Matz and live in Ruby land happily ever after?
To kick things off, I will shortly be blogging my own answer to this question (although I won't be eligible for the contest, naturally!) but I look forward to getting to see what it is that's made you excited about Ruby, especially if I get to experience some new "Wow!" moments I haven't had before!

And while you head off to write you masterpiece, I'll be off reading through a stack of great entries from last week's contest.

Taking a class from somewhere else, evaluating it, and deciding it needs new or modified functionality at runtime is mind blowing. You can literally do anything! Pass around packets of functionality and mix and match as needed.

- first of all (as probably for many others) - blocks.Its a totally cool feature man ...

I came to Ruby from BASIC -> Turbo Pascal -> UNIX and DOS C -> Java -> Python (and liked and still like all of them - yeah - even BASIC! its good to whack some quick code up in ..., though I hardly use it nowadays). I don't know of any such feature in those languages, though there may be - I'm not a language lawyer, just a fan ...

- open classes are pretty good feature too.

- really like attr_accessor and its ilk too; the ability to call getters and setters as though they're fields of an object shortens code ...

- and last but not least, "everything in Ruby is an object" is a great one as well.