3 ms·
You care about code quality. Many don’t. I had someone tell me this week that a 6000 line class was ok because it was easier for the model to understand and tha
by digitaltrees 5mo ago
You care about code quality. Many don’t. I had someone tell me this week that a 6000 line class was ok because it was easier for the model to understand and that’s more important than human comprehension. And I get his point but that seems like a big risk to take.
- mpalczewski 5mo agoand it's wrong. a 6000 line class is not easier for a model to understand. the same things that help humans also help agents. I find myself adding linters that must pass and the agent muss fix that limit file size, function length, function complexity, how many files in a directory. a little more work for the agent, but the codebase is healthier and the agents write fewer bugs.
- lukevdp 5mo agoI don't think the same things that help humans help agents. Simplicity helps humans, for agents parsing complexity is a breeze. Not saying code quality isn't important - it is. But I think what is described as quality code will change.
- cjbgkagh 5mo agoAgents still pay a penalty for complexity even if it is a smaller one.
- digitaltrees 5mo agoParsing single file is easier than navigating a file system for an LLM. Until the models have context windows large enough to hold the entire codebase in one shot, single files will beat multiple files every time.
- bossyTeacher 5mo agoThis. I suspect the codebases in the future will be made of a small number of gigantic source files. These will be able to be transpiled into a more human friendly that produces multiple smaller files per big file in human-debug mode.
- cjbgkagh 5mo agoAs a human who typically uses large files, 10k to 30K lines of code files are pretty common, I find the agents don’t read the whole file after the first time, they almost always do a range select for the bit they are interested in.
- digitaltrees 5mo agoBut you wouldn’t argue that a 30k line file is good code would you? Humans write bad code to. For me the litmus test is: will someone read this in the future. If yes, then write good code. I don’t think we are in the era when a human will never read the code again in human history. So we should still strive for human intelligibility.
- cjbgkagh 5mo agoThe code I write is good. I don’t write for the lowest common denominator, readers need to be hard core functional programmers as a pre-req. The great thing about AI is that it’s raising the bar on lowest common denominator.