Sunday 27 September 2020

Quality is a mindset

 

Accuracy:  Achieving 100% accuracy is not always practical and often very expensive/time-consuming.   Each time you write a script/software, you must consider the level of accuracy required.  Whatever may be the requirement always maintain a high level of accuracy.

Best Practices:  Following industry-standard best practices always makes your code easy to read, identify mistakes, easy to modify, etc. Many codes are written to run for a long time and often have to revisit to make amendments. Following best practices makes it much easier to revisit and improve your code.

Consistency: This is the key to winning users' trust in your code. You only get one chance and if users lose confidence due to inconsistent results, it is very difficult to win them back. Go extra length to ensure your code produces a consistent result, and if it is not ready better not make it available than release incomplete script/software.

Documentation: It can be within the code itself and or externally.  Every code should describe the purpose, and thought process at a high level.  Programs should be intuitive and should contain help available to users.

Exception Handling: Every block code must have error checks to validate the result of each execution step and have an appropriate error message to clearly indicate the problem.  Also at each stage of error check a decision has to be made on what action to be taken if a particular step fails.

Fault Tolerance: No service is 100% reliable, and should always have tolerance for failures. This is especially true when dealing with external services. There must be checks to detect faults and a plan to handle faults. For example, if there is a failure at and endpoint, you have to make sure your application does not keep sending requests or filling up resources on your own system which in turn can cause further failures.