Skip to content
Home » Quality


Approaches to improving quality in codebase:

  • Linting and appropriate tooling that interactively aids development
  • Unit testing: for example in Java
  • Implementing proper CI – that is quick and runs lint and unit tests
  • Linting at a high-level in CI – making it a failure mode for compilation (possibly even warnings)
  • Ensuring (but not obsessing about) adequate code coverage, especially in core components and interfaces
  • TDD approaches (fake, mock, stub)
  • Preferring to use TDD when developing and designing software
  • BDD and when to use it
  • Acceptance testing (See Dave Farley’s talk here) and contract testing. Production-like deployment
  • Continuous Delivery

TDD Approaches

Fake: a class that implements an interface but contains fixed data and no logic. Simply returns “good” or “bad” data depending on the implementation.

Mock: a class that implements an interface and allows the ability to dynamically set the values to return/exceptions to throw from particular methods and provides the ability to check if particular methods have been called/not called.

Stub: Like a mock class, except that it doesn’t provide the ability to verify that methods have been called/not called.

Techniques & Observations

Contract Testing and Test Doubles

Integrated Tests are a Scam