3 ms·
> "oh god, I want to change the name of this function/variable, but I need to go through 500 files, and see where it's used, then make local changes, then re-te
by cesarb 1y ago
> "oh god, I want to change the name of this function/variable, but I need to go through 500 files, and see where it's used, then make local changes, then re-test everything..."
Forgive me for being dense, but isn't it just clicking the "rename" button on your IDE, and letting it propagate the change to all definitions and uses? This already existed and worked fine well before LLMs were invented.
- tptacek 1y agoYes, that particular example modern editors do just fine. Now imagine having that for almost any rote transformation you wanted regardless of complexity (so long as the change was rote and describable).
- timr 1y agoYeah, sorry...I re-read the comment and realized I wasn't being clear. It's bigger than just search/replace. Already updated what I wrote. The far more common situation is that I'm refactoring something, and I realize that I want to make some change to the semantics or signature of a method (say, the return value), and now I can't just use search w/o also validating the context of every change. That's annoying, and today's bots do a great job of just handling it. Another one, I just did a second ago: "I think this method X is now redundant, but there's a minor difference between it, and method Y. Can I remove it?" Bot went out, did the obvious scan for all references to X, but then evaluated each call context to see if I could use Y instead. (But even in the case of search & replace, I've had my butt saved a few times by agent when it caught something I wasn't considering....)
- tptacek 1y agoI really like working with LLMs but one thing I've noticed is that the obvious transformation of "extract this functionality into a helper function and then apply that throughout the codebase" is one I really actually enjoy doing myself; replacing 15 lines of boilerplate-y code in a couple dozen places with a single helper call is _really_ satisfying; it's like my ASMR.
- timr 1y agoHah, well, to each their own. That's exactly the kind of thing that makes me want to go outside and take a walk. Regardless of what your definition of horrible and boring happens to be, just being able to tell the bot to do a horrible boring thing and having it done with like a junior level intelligence is so experience enhancing that it makes coding more fun.
- tptacek 1y agoI find elimination of inertia and preservation of momentum to be the biggest wins; it's just that my momentum isn't depleted by extracting something out into a helper. People should try this kind of coding a couple times just because it's an interesting exercise in figuring out what parts of coding are important to you.