don’t pass your shortcuts through the installer

God, this one really annoys me. I’ve installed an application and it puts the shortcuts into the root of all programs. I move it where I want it to be (There was no choice on install). Then I run said program. Up pops the windows installer and recreates the shortcuts in the root of the start menu.
You ignorant stupid rat b*****d wh***son of a b****h. What; do you think you own my computer? Away with you and your crappy force fix of my choices as a customer. This complaint brought to you by shite software and a harkening back to why is there no programmatic access to the Start menu pin list. Thank you for small mercies.

Space/time tradeoff for disk access

It’s significantly slower to access a disk than it is to access memory. When given a choice between using a bit more processor power to decompress the information once it’s been read into memory or pulling more information from the drive then you really should make the smart choice.
Even if disk space is cheap/free, it doesn’t make sense to spend the time reading the information whan you could be using it. The problem is of course, using a sensible and fast compression/decompression algorighm, and also realizing that it really screws with the whole ease of write on the disk. You end up with some change one byte means completely altering the on-disk image so you need to write a lot more information. This is probably why we use transparent compression on files that don’t change that much.
Whee, ain’t science fun.

Just so you know… the palm database file format

Trivial, I know, but some people need to know these things.
From the start we have the header, appinfo (optional), sortinfo (optional) followed by the record entry headers.
The header is:

Field Size Value
Db Name 32 Ascii Database Name
attributes 2 See DataMgr.h for meaning (dmHdrAttrResDB)
version 2 Version number an application would use this to decide if the content was compatible
creationDate 4 Creation date of the database – time from the palm epoch when it was created
modificationDate 4 Last modifiied date of the db. creationDate by default.
lastBackupDate 4 date last backed up ina hotsync
modificationNumber 4 when changed this gets bumped
appInfoID 4 Offset in this DB to the appinfo block (0 if it does not exist).
sortInfoId 4 Offset in the DB to the sortinfo block (0 if it does not exist)
type 4 the 4 character type of the pdb
creator 4 the 4 character creator of the pdb
uniqueIDSeed 4 Stumped – I don’t know what this is for, leave it at 0
This is the end of the header structure, the next is the record entry information

Record list:

Field Size Value
nextrecordList 4 Address of the next record list (only used for really bit pdbs)
nRecords 2 Number of records in the recordlist
pad 2 Number of records in the recordlist
nRecords items 4 * nRecords Addresses of the records in the pdb

The address of the first record usually lies immediately following the appinfo and sortinfo data. As this data is consumer defined, the only way of determining it’s size is to use relative calculations. For example, the size of the appinfo structure it’s local address up to min(addr(sortinfo, Address of any data records)) – 1. The size of the sortinfo structure is it’s local address up to the min(Address of any data records) – 1. They are application defined, and as such should not be messed with.

Welcome to the real world boys….

I think fintan says it best when he says ‘Hmmm, which part of stock market floatation did you not grasp Jack?. Welcome to the world of private business.
Aer Lingus… a division of Ryanair has a nice ring to it.

This is really a WTF

I discovered this one in a state management routine – save the address of the database corresponding to the module that’s loaded. It works until the program is restarted or the operating system is rebooted. I’m going to have to change it to use the name of the module instead of it’s address. The only problem I can forsee is the presence of multiple copies of the same named module in the application path; That’s just another thing to work out.

It’s not just me but security elevation prompts in vista are a pain in the ass

Firstly, it’s cool that they are there. Rather than having to do something surreal involving runas, explorer and a couple of other things to allow you to run an application at a privileged level you now encounter the ubiquitous shield icon, which tells you that to perform this operation you need to acquire the appropriate privileges. It’s a lot like the linux sudo, except by default you just have to click the ‘continue’ prompt instead of a password.
Pretty cool, even if you’re an administrative user, you don’t start with all the privileges that your group memberships provide.
Here comes the rub – I’ve stopped reading the prompts, I just find the one that tells me how to get to the next step and click on it. I’m not positive, but I think this is probably par for the course for other users as well.
Shame that, nice idea, but hamstrung by having too many things need administrative privileges.

Palm Binary Compatibility

I find the Palm platform convenient for programming. You can build something using the latest and greatest Palm 5 based SDK and then run it on the oldest cruddiest palm you have. As long as you make sure to not use unsupported APIs your program just works. It’s like static linking under Unix/Linux – all you need to make sure is that the underlying system calls are there (or in this case entries in the trap table.