next up previous
Next: How errors work Up: Errors are born in Previous: Different ways are different

The smile of the Dragon

Let's model a real situation. Suppose one developer has the rule:

\begin{displaymath}
X_{i} = X_{i-1} * 2 - i %%(7)
\end{displaymath} (15)

The 0th element is 2. The developer writes the sequence:

\begin{displaymath}
2, 3, 4, 5, 6, 7 %% (7a)
\end{displaymath} (16)

OK! The sequence is very good. It is simple. Of course the developer has no time to describe the complex rule he had used. He checks the rule "add one" and is sure that even the 100th element can be calculated in the simple way. He makes a bad decision and doesn't notice the real rule proper. The Dragon's resource is created.

After any time the requirements change. The 0th element should be 3 instead 2. One other developer sees the sequence of numbers. The Dragon activate. Even the first developer had noticed somewhere (in a bad place) the real rule, the second very quick understands the rule "add one". He has no time to read "useless comments". (The Dragon use overconfident.) As result the new sequence is:

\begin{displaymath}
3, 4, 5, 6, 7, 8 %% (7b)
\end{displaymath} (17)

In case the proper rule were used, the sequence were a bit different:

\begin{displaymath}
3, 5, 8, 13, 22, 39 %% (7c)
\end{displaymath} (18)

If the proper rule is somewhere noticed, the fault can be corrected. If it isn't, it is very hard to restore. The second developer wrote the sequence quite wrong and the first variant of the sequence is erased. The Dragon laugh. 4


next up previous
Next: How errors work Up: Errors are born in Previous: Different ways are different
2002-03-18