Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Computer bugs and testing


1. Computer bugs and testing

2. Computer bug
A computer bug is an error in a computer program.

A feature is a bug that the company has no intention of fixing.

Microsoft does not like to call them bugs. They have other terms, such as "issues" or "glitches".

3. Palmetto bugs
No one likes to talk about bugs.

When we discovered a roach in our hotel room, and brought it to the hotel clerks attention, he said that they did have problems with Palmetto bugs, not wanting to say the word roach.

4. Hopper: First computer bug
In the early days of computers, the first documented computer bug was a "moth" that had short-circuited a switch in a computer circuit.

The first bug was documented by Grace Hopper (first computer bug) , though the term bug goes back further than computers.


Grace Hopper is known for the saying that it is easier to ask forgiveness than to ask for permission.

5. The term bug
The use of the word bug to describe a problem, however, was in use long before computers were invented.

6. Thomas Edison
Thomas Edison used the term "bug" to refer to a glitch, error, or defect in a mechanical system or process.

Edison: America's greatest inventor

7. Shakespeare
Shakespeare used the term "bug". The word "bug" here means a frightful object, derived from a Welsh mythological monster called the "Bugbear".

8. BSOD



In Windows, users sometimes encounter the BSOD (Blue Screen of Death) where the entire screen turns blue and a message is displayed. Often, the user ends up cold booting the computer.

9. Microspeak
Microsoft does not refer to bugs as bugs. Instead, the following terms are to be used by their support staff when talking to customers.

10. James Gleick
This language has been christened "Microspeak", at least by James Gleick. Gleick, J. (September 1997). "A bug by any other name...", in Visual Basic programmer's journal, Vol 7, No. 10, p. 128..

James Gleick wrote the following.

11. From the MSDN
MSDN Anomoly Tracking SystemThe MSDN (Microsoft Developer Network) contains an ATS (Anomaly Tracking System) .

The word anomaly is used often in database terms to refer to an error in the database. It sounds so much better than calling it an error or bug.

12. The ATS
ATS: Anomoly Tracking SystemWelcome to Anomaly Tracking System (ATS), the database application designed to track issues during team development of software.

Issues can be bugs in the code [i.e., your code], inconsistencies between the product and the specification, or future wish-list features.

13. Testing programs
How can you test a program to insure that it does not have any errors?

14. Dijkstra: Program testing
Dijkstra has said that if debugging is the process of removing bugs from a program, then programming must be the process of putting them in.

15. Correctness of multiplication
Here is the reasoning adapted from Dijkstra. Consider showing the correctness of a method for multiplying two numbers. The method is correct if, given two numbers, a correct result is always supplied. Let each number be represented by 32 bits. Then there are possible ways to multiply the 2 numbers.

Smaller example to show method:
24 * 24 = 24+4 = 28 = 256 = 16 * 16 = 24 * 24

Let us also suppose that we have a table by which to check the results (this would be a big table). If we can check about 230 possibilities per second (a billion possibilities a second), it would take about 234 seconds to check all possible combinations. There are about 225 seconds in a year, so it would take 29 years (about 500 years).

16. 64 bits
Now let each number be represented by 64 bits. Then there are possible ways to multiply the 2 numbers.

Now the time is about this many years.
   500*264    ≈ 500*15,000,000,000,000,000,000 years    = 7,500,000,000,000,000,000,000 years    = 7,500 trillion trillion years


17. Testing and correctness
The hardware will fail before we can check even a tiny fraction of the possibilities. The same is true of software. The bottom line is that we buy computers that will only ever use a tiny fraction of all possible computations.

But we expect every one of them to be correct. Obviously we cannot check correctness by exhaustive enumeration.

As a result, testing can never show the correctness of a program, but it can show the presence of errors. There are, however, mathematical ways to prove certain programs correct.

18. Program correctness
Programs, to a large extent, can be verified to be correct using various program correctness techniques.

The field is called software verification.

In a beginning programming course, one need only know that such techniques exist and that programs cannot be shown or proven correct by testing.

Who uses formal verification of software?

19. Formal verification
Formal software verification is very costly to use but is used when the cost of failure is very high.

20. Testing
Program testing is only useful for showing that a program appears to be good enough to use for some purpose.

A student can encounter such issues when a program works for them with some test data, but then does not work on another computer and/or with other test data.

21. Dijkstra: Computer bugs

22. Harry Truman
Harry Truman was the President after Franklin Roosevelt and before Dwight Eisenhower.

He had a famous saying that "The buck stops here". That is, he would make the final decision.

23. The bug stops here
It is the software engineer's job to insure that "the bug stops here", a play on words on the saying "the buck stops here", made famous by President Harry Truman.

Otherwise, program errors could have severe consequences (lost revenue, liability, death, etc.)

24. Bug reports on the Internet
If you have software that is not working quite right, it may be due to a bug (or feature).

A web search might help you locate and fix the problem.

25. Problem location
Identifying and resolving an error may be easy or it may be difficult.

26. End of page

27. Multiple choice questions for this page

28. Acronyms and/or initialisms for this page