My Inbox Runneth Over - Embedded.com

My Inbox Runneth Over

Jack's last two columns provoked a flood of responses. This month he takes stock and makes plans to add to the toolbox.

Wow! I seem to have really started something with my last column, “The Curmudgeon Strikes Back” (July 2002, p. 9). That column, and the previous one on RTOSes, generated a flood of e-mail, more than the rest of the year combined. So why did I spend a year mucking about with function minimizers?

I feel a bit like the Howard Beale character (played by Peter Finch) in the movie “Network.” I shout, in print, “I'm mad as Hell, and I'm not going to take it anymore!” The next thing I know, other folks are echoing the sentiment all over the place.

Some readers seemed to know exactly what I was talking about. Steve Ackerman wrote, “The tech support (or lack of it) section was almost like dj vu.”

Steve also sent along a hysterical quote from www.bmug.org/news/articles/MSvsPF.html. The researchers compared results from Microsoft's Technical Support line to the Psychic Friends Network. You really must see the website for the details, but their conclusion bears repeating:

“In terms of technical expertise, we found that a Microsoft technician using Knowledge Base was about as helpful as a Psychic Friends reader using Tarot Cards. All in all, however, the Psychic Friends Network proved to be a much friendlier organization than Microsoft Technical Support. While neither group was actually able to answer any of our technical questions, the Psychic Friends Network was much faster than Microsoft and much more courteous.”

