logoalt Hacker News

knuckleheadstoday at 7:17 AM1 replyview on HN

Very much agreed. Something specific that has helped me a lot (beyond just automatic formatting, linting and testing) was putting a hard fail on any file with more than 1500 lines or so, with an allowlist for specific files with specific reasons for their length. I realized the agents were squirreling away code without wanting to do any sort of refactor. Every time one of these rat's nests has turned up, the codebase has been much improved with a small refactor, to the point it doesn't feel like such a pile of slop anymore.


Replies

rhubarbtreetoday at 7:26 AM

200 is my preferred limit, and I think you can find that in a few highly regarded books on coding.

show 1 reply