ENES

Bug

A mistake in software that makes it behave differently from what was intended.

A cart total that should be 30 shows 3000, because one highlighted line of code multiplies the price by 100 by mistake, with a small bug drawn next to it

A bug is a flaw in a program that makes it do something its authors did not intend: a button that does nothing, a total that adds up wrong, an app that crashes when you rotate the phone. Computers follow instructions exactly, so a bug is almost always a human mistake in those instructions, or a situation nobody planned for, like a name with an apostrophe or a date in a leap year.

Engineers used the word for machine faults long before computers. The famous story is from 1947: operators of the Harvard Mark II computer, a team that included Grace Hopper, found a real moth stuck in a relay and taped it into their logbook as the "first actual case of bug being found". The joke works precisely because the word was already in use.

Some bugs are cosmetic, others are serious. A bug that lets an attacker read data they should not see is a security vulnerability. Bugs are normal in any large program; what matters is catching them early through testing and code review, and fixing them with debugging. Teams usually track them in a bug tracker, with steps to reproduce, how severe they are and who is working on them.

Keep in mind

Go deeper

Related terms

More in Software