Deprecated: Assigning the return value of new by reference is deprecated in /data/55/1/150/3/1639166/user/1767119/htdocs/phoneonfire/wp-settings.php on line 468

Deprecated: Assigning the return value of new by reference is deprecated in /data/55/1/150/3/1639166/user/1767119/htdocs/phoneonfire/wp-settings.php on line 483

Deprecated: Assigning the return value of new by reference is deprecated in /data/55/1/150/3/1639166/user/1767119/htdocs/phoneonfire/wp-settings.php on line 490

Deprecated: Assigning the return value of new by reference is deprecated in /data/55/1/150/3/1639166/user/1767119/htdocs/phoneonfire/wp-settings.php on line 526

Deprecated: Assigning the return value of new by reference is deprecated in /data/55/1/150/3/1639166/user/1767119/htdocs/phoneonfire/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /data/55/1/150/3/1639166/user/1767119/htdocs/phoneonfire/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /data/55/1/150/3/1639166/user/1767119/htdocs/phoneonfire/wp-includes/theme.php on line 618
Real Life Debugged » Stories from the trenches

Tag-Archive for ◊ Stories from the trenches ◊

After waiting forever for pictures on my laptop to load to show my family, I finally decided to upgrade my RAM from 1GB to 2GB.  I was ready for SCREAMING fast performance.

Then the Windows Shutdown “Hibernate” option stopped working.

“System Error : Insufficient system resources exist to complete the API.”

Now, I live to Hibernate.  Or, I should say I don’t reboot my laptop unless I *have* to.  The computer gets to Hibernate whenever I take it with me so I can resume with all windows and programs exactly where I left them.

I love Hibernate.

But suddenly Hibernate and I were plunged into a Jr High school relationship of drama and fickleness.


Subtitle: Awarding Jobs to the Lowest Bidder

For years Verizon has subtly questioned my ability to use my own two-line phone.

It came to a head when the kids moved out, we trashed DSL and switched to cable modem. No longer needed two phone lines. So I called Verizon on our main line to turn off Line 2. Finally (I cheered internally), the end of 10 long years suffering through Verizon’s insistence that in fact, Ma’am, you are calling me from Line 2. I’d given up arguing the “Line 1 vs. Line 2″ nonsense, but now that I wanted Line 2 turned off, I figured it was a good idea to “confirm” somehow.

So for the zillionth time I responded, resigned, “No, I’m calling from Line 1. This is the phone that rings when people call our main number.”

“No Ma’am, you are calling from Line 2.” (Unspoken on her side I imagine, “This lady is an idiot.”)

Sigh. “Cancel Line 2.” I confirmed the telephone number. Fingers crossed. Five days later, Line 2 was truly dead. “dee Dee DEE, The number you have dialed….” Amazingly, Verizon actually turned off the right one.

But now Line 1 rang busy. Forever.


I wrote most of my book on a little Dell Inspiron 700m, carrying it in my backpack all over creation. It’s a lightweight little thing with a great screen and 5 hours of run time on the extended battery. Delayed flights, no problem. Writing on the patio, no problem.


But sometimes when I’m pursuing a life outside the office, it spins into overdrive, cranking the disk and fan up into a frenzy. And when I return, the CPU Usage is pegged at 100%.

What the heck is it doing, I wonder? Is it more productive than *I* am? Well, could be when I’m surfing icanhascheezburger, but when I look away it may be stuck on the home shopping channel.

Does your computer misbehave behind your back? Today I decided see where my computer wanders, using a little deduction and some pretty simple tools.


Let’s Debug It: Keyboards and Endothermic Mammals
Saturday, January 24th, 2009 | Author: lisaksimone

First, recognize that in any disagreement with a Cat, the Cat will Win.

The main character of my book, Josie, was named after my oldest cat. My tiny little girl going on 13 who still jumps, plays, zips around and insists on her treats at EXACTLY 7:30 each night. But she’s gotten older, perhaps stiffer, and as such, she’s sought out the warmest areas in the house to snooze.

And then she discovered my laptop computer.

How do you stop a clever cat from using your laptop as a Really Nice and Warm Bed? While also preventing the sending of salacious emails to your co-workers?


Let’s Debug It: Hacksaws are Your Friend
Sunday, December 21st, 2008 | Author: lisaksimone

Clearly, all good things go bad when least expected. I was playing CDs extremely loudly one night and my fun came crashing to an end when the CD player began emitting disturbing grinding noises. Not at all in sync with the beat. In fact, there was no more beat.

