From 378a514dfc5253146566157d3045f471dc78db97 Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Wed, 29 Jan 2020 07:03:05 +0100 Subject: [PATCH] Add more principles. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 15deb4a..a49d3dd 100644 --- a/README.md +++ b/README.md @@ -326,6 +326,14 @@ package.json package-lock.json ``` +### 💩 Long-read functions are better than short ones. + +Don't divide a program logic into readable pieces. What if your IDE's search brakes and you will not be able to find the necessary file or function? + +- 10000 lines of code in one file is OK. +- 1000 lines of a function body is OK. +- Dealing with many services (3rd party and internal, also, there are some helpers, database hand-written ORM and jQuery slider) in one `service.js`? It's OK. + ### 💩 Avoid covering your code with tests This is a duplicate and unnecessary amount of work.