CURIUM
What happens when a program has a bug?

Software bug

What happens when a program has a bug?

It doesn't do what we expect. A bug is an error in the code: the programme crashes, displays something wrong or behaves oddly. The fault is almost always human, slipped in while writing the software's instructions.

TechnologyProgramming

The three levels

Beginner

What happens when a program has a bug?

It doesn't do what we expect. A bug is an error in the code: the programme crashes, displays something wrong or behaves oddly. The fault is almost always human, slipped in while writing the software's instructions.

Intermediate

Where does the word 'bug' come from in computing?

From a real insect, so the story goes. In 1947, a moth stuck in a computer caused a breakdown; engineers taped it into their logbook, writing 'first actual case of bug being found'. The word already existed in English, but the anecdote made it famous.

Expert

How does a developer track down a bug?

By playing detective. They reproduce the error, examine the code step by step, add messages or use a 'debugger' to see what's happening. Finding the cause is often longer than fixing it: the real work is the investigation.