About

2.5 The Spiral of Unattainable Perfection

Theory: The Spiral of Unattainable Perfection

Near the end of the lecture the professor gave the class a piece of advice: “Be careful not to get caught in the dangerous spiral of unattainable perfection.” Then came the important part: “Maybe I will put this in the exam and write discuss.” This lesson explains what the sentence means, what it does not mean, and how to write the two-paragraph answer the professor wants.

Exam radar: this is a likely “discuss” question. The professor wants two paragraphs (principles, then meaning), and the key idea is that the unreachable perfection is the goal of showing every bug, not perfect software.

Cleaning Your Room

Think about cleaning your room. In the first ten minutes you clear the big rubbish, and the room already looks clean. In the next hour you deal with smaller things. To remove every last speck of dust you would need many more hours, and even then you would never reach 100%.

Finding bugs works the same way.

The Bug-Finding Curve

If you plot the number of bugs found so far against the time and effort spent testing, you get an S-shaped curve with three parts.

all bugs that existthe knee: about 50–70%of the bugs you will find1slow start2fast part3much effort, few bugstime and effort spent on testing →bugs found so far →
Slow, then fast, then very slow. The curve approaches the dashed line of all existing bugs but never reaches it.
  1. Slow start. At first you find few bugs, because you must prepare tools and learn the software.
  2. Fast part. Now bugs come quickly; you find many in a short time. This continues until you have found about 50–70% of the bugs you will eventually find. That turning point is called the knee.
  3. After the knee. The curve flattens. You spend much more effort and find very few new bugs, and the curve never reaches the line of all the bugs that exist.

Where random testing and AI help

Part 2 is where random testing works well. In random testing, a program generates test inputs by chance and runs them. AI can do this even better, because it produces clever test cases very fast. So in the fast part, automated testing by a tool or an AI is very useful: while bugs are plentiful, sheer volume of tests pays off.

The danger is part 3

Part 3 is where the spiral lives. On a good day you feel like a hero and want to find every last bug. You try and try, but the curve barely moves: each new bug costs more effort than the last. That is the dangerous spiral of unattainable perfection: chasing a goal that can never be reached, with less and less to show for it. (How to decide when the curve has flattened enough to stop is Lecture 7’s subject; see 7.3.)

What “Unattainable Perfection” Does Not Mean

In class, a student answered: “Unattainable perfection means we cannot make perfect software with no bugs.” The professor stopped the student right there: do not write this in the exam.

The answer talks about perfect software, and testing is not about perfect software. Testing is about showing that bugs exist (2.4). So the unattainable perfection is not a perfect product; it is the goal of showing every single bug. We already know that goal is impossible: testing cannot prove the absence of bugs, and exhaustive testing is impossible (2.1).

Common mistake: writing that “unattainable perfection means perfect software is impossible.” The professor explicitly rejected this. The perfection that cannot be reached is finding and showing every bug, not building a bug-free product.

Writing the “Discuss” Answer

How to write the answer: the professor wants a discussion in two paragraphs. Paragraph 1 states the basic principles; paragraph 2 uses them to explain the meaning. A good answer:

Paragraph 1. Testing shows that bugs exist; it cannot prove that there are no bugs (Principle 1). Exhaustive testing is impossible (Principle 2): even a simple calculator needs about 106410^{64} tests. When we test, the number of bugs found grows fast at first, then the curve flattens. After that point, the knee, each new bug needs much more effort.

Paragraph 2. So “unattainable perfection” does not mean perfect software. It means the goal of showing every bug, and this goal cannot be reached. A tester who follows it spends more and more effort for less and less result. A better way is to use risk to choose what to test, find the important bugs early, stop when more effort is no longer worth the cost, and accept the risk that remains.

Before handing in, check your answer for one phrase: it must say “the goal of showing every bug”, not “perfect software”.


Worked Examples

Exercise 1

“Be careful not to get caught in the dangerous spiral of unattainable perfection.” Discuss.

Show solution ↓
Solution

Write two paragraphs: principles first, then meaning.

Paragraph 1 (principles). Testing can show that bugs exist, but it can never prove that there are none (Principle 1), and exhaustive testing is impossible (Principle 2): even one addition on a simple 32-digit calculator would need about 106410^{64} tests. In practice, bugs are found quickly at first; after the knee of the curve, at roughly 50–70% of the bugs that will be found, the curve flattens and every further bug costs far more effort.

Paragraph 2 (meaning). The “unattainable perfection” is therefore not perfect software but the goal of showing every bug, a goal that cannot be reached. A tester caught in this spiral keeps investing more effort for fewer and fewer bugs. The professional response is to choose tests by risk, find the important bugs early (using automation and AI where bugs are plentiful), stop when more effort is no longer worth its cost, and consciously accept the remaining risk.

Self-check: did you write “the goal of showing every bug” and not “perfect software”? ✓

Exercise 2

A classmate’s exam answer begins: “Unattainable perfection means we cannot make perfect software with no bugs.” What is wrong with it?

Show solution ↓
Solution

It talks about the product, but the advice is about testing. Testing is not about making perfect software; its goal is to show that bugs exist. So the unattainable perfection is the goal of showing every single bug, which is impossible because testing cannot prove the absence of bugs and exhaustive testing is impossible. The professor explicitly said not to write the “perfect software” version in the exam.

Exercise 3

Describe the three parts of the bug-finding curve and explain why each part has the shape it does. Where is the knee?

Show solution ↓
Solution
  1. Slow start: few bugs are found because the tester must first prepare tools and learn the software.
  2. Fast part: many bugs are found in a short time, because bugs are still plentiful and easy to hit.
  3. After the knee: the curve flattens. The remaining bugs are rare and hidden, so much effort finds very few of them, and the curve never reaches the total number of bugs that exist.

The knee is the point between parts 2 and 3, reached after finding about 50–70% of the bugs that will be found.

Exercise 4

In which part of the curve are random testing and AI-generated tests most useful, and why? Why are they less useful later?

Show solution ↓
Solution

They are most useful in part 2, the fast part. Random testing generates inputs by chance and runs them in large numbers; AI generates clever test cases very quickly. While bugs are plentiful, a high volume of tests keeps hitting new ones.

After the knee (part 3), the remaining bugs are rare, so most random or bulk tests find nothing new. More volume barely moves the curve; what is needed instead is a decision, based on risk and cost, about when to stop.

Exercise 5

A team has found 70 bugs in the first two weeks of testing, 8 in the third week and 3 in the fourth. The test lead wants to continue for two more months “until we have found them all.” Advise the lead, using the ideas of this lesson.

Show solution ↓
Solution

The numbers show the curve has passed the knee: 70 bugs at first, then 8, then 3. The team is now in part 3, where much effort finds very few bugs.

“Until we have found them all” is exactly the spiral of unattainable perfection: showing every bug is impossible, because testing cannot prove the absence of bugs. Two more months would cost a lot for very little.

Advice: stop chasing every bug. Use risk to direct any remaining effort to the highest-impact areas, decide whether the cost of further testing is still worth it, and if not, stop and accept the remaining risk. (Lecture 7 gives a formal way to make this stopping decision from the slope of the curve.)