Go here to sign up for The Embedded Muse.
The Embedded Muse Logo The Embedded Muse
Issue Number 467, April 1, more or less, 2023
Copyright 2023 The Ganssle Group

Editor: Jack Ganssle, jack@ganssle.com

   Jack Ganssle, Editor of The Embedded Muse

You may redistribute this newsletter for non-commercial purposes. For commercial use contact jack@ganssle.com. To subscribe or unsubscribe go here or drop Jack an email.

Contents
Editor's Notes

SEGGER embOS-ULTRA

Tip for sending me email: My email filters are super aggressive and I no longer look at the spam mailbox. If you include the phrase "embedded muse" in the subject line your email will wend its weighty way to me.

The Embedded Online Conference is coming up in April. I'll be doing a talk about designing hardware and software for ultra-low-power systems (most everything one hears about this subject is wrong). The normal rate for people signing up in April is $290, but for Embedded Muse readers it's just $190 if you use promo code MUSE2023.

Is life a tragedy or comedy? I prefer the latter so this issue is devoted to April Fool's Day.

Quotes and Thoughts

I don’t want to make the wrong mistake – Yogi Berra

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.

Freebies and Discounts

The Active-Pro is a highly performance optimized “printf” debugger that captures detailed debug information sent from a single line of code in your firmware, and can contain the graphed values of variables and the exact timings of textual debug messages as they are executed. The folks there generously donated one for this month's giveaway.

Enter via this link.

The Secret of My Success

The blue light of the TV flickered on the blank wall, but it went unnoticed by me as I slumped in my old armchair.

It had been a bad week. She left on Monday, screaming that she couldn't take all of the equipment piled everywhere. Me, I thought that old Tek 545 was a collector's item, an antique. Sure, the dust was pretty bad, but you can bet we were the only couple in town with a living room populated by old scopes and CP/M machines. 

Women - I'll never understand them. Like, that time my homebrew furnace controller burped and drove the house to 115 degrees when we were gone for the weekend. Hey, I never liked those pets anyway, and the smell did eventually come out of the carpets. Pretty much. I mean, it was just a little software bug; we all have those!

And she never forgave me for the fire. Yeah, next time I'll put a bigger heat sink on the power supply. I admit it - I learned a lesson. The scorch marks on her dresses don't really look all that bad. Jeez, you'd think she'd be a bit more understanding!

 I reached for another bag of chips as the chair groaned a bit more. One of these days I'm gonna have to work off some of the excess pounds. A decade spent in the lab drinking Jolt and munching fries had taken its toll. Despite the flab I still know calculus and can program in C; surely a dream dude for any discerning woman. I bet I could wow them at the local watering hole with my great stories about TCP/IP!

Well, this is Silicon Valley after all, where relationships, jobs and careers are measured in milliseconds and loyalty doled out by the microgram. Electronics is a dog-eat-dog business and I'm an old hand at crawling out from the wreckage. Like that last startup I worked for. I told 'em we'd get that product out the door, eventually anyway. We woulda survived if that idiot president just got another couple of mil of venture capital. For a while at least.

Ya know, maybe it was losing that job that ticked her off. I figure, what's the big deal? She should be used to this by now. Check out my resume - it shows lots of experience at lots of places. No one can beat this!

I picked up the phone but heard only the accusing silence of a non-payment disconnection. No matter. Time to find another company looking for my embedded expertise. There's a startup a minute here, pigeons ripe for picking.

I clumped out of the trailer's front door and found Big Al, the usual wild look in his eyes, mouth working hard on this morning's sugar raised, the white powder spotting his beard.  "Al, buddy, you're outa work too, huh? How's the wife and kids?"

"Kids? Kids? Yeah, come to think of it I did notice some little people living with me. I wonder where they came from? Check this out." With that he shoved a coffee-stained fragment of the San Jose Mercury News into my hands. I quickly took in the circled want ad. "ENGINEERs - microprocessor savvy designers and programmers needed. C, FPGAs, Rust, assembly a plus. Exciting opportunity for a motivated developers in a new high-growth company."

A slow smile spread across my face. Here was our pigeon; I was already mentally spending the signing bonus.

That afternoon, T-shirts cleaned and pressed, with most of the donut detritus hurriedly wiped from Al's beard, we met with the president of Galaxar Enterprises. Yep, just as usual, this man was the typical harried executive desperate for people, so desperate he had neither the time nor resources to do much of a background check. Not that my background is so terrible; it's just that there's so much of it.

"You know C? Schematic capture? What's the last project you worked on?" he mumbled, looking at his watch while the beeper pinged an urgent tune.

