Well...
- Ensure the source will always be available, in the required form, if needed:
- Use CVS so you can rollback the code to any point.
- Implement proper backup proceedures taking into account everything from media failure to natural disasters.
- Ensure problems can be fixed in an acceptable time frame.
- Create a modular design.
- Clearly specify every aspect of the code.
- Document it well (both high-level user docs and comments).
- Take steps to prevent problems in the first place:
- Design everything in detail first.
- If possible, audit and use existing tested code.
- Write tests, then code.
- Refactor, refactor, refactor.
- Refactor.
- Remain paranoid.
- Pass off maintaining the code.
- Peace of mind (until the new maintainer bothers you ;)
So yeah, if you want peace of mind you'll have to find another job ;-).