Do you have a backup strategy?
Published in Embedded Systems Programming
|For novel ideas about building embedded systems (both hardware and firmware), join the 27,000+ engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype and 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
Dateline: April 1, 2005.
Some wild news items have come across my desk recently. I was surprised to learn of a C# 8051 compiler. Another press release explained why all those servers smoked when Slashdot slashdotted itself. Then Google's mesh of 100,000 computers became self-aware and returned the single word "MORON" in 72 point type to all searches on "Britney Spears."
Now it seems Linus has ported Internet Explorer and Outlook to Linux. Why? Well, he figures that the only way to combat Microsoft's hegemony in operating systems is to invite the same sorts of virus attacks that make Windows so popular. Once hackers see Linux as a viable target, the same brain-dead PC users who don't upgrade their virus definitions and who never use a firewall will be drawn to the OS. Then they'll see how "ls -la" is so much more intuitive than Windows Explorer. Apparently spam messages (URGENT AND CONFIDENTIAL) directed to Linux machines already advise users to immediately issue "rm -r" to get the $27 million that's sequestered in some bank in Nigeria.
Here are a few more oddities you may find interesting.
The agile community has come up with a new methodology that builds upon the ideas and successes of SCRUM, TDD, FDD, and XP. EXtreme saboTage dOoms softwaRe pronTo (EXTORT) defines four practices a healthy software organization can use to improve their software processes.
Tom Stochastic's book "EXtreme saboTage dOoms softwaRe pronTo Explained: Embrace Chaos" expands XP's philosophy of provoking change early to provoking failure as soon as possible. From the book: "Software costs are spiraling out of control. Every year projects get bigger and later, yet studies show few large projects are ever delivered. By provoking failure early companies can save billions which would have been squandered on gigantic IT projects that are inevitably doomed to fail."
The author dissects Chrysler's famed C3 project, which has often been touted as a poster child for eXtreme Programming. After the original project became a complete debacle, Kent Beck was called in to use his XP practices to save the program. Four years later, again over budget and behind schedule, C3 was cancelled.
By employing EXTORT on Ford's similar payroll system Mr. Stochastic was able to achieve complete program failure in only two years.
Instead of XP's "hard to remember" 12 practices, EXTORT needs only four. The first is a 15 hour work week. Tired people make mistakes, and the brutal 40 hours demanded by XP advocates tends to intrude on web surfing, laundry and long lunches. As Mr. Stochastic writes, "It's exhausting to even think about programming."
EXTORT requires team- instead of pair-programming. A single developer sits at a computer, whose output is projected on a 2500 square foot monitor in a stadium. 40,000 other developers in the stands heckle and kibitz. "Sure, it doesn't sound all that productive," says Mr. Stochastic, "but if two heads are better than one, think about the power of a small city all working together on a 50 line function. And stadiums already have the infrastructure to provide nutritious programming food, like hot dogs and beer."
Shops using EXTORT unfactor relentlessly. Code that can be obfuscated must be obfuscated. Obviously, software that clearly communicates its intent invites change. "Developers must be very afraid of the code," Mr. Stochastic writes, "otherwise they're likely to bow to pressure for bug fixes and enhancements."
(An unfactoring tool is available that removes white space, adds random carriage returns, renames all variables to Ixxxx, where xxxx are sequential numbers starting at 0001, and replaces comments with quotes from the Kama Sutra.)
Finally, EXTORT practitioners never construct a real test, which might break the code and lead to 20 hour work weeks. Limited unit tests are fine as long as none check extreme values or other, hard to debug conditions. Integration testing is required, but only by the customer. Users expect bugs; why disappoint them?
The IEEE Transactions on Software Engineering published an article engineers can actually read.
I do read - well, try to read - the Transactions. Check out some of the (for real - see http://www.computer.org/tse/archives.htm) titles of hot papers published in 2004:
- Optimizing real-time equational rule-based systems
- Software process representation and analysis for framework instantiation
- Using hammock graphs to structure programs
- The Effects of an ARMOR-based SIFT environment on the performance and dependability of user applications
- Analysis and visualization of predicate dependence on formal parameters and global variables
- Improving Cohesion Metrics for Classes by Considering Dependent Instance Variables
- Cognitive Heuristics in Software Engineering: Applying and Extending Anchoring and Adjustment to Artifact Reuse
And my personal favorite:
- BDD-based safety-analysis of concurrent software with pointer data structures using graph automorphism symmetry reduction
What a journal! Hard-hitting and pithy articles with titles like these are just the sort of thing every practicing engineer eagerly awaits each month. Why, here in Baltimore all of the newsstands and grocery stores stock copies of Transactions. They simply fly off the shelves. Street vendors hawk them to passing motorists. I saw one clutched in a homeless man's hands while he muttered about "A methodological framework for viewpoint-oriented conceptual modeling."
So what a delight it was to read December's "How Effective Developers Investigate Source Code: An Exploratory Study." (http://csdl2.computer.org/dl/trans/ts/2004/12/e0889.pdf, membership required.) The title sounded interesting, and the article itself was nearly devoid of the usual academic-speak.
But practical? Ha! The study used a broad sample base of! five developers.
But no doubt the researchers chalked up a pile of grant money, so it served a useful purpose after all.
Wet Planet Beverages recalled 14 million cases of Jolt Cola today after researchers discovered the drink leads to bug-infested code and violent workplace behavior. Long a favorite for late night programming stints, the caffeine-rich drink is a staple for 20-something developers working under crushing schedules.
Dr. James Wired explained that stimulants such as caffeine keep one awake; awake one can write programs. And all bugs stem from code. As he put it "no code, no bugs."
Dr. Wired also found a strong link (correlation coefficient of 0.999) between crazed sleep-deprived developers chasing masses of bugs with the deadline hours away, and crime. "You ever see a meditating Buddhist monk go postal?" he asked. "These uber-caffeinated drinks are like PCP. Just last night I saw a guy with eyes the size of the fabled mega-squid bashing his boss's Beamer with a Dvorak keyboard."
Wet Planet plans to release a new drink for programmers called "Slumber." Said to contain 20 mg of Phenobarbital the company promises an immediate decrease in software defect rates. "Three or 4 cans of this stuff and you'll have the highest quality code in town," a PR hack promised.
Starbucks countered with "Caf' ~Expresso," a decaf blend with three times the amount of Phenobarbital in Slumber. To encourage developers to continue to use their stores as meeting and work places all hotspots will be downgraded to dial-up.
Pillows will be provided.
Edsger Dijkstra has recanted his 1968 paper "Go To Considered Harmful." (Communications of the ACM, Vol. 11, No. 3, March 1968, pp. 147-148). That work was considered seminal at the time and spawned a wave of structured languages like C and Ada.
Recently, though, the National Enquirer quoted Dijkstra as saying "at the time most software was infested with gotos. Hell, look at Dartmouth Basic. The tiniest bit of code requires dozens of gotos. And FORTRAN! Did you ever see such convoluted mess? Yeah, they eventually tidied that language up, but look what's happened since.
"C, C++, Python, they're all the same. I need a bleedin' 62 inch HDTV monitor to see the code pushed a yard to the right by all those indentations! Remember when 'white space' was used to illustrate structure? Well now all we've got is white space. The code in a deeply-nested construct starts on column 1823! And it reads "while while while while while' like some perseverating autistic kid. You see 'ifs' nested so deep I need a bloody periscope to find the closing braces.
"And they call this stuff structured?
"I dunno what I was smoking when I wrote that paper. It was the 60s, after all. Somehow I figured the love and peace thing would translate into beautiful snippets of structure, bits of poetry crafted by long-haired programmers. Ha! Now we're all part of a machine, adding patch after patch to a rickety structure to get yet another product out the door.
"So now I'm thinking FORTRAN got it right in 1957.
"My new approach is called Outrageously Obfuscated Programming Slang, or OOPS. Structured programming often disguises code which is in fact a convoluted muddle. Looks good at first glance but when you dive into the stuff you realize the developer had tied himself up into a Gordian knot of do-while loops. With OOPS we embrace gotos; our special editor draws lines between each goto and its target. The spaghetti mess fairly screams at you off the page, making it easy to figure out what to refactor."
I visited Professor Dijkstra's lab for more background information on this story, but his assistant told me "goto" someplace as hot as a marketing guy when told there's been yet another schedule slip.
The long-running feud between SCO and, well, the entire world, ended last week when the Supreme Court forced IBM to publish all of their source code to every product they've ever released. After digging through hundreds of millions of lines of Autocoder, Cobol, Fortran, APL, C and more the court found a single comma they ruled was stolen from SCO Unix.
In their 682 page opinion, which used the "╕" character instead of commas, the Justices wrote: "This brazen and egregious theft of a much smaller company's intellectual property is intolerable. Some might complain that a single character does not deserve copyright protection╕ but in consultation with our panel of illustrious computer experts we found that the comma is composed of 8 whole bits╕ each of which was crafted and invented by engineers at SCO. IBM's wholesale pilferage extended to all of their products released over the course of generations."
SCO's chief executive Darl McBride released a statement saying: "Now that we've proven the Linux community is using our proprietary software it's our intent to go after every other company and individual infringing on our copyrights. Illegal comma users beware: pay up or face litigation!"
The Justices' opinion concluded with the statement: "We grepped the Constitution and found 585 commas therein. The United States will therefore pay SCO a yearly licensing fee of 585 billion dollars╕ with additional reparations backdated to 1789."
Reportedly Microsoft has offered their own comma character ("$") for a license fee of "merely half what those pirates at SCO are charging. And ours comes with an automatic update service."
In related news the legal firm Botts, Butts, Botts & Butts, LLP, SP, LLC, Inc, GMbH, AB, Ltd, recently was awarded a software patent for the loop. 29 claims cover all conceivable forms, including the infinite loop. A press release on their web site advises all companies providing, using, modifying or maintaining any form of software to scour the code for loops, and to remove those immediately. The release goes on to say "in those very few percent of cases where it's either impossible or too costly to excise all loops, Botts, Butts, Botts & Butts, LLP, SP, LLC, Inc, GMbH, AB, Ltd offers a reasonable licensing plan enforced with just one dongle per loop used."
And that's the news for this April 1, 2005.