Follow @jack_ganssle

The logo for The Embedded Muse For novel ideas about building embedded systems (both hardware and firmware), join the 25,000+ engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype, no vendor PR. It takes just a few seconds (just enter your email, which is shared with absolutely no one) to subscribe.

By Jack Ganssle

The Hundred Years War

Published 5/27/2005

The war grinds on. After a century the tally stands at 30 million dead worldwide, with no end in sight to the slaughter. There's a disabling injury every 14 seconds; 100 lives a day are lost. Industry cranks out the machines of death, manned by citizen-soldiers on the field of battle.

No, I'm not reciting a history lesson about Europe in 1453. This is here and now, in the US and abroad. The battlefields are the highways; the instruments of war the automobiles manned by sometimes crazy, sometimes distracted, or sometimes just confused ordinary people. They range in age from 16 to far-too-old, their driving skills might be comparable to a NASCAR professional or perhaps are just being learned. Overconfidence abounds, yet at 100 feet per second, with cars nanometers from each others' bumpers, even a glance in the mirror may spell death.

We accept the carnage because. well, I really don't know why. In real wars ordinary citizens are often unwillingly drafted or co-opted into the battle by the power of the state. But on the roads it's different. We - each of us individually - make decisions to drive too aggressively, change lanes suddenly, run that red light or zip along the right shoulder at 30 MPH when the highway is gridlocked.

Various technology solutions have been presented, such as vehicle data recorders (http://www.edn.com/article/CA529380.html). No one seems very happy about this approach, other perhaps than the lawyers, despite the fact that similar black boxes have made air travel the safest form of transportation ever invented. The recorders turn accidents (though tragedies) into positive experiences. Investigators root out the cause of the crash and change something so that particular problem never occurs again. Realistically, there are so many car crashes that I suspect no agency or company could ever keep up with the volume of data. And since nearly all stem from stupid driver behaviors, which so far seems immune from change, I doubt that recorders would make the roads any safer.

Every parent of teenaged drivers lives in fear of that late night call. I've tried to give mine training, advice and wisdom, but have told them the most important tool they have, if they should chose to employ it, is reflection. Most drivers are an open-loop system, accumulating bad habits over years, rarely thinking about the implications of these habits. Instead, close the loop. Stop and think about your practices. Change something. No one wants to die, and none of the road insanity gets you to your destination any more than a few seconds faster.

I give the same advice to engineering groups. Stop and think about your development efforts. What crazy practices do you use to ship the system? Do you start in a spirit of professionalism and then descend into the 7 circle of hacking hell as the deadline looms? Are comments accurate or, in change frenzy, do you "forget" to update them as the code changes?

Feedback stabilizes systems, be they electronic systems or human. We all develop bad habits. Stop and reflect, from time to time, about your development (and driving!) practices. Bad habits are like entropy - they accumulate constantly unless one works hard to keep things in order.

What do you think? How do you avoid developing bad habits?