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.

  • Isolation - Code that is isolated provides the ability to decompose, replace, refactor, and reorganize without fear of causing unexplained and unexpected behaviors that my be insidious or readily apparent.  Excellent guidelines I have found on this are to use functional programming and "pure" functions as they follow a simple model lend themselves to replaceable pipeline architecture and avoid state which is difficult to test and requires large commitments to the programmers memory causing cognitive overload in many cases.  Examples are  Static classes in C# and Extension methods here is the most commonplace and easiest example for programmers to understand Redux project for React uses "pure" function which take an input transform and then output a new state Growth and importance of functional languages and principles in other languages i.e. the growth of Haskell and the incorporation of JavaScript for ES7 to embrace functional programming practices.  

  • 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/