Navigate this BlogHome
Idealog AlliesWork In Progress (Chris)
Programming for the Zaurus
Thursday, September 25, 2003
A few weeks ago, I got a Linux-based PDA, the Sharp Zaurus SL-5500. Today, I finally got around to coding up the one application I use on a regular basis. It's a program I use to count calories, when I'm on a diet. (I guess this means that I have no excuse for not getting back to my diet.)
The old version of this software was implemented for PalmOS, which runs on my cell phone (a QCP-6035). Programming for the Palm is quite a bit of a pain. Unlike normal computers, the Palm doesn't have a filesystem. Instead, it uses databases that are specific to applications (although it's sometimes possible to share them).
The use of files makes a computer much more useful. This is because there are many tools to process files. For example, my application needs to store a database of foods and how many calories they contain. To allow this to be changed on the Palm, I would have needed to write a custom editor application. Instead of doing that, I wrote a preprocessor that ran on my computer that would create a palm database.
The newer version runs on the Zaurus. It's written in Python, a scripting language that's my current favorite programming language. The python interpreter that runs on the Zaurus uses text files to contain the source code, so there's no compilation step that requires a host computer.
The Zaurus also uses a filesystem, so I made the food database a text file. This let me use the Text Editor application to edit it, so I didn't have to do anything extra. While we take it for granted most of the time, it's great to have general-purpose applications that will work with any sort of data.
Once I got it installed, developing in Python on the Zaurus is a snap. I simply edit the source files and copy them over using scp. (I use the OpenZaurus distribution, which ships with ssh enabled by default.) I can then run the program. I can even open the source in the text editor or one of the other tools on the system.
The programming model being the same as a full computer makes it easy to test code on a desktop system. There's one statement I need to change to make the program run on my Linux box. The rest of the code can be identical.
Now, PalmOS is well suited for the niche of low-power PDAs dedicated to business tasks. It served me well for many years, and is probably still a very good choice for people not writing their own software.
On the Zaurus, however, the barrier to programming is much lower. This makes it more suited for a developer, and probably as a platform for the deployment of custom applications.
Posted on Friday, November 07, 2003 by martii:
Great !!! Linux and Zaurus rox !!!
Commenting has been suspended due to spam.