A while back, I started learning Ruby. It really captured my interest, and struck me as a particularly elegant language. One might say it is “beautiful”, in a way that few languages can (reasonably) claim.
I didn’t get terribly far. I’m in no sense really competent in the language. I got derailed in the process of learning Ruby by other things that, unfortunately, required my attention. Thus, it got set on the back burner to simmer.
It has boiled down to nothing. All the water evaporated from the pot. All that’s left is a little bit of mineral sediment (see, I told you I should have used distilled, rather than tap, water). There’s naught left but a residue of what little I had already learned.
I’m almost a complete newbie to the language again, and I’m once again looking at the possibility of really learning the language. This time, though, I’m not going to just dive in head-first without thinking about how best to get anywhere.
I know at least a couple of my readers — at least one of which is a regular reader — know the language well enough to be able to offer some advice on the subject of how best to go about learning Ruby, pretty much from scratch. I have a copy of Agile Web Development with Rails on my shelf, and would prefer to avoid spending any more money on Ruby books for a while, though I might be persuaded to make an exception if the argument is strong enough for doing so.
So . . . what would be the most efficient and interesting way to gain competence as a Ruby programmer? Where should I start, and where should I go from there?
I rather suspect that my personal proclivities would lean toward one of two paths for learning:
- web development — I might be able to make use of Ruby for web development as a way to steep myself in the language’s knowledge, as this would provide me with a real-world, immediate use for the language that would keep me hacking Ruby code, assuming I have the references and instructional materials to help propel me along that path.
- command line automation scripts and utilities — I have discovered that command line arguments, data munging, and simple I/O for command line programming (such as sysadmin scripts) provided the most helpful path to learning Perl to any level of competence. Perhaps the same approach would suit me for Ruby.
If you have suggestions for approaches to learning the language that involve database access and a means of easing me into OOP with Ruby, that too would be welcome — though again, I think that real-world applicability would be of paramount importance, early and often, in the practice aspect of the learning path.
A problem I’ve discovered with most programming instructional texts is that they waste a lot of up-front time talking about language functionality that nobody uses in the early stages of learning the language when they want to write something they’ll actually use. As such, the more important aspects of the language for such projects get neglected. For instance, almost every programming instructional text in the world teaches an input loop of some sort as the first form of program input, and many of them not only don’t get to taking command line arguments very quickly, but sometimes don’t get to it at all, ever. Even those that do often fail to explain the “right” way to do so — for instance, some Perl texts will do a cursory job of explaining the @ARGV array, probably in an appendix or footnote, but never explain anything about using Getopt::Std and Getopt::Long. Please think about these issues when considering suggestions you might offer me.
Your responses don’t have to be here, if you have any advice to offer — if you have another means of contacting me and prefer that as a means of getting the information to me, I’ll be grateful for that as well. Do it however you think works best. I just hope someone can offer me some advice that will get me on a path that won’t prove overly frustrating. One of the reasons Ruby got back-burnered in the first place was the disconnect in the relation between most of the documentation and instructional materials I found, and where the rubber meets the road, so to speak. I don’t want to stall out when I tackle the subject again.