Slashdot Mirror


Three Books About the Ruby Programming Language

DJSpray writes "I've written a review of three books about the Ruby programming language, available on my weblog here. The three books are Yukihiro Matsumoto's Ruby in a Nutshell from O'Reilly, Hal Fulton's The Ruby Way (Sams), and Programming Ruby: The Pragmatic Programmer's Guide by Dave Thomas and Andrew Hunt (Addison-Wesley). Note that the third book is available online here for those who prefer that sort of thing. Executive summary: while I have found several of the other O'Reilly Nutshell series books to be excellent, this one is riddled with errors, confusing writing, and omissions, and does not live up to O'Reilly's usual standards. Fulton's book is filled with good cookbook examples and well-written explanatory material, as well as solid tutorial examples, but it is not structured as a reference. The Pragmatic Programmer's book works well as a reference and covers language features in increasing depth, but with fewer examples. Ruby beginners may find that the latter two books actually complement each other nicely, while I can't recommend this edition of the Nutshell book at all."

45 comments

  1. What is Ruby? by mnmn · · Score: 0


    or rather where can it be placed. python and perl are fighting so hard for the place, and if you step out to real compiled languages, the dominance of c, c++ and java cannot be shaken. Languages like LISP and cobol and fortran have been mercilessly killed, but the remnant diehards will still insist its alive in some remote forest. So where does Ruby fit in... what is it anyway?

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    1. Re:What is Ruby? by bwt · · Score: 3, Informative

      Ruby is a competitor to both Python and Perl. In some sense, it is an attempt to combine the best features of each. My belief is that it succeeds well at this goal. It offers an even purer OO approach than python, while offering much of perl's strong syntactic sugar.

    2. Re:What is Ruby? by Anonymous Coward · · Score: 0
      The original poster inquired about the usage of Ruby, not the features. For example:

      I am writing a Windows desktop application with Internet connectivity. It needs to have a GUI, ease of installation and general portability among Win32 platforms. Can I use Ruby?

      I am writing a low-level routine to be embedded into MP3 player hardware to increase the functionality and add some features to the hardware piece. Can I use Ruby?

      I am writing a large content management system for the Web, it will be accessed by about a dozen journalists and editors, some routine features like ability to edit and comment on an article are required. Can I use Ruby?

      I am writing a large application the main purpose of which is generating the database reports and distributing the data from the wirelessly to multiple platforms within the organization. Can I use Ruby?

      And so on. Perl is an obvious choice for CGI, C for low level stuff, Java for server-side enterprise, C# for desktop apps. Where can I use Ruby?

    3. Re:What is Ruby? by Dr.+Photo · · Score: 5, Informative

      I'd place ruby somewhere between "a cleaner python" (at least, in terms of design-- ruby learned the lessons of Python for free, that Python had to learn the hard way...) and "a saner Perl"... (of course, Perl's insanity is half the fun!)

      It's got all the LISPy goodness of Python (and supports true closures & continuations, which IIRC are only to be found in experimental implementations of Stackless Python), the regexpy powerfulness of Perl, and the dynamic-OO cleanness of Smalltalk.

      I find it really makes programming fun again, and it's very easy to write extensions for it in C (or C++, if that's your bag, baby)... in fact, using ruby as the "brains" behind a bunch of C modules gives you the silly-fast speed of C, while correcting C's worst deficiencies (you get free GC, safer string handling, namespaces, OO, etc.)

      Ruby's "chock-full of heady goodness", and definitely worth adding to your repertoire.

    4. Re:What is Ruby? by Anonymous Coward · · Score: 1, Insightful

      please don't suggest that non-compiled languages aren't "real" ... there's so much run-time dynamic stuff happening with compiled languages and modern CPUs, and so much pre-processing in "scripting" languages that the distinction will become more and more blurred as time goes on.

      I use Ruby, Perl, and C for ALL my programming these days, and I don't distinguish between them in those terms any more.

    5. Re:What is Ruby? by Dr.+Photo · · Score: 1

      The original poster inquired about the usage of Ruby, not the features. For example:
      - I am writing a Windows desktop application with Internet connectivity. It needs to have a GUI, ease of installation and general portability among Win32 platforms. Can I use Ruby?


      Yes.

      - I am writing a low-level routine to be embedded into MP3 player hardware to increase the functionality and add some features to the hardware piece. Can I use Ruby?

      Probably, though you'd want to do the low-level stuff as a C extension.

      - I am writing a large content management system for the Web, it will be accessed by about a dozen journalists and editors, some routine features like ability to edit and comment on an article are required. Can I use Ruby?

      Definitely.

      - I am writing a large application the main purpose of which is generating the database reports and distributing the data from the wirelessly to multiple platforms within the organization. Can I use Ruby?

      Yawp. You're a natural candidate for this language, y'know... ;-)

      And so on. Perl is an obvious choice for CGI, C for low level stuff, Java for server-side enterprise, C# for desktop apps. Where can I use Ruby?

      I use ruby for CGI, database stuff, as a smarter replacement for shell scripts, and general application programming (and it's easy to extend ruby with C modules, so even the low-level stuff is covered); call me a language bigot, but for me ruby has become the language of choice.

      Try it.

    6. Re:What is Ruby? by MOD+PARENT+FAIL+IT! · · Score: 0

      can I ask what toolkit you're using to write ruby GUIs? I have not had much success finding a good one.

    7. Re:What is Ruby? by pmz · · Score: 1

      Ruby's "chock-full of heady goodness", and definitely worth adding to your repertoire.

      Where should Ruby rank among the other 4385 lanugages and APIs that everyone says are worth learning?

      I really don't mean to troll, but the fact that programming languages are still so volatile is good evidence that programming languages are still in their infancy. By volatility, I mean that every 6 months or so, a brand new "must see" language is invented, develops a "growing userbase" of neophytes and zealots, becomes "production quality", gets several books written about it, and is adopted by a few risk-taking companies in real projects.

      I've seen software get written in such languages (Lisp, then Perl, then Java, then Python, etc.), where all that work will not carry over when the "next big language" is invented and becomes popular among interns (because who wants to learn something unfashionable like Lisp?). .NET is absolutely not the answer to this, as .NET is really multiple facades of the same thing wrapped up in a single-vendor bend-'em-over solution from a un-trustworthy company. The fact is that there is no good solution.

      This is probably why most software is still written in C and C++, even though they are bug-magnets, because they are most definitely not going anywhere for a long time.

    8. Re:What is Ruby? by Dr.+Photo · · Score: 1

      Try the FOX toolkit. (If you're using the standard Windows build, you'll find it's already there, along with tons of example programs.)

    9. Re:What is Ruby? by Anonymous Coward · · Score: 0

      I have not looked at Ruby due to lack of time but it sounds interesting. It kind of reminds me of the early 80s when everyone and there brother was writing new programing languages. Remember Promal, Comal, Action, Pilot, Prolog, and of course Logo. For a while it calm downed a bit with c and pascal and some flavors of Basic being the main stays. Then came OOP, and scripting languages. Now everyone and there cousin are writing programing languages again. It seems cyclical to me. In the near future I think people are going to settle down and start writing more programs and few programming languages. I think Perl is going to be one of the big winners with maybe Python or Ruby. Of course a flavor of Lisp or small talk could jump out from no where.

    10. Re:What is Ruby? by mnmn · · Score: 1


      Well said!

      My programming language has the speed of C, regex of perl, portability of Java, and every goodie of every language before it. Better learn it because it makes development SO fast and intuitive. So many programmers are flocking to it.

      But doesnt that make my language LESS faster than C, LESS portable than Java etc??

      The market is so variable, new niches are created and old ones destroyed. Cobol WAS a good language for what people did once upon a time. That entire niche has disappeared, automated and all its tasks fully programmed into other libraries that are simply imported and used. Software structures have changed so Cobol is no longer needed. Yet the pressure on /bin/sh grew so much even bash and zsh weren't sufficent. Perl came in at the right time and for the lifetime of this niche.. as long as people will be trying to automate tasks in UNIX, perl will live a good life. Should everything evolve into GUIS perl might be replaced with another language that tends to those needs better...

      C will sit tight. Even C++'s use is shaky and its market has had huge lumps bitten off by java and now C#. But C is the very basic language over the assembly and everyone and his grandfather knows it. It is so simple as a language, its like riding a bycicle, you dont forget it.

      But what is Ruby?? Where does THAT come in? Make a language as pretty as you want, market it better than C# but that doesnt change the markets needs. Pythons found a small foothold next to perl, partly into installations part in GUIS using QT, but is Ruby trying to nudge Python now to hold on one toe?? I can already see Ruby in freefall... screaming... screaming stories of its goodness on slashdot.

      --
      "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    11. Re:What is Ruby? by mnmn · · Score: 1


      Language Bigot!!

      --
      "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    12. Re:What is Ruby? by Dr.+Photo · · Score: 1

      Where should Ruby rank among the other 4385 lanugages and APIs that everyone says are worth learning?

      I'd put it pretty high on that list... :-)

      I really don't mean to troll, but the fact that programming languages are still so volatile is good evidence that programming languages are still in their infancy. By volatility, I mean that every 6 months or so, a brand new "must see" language is invented, develops a "growing userbase" of neophytes and zealots, becomes "production quality", gets several books written about it, and is adopted by a few risk-taking companies in real projects.

      Ruby originated in Japan in 1993. It's been pretty stable interface-wise for at least the past 3 years.

      This isn't flash-in-the-pan stuff. Perl, Python and Ruby simply aren't going to disappear, so put your fears to rest.

    13. Re:What is Ruby? by Dr.+Photo · · Score: 1

      But doesnt that make my language LESS faster than C, LESS portable than Java etc??

      Well, with any interpreted language you've got a certain unavoidable overhead. But when you can easily integrate it with compiled C code it quickly becomes a non-issue. Ruby programs run the same across the ports to various OSes, which is something that Java was supposed to do.

      The market is so variable, new niches are created and old ones destroyed. Cobol WAS a good language for what people did once upon a time.

      If you enjoy programming in COBOL, perhaps ruby is not for you.

    14. Re:What is Ruby? by Dr.+Photo · · Score: 1

      *grin*

    15. Re:What is Ruby? by eidechse · · Score: 1

      Let me get this straight...above you ask what ruby is and then proceed to make pronouncements about it's "freefall" and imply that it's some sort of slashdot fad. The damn language has been around for 10 years. Rather than waxing prolific about the obvious uses of C/C#Java/Perl/Python why don't you take a look at Ruby? If don't care or don't want to, fine. Making sweeping generalizations about market forces as applied to programming languages as a means to discredit a language you admittedly know nothing about is pendantic at best.

    16. Re:What is Ruby? by Anonymous Coward · · Score: 0

      Lisp is hardly dead. LISP maybe. But anyone who writes Lisp as LISP is seriously out of touch.

  2. Ideal language by greenhide · · Score: 0

    I've always read that many people consider Ruby to be an excellent programming language.

    I wonder, then, why it doesn't seem to have that many developers using it? Is it only because it is new?

    --
    Karma: Chevy Kavalierma.
    1. Re:Ideal language by bwt · · Score: 4, Interesting

      Many people who might like ruby better are happy enough with perl and python. Perl has a much larger class library because it's the established player. Many people who were dissatisfied with perl's loosy-goosy style and OO approach probably already left and went to python.

      At some point many potential switchers say "OK, maybe ruby is slightly better at this and has this other advantage, but I can live without that slight advantage because I get a bigger community and class library to draw from by staying with [perl|python]"

      Personally, I don't find that argument persuasive because I think it's good to know more langagues and I give my first look to ruby and fall back to python or perl only if I need class libraries that I don't want to write myself.

    2. Re:Ideal language by Anonymous Coward · · Score: 0

      Hmmm...nine responses to this thread. Looks like the entire global community of Ruby developers has checked in...

      Do yourself a favor and learn Python.

    3. Re:Ideal language by Anonymous Coward · · Score: 0

      right, exactly. I love the fit and finish of ruby, but every time I sit down to write a big project with it, I realize I can't get all the cool modules that Perl has. I'll hunt around, find something that doesn't quite work right or handle all the special cases, and give up and go back to Perl.

      Plus installing new modules on ruby isn't as cool as Perl, with CPAN and all..

    4. Re:Ideal language by DJSpray · · Score: 1

      I am not knocking Python, but I have been investigating Ruby specifically because there were aspects of Python that I didn't like. I'm probably much more anal-retentive than the average developer; purity and consistency in the language design means a lot to me.

      I've got a number of gripes with Ruby, but fewer than I had with Python. Among the many features I didn't like in Python were the lack of a consistent Boolean type and the lack of standard closure semantics. Instead, we get values evaluated in a Boolean context, which reminds me of all the things I didn't like about Perl. I also have been consistently given the impression that Guido is not really friendly to the functional programming community and the language will not evolve to be more supportive of the functional programming paradigm.

      For context, my favorite programming languages have been Apple's NewtonScript, which was a very small language with an exceptionally clean design, and Dylan, which is not so small, but which makes Lispish programming paradigms available with a very clean Pascal-like syntax. Yep, I back the winners : )

      Ruby also seems to represent a good merging of functional and object-oriented style; everything is truly an object, with no distinction between classes and types (Python is getting around to erasing this distinction as well, it seems).

      Ruby has a lot of minor inconsistencies and things I don't like. I'm hoping perhaps I can get my voice heard on some of these issues. I'm not really in favor of including a lot of the Perlisms as part of the core language, but it seems like an excellent project to support.

      In addition, I've been able to link Ruby into my C and C++ application code easily as a runtime support library and set up calls back and forth. That impressed me. Deploying Python this way has seemed harder, although maybe it can be done and I just haven't figured out how yet.

  3. Ruby's biggest problem by metamatic · · Score: 2, Interesting

    I like what I've seen of Ruby. There's just one snag: no UNICODE support except via libraries.

    I already know Perl. I'd like to learn something cleaner, and Ruby looks like exactly what I'm looking for. However, I'm not prepared to put in effort learning yet another language that doesn't have native multilingual text support.

    Doing everything via library calls to get UNICODE support is an ugly hack... and like I say, I know Perl, so my ugly hack requirements are already adequately met.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    1. Re:Ruby's biggest problem by josephgrossberg · · Score: 1

      At the risk of starting a flamewar ... have you looked at Python?

      I've found that once you get over the superficial (e.g. whitespace matters), it's really an enjoyable language to use -- even when you have to read someone else's code.

    2. Re:Ruby's biggest problem by aziegler · · Score: 1

      Whitespace matters ... which means that to me that Python doesn't matter to me.

      A language is no good if it forces me to format things in its style without letting me work in my style.

      I understand Python just fine, I just don't like it (and, to be quite honest, it isn't OO enough for me; having to pass self in all the time feels entirely too much like Perl, and so does the fact that some things are functions and others are methods).

      -austin, shameless Ruby advocate, http://www.halostatue.ca/ruby/

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
    3. Re:Ruby's biggest problem by josephgrossberg · · Score: 1

      I'd imagine you hate Java's "this" keywood too? ;)

      I do like the fact "everything in Ruby is an object."

      The whole whitespace thing weirded me out at first, but then again so did Ruby's "$" and "@" operators -- I initially thought to myself "Ugh. It's Perl again."

      The whitespace rules help prevent people from getting lazy and sloppy about their code formatting -- plus it prevents the choice between (1) debates about "proper" style (2) having to read multiple styles on the same project or (3) having someone other than Guido dictate your style. :)

      - Joe (who loves Python, is very pleased with what he's seen of Ruby so far, has a love-hate relationship with Perl, and thinks Java is too wordy)

    4. Re:Ruby's biggest problem by aziegler · · Score: 1

      Java doesn't require that I do:

      class Foo {
      int bar(this, ...) { }
      }

      Python does.

      Ruby, to me, is far more intuitive. I mentioned as well that I find that Python's stupid whitespace scoping doesn't let me work *my* way, which is to place certain temporary debugging lines flush left so that I can quickly find them to remove them when I've tracked down a bug. That idiocy (not letting me work *my* way) is exactly why I won't use Python.

      -austin

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
  4. note by pizza_milkshake · · Score: 1

    note: these books are all several years old; nothing new here

    1. Re:note by Anonymous Coward · · Score: 0

      Ruby hasn't even been around for several years you moron...

    2. Re:note by DJSpray · · Score: 1

      Well, yes; the copyright dates are 2001 and 2002. The version of Ruby designated stable is several years old as well, so I'm not sure this is a big liability; changes between the Ruby these books describe and the Ruby on your system are likely to be bug fixes, not major changes in functionality.

      Paul

    3. Re:note by aziegler · · Score: 1

      Ruby 1.8 is supposed to be released Real Soon Now, and it includes a number of significant changes (see Programming Ruby Two, a Wiki page about a hopeful second edition of Programming Ruby covering 1.8.) -austin

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
    4. Re:note by DJSpray · · Score: 1

      Ruby is actually ten years old, as ten seconds looking at http://www.ruby-lang.org/en/ would have told you.

    5. Re:note by aziegler · · Score: 1

      Ruby just celebrated its tenth birthday. However, it has only been on the radar in the West for about three or four years.

      -austin

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
  5. I own two by Fished · · Score: 3, Interesting
    I own Ruby in a Nutshell and Programming Ruby. For the most part, I agree with his assessment. Ruby in a Nutshell was originally published in Japanese only. My impression is that it was translated by someone with limited experience; everything is syntactically correct, but the writing style is wooden and it's just not a very interesting read.

    However, I think the Practical Programmers' book is much better than you give it credit for. It does a credible job of introducing an experienced programmer to the Ruby Language (although it's really not for those who are not familiar with an Object-Oriented Language). I have found that that is my standard Ruby resource.

    Incidentally, I only picked up Ruby a few months ago, and have found it to be a great language. Unfortunately, some of the support is not yet there. I've ended up doing my latest project in Java because I don't want to lock myself into a language that will not support high-end scalability features.

    --
    "He who would learn astronomy, and other recondite arts, let him go elsewhere. " -- John Calvin, commenting on Genesis 1
  6. Ruby Developer's Guide also good by bwt · · Score: 3, Informative


    A 4th book on Ruby that I kind of like is _Ruby Developer's Guide_ by Robert Feldt, Lyle Johnson, Michael Neumann (Editor), Lyle Johnson, Jonothon Ortiz.

    This has a series of chapters on more applied topics that would be good for the Slashdot programmer audience: DBI, XML, SOAP, Performace, Parsers, etc... The book is a little wordy, but the topics covered are very useful and it imparts a lot of useful information for people who don't want to relearn basic syntax.

  7. ruby is great by Anonymous Coward · · Score: 2, Informative
    I love Ruby. Unfortunately it still seems young and immature, in terms of libraries. There's nothing near the choice and quality that Perl has (for instance I was looking for a high-quality MIME library like MIME::Tools but there doesn't seem to be one for Ruby, just some very basic libraries that probably wouldn't be appropriate for high-volume mail processing).

    I use it for all my basic scripting needs though, and like I said, I really love it. It's OO makes a lot of sense, the block-passing stuff is awesome, and you can do perl-esque stuff like easy regular expressions.

    Basically I was looking for a good OO language, and although Python is okay, and I like the whitespace blocks, the language doesn't "feel" right to me. Also it seems to be changing every now and then so I'll probably wait until a few more evolutions before I look at it again.

    I have the O'reilly book and yes it does read like it was translated from Japanese but I haven't found any factual errors. I use it regularly for reference.. I don't think I'd avoid it like the reviewer does.

    The Pragmatic Programmer book is probably the best one, I have the paper copy and I'm currently trying to reformat the HTML version to fit on my Zaurus.. there is an XML version but it's really weird. For instance it uses

    between paragraphs rather than AROUND them.........

    Anyway if anybody out there is interested in a good OO language and is getting impatient waiting for Perl 6, check out Ruby.. I'd love for it to mature some more and move in from the fringes................

    1. Re:ruby is great by mhesseltine · · Score: 1

      For future reference, to show HTML/XML tags in an HTML formated posting, you have to use "ampersand lt semicolon" to get "<" and "ampersand gt semicolon" to get ">" around the tag.

      I had to read source to find out what your complaint was.

      --
      Overrated / Underrated : Moderation :: Anonymous Coward : Posting
  8. I do love a discussion about LOC... by Anonymous Coward · · Score: 0

    I have to make a couple of comments, some of which have been made elsewhere, some of which have not.

    Where do you get off saying that Lisp and Fortran are dead? Are you trying to start some flamewar? Maybe they're not used routinely by the majority of programmers, but they're very important in the fields they do get used in--which may be more broad than you think.

    And that doesn't mean to say that I'm "insisting they're alive in some remote forest." Unless you consider numerical computing remote, of course. Lisp is enjoying a renaissance of sorts, I believe, as people are beginning to understand how flexible it is. Recent discussions of aspect-oriented programming have many realizing that Lisp effortlessly incorporates every "new" programming paradigm that comes about, and often has had it for some time with a different name.

    In any event, language utility shouldn't be evaluated entirely by how many people are using it. Libraries and user bases help, of course, but every language starts somewhere, and that somewhere is with people who love the language for itself.

    I have no apologies for COBOL, on the other hand.

    About your question: where does Ruby fit in?

    As another poster noted, Ruby suffers a bit from its late introduction into the scripting trinity. Perl is the most established, but is ugly in many ways (and I say that as a routine Perl writer). People who got sick of Perl went to Python, but a bit too soon in many peoples' opinion.

    Somtimes I think that if Ruby had been released at the same time as Python, there probably wouldn't be a Python right now. I tend to feel it's everything that Python tried to be but wasn't quite.

    Ruby gets it right. Now, the question is, will it be able to catch up? I don't know, but I hope so. It will all depend on new programmers and how they are taught. My guess is, at best, those who are new to programming will take a look at the three languages, and those who admire Perl's resource base will use that, those who admire Ruby's cleanliness will use that, and Python will either get shafted or draw adherents of those who want a little of what Perl and Ruby have to offer.

    So what's my answer to your question? That it doesn't do anything different from Perl or Python, really. But you could turn that around and say that Perl doesn't do anything different from what Python or Ruby does, or that Python doesn't do anything different from what Perl and Ruby does.

    It's really a matter of syntactical preference and resource base. And with scripting languages, you have the two issues opposed on different ends of the continuum, with Perl being the ugliest but the most resourced, Ruby being the cleanest but the least resourced, and Python being somewhere in between.

    It's all a matter of where you fall in that classic programmer's dilemma: how much do I give up old and ugly but established for new and clean but unestablished?

    Let's be thankful that we have the choice with scripting languages--there's really room for everyone. I don't honestly think that's true of lower-level languages.

  9. Old Languages Never Die by fm6 · · Score: 1
    LISP and cobol and fortran have been mercilessly killed,
    Not true at all! They don't attract the massive interest they used to, but these languages are hardly dead. LISPlike (there's no one "official" LISP) languages are popular with the AI and functional development crowds -- one is used as a scripting language in GNOME. I've never liked COBOL, but big bureaucratic organizations still use it. And you can't hope to sell a supercomputer if it doesn't have a FORTRAN compiler!

    Does the latest FORTRAN standard still allow you to assign to constants (pass "3" to a call-by-value parameter and you risk getting that number redefined!)? I'd think that 50 years is plenty of time to fix that particular design bug, but you never know!

  10. Slower than C... by Big+Sean+O · · Score: 1

    But doesnt that make my language LESS faster than C,

    The standard Pythonista answer is that in most programs, 80% of the time is spend in 20% of the code. Profiling and careful optimization usually gets the performance hit down to the magic phrase "less than noticable".

    The other half of the Pythonista answer is that working at a very-high level makes rapid application development possible. Your programs end up well factored because it's easier to rearchitect things.

    Kent Beck calls it "First Make it Work, Then Make it Right, Then Make it Fast" and Don Knuth says "Premature Optimization if the root of all evil in programming". I think in the long run, C will end up occupying the same niche Assembler once held: You use it to extract extra performance when you need it, otherwise you use the higher level language.

    (Caveat: I recently read the Debugging chapter in Python in a Nutshell. Most of the arguments are paraphrased from Alex Martelli's excellent writing. I'm simply not this intelligent usually... :-)

    --
    My father is a blogger.
  11. Not all syntax is equally confusing. by Anonymous Coward · · Score: 0

    I respect people's love of Python.

    For me, though, there's a distinction between whitespace and @ and $ operators.

    It's at a different level of cognitive problem.

    "@" and "$" are each just another symbol. Maybe weird, but not that weird relative to other symbols that get used in progamming languages (e.g., "&", "&&", "|", "::", etc.).

    Whitespace, on the other hand, has a different meaning. It's empty space--it doesn't have much meaning in an absolute sense. Python advocates point out that we all put spaces in to denote blocks of code, but really, it's a very flexible thing--very fuzzy, so to speak, and not really integral to the meaning of the code in an absolute sense. The space is more akin to nonverbal human language--it helps, but isn't necessary.

    The whitespace issue is comparable to the parenthesis issue with Lisp: something that's such a mindfuck that you can't handle it easily. I agree that weird symbols are weird, but some symbols just induce insanity.

    1. Re:Not all syntax is equally confusing. by josephgrossberg · · Score: 1

      Umm ... once you start using it:

      * You're probably using an editor that'll auto-indent (from emacs to Visual Python), so you don't have to do it consciously
      * It looks just like properly-indented code, so you don't have to read the whitespace. Believe me, you're not there saying "Hmm. This is indented so far, so I think it goes with that!"

      In other words, the whitespace in Python doesn't have as much meaning as you seem to attribute to it.

      Almost no one has to hit the spacebar 16 times (unless you're using Notepad for all your coding). And good C, C++, Perl, Java, Visual Basic, etc. is indented in blocks anyway.

  12. one vote for The Ruby Way by bill_mcgonigle · · Score: 1

    Just picked it up at Borders a couple weeks ago and I'm only a few chapters in, but so far it's very well written and succeeds in anticipating the programmer's questions. The book claims it can't teach you Ruby, but they underestimate themselves. Granted Ruby's "just another language" for me, so if you're a new programmer this isn't your book, but if you're an experienced programmer this book does a great job.

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  13. You're so right about Unicode! by GCP · · Score: 1

    Matz has made it clear that the design of Ruby is based first and foremost on making it easier for him to do his own work, which he has stated is primarily in the Japanese Unix encoding EUC-JP. He says "EUC-JP is good enough for me" and "Ruby's internationalization strategy is whatever doesn't interfere with my Japanese work".

    Well, if EUC-JP good enough for him, then he clearly doesn't build globalized apps. It's the Japanese equivalent of a US language designer saying, "I want my language to be optimized for 7-bit ASCII, which is good enough for me." (Which, of course, is the history of many old programming languages from the days of standalone, unconnected computing, but he still takes that approach today in the era of the WORLDWIDE Web.)

    His provincial attitude about Unicode tells me that though Ruby's design is full of great ideas and he is a gifted language designer, ultimately Ruby can't be taken seriously as a production platform if you have any international ambition at all.

    (On the other hand, something like a Ruby.Net or JRuby that used .Net or Java Strings might be a great tool if the performance could be made acceptible.)

    --
    "Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."