I found a nice blog entry about refactoring via one of the popular links sites (I thought it was Reddit, but I can't find it back any more). I like it.
My favorite quote (by Larry Wall, heh) from that post is
Don't buy something unless you've wanted it three times.
which is, technically, not a programming quote. But what it means to a programmer is this: don't bother refactoring into a separate module until you've needed a particular functionality in at least 3 applications. Before that happens, you won't have a good idea how to generalize the code, yet.
It makes sense as economic advice too, it keeps you from ending up with stuff you rarely use. Do I really need an MP3 player? Well, so far I've not wanted to have it 3 times. So, no.
I think I'll keep an eye on that blog in the future.
rule of three (Score:1)