# Bug

> A mistake in a program that makes it do the wrong thing, or stop.

**Field:** Software Development  
**Category:** Programming Concepts  
**Also known as:** Software Bug, Defect

## Think of it like

Think of it like a typo in a recipe that says salt where it meant sugar. The cook follows it, and the cake tastes wrong.

## Definition

A bug is a mistake in a program that makes it do the wrong thing. The computer follows the code exactly, so the mistake is in the code, not the machine. Some bugs crash the program. Others quietly give a wrong answer, which can be worse. Finding and fixing bugs is a big part of every developer's day.

## Example

A shop's code adds tax twice on one page. For a week, people buying a 10 pound book are charged 14.40 instead of 12.

## Why it matters

Every program has bugs. Good teams find them early, when they are cheap to fix, not after customers do.

## Common mistake

Blaming the computer. It did exactly what the code said; the code said the wrong thing.

## Three principles

- **The code is wrong.** The machine follows it exactly.
- **Quiet ones hurt most.** A wrong answer can go unseen for months.
- **Cheaper early.** A bug found today costs less than one found later.

## Related terms

- [Debugging](https://learn.benibix.com/term/development/debugging)
- [Error](https://learn.benibix.com/term/development/error)
- [Logic Error](https://learn.benibix.com/term/development/logic-error)
- [Software](https://learn.benibix.com/term/development/software)
- [Bug Report](https://learn.benibix.com/term/development/bug-report)

## Taught in

- [Bugs and Error Types](https://learn.benibix.com/learn/development-concepts/bugs-and-error-types): Programming Basics, 15/18

---

Source: https://learn.benibix.com/term/development/bug
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
