The compass issues seem to be fixed in H8. Also, with the "Barcode Scanner" application, it seems to do a white level calibration when it starts, but never again. Point the phone at what you want to scan (or something else bright), *then* start the barcode scanner application.
Also, I don't know if this is meant for people to just feel better, to look silly in a large open space, or both, but you can try it
Ichimusai’s Place » Blog Archive How to calibrate the HTC Magic compass