Fail again, fail better

Martin Vetterli
Digital Stories
Published in
3 min readOct 1, 2018

What a frozen screen on your computer and a rocket explosion can teach us about software errors

“spacecraft flying through the sky” by SpaceX on Unsplash

While I was typing this text into my computer, the screen suddenly got stuck and the software crashed. That was not the first time, and there must thus be some kind of “bug” in my computer (as we call software errors). Luckily, this was just an innocuous error leading to the crash of my home software, but more serious damages can occur. Take the example of Ariane 5, a giant European rocket that exploded less than a minute after its first launch in 1996. The reason was a silly little error in the software of the rocket.

But why are software errors called “bugs” in the first place? In the early days of computers there were only few machines around. In 1947, one of these computers suddenly started producing incorrect results. When the engineers of the time inspected the machine to find out what could be causing this sudden failure, it turned out that this was due to presence of a moth, which was trapped inside one of the electromagnetic switches (in those times computers still used electromagnetic switches as their core elements). In other words, there was literally a bug inside the machine! From there on, computer errors had found a new name.

The term “bug” is now commonly used outside of computer-related contexts, too, but what is a bug in the context of a computer exactly? Let’s take an example from another century to illustrate this, namely the famous Y2K bug (also known as the Millennium bug). Most of you have heard about this one, since it was actually a big topic in the press for much of the year 1999.

The problem arose because programmers used a two-digit code to store the year in a date (1957 would thus be simply stored as 57). However, this made the year 2000 indistinguishable from 1900, and the change of year from 1999 to 2000 could in that sense lead to a jump back of 99 years in the past for the computer! This was a foreseeable error that could lead to all sorts of odd behaviours. For example, a program calculating interests on a bank account might suddenly add 99 years worth of interest.

Fortunately, nothing happened and in fact, most of the possible Y2K bugs were fixed before the start of the new millennium, preventing what could have been a catastrophe in areas such as energy, infrastructure, finance, or medical devices.

In a couple decades we will have another opportunity to see how much progress has been made in terms of handling computer bugs linked to dates. In 2038, we will have another Y2K-like situation, due to a more recent way in which computers store dates, namely as the number of seconds elapsed since 1/1/1970. In fact, by 2038 that number of seconds passed will be too large for a 32-bit container, and will thus wrap around to zero.

--

--