in reply to Best practices for distinguishing "development" from "production?"
As stated already, I find writing code that will work in all environments and letting configuration files distinguish the difference to work well. Personally I write my scripts to read from a xml configuration file and have my programs read that xml config to lead in values particular to that environment. In my line of work where we have over 200 different production environments and the same amount in dev and uat, this xml config allows me to not only distinguish between prod and dev, but also between different prod environments I need to deploy to as well.
Thing most important lesson I've learned is to write code to ensure that the config values are valid.