Writing code that works and writing code that is clean are two different dimensions. Trying to perfect both at once is exhausting and slow.

Instead, get it working first and the tests passing, by whatever means. Then clean and refactor the code.

Discussions for your team

  • what does “clean” mean for your codebase?
  • Once we validate that the tests work, are we spending enough time and effort into refactoring?
  • How much of time is spent getting the code to “work”, versus cleaning and refactoring?
  • What guardrails are in place to make sure the cleaning/refactoring step isn’t skipped?