This cropped up over in another thread (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1280914282/10#10). An unknown amount of the code in the Playground (and elsewhere) no longer works with the latest version of the IDE/libraries, or with later versions of the mcu (e.g. 328 registers versus 168). Would it help to have some kind of record inside the sketch of which IDE version and mcu it was written for, say in the form of #defines or #pragma statements? It wouldn't stop code rot, but the IDE could flag it up as a potential problem.
For instance you could have something like this in the sketch:
#define ARDUINO_CPU atmega328
#define ARDUINO_IDE 0.19
which the IDE would recognise and act on. Obviously it would be human readable as well.
Andrew
EDIT: Oops, I think this has come up before (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266076921) :-[