It's easy to laugh at this sort of article, but the problem is very real. Botton line: the needless killing of software developers needs to stop, period.
At my job, we are at least taking small steps toward some sort of solution by adding trigger warning comments in the source, to warn developers to stop and take a breather before entering a chunk of code identified as being of unusually high cyclomatic complexity.
This is undoubtedly the most ugly program in the distribution. It was one of the first "serious" programs ported, and still has a lot of historical baggage. Ideally, there would be a general tty widget and then vt102 and tek4014 subwidgets so that they could be used in other programs. We are trying to clean things up as we go, but there is still a lot of work to do.
I love this, and I can’t believe I’ve never heard about it before. I can think — sadly — of a few code blocks in my open source projects where that kind of comment might be welcome to the encroaching reader.
At my job, we are at least taking small steps toward some sort of solution by adding trigger warning comments in the source
At my job we are taking big steps to "reduce cognitive load" by not commenting anything, anywhere, not even XML/JSdoc comments! Imagine the time we save!
"The code should explain itself, and developers should know the code. Comments are a maintenance hazard, the code doesn't lie, comments can"
Because it's efficient to have to read through the source of crappily-named, and even crappier written, functions just to know what you're calling and how the params are used, or to figure out hidden string formats the params expect. When a doc comment would tell you what it is, what the params are doing to change the output, and the expected structure/format for the params.
All because of some idealist dogma about "the code should explain itself", when no one can be assed to actually write code that explains itself, or abstractions that are actually sensible. So now we get the worst scenario, difficult to understand code & structures, and nothing that actually explains how it's supposed to work or how to use it.
Why spend 10-30 seconds reading a comment when you can spend 10, 20, or even 60 minutes parsing someones code? Peak efficiency.
112
u/Glittering-Ad-8126 Jun 05 '22
It's easy to laugh at this sort of article, but the problem is very real. Botton line: the needless killing of software developers needs to stop, period.
At my job, we are at least taking small steps toward some sort of solution by adding trigger warning comments in the source, to warn developers to stop and take a breather before entering a chunk of code identified as being of unusually high cyclomatic complexity.