Re:Things I’ve learned in 20 years of programming
by wintorez on Friday November 22, 2019 @07:48PM
(#21611621)
Regarding avoiding copy-paste; I'm a JavaScript developer, and from time to time, I run `npx jsinspect src` in the root of my projects to detect copy-paste. The results are always interesting.
[ Parent
| on HN ]
Re:Things I’ve learned in 20 years of programming
by dehrmann on Saturday November 23, 2019 @12:14AM
(#21612601)
I've got slightly mixed feeling on copy-paste because sometimes it leads to lots of dependencies--some with conflicts--and you would have been better off writing if (s != null && !s.isEmpty()