Coding Practices - EP1SE1 The Good, The Bad and The Ugly
Discussing coding best practices and what we need to be aware of to make things easier and be kinder to our code base's future developer. We'll chat about comments, variable names, refactoring, planning, building and more.
for self-documenting code into three broad categories: structural - where the structure of code or directories is used to clarify the purpose naming related - such as function or variable syntax related - where we make use of (or avoid using) features of the language to clarify code.
follow: ‣ Avoid using vague words like “handle” or “manage” - handleLinks(), manageObjects() ‣ Use active verbs - cutGrass(), sendFile() — functions that actively perform something. ‣ Indicate return value - getMagicBullet(), readFile(). where it makes sense. ‣ Languages with strong typing can use type signatures to help indicate return values as well.
without comments, it’s probably just bad. Rewrite it until it doesn’t need comments any more. If, at the end of that effort, you still feel comments are necessary, then by all means, add comments. Carefully. Jeff Atwood ANOTHER FAMOUS QUOTE BY SOME GUY