Comment by LinuxAmbulance
18 hours ago
AI has made my work about 5-8x quicker, just because I'm able to have it cover a lot of the grunt work (update 42 if statements in 32 different files) that took time, but no particular skill.
I think the use cases where AI makes an economic improvement to the status quo for a business are rare, but they do exist, and they can be a significant improvement.
It's like the early days of the dotcom boom and bust - people thought the internet was good for every use case under the sun, including shipping people a single candy bar at a loss. After the dotcom bust, a lot of that went by the wayside, but there was a tremendous economic advantage to the businesses that were more useful when available on the internet.
Without getting into AI-for-work good or bad,
> update 42 if statements in 32 different files
is a silly behavior for a programmer or an AI to have to do more than twice. We have tools that very effectively remove the need for things like that: programming languages that allow modular and reusable code, good design, etc.
Ideally. But that requires the correct abstraction, requires keeping it up to date.... that's basically an unachievable ideal. You either have overabstraction/overengineering (most codebases) or you have repetition. Repetition is actually more preferable in the LLM-world because you have to keep less stuff in your head. And the LLM's head too.
Even if something does look copypasted, it might actually be semantically distinct enough that if you couple them, you'll create a brittle mess.
Additionally, there's always going to be global changes (update the code style, document things, refactor into a new pattern, add new functionality to callers, etc.). The question isn't whether you use your lanuage's tools or you do it by hand, the question is whether you use an LLM or do it by hand :P
Totally fair, but 42 if-statements across 32 files isn't something you need to fix with like ... a grand refactor or hexagonal architecture or event sourcing or whatever the overengineering pattern du jour is. You can fix that with a utility function or three, and a file/class/module/whatever that owns the code relating to some of those conditions.
I'm not some DRY zealot, but I've been in the "this system needs really similar changes to a ton of geographically distant code for simple changes" salt mines a lot. The people who say that kind of spaghetti is unavoidable are just as wrong as the ones who say it can only be fixed with a grand rearchitecture by a rockstar.
4 replies →
LLMs are great at replacing repetition with an abstraction.
The AI needs to update the 42 statements to all use the same function so it can be updated in just one place going forward.
Does your work primarily consist of updating 42 if statements in 32 different files? We all do that occasionally, but if you're doing it constantly, is it possible that a different system design would make your work much easier?
Could you please show us an example of the change made to one of these if statements? I'm curious, because it seems absolutely wild to me to end up in such a situation (where that many changes are required and the usual refactoring tools of modern IDEs are insufficient) in the first place.
> the usual refactoring tools of modern IDEs are insufficient
Cursor doesn't have refactorings, so
If you are 8x quicker by having the AI do these for you, I think you are a junior intern or something? It must mean most of your time is spent doing these things.