What Is a Bug?
A BUG is a mistake in code that makes it do the wrong thing. The word comes from 1947 when a real moth got stuck inside a computer at Harvard and caused it to malfunction! Grace Hopper (a famous programmer) taped the moth into her notebook and wrote 'First actual case of bug being found.'
Bugs can be: WRONG ORDER (steps in the wrong sequence), MISSING STEP (forgot an instruction), WRONG COMMAND (said left instead of right), or TOO MANY/FEW REPEATS (loop runs wrong number of times).
Even the best programmers write buggy code! The difference between beginners and experts is not that experts write perfect code β it is that experts are GREAT at finding and fixing bugs. Debugging is like being a detective!