4 ms·
Yes it feels like refactoring would be a perfect use case for LLMs but it only works for very simple cases. I've tried several times to do bigger refactors span
by M4v3R 2y ago
Yes it feels like refactoring would be a perfect use case for LLMs but it only works for very simple cases. I've tried several times to do bigger refactors spanning several files with Cursor and it always failed. I think it's a combination of context window being not big enough and also tooling/prompting could probably be improved to better support the use case of refactoring.
- vbezhenar 2y agoSome IDEs like Intellij Idea have structured search&replace feature. I think there are dedicated projects for this task, so you can search&replace things using AST and not just text. May be it would make sense to ask AI to use those tools instead of doing edits directly?
- MrMcCall 2y agoHow is a 'guess-the-next-token' engine going to refactor one's codebase? Just because everyone's doing it (after being told by those who will profit from it that it will work) doesn't mean it's not insane. It's far more likely that they're just a rube. At the end of using whatever tool one uses to help refactor one's codebase, you still have to actually understand what is getting moved to production, because you will be the one getting called at midnight on Saturday to fix the thing.