4 ms·
Personally I think of LLM code helpers as a warning smell. If I’m working on something where I’m tempted to generate a bunch of boilerplate from a bot that kno
by pavlov 3y ago
Personally I think of LLM code helpers as a warning smell.
If I’m working on something where I’m tempted to generate a bunch of boilerplate from a bot that knows very little about the context of the project, am I really spending my time on the right thing? Either I should be working on something higher level, or the amount of boilerplate should be so low that I can write it myself. Anything else suggests that there’s a problem and the LLM bloat band-aid isn’t the solution.
- coffeebeqn 3y agoDepends. We have a large CRUDv service - lots of endpoints that has a lot of boilerplate and not much business logic but it doesn’t change often. It’s annoying to add a new endpoint but it’s not common enough that I want someone to spend a month+ refactoring it
- lostmsu 3y agoI'm sure you generate all your serialization code by hand. Not to mention the object model. Why let compiler make a virtual call if you can load the class pointer and look up the right function yourself, MIRIGHT?
- jononor 3y agoSerialization code should be generic, no boilerplate needed. Object models must reflect the problem domain well, something to think carefully about. Current code assistants is only able to do that automatically for very generic classes.
- hn92726819 3y ago> I'm sure you generate all your serialization code by hand. Is this sarcasm? Who generates serialization/deserialization by hand now? Even Java has mature annotation libraries so it can be done in a single line. Maybe legacy code, but I'd argue using IDE method generation would be much preferred on a legacy codebase than AI.
- pavlov 3y agoBut that’s the whole point of what I meant by “I should be working on something higher level.” Nobody (hopefully) uses an LLM to write mounds of x86 assembly code instead of letting the compiler do it. An AI model is a very blunt tool for most jobs. If I need code generation, most often I should write my own tool for it rather than copy-paste reams of barely inspected code from a language model.
- PH95VuimJjqBqy 3y agoyou can't know that, nor is it a code smell in any way. The first thing I did with ChatGPT was try to get it to generate a file with all 6502 opcodes defined as an enum. If I'm going to write an NES emulator, I'm going to need that done and either I do it or chatGPT does it. Many parts of programming are mechanical in nature.