Tuesday, March 30, 2010

Old Programmers Don't Die--They Go Embedded

Sometimes, I feel old. When I point this out, my friends older than I use that occasion to remind me that I'm really still quite young; my friends younger than me are quick to agree just how old I am. I know it's all relative. One way for sure I know I'm an "old tymer" is when I get a chance to talk to kids fresh out of university. Most think that the computers they know and love just sprang into existence. They're happy to be using Java or C# without a clue about all the machinery that's going on underneath the scenes. The concept of creating your own windowing system or memory management or OS or compiler never even occurs to them--it's a given. Why would anyone write to video memory directly? Yeah, just pull in that 30MB library--I really need that one function. What's an opcode, and why isn't the debugger showing me the source?

That's why it was fun to do a little reminiscing while creating my webinar. I roamed through a lot of my musty old code from years back. Sadly, I still remember programming over the years on a steadily improving array of equipment. I don't recall every line, but I do remember certain key lessons learned. For the reminder of those that should know better and the improvement for those who never knew, I tried to wrap up some of the most poignent best practices into my webinar.

My webinar's focus was on embedded programming, with good reason. Embedded is still an area where some of those older techniques are still useful. Yes, today there are better tools, compilers, frameworks, you name it. But you'll always have a few more limits and a little bit more constricted environment when programming an embedded device, no matter how powerful it is.

Case in point: I'm currently learning Objective-C for Mac/iPhone development. It's fun. It's been a while since I've had to completely bathe in a new environment, language, and paradigm, all in one. But most of the resources I've found are somewhat tedious. They cover details from a beginner programmer's standpoint. Instead of just telling me what's different, they insist on telling me everything and forcing me to wade through reams to get those little nuggets. Ugh. In this process, let me pass along a link to a very useful document, just in case you're a die-hard C++ programmer who wants to learn Objective-C and doesn't want to learn how to program from scratch. C++ and Objective-C are both object oriented dialects of C, but they're exceedingly different. (And thank you Pierre.)

What does learning Objective-C and the iPhone have to do with old-tyme embedded programmers? The iPhone has 32MB of RAM, but it doesn't support garbage collection, so you can't be lazy with your memory management. Not everything that Mac programmers have gotten used to will work on the iPhone. Because, it's (say it people) embedded. Maybe some of those old tricks will come in handy still after all...

Thursday, March 18, 2010

QNX turns 30! What was happening way back then?

Sometimes it's very fun to be taking a trip through memory lane.  With QNX turning 30 this year, I've been hauling old QNX manuals out of storage, conveniently archived just feet away from my desk, and doing a bit of research for some interesting tidbits to share for our birthday celebration.  Looking through all those old typewriter banged out manuals with the occasional white-out and hand-penned corrections brought back fond memories.

I wasn't using QNX back in those days.  I was programming in both BASIC and 6502 assembly on an Atari 800.  Writing my own games, truth be told, since I didn't have lots of spare cash on a paper route income.  And I was typing in listings from magazines like "Compute!"--yes, in fact, once upon a time the best way to get programs was to type them in from a listing in a magazine.  Hard to believe in an era where you can download gigabytes of free software while sitting on your living-room sofa.

At that time, QNX was called Quantum Software Systems.  And Quantum Software System's first product was called QUNIX: a microkernel-based OS that felt a little like UNIX.  AT&T was very polite in requesting that we change the name, and so QNX was born.

QUNIX released as product in 1981

Description:First commercial microkernel OS

Inventor:Dan Dodge and Gordon Bell

Impact on civilization: Showed it was possible to have a multi-user, multi-tasking, multiprocessor OS with real-time performance running on a PC with only 64K of RAM. It and its successors (QNX2, QNX4, QNX Neutrino RTOS) spawned many uses in reliability-critical industries.

What else was going on at the time of QNX's first product?  Two other notable software products were created right around then: one about 6 months before, and one about 6 months after.  You'll certainly recognize one.  If you've been around in this industry for long enough, you should recognize both.

Visicalc introduced on PC in 1981

Description: First commercial spreadsheet

Inventor: Dan Bricklin and Bob Frankston

Impact on civilization: Made personal computers a serious business tool instead of a hobbyist orgame machine. Visicalc was first created in 1979, but it effectively launched the Personal Computing industry, by bringing IBM to the party in 1981.

I remember this pretty distinctly--my Dad bought Visicalc for the Atari 800. It made heavy use of the slash key for doing almost anything. It was pretty limited compared to Excel.  At the time, it was amazing to see numbers magically recalculated all over the page when you changed one little thing. All done in 48K. If you're feeling nostalgic, you can run a real version of this on your Windows PC for old-tymers found on Dan Bricklin's website.

MSDOS 1.0 released in 1982

Description:Common PC OS

Promoter/Inventor:Bill Gates / Tim Paterson

Impact on civilization: Created a common architecture for software development, spawning an industry. And created the world’s wealthiest person. (As of Mar 10, 2010 due to Mr. Gates' generous philanthropy and the depressed state of the stock market he was bumped down to the second wealthiest.)

By the time the IBM PC XT came out in 1983, I was gainfully employed writing statistical quality control software. Yes, it was in high school, but a real job, nonetheless.A 5MB hard drive--WHOA. That was big time. How on earth could you fill the whole thing? (Easy--put one single mp3 song on it.) In the intervening year, Microsoft DOS 1.0 had been replaced by MS-DOS 2.0. A major improvement and still with lots of warts, but it was the OS of choice for business applications. GW-BASIC was the language that my company used back then. I remember the good times when we'd have compiled basic programs give the occasional "Syntax error". Think about that for a second. It's a lot funnier now than it was at the time. We eventually replaced GW-Basic with Turbo Pascal, but I digress. Maybe that's fodder for another blog.

Tuesday, March 9, 2010

Embedded World Germany 2010

I've just returned from a trip to Embedded World Germany in Nuremberg, which is probably the biggest show for the embedded market.  You see a lot of the familiar faces in the embedded space from all around the world there.  Where else could you be talking to German, Norwegian, French, American, Canadian, and Japanese business people all within the span of ten minutes?  

My days were filled with press interviews, conference presentations and talking to customers.  My nights filled with scouring the schnitzel and sausage-filled menus for something, anything, green to eat.  The Olympics wrapped up while I was in Germany, and I got to have all my Canadian colleagues give me a good natured razzing after the Canadian hockey team beat the US 3-2 in overtime.  I guess I can finally admit that hockey is Canada's game and winning the silver is not bad!  Congratulations Canada!

The year's show was a great one for QNX.  There was lots of activity and interest in our Industrial developments--our Smart Energy reference design, our Building Automation demo, our Industrial protocol work with partners, and our real-time control demo.  On the automotive side, we were showing our latest QNX CAR with all the extra ng Connect features.  That same QNX technology went into the 2010 Audi A8 MultiMedia Infotainment system with full multimedia and Google Earth maps which had everyone drooling.  More than one person told me "this is my next car," and I don't blame them!

The show is now all packed up and everybody is home recovering from jet lag.  So I guess I'll see everyone next year!