I'm a Unix sysadmin-turned-programmer, and because this is near and dear to my heart at present, wanted to hear about some best- and worst-practices, in terms of writing software so that it is easy to deploy, upgrade, and maintain long-term. I'm not talking about the long-term maintenance of the code itself; rather, what guidelines do you use to keep your software from turning into an un-installable mess?
My current pet peeve is hard-coded configurations. I'm in the process of working with our development team at my full-time job to simplify the deployment of our applications, so that I can totally automate every step of the deployment process. A large chunk of the configuration for these apps is actually hard-coded, either at build time or in the codebase, which makes the process of actually setting the software up on a server very, very painful.
Fortunately, the team at my full-time gig is talented and wants to see this fixed as much as I do, so things are moving along smoothly.
As for a 'best practice', from a Unix perspective, I really like it when software is, or can be, self-contained. So, I should be able to install an application into a directory, and then be able to move that directory around without causing the app to go utterly haywire. This doesn't really take much more than a bit of startup path-detection, and it makes my life as a sysadmin so much nicer.
What are some ways that you simplify the deployment process (on both Windows and Unix) for server-type applications, and likewise, what are some things you've run into that have turned into a real nightmare when it came time to push the code out the door?