Learn Ruby the Hard Way – the Halfway Point

I’ve been plugging away at Zed Shaw’s Learn Ruby the Hard Way and made it to the half-way point tonight. So far, so good. I haven’t discovered anything earth-shattering just yet.

I think the biggest thing that’s stood out for me thus far is an idiom of string substitution I’ve not seen before. It involves leaving %s or %d within a string and then listing the values to be substituted into the string after closing the string. See the example below:

# string substitution
puts "We'd have %s beans, %s jars, and %s crates." % [jelly_beans, jars, crates]
 

Aside from that, I’m happy to report that nothing has surprised me. I’m hoping to finish this off this weekend. I realize that I’m taking a faster pace than is outlined on the site, but I’ve got quite a few Ruby resources to get through over the next month. If I hit a snag, I’ll slow down and take the time I need, but for now it’s full speed ahead.

  • http://socialposer.com/ Collin

    I know nothing about programming, but after reading Exercise 0 I’m intrigued. Is this basic enough for me to try to get through it, or is there some sort of pre-requisite that you’d recommend? 

  • http://twitter.com/Matt_Wheel Matthew Wheeler

     Learn to Program (2nd ed) by Chris Pine is an effective introduction. (I can’t speak to Ruby the hard way, but plan on checking it out this weekend).

  • http://www.doodlehaus.com Mark Anderson

    +1 on the Chris Pine book, feel free to email if you have questions as you go.