by romanovcode · 1y ago · 0 comments
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.
The true senior engineer skill.
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.
May be it would make sense to ask AI to use those tools instead of doing edits directly?
Text files are just a database with a somewhat less consistent query language than SQL.