2 ms·
I've always liked the rule of three; the first time, solve just your immediate the problem. The second time, notice that you solved the same problem twice. If t
by llimllib 18y ago
I've always liked the rule of three; the first time, solve just your immediate the problem. The second time, notice that you solved the same problem twice. If the same situation occurs a third time, write a general solution.
- eelco 18y agoI couldn't agree more. I call this ORYO: Only Repeat Yourself Once. Actually, I often put comments in my code marking places I've already repeated myself (saying 'ORYO' plus a reference, if needed).