3 ms·
I believe random comments often become extra clutter and diversions from actual code. Code should have short, succinct names that explain in context. What we s
by _y5hn 5y ago
I believe random comments often become extra clutter and diversions from actual code. Code should have short, succinct names that explain in context.
What we should do is document the code, short and consise description of classes, methods and functions. This will then act as a reference, when names inevitably fall short.
From this discipline, comments above code-blocks should explain what's missing in code to a future reader - probably yourself even. But a basic explanation of "What the heck is this? What is it for?" might be in order, if not already given.
How to implement this depends on needs and tooling.
The bigger picture belong in design documents, with references to components.