Skip to content

Commit 9c2f995

Browse files
authored
Significant improvements to Clean Code section
1 parent 5c0543c commit 9c2f995

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,16 @@ _This is a work in progress. Important knowledge might be missing, existing bull
110110

111111
#### Clean code
112112

113-
* Acknowledge that naming is key to code readability (files, classes, variables / attributes, functions / methods...)
114-
* Try to write code that is self-explanatory (i.e. "what" the code does is clear when reading it)
115-
* Favor good naming and lightweight documentation over inline comments in your code
116-
* [Code comments often lie](https://www.codeproject.com/Articles/872073/Code-Comments-are-Lies) and tend to be shortcuts to make poor code understandable, instead of refactoring (there are some exceptions)
117-
* Write documentation as code, idealy alongside code, for easier maintenance (e.g. markdown files in a "docs" folder in your repository)
118-
* Use docs to describe "whys" and "hows" (e.g. business needs being tackled and high-level architecture overview)
119-
* Follow conventions to organize project structure
113+
* Acknowledge that naming is key to code readability (files, classes, variables / attributes, functions / methods...)
120114
* Avoid long functions and classes, making sure to split responsibilities properly into methods/functions and/or classes/files
121-
* In OOP, favor [composition over inheritance](https://en.wikipedia.org/wiki/Composition_over_inheritance)
115+
* Follow conventions to organize project structure
122116
* Extract complex boolean conditions into well-named functions
117+
* Try to write code that is as self-explanatory as possible (i.e. "what" the code does is easy to understand by reading it)
118+
* Favor good naming and lightweight documentation over inline comments
119+
* [Code comments often lie](https://www.codeproject.com/Articles/872073/Code-Comments-are-Lies) and are usually shortcuts written to explain what a messy code block does, instead of investing the time in refactoring it to improve its readability
120+
* Write documentation as code, ideally alongside code, for easier maintenance (e.g. markdown files in a "docs" folder in your repository)
121+
* Use docs to describe "whys" and "hows" (e.g. goals, use cases, components, high-level architecture overview,...)
122+
* In OOP, favor [composition over inheritance](https://en.wikipedia.org/wiki/Composition_over_inheritance)
123123
* Follow [semantic versioning](https://semver.org/)
124124
* Know about TDD and its practices (e.g. "red, green, refactor")
125125

0 commit comments

Comments
 (0)