From the course: Debugging C Code
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Understanding bugs - C Tutorial
From the course: Debugging C Code
Understanding bugs
- [Instructor] The legendary first programming bug was a moth caught in the circuitry of the Mark II computer in 1946. Whether the story is true, the term "bug" has traditionally been used to express the notion of a glitch, but it holds a special place in the history of computing. Since that memorable moth, bugs remain a constant in programming, so much so that some question whether the art is programming or it should more properly be called debugging. Bugs are prevalent and no programmer is immune. Of the possibilities, I set programming bugs into three categories. Syntax errors, flaws in logic or program flow, and crashes. Syntax errors include missing items, improperly formed statements, typos, and other silly mistakes. These bugs happen to everyone, but the good news is that these bugs are often reported during the development process by the editor, compiler or linker. Logical flaws are caught when the program doesn't run as intended. The code builds, but execution goes awry…