Best software practices: debugging and error handling

Autor: Damian Chodorek • Opublikowany: 23 lutego 2019 • Kategoria: Good practices

Best practices related to debugging and error handling. Gathered from various sources.

  • Fail fast.
  • Badly designed systems tend to poison systems they interact with.
  • Flexibility breeds bugs.
  • Never ignore errors.
  • Presence of errors indicates that you don’t understand your system well enough.
  • Make a clear distinction between critical and non-critical errors.
  • Every assert becomes a proper error handling eventually.
  • Add logging and error handling early.
  • Assume no coincidences, investigate.
  • Adress problem directly, not with workaround.
  • Most mistakes in software design result from assuming that you will need to do something (or never do something) in the future.
  • The world of computers is full of things that should have been strict from the beginning, and became ridiculously complex because they weren’t (HTML).
  • Bugs most commonly come from somebody’s failure to reduce complexity. Less commonly, they come from a misunderstanding of something that was actually simple.
  • When solving a problem in a codebase, you’re not done when the symptoms stop. You’re done when the problem has disappeared and will never come back .
  • Debugging is accomplished by gathering data until you understand the cause of the problem.

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany.