Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
RadiatorTwo35870dOh I beg to differ here. Especially when programming in a field like ERP.
Yes the code is good when it tells you that a specific thing is being done. But without any comment why it is done, it's a nightmare for anyone who looks at it afterwards.
I don't know how often I heard sentences like: Why the fuck is this value here subtracted from this value.
I hear something like that all the time when it comes to tax calculation.
Yes you can look at the documentation (good luck with finding any details about that specific calculation).
But a comment in code would help a lot.
Even if it just points to a specific line in the documentation.
electrineer853770dCode itself should explain what is done. Comments should explain why something is done.
arcadesdude697270dComments are needed for context and "why" -- which even superior clean code cannot provide.
simpleJack169970dPeople regurgitate this stuff like theyre in a cult.
COMMENTS ARE USEFUL
You dont have to go nuts,you dont have to write an essay but a small explanation can be incredibly useful to the person that comes after you.
Stuxnet5414170dFuck off with that bullshit mentality.
Don't be a cunt and comment your fucking code.
Fast-Nop1301870dYeah have fun maintaining code that makes perfectly clear WHAT is being done but not WHY. Try adding features to that without knowing the rationale of the existing stuff. Have fun when the existing tests suddenly fail and you have to figure out why.
Does anyone remember the Debian key disaster from 2006-2008? That was because a maintainer out commented two lines of code to remove valgrind warnings because he saw what the code was doing, but not why these lines were important.
Ximidar113969dNah bruh. Comment that shit. If it makes you feel better learn some framework that will turn your comments into documentation. But absolutely use some type of commenting scheme.
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job