|
|
|
|
|
by nunez
131 days ago
|
|
I find it funny that we, collectively, are now okay with comments in the code. I remember the general consensus on this _not even two years ago_ being that the code should speak for itself and that comments harm more than help. This matters less when agentic tools are doing the maintenance, I suppose, but the backslide in this practice is interesting. |
|
Saying that function "getUserByName" fetches a user by name is redundant. Saying that a certain method is called because of a quirk in a legacy system is important.
I regularly implement financial calculations. Not only do I leave comments everywhere, I tend to create a markdown file next to the function, to summarise and explain the context around the calculation. Just plain english, what it's supposed to do, the high level steps, etc.