Mon
8
May '06
|
|
This is the second leg on the Road to Ruby enlightenment. It started with tutorials and first steps.
1. tutorials and first steps
2. talk, quiz and cookbook
3. red and gray
4. lambda, proc etc.
Ruby-talk
From ruby-lang.org I followed some links to the Ruby FAQ. Like the tutorials I read, the FAQ itself answered only questions regarding the language Ruby but lacked information about ‘good style’ or ‘the Ruby Way’. But the FAQ pointed me to the Ruby Talk Mailinglist. A few minutes later I was subscribed and messages started to come in[1]. There are just too many good posts to single out just a few. The mailing list archive (sorry) sucks, but fortunately the list is replicated via a ML-NetNews gateway with comp.lang.ruby which makes it possible to search for old posts via groups.google.com etc.
Ruby Quiz
After some time I noticed these strange posts to ruby-talk which had a [QUIZ] in the subject. I found the answer on rubyquiz.com:
What Is Ruby Quiz?
Ruby Quiz is a weekly programming challenge for Ruby programmers in the spirit of the Perl Quiz of the Week. A new Ruby Quiz is sent to the Ruby Talk mailing list each Friday. (Watch for the [QUIZ] subject identifier.) After a 48 hour no-spoiler period has passed, everyone is invited to contribute solutions and/or discussion back to the list. The following Thursday a Summary will be sent to the list, discussing the quiz, solutions and discussion. The next day, the cycle begins again.
The quiz is run by James Edward Gray II, who collects the solutions and writes a summary. A collection of quiz questions and solutions can be found on rubyquiz.com.
My favorites:
- Roman Numerals (#22)
the last part, about how to add Roman Numeral Constants - Code Cleaning (#26)
how to unobfuscate Ruby code - HighLine (#29)
useful and I did learn something - SerializableProc (#38)
magic, especially Florian’s solution - Sodoku Solver (#43)
I like sudokus and I like Ruby… - Dice Roller (#61)
the old roleplayer came through, this was the first quiz I played around with
PLEAC – Programming Language Examples Alike Cookbook
Another link I found via the FAQ was PLEAC-Ruby, a cookbook with a huge number of code samples. BTW, the PLEAC Project has cookbooks for other languages, too. Most of the examples were pretty obvious, but I recommend browsing through
- Arrays and Hashes, just to see more examples on what to do with them
- Patternmatching if you can’t remember all the regex magic
- Packages etc. and Classes etc.
But like most of the documentation found online, it was more about code and less about style.
Check back later, there is still more to come
[1] I read my share of mailinglists, but ruby-talk is the only list with such a high volume which still has a low rate of flamewars, bashing, etc. Keep it up guys, even though I don’t write much, I really like reading this list.
Just a quick note – the gateway between the mailing list and comp.lang.ruby has been gone for a couple of months now, and no one came forward to host it again. So, unfortunately, they are now separate communities. The mailing list remains where most posters are.
Thanks for the hint, I didn’t know that – this explains some missing posts.