"We did that Internet Cappuccino maker for Kitchen Services; you must have read about it in the press. Yep, that puppy had a MIPs based coffee engine with 64 megs of RAM!"

"Didn't they go Chapter 7?", he interrupted, interested  now.

"Trust me on this. The boss was an idiot. He just didn't understand how much compute power we needed to blend the perfect cuppa joe. That sucker could crank some coffee, believe me. If they hadn't been so stuck on the cost of goods we coulda cleaned up the Cappuccino market. We were practically done with development when the SEC raided us."

 "OK, OK, look, when can you start? Now? Don't you guys ever shave? Hell, just sit here and Bob will tell you what to do."

Bob, engineering VP, was one of those snotty-nosed brats with a degree and an attitude. "We're building a new marine VHF radio for the recreational boating market. That means there are three main design parameters. First, the unit must be totally sealed to ensure it's waterproof. Second, the sell price can't exceed $250. And obviously the unit must be simple enough that even the most casual boater can use it."

He went on to tell us how we were going to design the product. Us! Can you imagine? As if I don't understand project planning, structured design, discipline design, and all of that utter crap. Me, I prefer to skip all of that non-productive nonsense and just bang it out.

I zoned out, the drone of Bob's voice barely noticeable, nodding at the right time while planning my next move. Clearly it was time for the old end-run. Saturday night Al and I marched into the president's office. "Herb," I started, "we know you're running out of venture money and an IPO is at least a year away. Bob's planning to spend another three months just doing preliminary design. Whatdoya want, a design or a product? Trust me on this - we can pound out a design in a week, max, and then get the radio done in no time."

Herb's eyes gleamed. It seems that he, too, was fond of Steve Jobs, where unbridled passion and hope fuels the dream of tomorrow's big score. Discipline? Bah. Just lemme at a problem and I'll get it done. With a bit more prodding Herb agreed that this project was so important he'd give it skunk-works treatment, get Bob off of our backs, and let us report directly to his president's office.

The week sped by like a read from cache memory. Al slouched into my cubicle, let out a long, satisfying-sounding belch, and asked "didn't we promise Herb a spec or something?" Right! Never let the boss, down, that's my motto. Unless there's a good reason, of course.

"Sure, look, just grab those header files we've been working on and edit a bit of descriptive stuff at the beginning. They'll never read it all anyway. If he complains we'll tell 'em not only is the spec done, we've incorporated it into the firmware. How can he get upset if he sees we're already coding?"

Herb swallowed our header files hook, line and sinker. He's thrilled that we're already cranking out software, and giddily reported our progress to the venture capitalists. I think they're already mentally spending their IPO profits. Bob is muttering vague threats, but he's been squeezed into the user-interface group.  He wants Al and I to take on that new college grad, Marty. We're supposed to show him how to get projects done. It's  not all bad; the kid has a car so can get us beers and carry-out.

The secret to success in this business is to look busy, keep a prototype in a state that looks like it has some level of functionality, and always agree with the boss.  And you can't act like you have a personal life when battling a schedule! Heck, after just three days on the job Marty asked if he could leave at 5 to celebrate his first anniversary. I straightened him out. "Kid, trust me on this. We all go through one or two starter marriages, you know, no kids, no property, no regrets. Don't take it too seriously. Now let's order a pizza and get back to work." It was probably a good thing that I turned off the switchboard that night, so he wouldn't get distracted by all of those frantic calls from home.

And that kid did need some attention. I caught him late one night doing a spell check on his comments! Somehow he missed the fact that a ship date loomed; comments are always the first thing to go. "Kid, trust me on this. Never include a comment that will help someone else understand your code. If they understand it, they don't need you." I think he gets the picture now.

As time moved on we started having trouble fitting the binary image into the CPU's 64k address space. "This always happens", I reassured Herb, "them 8 bitters just can't handle the sort of code we're cranking out for you. Look, we'll just stuff a bigger part in there this afternoon. No problemo; I've done this a million times."

Big Al's eyes lit up when I suggested we look into a 32 bit processor. "I've got just the ticket. There's one I've been itching to try; it's totally reconfigurable, you can even define your own instruction set. Man, this is gonna look great on my resume!"

Ah, resume fodder, the grease of the industry. Herb didn't seem to concerned about the increased cost of goods - at least he wasn't asking any questions - so I set out trying to find some way to cool the sucker. With luck a big old heat sink and decent-sized fan might be adequate. Jeez, maybe I'll use the next size up; those burnt dresses still haunt me at times.

We optimized the instruction set on the CPU to play DoomStar III at awesome speeds. The best part of using a custom architecture was that I got to port the entire GNU toolchain to our chip. That compiler sure is tricky! First time I'd ever fiddled with a code generator, so it naturally took a bit longer than planned to get working - mostly - tools.