(In all good conscience, I must add that my own experiences with Microsoft Tech Support have been better. I stress, however, that it's been with either their warranty support or pay-per-incident services.)

Dave Boydston echoed, “When reading your article, I became convinced that I must be you in a parallel universe…. I could not help but hear myself over and over as I read your words.”

Dave also reminded me of another Good Guy company: V-Com, vendors of System Commander. I used System Commander for years, and at one time the combination of Partition Magic and System Commander was the hot set up for multiboot. The relationship between them was very much a symbiotic one. Unfortunately (in my opinion), neither company seemed happy with the symbiosis. PowerQuest wrote their own boot manager (Boot Magic), and V-Com wrote their own partition manager. I chose to stick with PowerQuest. Nevertheless, I'm happy to add V-Com to my list.

Greg Burnett added a new twist: “I just finished your article and wanted to let you know I was laughing out loud throughout. I guess I've been generating a mental list of good guys, like yours, but it is a list of magazines worth reading. Embedded Systems Programming is on the list. I think I read every column, and it takes me awhile to generate the momentum to read an entire tech magazine.” Thanks, Greg.

Regarding software quality, Matt Fichtenbaum wrote, “I realized that my generation (I'm mid-'50s) knows what craftsmanship is, and practices it where possible. The next generation knows about craftsmanship, but never has time to put it into practice. The generation to come will have no concept of craftsmanship. Add to that software's nature as a perfect implementation technology with no physical limits on complexity, and we're beyond hope.”

I have to wholeheartedly agree. Matt and I are not the only ones to be worried about the current state of software quality. What is one to say about software quality in an environment where periodic crashes are accepted as a fact of nature, sort of like catching the flu? I worry that we are rearing a whole generation of software engineers who simply don't grasp the notion that software that crashes is broken.

Speaking of software quality, I read a wonderful column on the subject, which I am recommending. It's written by Charles C. Mann, and is called “Why Software is So Bad (and what's being done to fix it)” (Technology Review, June 17). (It's also available online at www.msnbc.com/news/768401.asp.)

Not all the e-mails were about the curmudgeon column, or about Good Guys. Some readers took me to task, some more gently than others, for expecting to get what I needed from an off-the-shelf product like Sony or Dell in the first place. In a most intriguing analogy, reader Joseph-Paul Swinski reminds me of my own words: “It seems to me that you are failing to realize that buying and operating a PC is no different than buying and operating an RTOS. Buy only what you need. Once you own it, take control of its environment.”

He continues, “I am a true believer that feature bloat and other people's decisions that I am unaware of are two of the most damaging consequences of buying a pre-built machine.

“I put in a little upfront time (day and a half), research all the best parts for the best prices, order them online, assemble at home, and it never fails.

“Everything I want, I have, and everything I have is something I want. Sounds a lot like your recommendation for RTOSes.”

Joseph-Paul makes an excellent point-a point also made by several other readers, including Bill Dudley, Jim Moe, Walt Pawley, and Gary Bergstrom.

In my defense, I suppose I should point out that I've usually either built my own systems (beginning with an Altair 8800) or modified the heck out of them. I still have a customized Kaypro 4, complete with metallic purple and white paint job. One reason I fought, kicking and screaming, the lemming-like rush to PCs and DOS was that, for years, CP/M on a Z-80 based Kaypro just flat-out outperformed the PCs of the day. Even now, I could probably get a lot of work done (as in, a few edit/compile/test cycles) on the 2MHz Kaypro in the time it takes my 1.7GHz system to boot!

Kustom kars

Perhaps I should explain. I'm an old hot-rodder at heart. One of my first cars was a Model A Ford (back when an average citizen could afford one) with a stripped-down body, an Iskenderian cam, full-pressure lube, and other nifty features. It wasn't much to look at, and it wouldn't stop worth diddly, but it was a lot of fun.

Another car was a heavily customized (sectioned 3in., by yours truly) '40 Ford Tudor. If you know what “sectioning” means, then you know that doing it to a sloped-back Ford is a trick. The engine was much tweaked, as was the suspension.

Fact is, very few cars or motorcycles I've ever owned remained stock. Most had cams, carbs, and other goodies. Even today, gray hair and all, the car I drive is a souped-up Nissan pocket rocket. It takes me longer to get in and out than it used to, but it still feels great once I'm inside.

When I got into computers, my desire for customization never stopped. More than once, I've stated my goal: to have a computer with nothing in it by either Microsoft or Intel. Not that I have anything against Intel-we have them to thank for starting the revolution with the 8080-but I hate the x86 architecture.

I not only achieved that goal with the Kaypro, but dang near replaced everything by Digital Research, as well. Not liking the plain vanilla version of CP/M very much, I shopped around. Between software and hardware vendors (definitely Good Guys, all sadly defunct now) and freeware from the CP/M user's group, I managed to create a very nice environment for myself, tailored to the kind of work I do. Old CP/Mers will recognize the names: Borland Turbo Pascal, BDS C, SLR Assembler, Modem7, Wordstar, and Rich Conn's ZCPR3. Even Wordstar was, itself, customized.

One day I was discussing CP/M with someone, and listening to them complain about how hard it was to use. I was having trouble identifying, until I realized with a shock that every behavior my friend complained about, my system no longer did. I had virtually replaced the entire OS, beginning with the command processor (replaced by ZCPR3), and even to include the built-in function like DIR, ERA, TYPE, and so on. CP/M was a small enough OS that, if you didn't like something that it did, you could patch the source code, change it to do what you wanted, and rebuild it. The Kaypro also had a super-fast, hardware RAM disk, which made all the difference.

I now realize that one of my major beefs with modern PCs is that I can't customize them. Certainly not Windows XP, and lately, not even the hardware.

Many years ago, a colleague and I did a study on user-friendly software, which was then a popular buzzword. Among the several items on the “Computer Users' Bill of Rights” we listed was, “An environment that can't be changed, no matter how comfortable, is a prison.” A Sony with Windows XP feels a lot like a prison.

Here's a tidbit I only recently discovered. On the front panel of my Sony is a sticker that says, “Designed for Microsoft Windows XP.” It's only slowly begun to sink into my consciousness: they aren't kidding.

Time was, if you wanted to assemble your own PC, you began with a motherboard and added standard boards such as serial cards, printer cards, video cards, and so on. Even the big vendors like Dell, Gateway, and Sony used separate cards, like a Diamond Viper for video or a Creative Labs Sound Blaster. So once you got the computer, you could swap out these boards, or swap out the OS, and still find drivers for the hardware.

Not anymore. Over the years, various hardware bits like parallel ports, serial ports, and so on, have migrated to the motherboard. More recently-and this part, I didn't know-so have the video and sound hardware. This Sony doesn't have separate video and sound cards. What they have are the chips a vendor might put on the cards, but the chips are integrated onto the motherboard, in manners not necessarily like what other chip users might apply.

Why do we care? Because you can no longer go to a website and get updated drivers. Because you can't install Linux and get drivers. The only source for drivers for the Sony is…Sony. Sony will be happy to send you drivers and even update them as patches come out. You can get drivers for any operating system you want, as long as it's Windows XP.

Kustom komputers?

Let's get back to Joseph-Paul's comments. As I said, my stated goal is to have a system with nothing in it by either Intel or Microsoft (especially the latter). Oh, if I wait a couple more years, maybe I can afford an Intel Xeon or two, which will be okay, because it's not x86.

What I need is what I had with the old reliable Kaypro (which still runs, by the way; silicon doesn't wear out). I want a Kandy-Apple Metallic Purple and White, Kustom PC, customized inside and out, hardware and software. As Joseph-Paul and many others so eloquently pointed out, I'm not going to find that at Dell or Sony. Reader Mark Ramsell said it best: “Your situation is similar [to mine], yet you didn't come to the same conclusion that I did. Ask yourself, 'If I can't get good service, why should I pay for it?' Look at the licensing agreements of some of the software you own. Don't some of them specify that the product is not guaranteed to do anything and even if it does, they're not responsible for any damage it may cause. What are we paying for, if the product states it won't necessarily work?

“My conclusion to all this was to build my own and/or only use Freeware or GPLed software whenever possible. I can't support the Dells or the Microsofts in this world any longer. It is actually counterproductive to do so because it will strengthen their hold on us. Why would they ever bother to fix anything if they don't have competition?

“I realize not everyone can do this, and feel especially sorry for new computer buyers. Some think they'll just be able to plug the thing in, and they'll be able to solve problems with it. We know that's only the beginning. Soon they'll log on to the Internet and they'd better have Service Pack 2 for Outlook Express so it doesn't run programs that say they're sound files. And they'd better have a firewall running along with some antivirus software or they'll get hacked and/or hosed.

“It's supposed to be a tool, it should hide complexity, and make things easier for new users. Sure that's end-user mentality, but sometimes we just need to get stuff done.

“So how does it help to build your own? Well, we aren't donating funds to those with shoddy products, and we will know exactly what goes in the box. If we use open-source software, we could help the developers find problems and improve their products. This should force authors, who wish to collect money for their products, to provide real value and support.

“This is a tough road to follow though and the time cost is very high. Usually you won't be able to buy the latest gadget because it's not supported. I just feel it's the right thing for me to do because it will eventually help others.

“The expression is 'You get what you pay for,' but I think your article says, 'Every once and a while, you might get what you paid for.' I don't want to risk it anymore. The upside to building your own, if you survive the experience, is that you will learn a great deal.”

Well said, Mark. And all of you are absolutely right.

In my defense, I only want to add that I did build my own PCs at first-the 286 and 386 were strictly homebuilt, not even “barebones,” and so is the Pentium that was my mainstay for years (and still works just fine). I've only slipped twice over the years; once with my first Dell, because as a professional, I liked their promise of 24-hour service. That's the same reason I turned to Dell again back in 2000, though at that time I didn't realize that the promise had turned to dross.

In the case of the Sony, I plead necessity. With an office full of unopened boxes, a Dell that wasn't working, and a deadline two days away, I really didn't have a choice. I needed a computer, and I needed it right away. After all, I couldn't very well disappoint you readers, could I?

But I've definitely learned my lesson, and I'm going back to my roots. I'm currently shopping the 'Net for motherboards and barebones systems and “white box” accessories, and so on. Anybody want to buy a barely used Sony?

I've also learned my lesson with operating systems. There is most definitely not another Windows XP in my future. Trust me on this one. Can we all say, “Linux”?

On that topic, I'd like to share a couple more e-mails. From Bill Dudley: “I run both FreeBSD and Linux boxes, (including a couple of Vaio's), and get this: the software never never never ever breaks. No viruses. No Trojan horses. You do have to be a little careful and install updates occasionally to close down exploits as they are discovered, but since the virus writers (may they burn in hell) are targeting Windoze, it's pretty quiet.

“I'll repeat this bit because it's unbelievable to Windoze users: the OS never breaks. You don't have to reboot it just to install a driver. You can replace almost every software component without rebooting. Stuff just doesn't mysteriously break.”

I think I may always need a system that can run Windows, just for file compatibility and your occasional video game. But Steve Schulz observes, “I now use OpenOffice 1.0 for office docs. It's very complete, and file compatibility is mostly excellent, except for a few 'page layout' variances here and there (<5% of the time, once you import actual MS-Windows fonts into Linux). Of course, 100% certain compatibility still means Windows apps, I agree. So I use VMware for that. VMware really works great-Windows, or any app, cannot do harm to anything besides itself. I keep all my files on Linux (a 'shared drive' to Windows), which has a journaling file system and is immune to power outages, and so on. Besides, VMware has 'undoable' and 'nonpersistent' disk modes that reload the prior HDD session state on request-no virus risk. Also, no waiting to boot up, since VMware resumes to a running state as soon as the memory data loads. This might be a useful way for you to utilize any Windows app (excluding DirectX games), without viruses or data loss risk, or need to reboot for months. FYI, there are several good alternatives to VMware, too (Win4Lin, CrossOver, and so on)."

I should probably have mentioned VMware before. I've gotten recommendations for it from a number of readers. I really must try it, as an alternative to multi-boot. Anyone want to nominate Linux and VMware for the Good Guys list?

Not all agree

Not everyone is happy that I'm talking about Dells, Sonys, and Windows in a column that's supposed to be about embedded software. One reader, whom I won't name, wrote, “While I'm sympathetic to that point [about today's computers and the quality of service (Jack) gets on them] … none of that has anything to do with the 'Programmer's Toolbox' title of his column.”

Well, what can I say? He's absolutely right, and I've been meaning to talk to you about this. The title certainly does say, “Programmer's Toolbox,” and my stated goal is to provide you with algorithms for doing math in embedded software. I think I've done a lot of that over the years, but it's quite true that, lately, I've been talking more about computer woes.

However, I do think what I've done provides a service. You can read reviews of personal computers in any number of PC-related magazines. But where can you find out that some of them only work with XP? You can read all about benchmarks and megaflops, but who else will tell you that a vendor's tech support sucks rocks?

The thrust of this column is, and always will be, the use of math-intensive software algorithms in real-time, embedded software. Over the years, you guys have stuck with me for some pretty hairy math, from vectors and matrices to calculus and numerical analysis to Laplace transforms, z-transforms, FFTs, rotation algorithms, dynamics and control, and all manner of other tricks of the trade. I know it may be hard for some of you-those of you who work with fairly simple microcontrollers-to believe, but every single algorithm you've seen here has been something I both needed, and used, in embedded software. I'll be talking some more about this, and how my approaches can help you, in my next column. We don't have enough room left, this month, to do it justice.

There's more going on here, though, than a desire to show you neat algorithms. I want to show you where they come from, and how you can develop your own. If you're looking for canned C code that you can apply on your next assignment, without having to bother understanding it, you came to the wrong place. If you want numerical recipes, buy the book Numerical Recipes, edited by William H. Press (Cambridge University Press).

As the old saying goes, give a man a fish, and you feed him for a day. Teach him how to fish, and you feed him for a lifetime. My goal here has never been to toss out fish, but to teach you how to catch your own. I believe most of my readers understand that, and appreciate the difference. I hope so, anyhow.

There's one other thing I do in this column that you aren't likely to find anywhere else: I let you look over my shoulder as I think. Many folks work on problems, develop algorithms, and write up the one that works. Read any refereed technical journal, and you'll see what I mean. The author presents the problem and then the solution, as though one followed from the other without the slightest hiccup in between. I've always wanted to see a technical journal article that said, “We wanted to solve problem X. First we tried approach A, but that didn't work. Then we tried B, but that was even worse. Eventually, we hit on an idea, and that led to approach Q.” It would be refreshing, wouldn't it?

Not only would it be refreshing, it would be instructive. Read an article like that, and you not only find out what approach solves problem X, you also learn a whole bunch of approaches that don't. That's got to be worth something.

When I approach a new problem in this column, you'll not only get the approach that works, you'll get to watch me arrive at it. You'll get to see a whole lot of approaches that also work, more or less, and might very well be good enough for your particular application. You'll hear me tell you which approach works in which cases, and what the trade-offs are.

Why do I do this? Is it because I'm so vain that I honestly believe you want to watch my brain working? No, it's not, and I'm not. It's because I'm hoping that, in seeing how I circle around a problem, sneak up on it, and find the soft spot that leads to a solution, you'll be better equipped to do the same. In short, I'm teaching you how to fish.

We'll be talking about this quite a lot more in my next column. My approach is, admittedly, somewhat unique, and some folks get the distinction more than others. I'll be talking about my book, Math Toolkit for Real-Time Programmers, (CMP Books, 2000) and the style I used in it. Not surprisingly, the style is much the same, and so is the reaction: some get it, some don't.

This is not intended to be a criticism or a put-down. Quite the contrary. If I put something here in the column, or there in the book, and folks don't get it, guess whose fault that is? It's mine, for not explaining it well enough.

One item I've shown in both places is an equation I consider to be among the most important in computer-related math. It's the relationship represented by:

z = ehD (1)

Every time I derive this equation for someone, I feel as though I've just derived Einstein's famous equation, E = mc2. I sit back with a satisfied smile on my face, basking in the elegance of the derivation. But when I look at my audience, all I see are blank faces staring back at me. Obviously, someone's not getting it. Why is that?

I think I know why. First, the equation doesn't do much for anybody, unless you tell them how to apply it. I think I'm doing that, but obviously not well enough. Perhaps I need more concrete examples to show that it really does work.

Second, I think there's a definite feeling that it can't be that easy. Surely it has to be harder, more painful. Like medicine that has to taste bad to be good for you, surely it can't be possible that Equation 1 solves everyone's problems. Or can it? Stay tuned to this column to find out.

Jack W. Crenshaw is a senior software engineer at Spectrum-Astro. He is the author of Math Toolkit for Real-Time Programming (CMP Books). He holds a PhD in physics from Auburn University. Crenshaw enjoys contact and can be reached via e-mail at .

Return to the September 2002 Table of Contents

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.