2 ms·
My very first mentor responded to me calling something "just a stupid bug" by saying "Almost all bugs are stupid." His point was that even the most talented pr
by aidenn0 11y ago
My very first mentor responded to me calling something "just a stupid bug" by saying "Almost all bugs are stupid." His point was that even the most talented programmers will make stupid mistakes and stupid bugs are capable of passing through large levels of code review.
Things like inverting the logic in one case of a complex conditional, or copy paste bugs like:
z1 = x1 + y1;
z2 = x2 + y2;
z3 = x3 + y1;
Are very hard to see. We have lint tools to catch a lot of them (e.g. a single '=' in a conditional), but at some point the tool lacks sufficient semantic understanding to catch everything.
- neppo 11y agoThat's a very common error and is called the last line effect: http://www.viva64.com/en/b/0260/#ID0E5HAE http://www.viva64.com/en/b/0260/#ID0E5HAE