Hunting bugs

Dylan Miles • 19 May 2019
3 comments
6 likes
378 views

The term 'bug' in regards to an error or malfunction in the behaviour of a machine was first used by Thomas Edison in a letter to an associate dated March of 1878:-

"You were partly correct, I did find a 'bug' in my apparatus, but it was not in the telephone proper. It was of the genus 'callbellum'. The insect appears to find conditions for its existence in all call apparatus of telephones."

In November of 1878 he wrote to Theodore Puskas:-

"It has been just so in all of my inventions. The first step is an intuition and comes with a burst, then difficulties arise - this thing gives out and [it is] then that 'Bugs' - as such little faults and difficulties are called -  show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached."

The term 'computer bug' was coined on the 9th of September 1947 by Grace Hopper who traced an error to a dead Moth trapped in a relay. The insect was carefully removed and taped to the log book. 

From then on the term "Bug" was used to describe any errors or unexpected behaviour (glitches) in a computer program and later was adopted to describe the same in software.

The main reason that hunting the unexpected so challenging is that the main tool at my disposal is my mind. My mind is needed to grasp the relationships between all the various components and hopefully eventually the origin of the bug. 

But also, out of the minds desperation for being right it cannot afford to be wrong and yet in hunting a bug being willing to be wrong is essential.

The result  of the minds desperation to be right, is an inability to grasp the unexpected. A denial of reality. Staring at unexpected behaviour and denying that it is actually happening is the height of folly!

The definition of insanity is doing the same thing over and over again, but expecting different results. - Albert Einstein

So the starting point for hunting a bug has to be to stop thinking or even more essentially stop trying to fix the problem. Instead find a way to increase my awareness.

No problem can be solved from the same level of consciousness that created it - Albert Einstein

A practical way to increase my awareness is through observation. I do this by pausing and assessing everything I think I know and comparing it against the behaviour I have witnessed. 

I watch the behaviour as many times as I have to noting but not attaching to any conclusion my mind jumps to. 

I also note feelings and especially emotions that come up in relation to my thoughts and observations. Feelings are usually in the form of a direction to try explore next, an opening of sorts. Emotions can help fuel or undermine my effort depending on how I direct them.

On a practical level, to set up a way to replicate and observe the behaviour of the system I am trying to de-bug can be a challenge in and of itself.

At some point during observation, a theory will start to form in my mind about the origin of the bug. This theory has to be viewed as an assumption and tested no matter how real it seems.

The testing will either yield more detail in the behaviour or prove the theory. Depending on the nature of the bug, at some point there will be nothing left to try. This could be an indication that I have run out of energy or got fixated and cannot see the wood for the trees.

A time to pause and wonder while doing something else for awhile.

When I do find the origin, it usually fits all the observations like a glove and it is usually because I have discovered a hidden piece of the puzzle I was missing before. It is also often accompanied by a big grin or laughter because it is now so obvious, the the person that I was when I missed it before seems like a complete stranger! Lol!