Skip to main content

Code Style


  • Inversion of Conditional Blocks • A good example of how to flatten nested conditional statements to make logic easier to understand at a glance
  • Cleaner IF statements // Clean Code - YouTube • I’m a big fan of this pattern of guard clauses with early returns rather than nesting conditional
  • Clever Code Considered Harmful • Josh Comeau 📖

    As engineers, it can be really satisfying for us to implement clever, terse solutions to problems, relying on advanced tricks and techniques. As a result, we often write code that is hostile and inaccessible to the junior folks on our team. This article makes the case that we should strive to write simple, accessible code, using the dumb old primitives that everyone knows.



  • Encapsulation • “Typically, functions are written for their reusability, but I want to convince you that the reason to reach for a function is to encapsulate a concern” • Kyle Shevlin 📖