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...

1 comment:

  1. Increasingly I see the term "embedded" being used in jobs posts to refer to the iPod/phone, android and blackberry platforms...

    Welcome to the "new" embedded!

    ReplyDelete