I’m pretty sure that I exhibit one of the failings common to experienced developers trying to learn a new thing. That failing is an unwillingness to just hack out code.
I’ve been working with Ruby on Rails for a few months, but not as much as I’d like, mainly because I have many duties beyond just typing code into a text editor. That’s unfortunate, because I enjoy coding. I have lots of experience with many other languages, so Ruby on Rails was easy to pick up. If you know Java and Perl, you can pick up enough Ruby to get things done in hours.
Unfortunately, as an experienced developer I feel like it’s not enough to write Ruby. I need to write idiomatic Ruby. I need to write Ruby code that looks like it was written by someone who really knows Ruby, and who has worked with other Ruby developers. I want my code to be clean and readable and maintainable. I don’t want people who look at my code to say, “That dude is obviously a Java developer who dabbles in Ruby.”
The thing is, there’s no way to get to that point without just hacking. You can read all the books you can find. You can search the Rails wiki for examples. You can search mailing list archives. But when you’re starting out, if you want to get things done you have to do the best you can and put the aesthetics on the back burner. The beauty of refactoring is that you can just make your code work at first and worry about making it elegant later.
I keep forgetting this lesson, and just had to re-teach it to myself again last night.