-
Notifications
You must be signed in to change notification settings - Fork 482
Zen of LBRY Development
Lex Berezhny edited this page Jul 31, 2018
·
4 revisions
- Write less code that does more in a clear way.
- Write a manageable amount of thoughtful unit tests to aid in future refactoring but prefer integration tests to prove your code actually works.
- Craft intuitive and composable APIs.
- Don't create a class when there is no state to manage.
- Avoid loops in unit tests.
- Learn and use many of the
unittest
assert methods. - Use function name to document what the function does.
- Split large functions into smaller ones and see previous rule.
- Don't write redundant comments or doc strings.
- Do write comments or doc strings to include references to specifications or other resources.
- Prefer writing clear code instead of clear comments to explain unclear code, clearly.
- Too many unit tests makes refactoring cumbersome.
- Not enough unit tests makes refactoring uneasy.
- KISS
- The Zen of Python