from Hacker News

Hello Ruby – Almost there

by yorak on 8/3/15, 7:22 AM with 122 comments

  • by pluma on 8/3/15, 10:40 AM

    I'm not sure whether Ruby is a good intro to programming.

    It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't). What would syntactically be a reference to a method in other languages instead invokes the method with no arguments. It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truck" approach to imports). I could go on.

    Ruby isn't widely used in practice (although its users tend to be vocal and particularly prevalent in the web startup scene). Installing it requires some amount of care and technical knowledge (don't even bother installing it with a Linux package manager -- you're almost guaranteed to end up with the "wrong version" of ruby and rubygems).

    I understand that Ruby programmers tend to be very emotionally invested in their programming language and that this book is probably written for Ruby programmers looking to teach their kids programming (using their favourite programming language) but it would be nice if there were well-written books aimed at a more general audience.

    I'm not sure what the "best" first programming language is. JS has its merits -- it's becoming increasingly important, can be used throughout the entire stack of a web application and all you need to try it out is a modern web browser. Python is a lot more straightforward to learn and has consistent and mostly unsurprising concepts that are generally very compatible with more mainstream languages (plus it was intentionally based on a language developed for beginners). If market use were the main concern you could probably argue for Java or C# (although I think starting with a class-based language locks you into the wrong mental model).

    In any case, I don't think Ruby is the best choice, even with its quirky community lore and the general emphasis on "play" and expressing yourself in code (although this seems to have died down a bit as the community matures).

    I guess it depends on whether you want to teach programming as an art form and toy, or as a general skill (like maths, biology or chemistry). Both can be fun and entertaining but maybe I'm just getting old and cranky.

  • by knivets on 8/3/15, 8:27 AM

    Looks great.

    Recently, I was trying to wrap my head around eigenclass inheritance mechanisms and it was pretty tough. Not to mention the object model, where classes are also objects and the Object - Module - Class relationship. I wouldn't recommend Ruby as a first language to anyone — it may look easy at first, but to grasp it, you need to invest much more time in future.

  • by hopeless on 8/3/15, 2:14 PM

    The character's name is 'Ruby' but I don't expect the book itself to be any sort of introduction to ruby-the-language!

    I'm a backer — I expect the book might contain some Ruby code because it's pretty readable though I'm bothered either way. I am full expecting it'll be an engaging story to teach my kids some of the concepts of programming, which have nothing to do with any particular language.

  • by gregd on 8/3/15, 12:17 PM

    What makes you think the book is ready? We've been told (KS backers) that the book isn't shipping until October 2015. There is absolutely nothing that you've linked to to indicate that it's ready.

    Incidentally the book costs less at retail, then even the lowest tier of it's Kickstarter campaign.

  • by revskill on 8/3/15, 10:55 AM

    I found Python's rule of space and tab is the most confusing thing that will happen to a kid. They open a command prompt, then instead starting writing the real code, they have to <space><space>, blahblah , <enter><space><space>... to do something that they hope to run. It's a waste of time.
  • by FilterSweep on 8/3/15, 8:18 PM

    It's all fun and games until the kids reach a gem dependency conflict that bundler doesn't fix......
  • by _sword on 8/3/15, 12:52 PM

    I don't believe the book is ready to ship yet, but I'm looking forward to when it is! I had the pleasure of working with Linda (author of this book) a few years back and she is really a wonderful person and I'm very happy for the initial success of Hello Ruby.
  • by staticelf on 8/3/15, 8:23 AM

    Cool book, I hope you will get some success with it. I don't have a kid (yet) but I will maybe buy it as a gift as I live in one of the countries with publishers.
  • by tigroferoce on 8/3/15, 8:50 AM

    Cool. Would you translate into other languages? Having kids speaking Italian I would be interested ;-)
  • by x0 on 8/3/15, 9:47 AM

    That book is absolutely beautiful.
  • by juhq on 8/3/15, 10:51 AM

    Torilla tavataan!
  • by wyclif on 8/3/15, 9:20 AM

    "Its" not "its'", heads up.