As I stated in the answer to another question, my approach is the following: 1. The first time I solve a certain problem, I just get it done. 2. The second time (i.e. when I solve a similar problem) I think: hm, maybe I am repeating myself, but I will go for a quick copy-and-paste for now. 3. The third time I think: hm, I AM repeating myself -> make it general! I.e. up to 2, another principle (YAGNI) wins over DRY. But starting from 3 (or 4 if I am really lazy!) it seems I AM gonna need it and so I follow DRY.