You may redistribute this newsletter for non-commercial purposes. For commercial use contact email@example.com.
Did you know it IS possible to create accurate schedules? Or that most projects consume 50% of the development time in debug and test, and that it's not hard to slash that number drastically? Or that we know how to manage the quantitative relationship between complexity and bugs? Learn this and far more at my Better Firmware Faster class, presented at your facility. More info here.
|Quotes and Thoughts|
"Inspections are one of the most effective defect removal techniques. Testing is one of the least effective defect removal techniques. We know this from measurements; it isn't speculation. And yet, what do most organizations do? They test. What do most organizations not do? They don't inspect. Why is this?" Jeff De Luca
|Tools and Tips|
Please submit clever ideas or thoughts about tools, techniques and resources you love or hate. Here are the tool reviews submitted in the past.
Row hammer can cause unwanted bit flips in DDR3 memory. We've known about this for some time, but were assured that the problem would go away once we migrated to DDR4. Turns out, that might not be the case. Steve Leibson has a worthwhile, and scary, post about this here.
Chris Deckard had a calculator suggestion:
Grzegorz Mazurkiewicz suggests a plotting tool:
|Freebies and Discounts|
I'm a big proponent of the Ada language, so this month will give away a copy of Building Parallel, Embedded, and Real-Time Applications with Ada, by John McCormick, Frank Singhoff and Jerome Hugues. This is excellent introduction to the language though at $114 (on Amazon) is quite overpriced. I reviewed it here. (The GNAT Ada compiler is free and open source).
Enter via this link.
(This is a story I wrote in 2004 that seems appropriate this week - Jack).
President-elect Bubba "the can man" Jones expressed surprise at his unexpected win in last night's quadrennial elections. With 100% of the precincts reporting in, Jones overwhelmed the opposition by acquiring an astonishing 65.536% of the vote. His opponents garnered a total of just 1.024%, with the rest strangely going to an as-yet unidentified candidate named "hckergrrl".
Seeming confused by the crush of reporters and well-wishers Mr. Jones continued to hover protectively over his shopping cart. Suspiciously eying members of his new Secret Service detail he was heard complaining about attempts to take his collection of aluminum cans and old clothes. "Nobody ain't gonna rip off my stuff," he muttered. "Dem cans worth 2, mebbee 3 bucks."
Hustled into the waiting limo he expressed delight at the prospect of sampling the car's mini-bar. Tonight the president-elect remains in seclusion in the Blair House, hastily-recruited aides telling reporters he was "sleeping off the effects of a trying campaign."
Though it remains unclear just how Mr. Jones won the presidential election despite his not having been on the ballot, this reporter has seldom seen an election run in such an efficient and forthright manner. Contrast last night's speedy decision with the rancorous climate of just four years ago, where slim margins and problems with paper ballots led to a court's decision that disenfranchised voters nationwide.
Modern technology has eliminated the age of hand-counted ballots. "Hanging chad" will be nothing more than a colorful phrase recalled in history books. Recounts now take seconds. Never again will the courts decide an election. Call 2004 "The Year of the Electronic Vote."
Thank the citizens of Florida for our electronic elections. Misplaced ballots, poorly-punched selections, and perhaps even outright corruption held the 2000 presidential race in suspense for weeks. Determined to avoid the scandals, the Sunshine State replaced thousands of antiquated manual machines with the latest of electronic vote counters. High tech touch screens instantly record each voter's decision, transmitting the results to a national database when the polls close. Recounts involve nothing more than a retransmission of the data, since we know the computers themselves are deterministic, immune from fraud, and cannot make mistakes.
Initial trials in the 2002 Florida primaries seemed less-than-promising. System crashes, locked up touch screens, and confusing instructions held the McBride/Reno contest in abeyance. Yet a winner did emerge, to tackle the incumbent in November's general election. Call 2002 a prototype of success, one that blazed a trail to this new and better form of e-Democracy that our children will inherit.
Luddites suggest that we rely too much on software for critical systems, sometimes referring to the Navy's unfortunate Smart Ship program. Recall, though, that after the sixth fleet attacked Palau in Micronesia earlier this year, the review board showed the logic of that autonomous decision: the computer realized that Palau lacked the ability to shoot back. "This clearly shows the efficacy of a system designed to win wars," Admiral Decobocker noted, "the system created a war that it could not lose. The subsequent divide overflow that crashed the flagship's propulsion system was entirely unanticipated."
(Reports indicating the ship was overwhelmed by an unruly band of Caroline Islanders who turned it into a floating casino bar remain unconfirmed).
Others mentioned last month's recall of 600,000 Internet-ready automobiles when hackers found they could deflate the cars' tires, reprogram the engine controllers to emit constant backfires, and lock the windows up and doors closed with the heat on "high". Detroit reluctantly admitted to a buffer overflow problem but stated these were minor problems blown out of proportion by the press. Spokesman Graeme Kirchner once again urged passage of the National Anti-Hacking Act, saying "these bloody unsupervised latch-key kids run rampant through the computer networks. Parents should keep them bloody well away from the bloody home computer."
To get to the truth of software risks I interviewed Tom Thorten, lead software engineer of the SmartVote system employed so successfully in this week's elections.
Me: "Mr. Thorton, isn't this device what you folks call a safety-critical system?"
TT: "Nah, this isn't a safety-critical app. That's for avionics and nuke plants. No one's gonna die if this thing crashes. Hey, if there's a problem with this box ya just reset and carry on. Pretty much like any chunk a code."
Me: "How can you insure the vote is tabulated correctly?"
TT: "Vote? Is that what this thing does? They just told me what to put on the LCD and how to log the data. The spec was pretty light, know what I mean?"
TT: "Well, it's like any system. The boss is wrapped up with making promises to customers. Her boss is usually off testifying somewhere, and the Big Boss is still awaiting extradition from Barbados. It's pretty much up to me what this puppy does."
Me: "How was this tested?"
Me: "No. What happens to the data?"
TT: "Oh, we toss it into one of those embedded DBs, a cool relational thing. Sure wish it was reentrant; those corruption problems are killing us. Then at the end of the day we TCP it to Republican National Headquarters. Or was it the Dems? One of them, they keep changing the IP address on us. Little do they know - we stuck in a back door that lets us set a new IP at will. Saves a recompile every time they change their freakin' minds. Those dudes then dump it all into the National Database. But our box logs the data and ships it out. After that it's not my problem."
Me: "So if these things are on the net, what about security?"
TT: "Well, I guess some folks might want to hack their way in, but it's pretty unlikely. We're running Embedded Win eXtraP, the most secure Win OS ever. It's so good it keeps downloading patches and fixes; hey, the system we ship evolves to something else over the course of a year. It's like, organic, man. No one really even knows what the code base looks like now. Pretty awesome, know what I mean?"
Me: "No. So no one can break in?"
TT: "Nah, probably not. Well, not at least if the users had a brain. I can't figure out why our customers never seem to set up a password like the read.me tells 'em to. Half them systems are wide-open! You know users, though. It's like my cable modem, you know? I see all sorts of open systems on the cable. My kid even ripped off some lawyer's Amex numbers from a Word doc on this dude's exposed C drive. Sure am proud of that little rug rat."
Me: "In Florida some people struggled with system lockups. What happens then?"
TT: "Oh, jeez, customers complain about every little thing. Just reset it, for Pete's sake, and don't get your panties in a wad."
Me: "But what happens to all of that data?"
TT: "Bit bucket, I guess."
TT: "/dev/null. You know."
Well, the arcane language of the computer professional was something we English majors didn't learn at Princeton. But I feel it's only proper to delegate the complexities of encryption, computers, and corporate accounting to those professionals who know these things best. Proper government oversight, as mandated in the Public Security and Trusted Computing Act of 2003, insures the nation's interest will be met. Mr. Thorten assured me that the Transportation Security Administration will start examining his code base "real soon now".
One Person, One Vote
President-elect Jones inherits a fractious constituency, divided in part by the nature of the very vote that gave him the nation's highest office. Perhaps the largest issue brought to the fore by various commentators in this post-election day is that of universal suffrage. Just what does "one person one vote" mean in a high tech age? Does your vote matter?
The 2000 presidential contest resulted in a razor-thin margin. Some contend that it makes no difference who had won that election, since the difference in votes was in the noise. Either candidate would have had the support of half of the electorate.
After the next mid-term elections a slew of contests won by the narrowest of margins raised questions only recently resolved by the Supreme Court. In a unique move the nine Justices deferred to the analysis of statisticians, who argued that uncertainty is part and parcel of every data gathering exercise. They pointed to the Gallop Polls which have long had an associated error band.
In Florida and other states an automatic recount is mandated when a contest results in only 0.5% difference or less between the candidates. The statisticians argued that such a small delta is meaningless, that no amount of recounting or runoff elections would express the will of the people with any more certainty. Justices bought this argument, resulting in the famous 3 sigma election rule: if the error does not exceed 3 sigma, why worry?
As the Chief Justice wrote in his majority opinion, "hey, this is the government. You just can't expect nine 9s."
After that landmark decision the liberal press was taken to task for promulgating the idea that voting was a quaint but pointless exercise. One wag suggested, for instance, that a Republican in Maryland (there are a few) shouldn't bother casting a vote in state-wide elections. The long and overwhelming history of Democratic successes there suggests that Democrats waste their time if they vote, and Republicans waste their spirit. To a first approximation the outcome seems preordained. The old saw "my vote negates yours" now reads "my vote counts as little as yours."
This reporter would argue that every vote counts, just as it did when the Founding Fathers brought forth this great nation more than 200 years ago. The Supreme Court's unfortunate decision did not factor in the power of technology to solve most ills. I see no reason why our scientists can't employ the same technology that so accurately guided the Mars Climate Orbiter to the surface of Mars, or that enabled Armstrong's triumphant Apollo 13 landing, to insure every vote counts.
Don't be misled by critics who contend that, in the absence of paper records, an e-recount is nothing more than another database download. Does a ballot whose chad-clinginess is interpreted by an army of well-intentioned but exhausted observers better represent the will of the people?
The new technology of electronic voting insures every person is properly represented. Your touch-screen selection instantly tips the balance in favor of your candidate. The margin for error, due to the supreme number-crunching power of the computer, is surely zero. I look forward to the day I can vote from home using the power of the Internet and the security inherent in the most popular operating systems.
The Rest of the Story
In other news, this reporter was heartened to see the Dow Jones sharply rebound when Red Hat (the latest addition to the esteemed ranks of the 30 industrials) released their Open Vote package. At 4096, up from yesterday's close of 2048, the Dow promises release from this long-lived recession.
|More Tips for Aspiring Developers|
In Muse 315 readers sent in tips for aspiring developers. Since then a number of readers have sent more.
Andy Kunz wrote:
Scott Winder has some great points:
Ray Keefe thinks:
Caron Williams contributed:
Harold Kraus has some outside-the-box suggestions:
|This Week's Cool Product|
Battery-operated devices are becoming more and more important, but it's notoriously difficult to accurately measure a cell's state of charge. Generally voltage alone is not a good indicator of reserve capacity as the discharge curve of most cells isn't linear. Maxim's new 172xx ICs are fuel gauges that promise to increase battery capacity accuracy.
Traditionally we've measured capacity by coulomb counting. Integrate current while charging and subtract the amount used in the discharge cycle. It's easy to do but provides only a rough idea of remaining capacity, and suffers from drift. Small accumulated errors compound. Battery capacity degrades with age. Maxim combines coulomb counting with a very complex proprietary algorithm. The parts reportedly achieve better than 3% accuracy 94% of the time, and better than 10% 99.5% of the time.
The devices sport a lot of features, including prediction of battery end-of-life, computed by accumulating capacity loss over each charge/discharge cycle. It supports multiple cells with cell balancing. Interestingly, instead of a sense resistor one can use a PCB track to form 0.0035 ohms of resistance.
It's designed to annoy end users as an encryption engine can be enabled to prevent battery cloning, sort of like how some printers won't take third-party ink cartridges.
On the down side, the part seems to be meant for batteries with lithium chemistries only - the data sheet is somewhat confusing about this. And with 40 uA of active current it's not for ultra-low power systems. The vast array of features comes at a price of a dizzying array of control registers.
According to Digi-Key these are $1.59 in quantities of 2500.
Note: This section is about something I personally find cool, interesting or important and want to pass along to readers. It is not influenced by vendors.
Let me know if you’re hiring embedded engineers. No recruiters please, and I reserve the right to edit ads to fit the format and intent of this newsletter. Please keep it to 100 words. There is no charge for a job ad.
|Joke For The Week|
Note: These jokes are archived at www.ganssle.com/jokes.htm.
When your hammer is C++, everything begins to look like a thumb.
|Advertise With Us|
Advertise in The Embedded Muse! Over 27,000 embedded developers get this twice-monthly publication. For more information email us at firstname.lastname@example.org.
|About The Embedded Muse|
The Embedded Muse is Jack Ganssle's newsletter. Send complaints, comments, and contributions to me at email@example.com.
The Embedded Muse is supported by The Ganssle Group, whose mission is to help embedded folks get better products to market faster. We offer seminars at your site offering hard-hitting ideas - and action - you can take now to improve firmware quality and decrease development time. Contact us at firstname.lastname@example.org for more information.