Copy-Paste, Ctrl-C, Ctrl-V
I create the PVS-Studio analyzer detecting errors in source code of C/C++/C++11 software. So I have to review a large amount of source code of various applications where we detected suspicious code fragments with the help of PVS-Studio. I have collected a lot of examples demonstrating that an error occurred because of copying and modifying a code fragment. Of course, it has been known for a long time that using Copy-Paste in programming is a bad thing. But let's try to investigate this problem closely instead of limiting ourselves to just saying "do not copy the code".
Andrey2008 19 january 2012, 18:52
1 2