As the weeks passed Herb got noticeably more antsy, checking on our progress on a daily, and then hourly, basis. This always happens, and is a sign that the old cash reserve is evaporating. I started running to the bank the minute paychecks came out. No one's gonna stick me with bouncing paper! Been there, done that.

Bob - remember Bob? - strolled into the lab one afternoon to check on our progress. It seems the fool had actually invested his own money into the company! He's correspondingly annoying about what we do, even though my end-run had gotten him off the project months before. Oddly, he seemed upset about the cooling fan. "This thing has got to be totally sealed, so no water gets in!" he whined.

"Yeah, yeah, just mount it in a dry place or something", I replied. "I can't be bothered with that sort of stuff. You know how much power this sucker uses?" These company men are all stress puppies. Not me; I'll be going strong when he suffers his first mid-30s myocardial infarction.

Christmas rolled around - or was it Easter? I dunno, we were plenty busy chasing down bugs and making feature changes. Bob's paycheck bounced. I knew that Herb had been doing some fancy footwork to keep things afloat, but when everyone in accounting quit, complaining about insolvency or something, the standard exodus began. As usual, engineering remained untouched by the various rounds of layoffs. They needed the products we make to survive. I love this field!

This seemed like a great time for a two week vacation, though Marty seemed almost hysterical that I'd take off now. "Kid, trust me on this. Never complete a project on time. If you do, they will think it was easy and anyone can do it and they don't need you. Now I'm outa here for a while. Look busy and we'll sort it all out when I get back."

I got back, more or less sober but feeling great, to find the front door padlocked and a sheriff standing guard. Marty, skulking in a dark corner, grabbed my arm and moaned that he couldn't build the code at all while I was away. It seems he had trouble locating all of the source.

"Kid, trust me on this. Never archive all the sources necessary to build a binary. Always hide a few on your own disk. If they can build your binary, they don't need you. What do they teach you in college, anyway?"

He said the creditors got fed up and were demanding their money. Half the employees were suing because their paychecks bounced. A satisfied grin spread across my face as I recalled beating the rest of those idiots to the bank.

Marty shrieked that Herb was suing all of us in engineering for not meeting promised dates, specs, or features. "Kid, trust me on this. They always sue. That's why I own nothing. What do they think they'll get, my trailer? The bank owns that!"

Well, it seems my two week holiday might extend itself a bit. No worries there! After such a tough project I needed a break. It's time to sleep in for a while, build up those reserves.

Days later an awful booming interrupted my sleep. "My god, it's not even noon!" I shouted, "go away". The door slammed open and Big Al loomed over me. "Check this out." He unwrapped the newspaper from around his BLT and handed me a section from the want ads. Yep, old Al was right on top of things again. Another startup, as usual desperate for a pair of gurus like us, no doubt willing to hire at any price.

A harried president briefly interviewed the two of us, asking lots of questions about our most recent experience. We gave them the scoop on the VHF radio, but had to parry his request for references. "Sorry - they went out of business. Shame, that. There's no one there you can call. But we built a hell of a radio for those guys. It's too bad management was so screwed up they folded. Hey, it happens all the time in this industry."

"But trust me on this - you need a graybeard like me to mentor your young engineers, and to get this project out now! I'm ready to start coding today. What is it we're building?"

April Fools

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,000,000 computers became self-aware and returned the single word "MORON" in 72 point type to all searches on "Kim Kardashian."

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.

Agile Methods

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?

IEEE News

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) titles of hot papers:

  • 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 "How Effective Developers Investigate Source Code: An Exploratory Study." 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.

Caffeine Deprecated

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.

GoTo News

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.

SCO Wins

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.

Failure of the Week

Have you submitted a Failure of the Week? I'm getting a ton of these and yours was added to the queue.

John Beatty and other sent this: From https://www.bbc.co.uk/news/uk-england-tyne-60369098
An energy firm has apologised after 74 customers hit by power cuts during Storm Arwen accidentally received compensation cheques for trillions of pounds. Northern Powergrid is paying tens of thousands of pounds to customers hit by days of outages in November. But a number with Halifax and Newcastle postcodes received cheques made out for 13-figure sums. Northern Powergrid said a clerical error was to blame.

This is from Joe Grand:

Jobs!

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

These jokes are archived here.

About The Embedded Muse

The Embedded Muse is Jack Ganssle's newsletter. Send complaints, comments, and contributions to me at jack@ganssle.com.

The Embedded Muse is supported by The Ganssle Group, whose mission is to help embedded folks get better products to market faster.