Live data from Hacker News

We should be more tired than the model

vickiboykis.com

141–150 of 168 posts

Re: We should be more tired than the model

#141
post #35
post #14

Something I've been trying recently for non-throwaway code is extensive refactoring, without typing any code myself but by closely directing the coding agent. 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". Early indications are that this is helping a lot with the problem where i…

>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.

Traditional automated refactoring tools cannot read multiple functions and, in one go, determine what subsets of all of those functions relate philosphically to the SQL queries (not just the actual queries themselves) and pull those out into a new coherent interface in a new file.

Re: We should be more tired than the model

#142
post #46

I don't know. I find that I'm moving up a level and improving my product-management skills while delegating most of the code to the agents. I'm still very much hands-on with the design and requirements, and I'm asking questions like, "What's our security story for XYZ?", "Are we accounting for colour-blindness?", etc. Not being down in the code allows me to prairie-dog a bit more and see the landscape better.

I'm about 50% that way. However when the AI is done coding I then step back and review to find places the code quality is unacceptable. I also have to stop the AI once in a while because it forgets the point and does something stupid. Junior engineer learn, AI does not.

I think the right comparison is AI models versions, not intra-AI-model growth (although even that can 'learn' with persistent memory & contexts).

Re: We should be more tired than the model

#144

I don't know. I find that I'm moving up a level and improving my product-management skills while delegating most of the code to the agents. I'm still very much hands-on with the design and requirements, and I'm asking questions like, "What's our security story for XYZ?", "Are we accounting for colour-blindness?", etc. Not being down in the code allows me to prairie-dog a bit more and see the landscape better.

> What's our security story for XYZ? lmao I hope I never use your products with anything sensitive ever

I think you missed the point. I don't abandon security to whatever the agent decides to write.

Re: We should be more tired than the model

#146
post #127

Earlier quoted context omitted.

That doesn't update documentation or comments referring to the function. I prefer search-and-replace.

Sure it does. IntelliJ will do that just fine.

Sounds like it doesn't catch everything and they recommend search-and-replace. From their docs: "For example, if you want to replace a variable name with a new name for a large project, use the Replace in path instead of the Rename refactoring since your variable can appear in the config files as well."

Re: We should be more tired than the model

#147
post #35

Earlier quoted context omitted.

>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.

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()"?

Yes, and ideally in this case LLM would be translating your intent into a series of invocations of specific APIs or scripts to do the transformations, and correcting for unexpected failures or realizations.

Because it's often not just Ctrl-C/Ctrl-V. It's Ctrl+C/Ctrl+V, except today paste is Shift+Insert, and in the other project it's usually C-y, and you actually need to check one more place for full list of things to copy, and then you discover one case needs a minor transformation, ...

LLMs can handle such annoying details intelligently.

> What's next? "Claude, rename the function doFoo() to performBar()"?

Yes. Such prompt can be issued in many equivalent ways, and works across environments, contexts and tool stacks. I can issue it from the phone, in form of "also doFoo -> perform... reame", and it will work even on Lisp code inside Word documents it accesses through Google Drive.

Re: We should be more tired than the model

#148
post #35

Earlier quoted context omitted.

>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.

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()"?

For one function, yes. I used Copilot to do massive refactoring on my project recently - switch to a new JSON library, completely switch web frameworks, etc. The stuff I needed to do but was putting off forever.

And even with small things, it's just toil. You can start a small update and then realize with all the back and forth of edit/test/edit/test that you've been stuck in the OODA loop for 40 minutes you will never get back.

Re: We should be more tired than the model

#149
post #35
post #14

Something I've been trying recently for non-throwaway code is extensive refactoring, without typing any code myself but by closely directing the coding agent. 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". Early indications are that this is helping a lot with the problem where i…

>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.

which tools?

Re: We should be more tired than the model

#150
post #35

Earlier quoted context omitted.

>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.

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()"?

"Pft, you use an entire IDE inside an electron web browser eating 16GB of memory to rename a function instead of a simple regex? What a waste"
Post reply on HN