4 ms·
Linters are great at catching specific pattern violations, but they’re useless against bad decomposition or a poorly chosen abstraction. An LLM can generate cod
by KurSix 1y ago
Linters are great at catching specific pattern violations, but they’re useless against bad decomposition or a poorly chosen abstraction. An LLM can generate code that passes all 100 linters and still ends up being a logical mess - with business logic in the wrong layer and completely unmaintainable.
- prmph 1y agoExactly this. LLMs may do a passable job of architecture if there are many examples of high quality architecture similar to what you want to do in their training set, but to introduce some novel stuff and they are clueless
- latentsea 1y agoWith Roslyn Analyzers and things like ArchUnit I've found its possible to actually write linters that enforce a predetermined architecture with established patterns such as enforcing usage of particular base or framework level classes in specific layers/locations. I agree with the assessment LLMs aren't great at novel architectural work. I'm merely reporting my experience that using LLMs to write analysers that enforce established patterns takes the output from random to well ordered and provides a nice productivity boost in a constrained, but valuable, set of circumstances. It's not a complete solve, but it's a big improvement over just prompting them and hoping for the best.
- KurSix 1y agoThis approach is perfect for mature projects with a well-established architecture. But it could be counterproductive in the early R&D stages when the architecture is still fluid and the team is constantly experimenting. The rigid constraints of the analyzers might stifle creativity. So it's a powerful tool, but for the right stage of a project's lifecycle