Why's (Poignant) Guide to Ruby
Colonel Panic writes "Why the lucky stiff has written one of the most unusual (and poignant) books about programming that I've ever encountered. The best description for it so far (seen on comp.lang.ruby) is that it's sort of like 'The Little Prince meets SICP'. However, it defies all attempts at description (at least in this small space), you've got to read it for yourself. Like SICP, the full text is available for free. This one is destined to become a classic - it will likely be known to future generations of jobless American computer scientists as 'The Fox Book.'"
...for the code for the book.
The list archives are here and the project site is here.
The Army reading list
Altogether, Ruby just seems like an odd choice when it comes to really caring about teaching people to program. Not a bad choice, but not clearly better than the more obvious choices either.
The one advantage that Ruby has over Smalltalk and Logo is that it's included with every copy of OS X. So is Perl, but please, please, please nobody teach children to program using Perl. It could doom us all!
Python is included with OS X as well, so that would be a fine alternative. Me, I like Ruby. Just because.
=Brian
There is nothing so good that someone, somewhere, will not hate it.
Nifty, but this is about three chapters too premature to be posting it on Slashdot.
Seriously, the author is biting a LOT off and while one chapter is a good start, it remains to be seen whether the author is biting off more then they can chew.
Truthfully, many programming languages are easy but even in this introduction there are signs that this isn't going to go down as well as the author would like, like the "symbols" discussion which I understood perfectly but is likely to make, say, my zoology-trained wife go "huh? so what are they good for? why not just use strings?"
You can also over-simplify Perl or Python this way too but when you start discussing @ISA or __metaclass__es, you're in trouble, and there is often just no way around those things, esp. if you're trying to read the code of others.
I am hopeful this will turn out well; it looks like a lot of fun and is full-unto-overflowing with personality, which can certainly reach out to a new audience. But it is also extremely ambitious and will be time consuming, so I must confess to a little bit of pessimism that that quality of output can be sustained all the way to the end of the book.
Oh, and entirely seperately, comparing a single chapter of an otherwise-unfinished book to the SICP disrespects the SICP. You do neither work a favor by comparing the two.
Not really, Ruby is a very clear and consistent language, much more so than Perl and Python. Squeak/Smalltalk is okay but I feel Ruby is like "pragmatic smalltalk".
I think Ruby would be a great teaching language, it's so darn simple, everything is an object, including classes, everything responds to methods, there is no distinction between methods and fields, debuggers and profilers can be written entirely in Ruby itself without external hooks, etc.
PS: Python was originally a "sysadmin language" for writing scripts clearer than Perl, at least that's what I thought Guido wrote once.
Yukihiro Matsumoto (the creator of Ruby) has frequently and often stated that one of the reasons to program in Ruby is that it is fun. And I quote: "Fun is the most important thing in the world... Ruby makes programming fun."
This book could fit perfectly into that when it is done. Therefore I think I'll reserve judgement until later. Especially since Why's web site is the only geek site I've ever recommended to my non-geek friends just because it's so amusing and fun to read.
I do not have a signature
A variable is a box
Wrong. In C/C++ a variable is a box. In Ruby (as in Python and many other dynamic languages) a variable has reference symantics, making the "nickname" metaphore reasonably apt.
--
CPAN rules. - Guido van Rossum