Hacker News new | ask | show | jobs
by riffraff 624 days ago
I don't think convention over configuration causes LLMs any problems, GitHub copilot generates code matching rails conventions quite easily for example.
1 comments

Because there’s enough rails code in the training data to determine the proper conventions :) if you’re making something new without this glut of data, it’s going to be much more difficult for a coding assistant to match a convention it’s never seem before.
The thing is, with some elbow grease, you can write a great plugin for your preferred editor. No need for dubious LLMs results, especially when the difficult part, code intellisense, is already solved with LSP. If you're a shop that has invested in a framework, it would be cheaper and more productive.
true, but the conventions it has seen are the same across all similar domains not just same framework/language, copilot "picks up" the similarity.

What I mean is: if you name your modules consistently, say Operation::Object::Verb or Action::ObjectVerb or ObjectManager.doSomething it's really easy for the LLM to guess the next one, just as it is easy for a human.

Add a new file actions/users/update.rb and start typing "Act" and it may guess "class Actions::Users::Update, and start to fill in the code based on nearby modules, switch to the corresponding unit test and it'll fill it in too.

Source: we have our own in-house conventions and it seems copilot gets them right most of the time, ymmv.