ThoughtCraft
Fail Early, Fail Often

Fail Early, Fail Often

Make your code simpler to read and simpler to debug by breaking apart your conditional statements and exiting the function whenever possible.

This helps to:

  • make your code simpler
  • ensure your functions have one purpose
  • keeps your functions smaller
  • makes your code easier to read
  • makes your code easier to debug

{% include responsive-embed url=“https://www.youtube.com/embed/E0Eph_Cv7SA” %}

Author's Note: I’ve chosen to preserve these thoughts as they were originally shared. Some external links or references may no longer work. I’m leaving them intact to maintain their original context and spirit.