3 ms·
Question I like to ask my colleagues. Suppose you have a program that passes all the tests. Suppose also that in that program there is a piece of code performs
by cratermoon 2y ago
Question I like to ask my colleagues. Suppose you have a program that passes all the tests. Suppose also that in that program there is a piece of code performs an operation incorrectly. The result of that operation is used in another part of the code that also performs an operation incorrectly, but in such a way that the tested outcome is correct.
Does the code have 0 defects, 1 defect, or 2 defects?
- userbinator 2y agoI can understand 0 and 2, but what's 1? The "I don't know how to count" answer?
- Izkata 2y agoThe second part could instead be more like "detects an edge case and handles it, accidentally working around the first defect".
- cratermoon 2y agoIt could be counted as a single defect because both pieces of code must be corrected to keep the test happy.