Okay, I thought, I’d just inserted two new CDs before the grinding began. Maybe, like a DVD or CDROM, it didn’t quite seat right in the tray - let’s redo.

Wrong. Not only could I not eject the CDs, I couldn’t stop the grinding noise and couldn’t turn the unit off. It finally stopped when I pulled the power cable, but sadly resumed said grinding after power cable reinsertion.

Okay fine. Bag the music for the evening; let’s watch TV. Ah, nice try. Audio for all our electronics also goes through this system.

It’s either Grind-Grind, or silence. Some folks on the internet suggested 1) throwing it on eBay or 2) throwing it off the balcony. Shall we have a go at it a bit more nicely first?


“Phone on Fire” Foreword by Jack Ganssle
Sunday, December 14th, 2008 | Author: lisaksimone

Foreword by Jack Ganssle

The oldest known book about engineering is the 2000-year-old work De Architectura by Marcus Vitruvius Pollio. One historian said of Vitruvius and his book, “He writes in atrocious Latin, but he knows his business.” Another commented, “He has all the marks of one unused to composition, to whom writing is a painful task.”

Does that sound like the last ten technical books you’ve read?

Engineers are famous for being very bright but also for lacking basic writing skills. Yet writing is still our primary means of communication, so we buy heavy tomes created without the benefit of basic grammar and often bereft of a coherent structure. Storyline? Character development? Forget it.

Welcome to a very different kind of technical book. Lisa Simone’s work isn’t the usual dreary tome stuffed with arcane wisdom buried beneath paragraph-length sentences seemingly written by someone just learning English as a second language. This is certainly the first embedded book with characters. The first with action, and with interesting and cool stories.

Bad code that makes a phone burst into flames?

What fun!

This is a James Patterson-style fast-paced book with dialog as close to gripping as one can imagine for a computer book. Its uniquely embedded focus twists together elements of hardware and software just as we engineers do in our daily design activities. One can’t be understood without the other. Code makes the hardware smoke. That’s unheard of anywhere but in the embedded industry.


William Wong from Electronic Design Magazine writes,

Great title and a good read too, especially if you like stories from the trenches. Simone does more than just revive old ghosts. She brings out the debugging techniques in context.

This storytelling-approach helps you remember the techniques. Even expert programmers with plenty of debugging background can read the book solely for its educational and entertainment value, possibly even picking up a few useful tips along the way.

Debugging is still an art, not a science. Simone attempts to bring some rules and reason to programming.

The narrative approach is used throughout, except for the appendix outline of debugging secrets. Many are common sense or ones usually picked up with experience but some may surprise you.

And yes, one of the chapters is entitled If I Only Changed The Software, Why Is the Phone on Fire?

The review can be found here.

Several readers commented on the test case article published at here. The reader responses are also presented below.

I really liked the article and the way it was presented. Well done Lisa.

I passed the code through my normal Lint system and it caught the problem and pointed out a couple of others too. This is what it reported:

  1. The Comparison for OvenPW less than 0 at the end is unneccessary, since OvenPW is an unsigned number, it can’t be less than 0. This is a clue to the error.
  2. The loss of precision in the subtraction as the two unsigned numbers (reference_temp_A2D_counts and actual_temp_A2D_counts) are subtracted and the result placed in the signed number, delta_temperature. (another clue)
  3. The loss of precision as the ovenPW is calculated from the Delta Temperature. This is where the problem manifested itself.

An unintended lesson of this, pay attention to what Lint is telling you.

Bob Bailey
Sr. Software Engineer

Thank you Lisa. Your article was a fascinating reading experience. I can only conclude:

“Two sensories are always better than one.”

Art Devine

Dr. Simone’s paper is very thought-provoking, and is refreshingly easy to read. Her approach to solving a problem extends far beyond ovens, of course, and should give us all pause to reflect how we could better do these things. Hats off to her!!!

Thomas Mann

This article is definitely worthwhile to promote as a vivid C programming case or as a trouble-shooting case. It is enlightening for reader to think thing in reverse engineering point of view.

Larry Luo

Out of sheer curiosity, I tried the attached source code with some C compilation tools I haved. Some compilers (e.g. TI Code Composer C/C++ compiler for TMS320C54x) issued a warning like “pointless comparison of unsigned integer with zero” on the instruction “if (ovenPW < 0) …”, giving the programmer a chance to notice the bug described in this article.

Some other ones (e.g. MS Visual C++ 6.0) didn’t report any problems even with the strongest warning level set.

Kazimierz Koziarz