next up previous
Next: The "real" code Up: Errors are born in Previous: The smile of the

How errors work

Let's add an other human factor to our model. Our next sequence is:

\begin{displaymath}
3, 4, 6, ???, 18, ?24? %% (8)
\end{displaymath} (19)

We know that on the place of "???" is an error. The previous developer doubted is 24 correct or not. He had noticed this by "?". The rule is "previous element plus something". Could you find it?

A good candidate is the rule of the fifth example:

\begin{displaymath}
X_{i} = X_{i-1} * 2 - 2
\end{displaymath} (20)

In this case instead "???" should be "10". "24" is not correct and should be replaced by "34". It seems to be right! You compile and begin to test. You get immediately a failure. After fifteen minutes you establish the fact that the cause is "34". You try 24 and it works. Could you find the rule?

Well. The rule is:

\begin{displaymath}
X_{i} = X_{i-1} + i
\end{displaymath} (21)

On the place of "???" is an error. Two numbers 9 and 13 are left.

Do you think here are two errors? Maybe. The lose of two numbers can be the result of one bad decision or of two different.

The Dragon has used here an other bad human's property, the optimism. If you know that an error exist, you don't know how big it is until you correct it. If a program doesn't work proper, this is not the result of one error. This is a result of at least one error.


next up previous
Next: The "real" code Up: Errors are born in Previous: The smile of the
2002-03-18