DEV Community

Lloyd Smith
Lloyd Smith

Posted on

broken windows

I deleted this comment before sending. It would have been a reply to a comment:

Anyone else's agents tend to write a lot of overly-defensive lines like this.foo?.bar?.baz || []? Are you doing anything to mitigate it? I would imagine it's a bigger problem for JS teams than TS

In the olden days of Java we had PMD and FindBugs and Eclipse and they would warn you about unnecessary null checks.

Yet codebases routinely had thousands of warnings.

The only way to get people to stop was:

  • fixing all those warnings, which required a heroic, thankless effort, or starting a new project
  • and then configuring strict build checks that failed the build
  • watch them so they don't disable it or just suppress warnings on every line

This was maybe 20 years ago.

People are still people-ing, I guess, via AI bots. The AI, I wonder, must have been trained on this sloppy human code.


P.S., Potential null pointer dereferences were almost as common.

Top comments (0)