Programming Errors — and Why We Should All Hate Them.

Krishan Damani
Sep 7, 2018 · 4 min read

Programmers will inevitably encounter one, ten or even a thousand errors a day, depending on the system or the code. One positive thing to take from this is that it is not always your fault. There are millions of reasons errors may occur. Three of the most common reasons are human error (i.e. it’s probably your fault), bugs or human intervention through hacking (i.e. it’s someone else’s fault).

Examples of famous errors you won’t want to emulate

The Queen’s Terminal (Heathrow Terminal 5) — A Royal Hiccup
The opening of what has been described as one of “the most technologically advanced airport terminals in the world” was labelled as a “national humiliation”. It’s first 5 days were mired in technical glitches which included 23,000 bags being misplaced, 5000 cancelled flights and losses of £16m. In the aftermath, it was embarrassing revealed that one of the major causes of these issues were IT problems and a lack of technical testing. So you see, even the mighty can fall down at testing.

Starbucks software glitch — what do you mean I can’t get a Frappuccino?
A ‘standard’ daily system refresh cost Starbucks $3 million dollars in profits in one day. The glitch the system affected the company’s POS system, which luckily for the customers meant they got thousands of free mochas, lattes and espressos. However for Starbucks they had to close 13,500 locations and were left embarrassed. This goes to show that there is nothing standard about a system refresh and it is important to continue to monitor all systems in order to avoid public failures such as this in the future.

600,000 RBS payments go missing — Where is my money?
One of the biggest software failures of 2015 was the failure to process 600k payments by RBS. These payments included wages and benefits and some were only processed after several days! The public explanation given by the CIO was that the system failed to process files from a third-party provider. So, big piece of advice: always keep a close eye on integrations with external parties — they are often a source of big problems! Make sure the interfaces are well defined and that the appropriate channels are in place to communicate any changes.


As you can see, these errors cost developer time and may end up costing you or your organisation hundreds or thousands of pounds — a disastrous situation that may even leave you unemployed!

Developers play a crucial role in error prevention and handling. It is their responsibility to ensure that they write clean code, test the code and let others review their code to ensure that it produces the expected result. It’s safe to say that meticulous testing and feedback are basic parts of error prevention.

Here at AND Digital, we strive to follow best testing practices. Here are some of our surefire ways to keep your job and help your organisation stay safe.

5 ways to avoid disastrous errors

Keep it secret, keep it safe
If you don’t handle errors correctly in your application, you might inadvertently display data that should remain private or allow hackers insight into system weaknesses.

Instead, ensure that there is catch-all error processing in place which gives the user a helpful message while logging that precious stack trace to a place where only the right people can see it.

Playing keepy-uppy in your sleep
Getting a phone call in the middle of the night because you need to restart your application is the worst thing ever* — so put the right error handling in place and you can keep your system up with minimum fuss, and even automatically bring it back up if it goes down.

Simple solutions for syntax slip-ups
*Ok I was wrong about the worst thing ever. The worst thing ever is realising you’ve spent 90 minutes trying to track down the source of that “really tricky bug” just to find that it was caused by a typo.

Compilers and/or IDE’s will catch most simple syntax problems, and static analysis such as SonarQube or CheckStyle can further reduce your chance of catching obvious errors before they lose you too much time. Automate these to run fast and frequently.

“It’s not a bug, it’s a feature”
Sometimes arguing over how a system should behave takes longer than making the change.

Logical errors are a bit trickier. These are related to the actual flow of the application and the way it is implemented, and are therefore not caught by a compiler or an IDE. However, with proper automated testing in place these errors can be caught before actually releasing your software into the world! Make sure you reason about the features you’re creating, think about its use cases and edge scenarios and make sure you create tests that address them.

With the help of deployment pipeline where these test are executed every time you commit changes to your code, you gain extra assurance that your application is behaving as it’s meant to!

“It works on my machine”
With tools like Docker or Vagrant, “it works on my machine” is now an excuse from the past.

These tools allow developers to recreate any environment in their own local machines, making sure that their software is executed against replicas of the target environment. This way, all developers have the “same machine”!

We’d like to hear your thoughts on this. Feel free to contact us (Krish — kdamani@and.digital or Matt — marcher@and.digital)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade