Comment Re:it's a tool (Score 2, Insightful) 147
I had it rewrite a backend function that reads from DB/returns JSON. But I had it do it "streaming" from the database instead of buffering-and-stringifying the database response. This has been long in my to-do list. I knew how to implement it (as I had done it in the past). I just didn't want to do it because it was a "nice to have" but not a must for our use case. And it's honestly boring to write.
I find I do a lot of refactors that I would have previously written off as good ideas, but too much work to be worth the effort. I still do think about the effort and weigh it against the benefit, but the effort I'm weighing is my time to review what the LLM did, and the time of whoever has to review my PR. On balance, though, I end up doing a lot of code cleanup that I previously wouldn't have done.
I do also have the LLM actually write most of my code, but first I discuss what I want with the LLM and ask it to write a detailed design doc, then I review and adjust the design doc, then have the LLM write the code from the design doc, then review and adjust the code. So I'm still doing quite a bit of work, but the overall process is still a lot faster than writing the code myself -- and I'm pretty fast. The overall quality of the result is on par with what I'd produce by myself, maybe a bit higher because of the greater willingness to refactor.
I also tried "Vibe coding an app" to see how that would work.
I actually do "vibe code" lots of stuff. Not production code but throwaway scripts used during development to automate things that I'd otherwise have done by hand because although it's faster once automated, the time to write a script by hand isn't justified. But with an LLM able to output a several hundred-line shell script in seconds, there's no reason not to automate everything I can. Option A is to tell the LLM to do it for me, but if I have to do it frequently and it's sufficiently mechanical to be scriptable the best solution is to tell the LLM to write a script for me. I don't really review those scripts, either, beyond a quick skim to make sure it's not doing anything insane. Beyond that, I figure out if it works by running it. If it doesn't, I tell the LLM to fix it. This is extremely efficient.
For more complex tasks that require judgment I tell the LLM to do it, then see what the LLM screwed up, tell the LLM to fix it, rinse, repeat until the result is good... then I tell the LLM to write a skill to capture what I just learned about how to get the LLM to do that task well. So then I can also automate tasks that aren't purely mechanical.
All in all, AI at least doubles my productivity. And probably a lot more than that.