Slashdot Mirror


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.'"

13 of 60 comments (clear)

  1. Re:Bad name by Discordantus · · Score: 2, Insightful

    For instructional purposes, I imagine it is much easier on the student to speak of decimal numbers than to launch into an explanation of binary, much less the true nature of floats. I can grok it, and you (presumably) can grok it, but that's due to long-term exposure. This is obviously aimed at being a lightweight text, not one that gets into the mucky internals. there are plenty of those around, but this is the first programming tutorial that I would feel comfortable giving to someone who is just interested in learning to program as a novice.

  2. seems like an odd choice by ajagci · · Score: 3, Insightful

    Children could be taught to program early in their school years.

    Yes, and that's what we have languages like Logo for. Or, if you want something readable and more adult, Smalltalk (and the Squeak.org environment). Python, of course, originally also was designed for education.

    Ruby is a nice language, but I don't think it comes out of an educational background. It syntax is cleaner than Perl's but doesn't seem like it would be all that intuitive to non-computer users either (both Smalltalk and Logo seem better in that regard).

    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.

    1. Re:seems like an odd choice by Anonymous Coward · · Score: 4, Insightful

      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.

    2. Re:seems like an odd choice by ratboy666 · · Score: 2, Insightful

      Ruby syntax *is* Smalltalk syntax. With some extra bits...

      So, I take it that you really don't know Smalltalk or Ruby?

      | a b c |
      | a, b, c |

      Smalltalk and Ruby for local variables... Etc.

      --
      Just another "Cubible(sic) Joe" 2 17 3061
    3. Re:seems like an odd choice by RevAaron · · Score: 2, Insightful

      Ruby may claim to be (Perl + Smalltalk) / 2, but the syntax really isn't all that much like Smalltalk. The influence is certainly there, there is no doubt about that... But Ruby syntax is not Smalltalk syntax.

      So, I take it that you really don't know Smalltalk?

      Sure, defining local variables is similar. But there are plenty of other differences. That whole dot-operator is one among many.

      I'm a Smalltalk coder who also knows Ruby. I continue to choose Smalltalk over Ruby for a number of reasons, including the environment/IDE of any Smalltalk (GNU Smalltalk excepted) is better than anything I've found for Ruby so far.

      But then again, to each his own. I'm not dissing Ruby, so don't fllp.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  3. Nifty, but... by Jerf · · Score: 4, Insightful

    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.

  4. Re:Bad name by FedeTXF · · Score: 2, Insightful

    I don't criticize the tutorial. I criticize the language.

  5. gaaaah! by Jim+Morash · · Score: 2, Insightful

    So painfully self-aware, cutesy, and po-mo-ironic that I think it gave me a stomachache.

    Otherwise, it's pretty good.

  6. Re:Bad name by __past__ · · Score: 3, Insightful

    C and derived languages have a datatype called "integer" which is actually just a small subset of integral numbers, as well as a datatype called "char" which doesn't hold characters at all, but is a subset of "integers". This doesn't seem to have stopped their adoption, even if it contributes to the aquired stupidity common amongst their users.

  7. Re:Bad name by Discordantus · · Score: 3, Insightful

    I'm not sure I follow... a glance at ruby's docs implies that it uses good 'ol IEEE 754 standard floating point numbers, and it calls them... "Float"s. Another look shows that the "BigDecimal" library /module/thingy actually uses decimal arithmetic. So I'm uncertain what you are criticizing...

  8. Re:Classic, huh? by ichimunki · · Score: 4, Insightful

    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
  9. Two Words. by ThetaPi · · Score: 2, Insightful

    Chunky.
    Bacon.

    I like the comics, they are sometimes funny and make concepts easy to remember. They may be silly, but people will remember them because of that. Hopefully, they will remember the concepts too.

    --
    "When God kisses Satan and the Incarnations applaud." "Death is dead. Long live Death!"
  10. Recommendation: do not skip ahead for 'the meat' by dankelley · · Score: 2, Insightful

    Normally, very little is lost by skipping ahead in a technical book. You're in a rush, and you just want to know how the new language maps into other languages you know. It is probably a mistake to read in this skip-ahead way, but in many cases the writing is so unengaging that we cannot stomach reading it all.

    Well, the defining characteristic of this "book" is that some readers will find it enormously engaging, so much so that they will read all the words, starting at the start. This is quite an accomplishment for the writer, and it might be very beneficial for readers who enjoy the style, since Ruby is probably not best learned by analogy to the other popular languages.

    The book is aimed at newbies, but experts might also find it amusing or perhaps even insightful.