miscellaneous¶
How to name things¶
- Never abbreviate
- Put units in variable name (example: delay_seconds instead of delay) https://www.youtube.com/watch?v=-J3wNP6u5YU CodeAesthetic - Naming Things in Code
Avoid comments when possible¶
- If you already follow single responsibility from SOLID, most of the time you should be able to write code that is auto explainable, such as using better names, or if complex enough, split into more functions. https://www.youtube.com/watch?v=Bf7vDBBOBUA CodeAesthetic - Don't Write Comments
Avoid nesting your code¶
- Either extract code block to a new function or method, or invert else conditions earlier https://www.youtube.com/watch?v=CFRhGnuXG-4 CodeAesthetic - Why You Shouldn't Nest Your Code