Spend some time to make things configurable in start of a project to save hours of troubleshooting later in the project.
There are so many factors due to which project deadlines are slipped. Not planning well ahead, not hiring skilled resources or not paying good to skilled resources, not providing professional environment and sufficient resources are very basic reasons which people ignore and underestimates. In short, having a good PLAN summarizes all this. So, plan well, ahead of time, and plan for everything.
It is unprofessional for programmers to bend to the will of managers who don’t understand the risks of making messes and bemoan the schedules that were too tight to do things right.