3 ms·
I agree. One of the biggest sources of errors for me is copy-pasting multiple lines of code and then failing to adjust some of the variables or numbers. If I do
by Kenji 12y ago
I agree. One of the biggest sources of errors for me is copy-pasting multiple lines of code and then failing to adjust some of the variables or numbers. If I do that it's guaranteed that I lose 2-3 times 15 minutes a day because of stupid bugs.
Don't be too smart, don't copy paste more than a word. The time it takes for typing is well worth the reduced error rate. Don't let your laziness get the better of you. Don't create circumstances that allow you to make additional errors.
- samatman 12y agoHence, languages with a proper macro system.
- lmm 12y agoApplication-specific macros make code unreadable, while common and standard ones might as well be a language feature. A well-designed language should offer suitable extension points in a structured way, rather than just allowing code to perform completely arbitrary transformations on the AST.