Three software engineers and a bug
By Mike Skrtic, Sales and Marketing Director, Percepio.
Recently, I was fortunate enough to have dinner with three embedded software engineers. It brought to mind a story that I thought would be both appropriate and amusing, so I shared it with them and, to my surprise, it was met with puzzled looks.
“How could anyone, blindfolded or not, mistake an elephant’s leg for a tree?” asked one.
“And how could anyone, sighted or otherwise, not recognise the feel of an elephant’s trunk and instead believe it to be a snake?” asked the second.
“And however impaired one may be, how could anyone think an elephant’s tail to be a vine growing on a tree?” said the third.
The story was about three men wearing blindfolds who were asked to identify an elephant. Without the sense of sight, each was restricted to making an assumption about the elephant based on the feel of a single body part. The story is actually, of course, a famous parable, adopted by many religions as a way to illustrate important lessons.
As the evening continued, my friends turned their conversation to their current project and were only too pleased to share with me the results of their labours. While the details of the project were interesting enough, it was clear that they were all currently in the throes of hunting down a particularly difficult bug.
“There’s nothing in the code I’m working on that could be causing the watchdog timer to expire,” said one.
“The priority of my task ensures it executes at least twice per second, so the array must contain valid data,” commented the second.
“Well, the code I’m working on has full control over the COM port, so we know the data coming in is up to date,” stated the third.
“Is it possible that none of you are correct?” I said, in a bid to break the stalemate and finger pointing. In unison they all replied “No!”
“Then, is it possible that all of you are correct?” I postulated. Again, the answer was unanimous: “No!”
I looked at each in turn and after a moment’s reflection I proffered a third possibility: “Then it is clear that at least one of you is wrong, so the only question that remains is, which one.”
“It’s not me,” said the first, emphatically. “I’ve been working on my routine for three months and it works perfectly.”
“Nor me,” said the second. “The code I’m running comes from the manufacturer’s application note, and the forums supporting it all confirm its quality.”
“And it’s not me,” said the last. “The software I’m working on has been used across four other projects and none of them have had any problems with it.”
I smiled and, pointing to each one in turn, I said: “Tree. Snake, Vine.” I turned my tablet towards my three companions and showed them the download page for Tracealyzer, adding: “I think it’s time to take off your blindfolds, don’t you?”
To see graphical views of your runtime world, download your free edition of Tracealyzer here: http://percepio.com/download/.