4 ms·
It seems like he's maybe miscounting some errors here. Several of his examples involve duplicate lines or blocks, but he considers the error to occur in the la
by ianferrel 11y ago
It seems like he's maybe miscounting some errors here.
Several of his examples involve duplicate lines or blocks, but he considers the error to occur in the last duplicate, rather than the first.
It seems equally valid to consider that an error on the previous lines, and more valid to consider it an error equally shared among all duplicated blocks.
Also, a simple hypothesis for why errors show up at the end: We tend to add new cases at the end of a block of similar code, and bugs are more likely to exist in more-recently added code because it's had less time to be discovered and fixed.
- raverbashing 11y ago> t seems equally valid to consider that an error on the previous lines No, because people usually write it top-down. So, if I have to do something like: a1 = 5 * b1 + 1; a2 = 5 * b2 + 1; for multiple items, I'm going to copy one of the lines written manually then paste it at the end (because the first ones are right) Also paste more lines than needed (because it's an estimate) is a common bug, and you'll end up with a redundant line at the end.