![]() |
|
An e-newsletter published by |
November 2005, Vol. 2 No. 10 |
| Welcome to Food for Thought™, an e-newsletter from Software Quality Consulting. I've created free subscriptions for my valued business contacts. If you find this newsletter informative, I encourage you to continue reading. Feel free to pass this newsletter along to colleagues by clicking this Forward Email link. If you’ve received this newsletter from a colleague and would like to subscribe, please click this Enter New Subscription link. If you don't wish to receive this newsletter, click the SafeUnSubscribe™ link at the bottom of this newsletter, and you won’t be bothered again. Your continued feedback on this newsletter is most welcome. Please send your comments and suggestions to info@swqual.com. |
In This Months’ Topic,
I discuss software bugs...
|
|
A Bug’s Life Do you know why we call them bugs? Most people are not familiar with the etymology of the term ‘bug’. The term was used much earlier than you might think. Thomas Edison used the term in a letter to an associate in 1878. He wrote:
In fact, the use of ‘bug’ to refer to a technical problem can be found in an electrical handbook from 1896, which says: "The term ‘bug’ is used to a limited extent to designate any fault or trouble in the connections or working of electric apparatus." [2] |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() A moth taped to Admiral Hopper’s Lab notebook, now on display at the Smithsonian |
The term as applied to software, is often incorrectly associated with Admiral Grace Hopper. Admiral Hopper, a brilliant mathematician, worked at Harvard on the Mark II Aiken Relay Calculator – an early analog computer built from hundreds of electromechanical relays. She liked to tell a story about an event that occurred in late summer of 1947, well before the advent of air conditioning, so the windows were open most of the time. A technician solved a problem with the Mark II machine by pulling an actual insect (a moth) out from between the contacts of one of its relays. Admiral Hopper’s notebook entry from September 9, 1947 reads:
This wording establishes that the term was already in use at the time in its current sense. Admiral Hopper’s contributions to computer science and software engineering have been extremely important. Among her significant accomplishments, she developed the first compiler as a tool to make writing programs easier. Some Famous Bugs… |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Like the characters in the Disney movie, some software bugs have achieved a measure of fame related to their economic and social impact.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
These are just a few examples of bugs that have cost huge sums of money and have adversely affected people’s lives. There are more. The impact that software bugs can have raises many questions. I’ll discuss three of these questions… 1. Where do bugs come from? Speaking about bugs, Dr. Harlan Mills once said:
Hmmm. Programmers must insert them… Well, why do they do that? One of the most common reasons is they often lack clearly written requirements. Without clear requirements, most respectable programmers will guess. Half of the time, they’ll guess right and you know what happens the other half of the time… The bottom line - it’s important to understand how and why bugs find their way into your products. By identifying the real root cause, you will learn a lot about a bug’s life. Root cause analysis of the bugs listed above has provided important insight into how those bugs came to be. For example, it took a combination of several “failures” to cause the accidents and resulting deaths in the Therac-25 radiation therapy machines. Understanding the root cause of problems is the first step in making sure that those problems don’t occur again. 2. Can we do a better job of preventing bugs? Several techniques can be used to prevent bugs from being “inserted” in the first place. These techniques include:
Using English to express requirements is fraught with problems because, as we all know, English is inherently vague and ambiguous. This leads to lots of guessing and you know what happens when we guess. One way to write clear requirements is to recognize the limitations of English and use alternative techniques. Alternative techniques can help reduce ambiguity by expressing requirements in a manner that leads to better understanding, a more coherent design, and thorough testing. Some examples of alternative techniques for writing requirements include:
Work flow diagrams and flowcharts are excellent tools for expressing requirements in a way that leads to better understanding. I provided some examples of using Structured English in my e-newsletter on Requirements. Here is an interesting example of comparing requirements written in English and the same requirements expressed in a truth table. Which is easier to understand, implement, and test?
Messages:
3. Can we do a better job of detecting bugs before they escape? The third and last question I wanted to discuss is how can we do a better job of detecting bugs before we ship? The two most common techniques used are:
Three separate organizations (shown in the table below) have recognized peer reviews as a best practice.
There are generally two problems with regard to peer reviews:
Ask people in your company if they have ever had any formal training in how to do peer reviews. Most people have had little or no training. And since many organizations lack good estimating and scheduling skills, projects are more often than not, constantly behind schedule. When projects are behind schedule, activities such as peer reviews are likely to get cut. Many companies rely too heavily on testing. Most people are not aware of the limitations that are inherent in testing. For example, the input space for every non-trivial application is essentially infinite. When we write tests, we are covering an infinitesimally small percentage of that input space. This means that we must have the skills to select a very, very small set of tests that will hopefully uncover as many bugs as possible. The ability to do this is affected by several factors, including the clarity and testability of the requirements, the time allotted for testing, the test environment, the skills of the testers, etc. And for the same reason that peer reviews are often cut (we’re behind schedule), testing is also often cut to meet deadlines. As a result, many bugs that could have been found, are not. Summary Software entomophobia is the fear of software bugs. Companies need to understand how bugs are introduced so effective steps can be taken to prevent and detect bugs before they affect your customers and the lives of others. Don’t’ be a software entomophobiac. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pay it Forward If you find this newsletter of value, please consider the following: Read more about the Pay It Forward foundation… |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Every month in this space you’ll find additional information related to this month’s topic.
|
Every month, you’ll find news here about local and national events that are of interest to the software community …
|
Software Quality Consulting provides consulting, training, and auditing services tailored to meet the specific needs of clients. We help clients fine-tune their software development processes and improve the quality of their software products. The overall goal is to help clients achieve Predictable Software Development™ – so that organizations can consistently deliver quality software with promised features in the promised timeframe. To learn more about how we can help your organization, visit our web site or send us an email. |
I hope this newsletter has been informative and helpful. Your comments and feedback are most welcome. Send me your feedback… Thanks, |