← the wiki

Bug

A mistake in a program that makes it behave differently from what you intended.

A bug is a gap between what you told the machine and what you meant. The machine is never wrong about following orders — it follows them perfectly, including the wrong ones. Finding and fixing that gap is called debugging.

The name is folklore made real: in 1947, engineers found an actual moth stuck in a relay of the Harvard Mark II computer and taped it into the logbook — "first actual case of bug being found". Every programmer, from day one to decade thirty, writes bugs daily. The skill isn't avoiding them; it's hunting them calmly.

The best way to make it stick: watch it run. Start an interactive lesson →