Why software bugs exist and how you can help

Numbers in software development are represented by fixed size variables represented in binary. These are usually 8, 16, 32 or 64 bits (each bit represents a 1 or a 0). When we develop software, we choose which of these will provide enough space for the thing we are representing.

Recently, the Gangnam Style video on YouTube surpassed 2,147,483,647 views and it appeared as though the view counter broke. That number is significant because it is the upper limit of a 32-bit signed integer. It turns out that the video view count was being represented using a 32-bit signed integer — a signed value1 can represent whole numbers in the range -2,147,483,648 through 2,147,483,647; it cannot represent any number outside that range.

Though, according to YouTube, this turned out to be an Easter egg2, the bug was there before they updated the counter to 64-bit and it certainly is not the first time a number has pushed the limits. For example, the use of two digits to represent a year that contributed to the infamous fizzle that was Y2K.

But why? Why are there bugs at all?

Although it may seem like software bugs are there just to ruin your day, they were not intentionally put there or maliciously inserted to give you a reason to "Office Space" your device. As software engineers we have to consider a variety of constraints on the software we are developing. How much space does it need to run? How much space will there be on the device on which it is to run? How fast does it have to be?  How many years will the software be in use3? What other software will be running? And we have deadlines by which our work has to be completed. In fact, software engineers tend to consider a whole host of things such as the requirements of the software (functional, spatial, and temporal4), the specification of the system on which it is to execute, project deadlines and budgets, and the expectations of the end user.

Almost always, there has to be compromise. Even though a solution might be possible that accommodates all considerations, we have to deliver software in a time frame that people will pay for and some things just take too long or cost too much. That is not to say that all software bugs are because of time and money, some exist because of mistakes and as a consequence of poor design.

What does it all mean?

Software engineers like myself do not want you to encounter bugs. We work very hard and the QA teams work very hard to ensure that you do not get buggy software; if we see a problem, we do what we can to address it. To find these bugs, we try to consider all the ways our software might be used and test them. Unfortunately, most bugs do not advertise their existence quite so obviously or politely as YouTube's view counter bug. For example, when in comes to the infinite ways any one device might be configured with different peripherals and apps installed, we just cannot test them all; the system is too complex5.

 Good developers welcome user feedback. We need your help.

Next time you encounter a bug in the software you use, whether it is a mobile app, a website, an ATM, a desktop application, or some other device, spare a thought for the software engineers. Remember, good developers welcome user feedback. Take a moment to tell them or the publishers of the software about the problem.

  • What did you type, touch, or click?
  • What else was running on your device?
  • What part of the software were you in?
  • What Internet browser or operating system were you running?
  • What versions?

Be as detailed as you can. All these details and more can help a software engineer track down, reproduce and ultimately fix that bug.

There is no malice in a software bug. It was not put there specifically to ruin your day. However, without your help, it will not go away. So, reach out to the developers and tell them, they will thank you for it.

Today's featured image is based on Software Bugs by Martin Maciaszek.


  1. signed means it can be positive or negative 

  2. An Easter Egg is a hidden feature often added to software as an amusement for users who find it. Examples include the "barrel roll" in Google or the flight simulator in Excel 

  3. Underestimation of this was a big contributor to Y2K 

  4. i.e. how it works, what space it needs, and how long it takes to run and for how long it has to run 

  5. That's a discussion for another time 

CodeMash 2.0.1.4

Adventure

It is almost nine years since I first set foot in the US. It was through that experience that I rediscovered the joy in challenging myself and embracing change, something I had not so strongly felt since I first started singing in a band. So, while I had faced challenges before as a result of my own decisions, none had been bigger. Even though the opportunity had been provided by someone else, it had been my choice to take it and to see it through1.

It took me a while to settle in to my new home (or even to acknowledge it as home), but I eventually joined the developer community in Ann Arbor and the wider mid-west region. The interaction with other developers has continued to provide challenging opportunities and encourage positive change within my career, as well other aspects of my life. It was through the basic act of attending one local Ann Arbor .NET Developers Group meeting and the people I met there that I learned about CodeMash.

CodeMash

CodeMash v2.0.1.4 logo
 
The CodeMash conference – a community-organized event held annually in Sandusky, Ohio – never fails to provide unique experiences or challenges. My first CodeMash, CodeMash v2.0.1.2 was unique because I had never attended a developer conference before (or any other conference), and CodeMash v2.0.1.3 provided a completely new experience when, after attending a fantastic workshop on public speaking, I went on to win the PechaKucha contest.

This year, I was guaranteed yet another unique experience when I was accepted to be a speaker. I am extremely grateful to friends, mentors and others for their support and encouragement leading up to speaking at CodeMash v2.0.14. It was a wonderful honor that I thoroughly enjoyed, and while it changed my CodeMash experience with the added anxiety of speaking and subsequent release when my session ended, I would definitely do it again if the chance arose.

