5 ms·
I’ve started requiring that unless absolutely necessary, all comments and docstrings be one-liners in our code 10k+ codebase(s). LLM-generated code has a tenden
by datsci_est_2015 2mo ago
I’ve started requiring that unless absolutely necessary, all comments and docstrings be one-liners in our code 10k+ codebase(s). LLM-generated code has a tendency to “over-justify”, which is reasonable when first reviewing the code as a human.
But then, once it’s passed the first human it should be considered human-to-human communication rather than LLM-to-human communication, and the long, winding, and often repeated justifications can be significantly condensed.
Also you can’t let it run loose with unit tests unless you want to be blasted in the face with hundreds of lines of absurd test fixture preparation.
- thinkharderdev 2mo ago> LLM-generated code has a tendency to “over-justify” This is the thing that drives my nuts about LLM-generated code. I will see PRs that fix a bug and the entire bug fix is re-explained in 10 different places in a code comment.