Recovering desktop-aholic
As I mentioned before, I used to work on Windows Media Player and other multimedia stuff like Deluxe CD Player. Before that, I wrote debugging tools and WAY before that, pharmaceutical salesforce software (before joining MS). But I got my start in programming on the Atari Portfolio, an early handheld computer that ran a modified version of MS-DOS.
In other words, I've had exposure to how different the world of mobile devices can be from desktop programming, but I got "spoiled" for a while. I joined this team to get unspoiled (and for the cool gadgets!)
One thing you find on this team is that it is fun, especially for those of us who remember Commodore Vic-20s and such, to get back to worrying about packing functionality into a small box. Frustrating, sometimes, but mostly fun.
For example, here's a mobile device development tip that I never considered before joining this team: Mark your data "const" whenever possible.
Think about it: You have a string in your code (just as an example; of course you'd always put your string in a resource table, right?). This string is for display and never gets modified. If you forget to mark this string "const" and your application is in ROM (OK, it is obvious now that "you" in this scenario is really "me"), then your string is taking up not only precious ROM space, but also RAM space as the system makes a copy of the string just in case you want to modify it!
Marking the string as const saves that RAM, saves the time it takes to copy it to RAM, and makes accessing the string a touch faster, too ... you still use the ROM (so keep those strings short and sweet!) but have had a really positive impact otherwise by keeping the data in its place.
[Author: Dave Stewart]
Comments
- Anonymous
June 28, 2004
Hmm, since most developers never write an application that is burned into rom, this really is not very applicable to them.
I too remember the Vic-20 and the Coomodore 64 (my first PC). I still have a PC-1 handheld computer from Radio Shack that was created and sold in 1981. - Anonymous
June 28, 2004
Totally true ... that's why I mentioned that the "you" was really "me" once I said it mattered if you were in ROM ;-) ... more of a glimpse into our world. I'll start writing stuff that is more applicable to anybody as I get more into this.
However, I would point out that there was lots and lots of great reasons to be "const correct" (even on the desktop) beyond just this ROM/RAM issue -- it just never hit home as much as it did when I got over here. - Anonymous
June 28, 2004
Atari Portfolio, now there's a name I haven't heard in a while - I had one of those too!
It also featured as a hackers tool in a film, but I can't remember what the film was...
P - Anonymous
June 29, 2004
The comment has been removed