3 ms·
Had extremely bad experience with Cursor/Claude. Have a big Angular project, +/- 150 TS files. Upgraded it to Angular 19 and now I can optimize build by markin
by romanovcode 2y ago
Had extremely bad experience with Cursor/Claude.
Have a big Angular project, +/- 150 TS files. Upgraded it to Angular 19 and now I can optimize build by marking all components, pipes, services etc as "standalone" essentially eliminating the need for modules and simplifying code.
I thought it is perfect for AI as it is straight forward refactor work but would be annoying for a human.
1. Search every service and remove the "standalone: false"
2. Find module where it is declared, remove that module
3. Find all files where module was imported, import the service itself
Cursor and Claude constantly was losing focus, refactoring services without taking care of modules/imports at all and generally making things much worse no matter how hard "prompt engineering" I tried. I gave up and made a Jira task for a junior developer instead.
- LocalH 2y agoSounds like Claude "has" ADHD lol
- rvnx 2y agoIt doesn't have ADHD, it's more likely because they create too much small chunks in the recent versons of Cursor. So Cursor is looking at the project with a very small magnifying glass, and forgets what is the big picture (in addition to the context length issue).
- M4v3R 2y agoYes 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.
- _joel 2y ago> I gave up and made a Jira task for a junior developer instead. The true senior engineer skill.
- cess11 2y agoI would use find ... -exec, ripgrep and sed for this. If I have a junior or intern around I'd screen share with them and then have them try it out on their own. Text files are just a database with a somewhat less consistent query language than SQL.
- bambax 2y agoCould this not be done algorithmically though? One can go reasonably far with static code parsing.