I’ve had the opportunity to work with Rails for a good three weeks straight, now. Not just evenings and “spare time”, like I might have before, but actually all day. Most of that has been front-end work, views and the like, but enough of that is tied to other parts of Rails that you definitely start to get a better picture of how it all fits together.
Hence the title, as I realize anew what everyone already knows, that you learn more by doing something than by reading about it.
Nevertheless, there is something seductive about simply reading about a technology, rather than just diving in and using it. Well, if you’re a bibliophile, there is. And I don’t think that time is wasted; the reading I’d done about Rails did give me a good frame of reference to get started in. I didn’t have to ask what models or controllers did, where to find the routes (or what they were), I came in understanding the essentials. Well, perhaps the bare essentials, but for what it’s worth, it was there.
That said, I do think I could have probably come in knowing more if I had been building little apps rather than reading about them. That has become my new paradigm, if you will, and my unsolicited advice to those who would learn Rails, or any other web application method: just start building something. If you don’t know what to build, build a blog or a digg/reddit type clone. A vanilla version of any of those is simple enough to be doable by a beginner (I realize they can potentially get more complex; hence the qualifier “vanilla”), but still complex enough to force you to learn various different aspects of web application development: you need a database, you need some programming logic, you’ll need at least a minimal presentation of information, a way to get input from the end use, save it, order it, possibly filter it, probably a user-authentication piece, and so forth.
So, put the books down. Minimize the blogs and API documentation for a minute. (Just for a minute.) Just start sketching, building, and coding. Open up the APIs and/or books if and only if you just can’t go any further; as soon as you find what you need to get the next bit done, leave the documentation again, until you need it.
If you’re using Ruby and Rails, in particular, and if you’re starting to get the hang of how things work, you probably should even just start trying things without looking at the documentation. There’s a lot of automagical stuff going on in Rails, and you just might find that what you intuitively wanted to type is actually what works. If not, you’ll probably find that it was close, you just didn’t have the syntax quite right; but try it first, anyways; there’s really nothing like the rush of attempting to run a code-snippet based on a hunch, and then finding out that it does exactly what you thought it would do.
I know; this is obvious to everyone, you’ve been doing it this way for years. Bear with me, I’ll catch up.
