Follow @jack_ganssle

Embedded Muse 128 Copyright 2006 TGG April 4, 2006


You may redistribute this newsletter for noncommercial purposes. For commercial use contact info@ganssle.com.

EDITOR: Jack Ganssle, jack@ganssle.com

CONTENTS:
- Editor’s Notes
- Live From the ESC
- Yet More on Tools
- Computer History and Tidbits
- A Story For April Fool’s Day
- Jobs!
- Joke for the Week
- About The Embedded Muse


Editor’s Notes


There has been so much interest in tools that I’ll continue to run your submissions and thoughts as long as they come in. Charley Moore has summarized and sorted all submissions so far into a document which I’ll be posting to www.ganssle.com soon. Do feel free to send in your thoughts about commercial tools, both positive and negative, and I’ll post those. One challenge in this industry is getting the real scoop on products; perhaps by sharing our experiences we can help each other. If you do chose to praise or pan a product, please include the product’s version number.


My Denver and Dallas “Better Firmware Faster” seminars (April 26 and 28) are booking up quickly. Want to become your company’s embedded guru? Check out http://www.ganssle.com/classes.htm for details. There’s info on inexpensive flights into these cities from around the nation there, too.

TV chef Emeril is always “kicking things up a notch” by adding garlic and other bits of zestiness to his recipes. How are your firm’s engineering recipes? Want to kick up your development processes by more than a notch? I can present my Better Firmware Faster class at your facility. See http://www.ganssle.com/classes.htm .


Live From the ESC


Along with 15,000 others, I’m at the Embedded Systems Conference in San Jose, CA this week. The show floor is packed with vendors pushing new and old offerings. Two classes of products, though, have caught my attention.

The first are static checkers. Most of us are familiar with Lint, which is a syntax checker on steroids. But three companies are showing a different type of product; a type that purports to find *runtime* errors. To my way of thinking this is great stuff; what we really want is a program that looks at our source and points out every mistake. The products at the show aren’t that perfect, but do find a large class of errors. Polyspace, Coverity and Klockworks all have booths here, and are getting a lot of attention from attendees.

Pricing models vary tremendously; none are cheap. But if they live up to the promises made the costs pale in comparison to what we spend debugging our code. Clearly this sort of technology is needed, and will be critical tools we’ll all use in the future.

I’m also fascinated by the new breed of FPGA compilers being shown at the ESC. A number of companies (Altera, Colexica, CriticalBlue) are twisting the FPGA paradigm away from EEs. These products, while differing in important ways, bring FPGA design to the software world. For instance, Altera’s C2H compiler generates C code for their Nios II CPU core (which resides in an FPGA) in the normal fashion. But is one routine too slow? Right click on the function name and the compiler will “accelerate” the code: it converts the C function to a bit of hardware that runs blazingly fast.

The line between hardware and software blurs even more.


Yet More on Tools


Dave Mazzoni likes Boost. Here’s his take: “I'm sure you're going to get a load of Email on this subject, so I'll keep mine short. Boost (boost.org) is a C++ extension that is being incorporated into the official extension to the language. Within boost are SEVERAL very useful tools for writing test driven code. The most impressive thing (in my mind) is that one doesn't have to change the code in order to test it. Otherwise, you might experience the horror of REMOVING the well placed debug print statements from 'tested code' to find the code then fails!”


Computer History and Tidbits


Max Maxfield is taking the concept of a relay-based computer a step (or ten) further. He’d like to get the community involved; check out his thoughts at: http://www.diycalculator.com/sp-hrrgcomp.shtml .


Debi Cole had some thoughts about the Eniac story in the last Muse: “Interesting Eniac story, but, as usual, there was no mention of the women mathematicians-turned-programmers who actually figured out how to program the damn thing to make it do something useful! Some of your readers may have followed Joyce Carpenter's blog link at the end of the story, but if not. Here’s a link to the real "computers":

http://www.witi.com/center/witimuseum/halloffame/1997/eniac.php .”

And here’s an interesting site linked from Joyce’s blog: http://history.sandiego.edu/gen/recording/computer1.html

Debi’s comments got me to thinking a bit. The word “computer” once meant someone who computed things. Women, mostly, rooms full of these folks laboriously calculated tables of functions and much more. Old-timers remember the CRC Math tables. Need the cosine of 3.4 degrees? Look it up there. The natural log 4.2? It’s in the tables, tables once figured with not much more than a pencil and a lot of care.

Many of us pre-calculator people worked slide rules in our youth to solve common math problems. But these rules were no more accurate than 3 decimal places. Precomputed tables gave much more precise solutions to everyday problems. I still use the government’s HO 229 tables to solve the navigational triangle when (for fun, now that GPS has replaced celestial) figuring position by the sun and stars at sea. Six thick volumes list nothing more than every possible solution to the triangle to 0.1 minutes of arc, since not so long ago navigators didn’t have access to calculators or computers. Though today a machine figures these numbers, once “computers” worked them out, enabling world-wide safe commerce.

And who can forget Grace Hopper, born just under a century ago (December 9, 1906), who shaped the electronic computer world in ways we still feel? She found the first “bug,” she built the early high level programming languages, and more.


A Story For April Fool’s Day


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, PLDs, 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 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? Heck, 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 insure 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 frustrated by Bob’s methodical approach to engineering. This valley is the land 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 me 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 banged 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 heck 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?”


Jobs!


Joke for the Week


Short of an apt phrase for the annual appraisal of your staff? Try some of these for size (reputedly from RN Officer Fitness Reports):
His men would follow him anywhere, but only out of curiosity.
I would not breed from this Officer.

This Officer is really not so much of a has-been, but more of a definitely won't-be.

When she opens her mouth, it seems that this is only to change whichever foot was previously in there.

He has carried out each and every one of his duties to his entire satisfaction.

He would be out of his depth in a car park puddle.

Technically sound, but socially impossible.

This Officer reminds me very much of a gyroscope - always spinning around at a frantic pace, but not really going anywhere.
This young lady has delusions of adequacy.
This Medical Officer has used my ship to carry his genitals from port to port, and my officers to carry him from bar to bar.
Since my last report he has reached rock bottom, and has started to dig.
She sets low personal standards and then consistently fails to achieve them.
He has the wisdom of youth, and the energy of old age.
This Officer should go far - and the sooner he starts the better.
The only ship I would recommend this man for is citizenship.
Works well when under constant supervision and cornered like a rat in a trap
This man is depriving a village somewhere of an idiot.
Only occasionally wets himself under pressure.