Analogies

A week or so back, on the London.pm mailing list we ended up chatting about how to get better at
photography. (We don't talk about Buffy all the time you know.)

I mentioned that a good way to get better is to learn to edit. Go through your photographs with a critical eye. Pick out the best ones. Now look at them and try and work out what it is that makes them good. When you come to make another photograph you'll hopefully remember what you saw, and do it again. Then, get critical, look at your good photographs and think about how you'd make them better. Again, apply what you've learned next time you point your camera at something.

But what does this have to do with Perl?

Well, think about it. I've described a process of improving your ability in small steps. And you can apply a similar method to improving the quality of your code. Take the best code you've written and do the same thing. Look at what makes it good, and what you'd've done different if you'd had the time, or had thought of it then. Do the same with the modules you've used. A good module is like a novel, if you read it 'critically' you can learn an awful lot about the language it's written in, and can improve your own style.

The rule is think effectively about what you're doing so that you can learn from your successes and mistakes.