You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not blindly follow this guide but think for yourself. The goal of
66
66
software development is keeping the code complexity low. Period. None of
67
-
the fancy patterns matters if the code becomes impossible to maintain.
67
+
the rules and fancy patterns matters if the code becomes impossible to maintain.
68
68
69
69
70
70
@@ -147,9 +147,9 @@ dashboard.show( warnings )
147
147
</td><td>
148
148
149
149
```python
150
-
Sys.test():
151
-
Engine.test():
152
-
SparkPlug.test():
150
+
sys.test():
151
+
engine.test():
152
+
sparkPlug.test():
153
153
testIgnition()
154
154
```
155
155
</td></tr>
@@ -281,7 +281,7 @@ Int totalIncome(employee){
281
281
282
282
## [Naming](#user-content-naming)
283
283
284
-
Code should communicate behavior to other humans with lower complexity than the behavior it inherits. Abstracting with meaningful names is therefore most important for readability.
284
+
Code should communicate behavior to other humans with lower complexity than the behavior it inherits. Since code mostly consists of custom names, your ability to abstract concepts with meaningful names is most important for readability.
285
285
286
286
287
287
@@ -341,7 +341,7 @@ for idx, score in scores:
341
341
342
342
### Use word pairs (opposites, antonyms).
343
343
344
-
If you “`start`” something, you should “`stop`” it and not “`end`” it [[CdCm]](#user-content-references).
344
+
If you `start` something, you should `stop` it and not `end` it [[CdCm]](#user-content-references).
345
345
While most opposites can be created by using `un-` or `de-` prefixes (`lock/unlock`), some are more distinct and allow code alignment:
346
346
347
347
Verb pairs with same length:
@@ -420,16 +420,41 @@ English is the language of programming, so documentation should also be in Engli
420
420
421
421
422
422
423
-
### Write brief comments of high quality.
423
+
### Write few brief comments of high quality.
424
+
425
+
Choose your words carefully and comment only what the code cannot say, that is *why* you did it, maybe *what* you did, but never *how*.
426
+
Change comments when code changes because “comments that contradict the code are worse than no comments” [[PEP8]](#user-content-references).
Comment only if necessary and choose your words carefully. “Comments that contradict the code are worse than no comments” [[PEP8]](#user-content-references). Change comments when code changes. Comment only what the code cannot say, that is *why* you did it, maybe *what* you did, but never *how*.
426
451
427
452
Further Don'ts:
428
453
429
454
* Don't commit commented-out code. Just remove.
430
455
* Don't create headings with `S E P A R A T E D` letters because you cannot search for them.
431
456
* Don't assume insider knowledge but write simple comments for anybody on the planet.
432
-
* Don't make jokes in comments. Tell them in person.
457
+
* Don't make jokes or use cute language.
433
458
* Don't comment closing braces. They just indicate that your blocks are too long.
0 commit comments