DEV Community

Discussion on: How would you define high quality code?

Collapse
 
nestedsoftware profile image
Nested Software • Edited

I’ll chime in with some characteristics I try to impart to my code:

  • simple: keep the code as simple as possible. Avoid over-engineering.
  • readable: make the intent of the code as clear as possible.
  • orthogonal: give modules of code clear and independent responsibilities. Ideally modules that work together should be composable in any combination.
  • tested: code should have automated tests by default.
  • graceful with errors: modules should have well thought out considerations for edge cases and error conditions.