Comment on 10 months later bill revisits his spaghetti code. forgets absolutely everything and refuses to elaborate

Prunebutt@feddit.de ⁨11⁩ ⁨months⁩ ago

Comments are lies that will happen sometime in the future

Comments are always overlooked if gode gets refactored. Language servers can’t/won’t parse them and they’re easy to overlook.

If you name your functions/variables clearly, put complex logic into clearly named functions and keep the same level of abstraction in every function (which never exceeds roughly 50 lines), you hardly need any comments, if any.

Comments are for behavior that’s not possible to convey clearly through code.

source
Sort:hotnewtop