From ba985daa71e7b09db40ce9cfe8828eb10ec92038 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 31 Jul 2018 12:25:56 -0400 Subject: [PATCH] Updated Zen of LBRY Development (markdown) --- Zen-of-LBRY-Development.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Zen-of-LBRY-Development.md b/Zen-of-LBRY-Development.md index c433ab4..9bc4247 100644 --- a/Zen-of-LBRY-Development.md +++ b/Zen-of-LBRY-Development.md @@ -1,10 +1,13 @@ 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. 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 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. 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. [The Zen of Python](https://www.python.org/dev/peps/pep-0020/) \ No newline at end of file