To those that attended my talk on AngularJS for XAML developers, thank you. I  hope that you found it valuable. If you were there or if you have an interest, you can find my slide deck and code on GitHub (Deck|Code).

I am very grateful to the volunteers that organize and run CodeMash each year, as well as the many friends and mentors that have guided my own CodeMash experiences and the many other experiences within the developer community. Without these people, I would not have had such amazing opportunities, nor would I have learned how important it is to challenge myself and strive for new experiences. It is always uncomfortable to embrace change, but the rewards of doing so are often worth the pain.

To close, I encourage you to challenge yourself this year. Make sure to let me know in the comments below how you will challenge yourself and perhaps we can follow-up at the end of the year.


  1. Of course, there were many times in the weeks between being offered the position and setting foot in the US when I considered changing my mind, including just after the plane doors closed 

How I got started with computers

I, like many others, enjoy the ramblings of Scott Hanselman. Recently, Scott posted a blog on how he got started in computers and programming and I thought I'd share my own story of getting started.

Domesday

It all began in the distant past (don't worry, the story isn't as long as it sounds) when I was at primary school (elementary school for those Americans reading). We were very fortunate in the UK during the 80s; the BBC was working hard to promote computer literacy. This culminated in a number of things, most notable (at least for this story) were the BBC Domesday Project and the BBC Micro.

The Domesday Project was a partnership between the BBC, Acorn Computers and various others to mark the 900th anniversary of the original Domesday Book, an 11th century census of England. It resulted in our school library having a laserdisc that gave us an unprecedented interactive view of the country.

The BBC Micro was the computing platform that formed a part of the Domesday Project and my formative programming experience thanks to the BBC's efforts to get one in every primary school in the UK.

A Domesday system at the Vintage Computer Festival 2010, Bletchley, UK
A Domesday system at the Vintage Computer Festival 2010, Bletchley, UK

We have lift-off!

It was a year or so after the Domesday Project had visited our school library. A BBC Micro sat conspicuously in my classroom day after day. I don't remember exactly how it started, but at some point I went from playing educational games on it to writing small programs in BASIC. I suspect it had a lot to do with a very inspirational teacher I had (Mr. Garbutt, I believe). He read fascinating books to us, he played guitar to us, he had us writing and remembering poetry and eventually, he had me writing software.

It was towards the end of my final year, shortly before my leap to high school, when I created my most elaborate program yet. It was a picture of a space shuttle complete with scaffold and a car with stickman owner for scale. It even had NASA written down the side (for someone who still struggled with some geometry at age 10, I am impressed with myself for rotating those letters). The program itself was more a feat of effort than it was of programming ingenuity; it was several hundred lines of MOVE and DRAW commands. However, that effort earned me a £10 book token and a printout of the drawing and the code used to create it. The printout has since been lost, but the book I purchased has journeyed with me and sits in my bookcase at home, inside it is taped the card that had contained the prize.

The book I purchased with my prize
The book I purchased with my prize
Inscription that accompanied my book token
Inscription that accompanied my book token

The Theory of Relativity

If it were not for the support and sacrifices of my family, that may well have been that. I would have left primary school and perhaps programming, behind. However, my parents recognized my interest and bought a home computer. It was a Tatung Einstein, a little known microcomputer and it was perfect for me to while away hours at home gaming and coding (now I come to think of it, this may be how I got my start with videogames too).

I wrote a whole host of programs for my Einstein including electronic versions of "choose your own adventure" books, an electronic Beatles album and a timetable manager for me and my classmates to use for who knows what. I even remember using the Einstein for our stall at a school business fair (I seem to recall it was some sort of murder mystery thing though I don't remember for sure).

Tatung Einstein and monitor
Tatung Einstein and monitor

Friend and Family

As my Tatung Einstein started to suffer from technical problems I set my sights on something grander; a Commodore Amiga 500. My parents sold our piano to afford this computer, much to the chagrin of my sister (and probably my piano teacher, although I'd already found my lack of talent by then). Meanwhile, at school I gained access to a 286 PC and an Apple Macintosh. The former was part of my science work and often included some lunchtime visits to Sid Meier's Civilisation with a very supportive science teacher, Dr. Stec; the latter helped me to write legible schoolwork for various classes (thanks, Mr. Simpson), assist in the publication of the school newspaper and learn about e-mail for the first time.

An Amiga 500 computer system, with 1084S RGB monitor and second A1010 floppy disk drive
An Amiga 500 computer system, with 1084S RGB monitor and second A1010 floppy disk drive (© Bill Bertram 2006)

And The Rest Is History

By the time I finished high school, my career aspirations were set and I headed off to get a degree in Computer Systems Engineering leading to my job as a software engineer. Along the way, I've had the opportunity to work with some amazing people on some great projects in some diverse circumstances and I owe it all to the opportunities I was given by the BBC, my schools, my teachers and my family. I will always be grateful for their support and the sacrifices that were made so that I could follow my ambitions.