3 ms·
>- Good programming comes from good habits. (in that vein: copy-and-paste is the devil.) Hardly. Copy-and-paste is fine if you understand how and why it works
by madamelic 10y ago
>- Good programming comes from good habits. (in that vein: copy-and-paste is the devil.)
Hardly.
Copy-and-paste is fine if you understand how and why it works. Magic is bad but forcing yourself to needlessly re-invent the wheel is a dumb idea in itself.
- goo 10y agoI'm not suggesting that C+P is magic, or a tool that should not be used. Understanding how and why C+P isn't really important. Being careful to only copy tokens or lines that don't introduce bugs (or making sure to modify those lines once you've copied them) IS really important. It's one of the more common ways to accidentally write bad code, and although of course I (like everyone) use C+P as a tool too, I think it is valuable to be aware of the increased risk. It's like driving. You're gonna drive, or someone on your team is, but it's one of the highest likelihood activities for accidental death.