Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What do you mean cloning boiler plate logic? Don't you just write it once and then call the function? Need to change things? Okay do a little abstraction. But I thought a big part of coding was to reduce repetition


> What do you mean cloning boiler plate logic?

As an example, each tool callable by the AI needs its own input JSON schema, and in its execute function needs to send a request to the client, client needs to have a callback that handles that request, etc. it is very boilerplatey, bridges across multiple implementation languages, in completely different parts of the codebase, and Claude knocks it out in like 30 seconds flat so I can focus on the parts of the implementation that it slightly fucked up, but it usually gets the boilerplate bang-on.


So why not write something to generate that file? Or if you don't need to write to disk, just the data?


I'm not really sure what you mean. It saves me time to ask Claude Code to clone a file for me and repurpose it for a new tool compared to doing it all manually. And iterating on it can also be faster because I can tell it what transformations to make to the file and it tends to be faster than doing those transformations myself.

I still do a bit of manual post-processing but the end-to-end latency is a lot lower than if I had done all of the processing that manually.

Another relatively common pattern for me is to do a certain transformation manually once and then tell Claude Code to repeat it on all of the related tools. It does a good job at that too. I don't even have to manually tab through each file in my editor, or come up with some cursed find and replace pattern, or anything like that. It's just more time-efficient for me.

Note that I don't use an LLM to save mental effort. It's purely for saving time. People who try to use an LLM to save mental effort are usually using it wrong. You still need to know what you're doing in order to properly tell the LLM to do that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: