Wednesday, July 31, 2019

Treating failures as opportunities

Any non-trivial engineering project is bound to face failures / errors / bugs. Instead of haphazardly fixing the error, I propose the following approach:
  1. If you are in a hurry and there is a quick fix, fix it, but take note and do the following steps when you have more time.
  2. Analyze and repeat the problem, find the root cause and solve it.
  3. Improve error indicators (e.g. different blinking LED frequencies / beep sounds for different errors) and error messages. A good error message contains a description of the problem and possible work arounds, it there are any. You might think that you have solved the error for good but the same error might be triggered from a different path and then you will be glad that you have a nice error indicator helping you solve the problem in half an hour instead of a week.
  4. Add unit tests proving that the bug was solved and leaving a trail of what kinds of bugs had to be tackled with in the past.

No comments: