Learn Ruby the Hard Way - the Halfway Point

| Comments

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.

Copyright © 2014 - Mark Anderson. Powered by Octopress