4 ms·
There is substantial technical debt introduced by copy and pasting code. I've made a rule for myself: Never paste more than three lines of code at once. It f
by valine 11y ago
There is substantial technical debt introduced by copy and pasting code. I've made a rule for myself: Never paste more than three lines of code at once. It forces me to understand the code I'm copying, and it keeps my work tidy.
- diskcat 11y agoThe trick to copying and pasting is doing it when it won't be you paying back the debt. Just like how the US economy works.
- edwinksl 11y agoGood idea.
- taneq 11y agoThat, or if you really have to use more, have a standard comment to mark such occasions so you can come back later and understand/fix it. // voodoo magic from stackoverflow starts here (link: ...)
- milansm 11y ago> so you can come back later and understand/fix it But, of course, that's very unlikely to happen.
- christianmann 11y agoEven just retyping the exact code helps me quite a bit.