Updated Zen of LBRY Development (markdown)

Lex Berezhny 2018-07-31 12:25:56 -04:00
parent 9028de9a73
commit ba985daa71

@ -1,10 +1,13 @@
1. Write less code that does more in a clear way. 1. Write less code that does more in a clear way.
1. Write a manageable amount of thoughtful unit tests to aid in future refactoring but prefer integration tests to prove your code actually works.
1. Craft intuitive and composable APIs. 1. Craft intuitive and composable APIs.
1. Avoid loops in unit tests. 1. Avoid loops in unit tests.
1. Learn and use the many `unittest` assert methods. 1. Learn and use many of the `unittest` assert methods.
1. Don't create a class when there is no state to manage. 1. Don't create a class when there is no state to manage.
1. Don't write redundant comments or doc strings. 1. Don't write redundant comments or doc strings.
1. Do write comments or doc strings to include references to specifications or original implementations. 1. Do write comments or doc strings to include references to specifications or other resources.
1. Prefer writing clear code instead of clear comments to explain unclear code, clearly. 1. Prefer writing clear code instead of clear comments to explain unclear code, clearly.
1. Too many unit tests makes refactoring cumbersome.
1. Not enough unit tests makes refactoring scary.
1. [KISS](https://en.wikipedia.org/wiki/KISS_principle) 1. [KISS](https://en.wikipedia.org/wiki/KISS_principle)
1. [The Zen of Python](https://www.python.org/dev/peps/pep-0020/) 1. [The Zen of Python](https://www.python.org/dev/peps/pep-0020/)