Skip to content

Zen of LBRY Development

Lex Berezhny edited this page Jul 31, 2018 · 4 revisions
  1. Write less code that does more in a clear way.
  2. Write a manageable amount of thoughtful unit tests to aid in future refactoring but prefer integration tests to prove your code actually works.
  3. Craft intuitive and composable APIs.
  4. Don't create a class when there is no state to manage.
  5. Avoid loops in unit tests.
  6. Learn and use many of the unittest assert methods.
  7. Use function name to document what the function does.
  8. Split large functions into smaller ones and see previous rule.
  9. Don't write redundant comments or doc strings.
  10. Do write comments or doc strings to include references to specifications or other resources.
  11. Prefer writing clear code instead of clear comments to explain unclear code, clearly.
  12. Too many unit tests makes refactoring cumbersome.
  13. Not enough unit tests makes refactoring uneasy.
  14. KISS
  15. The Zen of Python