| History of Bug and Debugging |
|
|
|
| Written by Yash |
| Wednesday, 19 November 2008 00:40 |
|
A computer bug is a mistake done by human beings during development of hardware or software. Without bugs there is no hardware or software. Majority of bugs occur due to ignorance of developers. History of computer bug: The term ‘Bug’ has been part of engineering jargon for many decades. It’s been originally in hardware engineering to describe mechanical malfunctions or problems. Problems with radar electronics during World War II are referred as bugs (or glitches). There is evidence that usage of this term date back to much earlier. This term is mentioned letter from Edison to an associate in 1878:
Note: Different sources mention different dates in finding this moth. Ancient methods of software debugging: After computer programs moved past the punch card stage and as paper line-writers and finally CRT terminals became available. These methods have enhanced debugging techniques too. Computer programs too were changing at the same time from batch-oriented programs that were run at night or successive days, programs were becoming user interactive, required input from the user to startup or even during the program run. The program output can be seen as the program running father then waiting until the program had finished. This was considered by many to be a major leap forward in computer programming. The next evolution of debugging came with the advent of command-line debuggers. These simple programs were amazing step forward for the programmer. He doesn’t need to guess what values of the memory address in the program contained. The debugger could now dump the values given memory locations. This allowed a programmer working in an assembler to look directly at the registers and the memory blocks that contained the address of the local variables of the program. This is easy compare to earlier methods of debugging from a hit-or-miss proposition into reproducible process. Reproducing something is the next step toward making it a scientific or engineering process. As the software projects started getting bigger and the same technique that worked well for small projects no longer worked when program reached certain size. Scalability was an issue even at the beginning of software complexity curve. Compiler vendor discovered that the information they had while they parsing high level languages such a C, FORTRAN, COBOL, etc... Could be kept in a separate file called Symbol map, which could map the variables names in the programs to the actual memory address into which they could load at runtime. The ability to look at variables names and map them to memory address allowed programmer to dump memory by name. These debuggers were called “Symbolic debuggers”.
Before breakpoint improvement, programmer had only two states: Initial state of application before it ran and the final state of the application. Due to breakpoint programmers can check state when they want it and still guessing where to set a breakpoint was still difficult (Guessing to add breakpoint even now is hard in larger projects). As software was moving ahead faster, even debugging was getting improved a lot. The ability to see the original lines of code in order to set breakpoints was added. Better ways to dump memory and look at changes in that memory were added. Also, conditional breakpoint is also added to many debuggers. Conditional breakpoint allowed you to set a condition, such as when a given variable became equal to zero, under which the program would stop ad if you had set breakpoint at the particular line (Even now not much programmer’s uses conditional breakpoint). Modern methods of software debugging: Next big thing in modern debuggers is Turbo Pascal with IDE (Integrated development environment) and this was introduced by Borland where you can edit, compile, link and debug code in the same system. No need to run programs and no need to load special symbol table or use special compiler options. Turbo Pascal signified the dawn of the modern age of debugging. Next comes true multi-threaded, multi-tasking UNIX operating system, here using debuggers to debug multi-threading was very hard. Although Microsoft Windows applications were not truly multitasking at the beginning, they emulated the concept well. Previous application debuggers were text based. But, to debug GUI based applications needed additional thought for debugging. Existing debugger were not supporting this, you need to flip back between application and debugger screen, but this was of little help when it was your application that “painted” screen. If the application was not running, the screen would be blank. Modern Debuggers and IDE’s widely used are VC++ (Visual), Eclipse (Visual), GDB (Command Line), DDD (Front-end for GDB and other debuggers of command line), etc… Due to these types of IDE and debuggers we are able to debug large projects. But, still there are lot of innovation should happen in Debugging areas. Since, more then 50% of the time programmer spends in debugging.
Source: Department of Commerce's National Institute of Standards and Technology on June 28, 2002. References:
|
| Last Updated on Wednesday, 19 November 2008 22:43 |




0 Comments