logoalt Hacker News

thfurantoday at 1:12 PM6 repliesview on HN

>Prompts like "move the code relating to SQL query analysis into a new file", "look for opportunities to use pytest parametrize to remove duplication in that test", "rename method X to Y".

There’s a lot of overlap there with the sorts of things traditional automated refactoring tools can do approximately instantly, locally, and for free.


Replies

ryandraketoday at 1:45 PM

Yea, when I read about people using AI with prompts like that, my first thought is, "Wow, that's like copy/paste, but instead of Ctrl-C/Ctrl-V, it's round-tripping to a server and using GPUs to do it." What's next? "Claude, rename the function doFoo() to performBar()"?

show 1 reply
cautiouscattoday at 1:24 PM

Yeah I do find myself leaning back into those tools. For awhile I’d just prompt to rename something. But when it’s my own tokens I’m paying for, I prefer the fast and free option :)

simonwtoday at 1:52 PM

Sure, and sometimes the coding agent will even use one of those refactoring tools on my behalf.

Getting them to run ast-grep is really fun, especially when it saves me from having to memorize that syntax myself.

mattaculartoday at 1:19 PM

What are some traditional automated refactoring tools that can do stuff like those tasks from the example?

show 4 replies
keyboredtoday at 1:37 PM

You just went too far. Go back to the subscription.