From b74308cff8ec0cf6523ae56f68b6cf4180cd2a4c Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 31 Jul 2018 12:31:53 -0400 Subject: [PATCH] Updated Zen of LBRY Development (markdown) --- Zen-of-LBRY-Development.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Zen-of-LBRY-Development.md b/Zen-of-LBRY-Development.md index 9bc4247..1a28ba0 100644 --- a/Zen-of-LBRY-Development.md +++ b/Zen-of-LBRY-Development.md @@ -1,13 +1,15 @@ 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. Don't create a class when there is no state to manage. 1. Avoid loops in unit tests. 1. Learn and use many of the `unittest` assert methods. -1. Don't create a class when there is no state to manage. +1. Use function name to document what the function does. +1. Split large functions into smaller ones and use function name to document what the function does. 1. Don't write redundant comments or doc strings. 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. Not enough unit tests makes refactoring uneasy. 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