Nepedia
Back to Discover
Fluent Reader
💻

Software bug

technology Maturity 11-13 war conflict Next article →

This article covers sensitive topics: war_conflict. Parents can manage visibility in Parental Controls.

A software bug is a mistake or defect within a computer program. These errors can be very small or very large. A minor bug might just be a misspelled word on a screen. However, a serious bug can cause a program to crash. A crash happens when the software stops working correctly. Some people argue that the word "bug" is not the best term. They believe it makes it sound like the error happened by itself. They prefer the word "defect" to show that humans caused the mistake.

Software bug displayed on two screens at La Croix de Berny station in France - 2021-10-28
Software bug displayed on two screens at La Croix de Berny station in France - 2021-10-28

Finding and fixing bugs is a major part of making software. The first step is often to reproduce the bug. This means the programmer must make the error happen again on purpose. If they cannot make it happen, they cannot find the cause. Sometimes, bugs are very hard to catch. One type is called a "heisenbug." This is a bug that seems to disappear when you try to study it. Programmers also use a tool called a debugger. A debugger lets them look at the code one line at a time. This helps them see exactly where the program goes wrong.

People have been dealing with these errors for a long time. Maurice Wilkes was an early computer pioneer. In the late 1940s, he realized a lot of his life would be spent finding errors. Since the 1950s, some systems have been built to find or fix errors automatically. Today, developers use many different methods to keep code safe. Some use "test-driven development." This means they write tests before they even finish the code. Others use "static analysis" to scan the text of the program for problems. These tools help find mistakes before the software is ever used.

Software bugs can have very big consequences in the real world. In 1996, a US$1 billion Ariane 5 rocket was destroyed. This happened less than a minute after launch because of a bug. In the 1980s, bugs in a medical machine called the Therac-25 caused patient deaths. In 1994, an RAF Chinook helicopter crashed, which was later linked to a bug. These errors are not just accidents; they can be very costly. A 2002 study found that bugs cost the US economy about $59 billion every year. This is about 0.6 percent of the gross domestic product.

Classpath bugs
Classpath bugs

Modern programming languages are designed to help prevent these mistakes. Older languages like BASIC and C taught us many lessons. Newer languages like C# and Rust are built to be safer. Some languages use "compilation" to catch typos before the program runs. This is different from "interpreted" languages where errors happen later. Some languages even leave out certain features to keep things simple. For example, Java does not use something called "pointer arithmetic." This might make the code slower, but it helps prevent memory errors. Using simpler code is often better than using complicated, buggy code.

483 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Software bug displayed on two screens at La Croix de Berny station in France - 2021-10-28.jpg
Software bug displayed on two screens at...
File:Classpath bugs.png
Classpath bugs.png
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.