Every one of us who writes computer programs to solve scientific and engineering problems knows that the coding itself takes only a small part of total development time. What takes most of the time is the tedious debugging of the program before the programmer and the users are satisfied. Sometimes not all of the bugs will ever be found which may, or may not, have consequences.
There are many ways to carry out the debugging, from placing simple write statements in the code, to checking that calculated numbers are reasonable, to using debugging and optimization tools. Some programming languages are safer than others. In general syntax errors are relatively easy to find and fix already by the compiler, while, for example, logical errors may take a long time to spot as the program runs well and keeps producing results. Additional types of errors are those when we attempt to divide by zero or an undefined number while running the program.
We learn to find the errors (most of them at least) in our own ways by systematically or randomly searching for them. There exist many well-known and embarrassing errors, from computer chips being rather bad in maths to maps for GPSs not leading anywhere or rather over a cliff or satellites not starting to orbit. Long ago as a post-doctoral fellow at the IBM laboratories, a colleague of us shared a story from the lab he came from where an office mate had changed a sign in the program he had been writing for the last three months. Not as a practical joke but rather to make his life miserable in a tough and competitive environment.
By writing this blog we would like you to tell about your own experiences concerning bugs in the program. What was the most fatal or curious bug you had in your own software or in a software written by other? And how did you find it? Share your experiences with us!
Kersti Hermansson & Aatto Laaksonen – Uppsala University