he best code development practices I have found through experimentation and observation of others are when the following practices are in place. In order of impact and importance.
- Repeatibility - The ability to repeat a set of steps to arrive at the same end state is what debugging is. The easier for this to happen at any point in development brings innumerable benefits to the programmer to understand and modify the program as desired.
- Verification - Tests, tests, and tests is what this covers. Unit tests, integration tests, automated tests, confidence tests, and etc. All of these tests allow for experimentation and statistical analysis of approaches and gives programmers the ability to build something quickly and if not performant or wrong then it can be replaced as soon as it passes the tests. Test must be constructed in a way as to easily understand how to make them fail as well because a test that never fails is suspicious in that is it doing what was intended because every programmer makes numerous mistakes per day some more egregious than others, but tests should fail under certain circumstances.
- Automation - Making the process of code writing automated reduces stress, builds confidence, gives consistency, and allows for partial delivery of features to any customer. Automation must also be configured to the deployment pipeline so that rollbacks are as painless as deploying new code as well. Worst case scenario https://dougseven.com/2014/04/17/knightmare-a-devops-cautionary-tale/