Re: An attack on a mint
Bill Frantz <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <r02010500-1049-9A597AEAF07A11DCB7FC0030658F0F64@[192.168.1.5]> |
Mark - Thanks for your response. mrs-ChQETwBkFSdCgCasaBwmdgC/[email protected] (Mark Seaborn) on Monday, March 10, 2008 wrote: >Bill Frantz <[email protected]> wrote: > >> I would agree that having a unit test to check this condition would >> be valuable. However, in my experience, unit tests get lost much >> faster than comments. > >What do you mean by "lost"? Do you find tests get removed because >they are hard to maintain, or are they simply not run? Take for example the code for VatTP in E. The unit tests for that code that I used while developing it were never added to any source repository. Along with the machine they ran on, they are gone. It's not a matter of just not being run. They are gone. >> I must ask, what is refactoring? If I have done it, it wasn't under >> that name. > >Transforming code in a way that preserves its behaviour, usually done >by hand, in order to make it easier to change and maintain. >http://en.wikipedia.org/wiki/Refactoring I think before you consider refactoring high reliance code, you need to consider the cost of re-certifying it. If you were working on Shuttle code for NASA, those costs might be prohibitive. There is good reason for this situation. Any change to a piece of code has the possibility of introducing bugs. If that code absolutely must work, then it must be re-certified. What you have to go through to re-certify the code can vary all over the place. It may be sufficient to show that the changes to the source code have not changed the compiler output. A simple rename of internal variables in C might be an example. There may be a proof that the change does not change the meaning of the program. We only hope that the proof is easy to verify. The worst case is that the code is so embedded in the total system that the whole system needs to be re-certified from scratch. As an aside, I remember being appalled when IBM announced in the early 1970s that they were no longer committed to fixing bugs, but rather to "managing" them. This policy makes perfect sense for a profit-making enterprise, but to my mind it lacks esthetic appeal. Cheers - Bill ------------------------------------------------------------------------- Bill Frantz | The first thing you need when | Periwinkle (408)356-8506 | using a perimeter defense is a | 16345 Englewood Ave www.pwpconsult.com | perimeter. | Los Gatos, CA 95032