←back to thread

466 points 0x63_Problems | 5 comments | | HN request time: 0.848s | source
1. inSenCite ◴[] No.42142037[source]
On one hand I agree with this conceptually, but on the other hand I've also been able to use AI to rapidly clean up and better structure a bunch of my existing code.

The blind copy-paste has generally been a bad idea though. Still need to read the code spit out, ask for explanations, do some iterating.

replies(3): >>42142460 #>>42142747 #>>42143257 #
2. ImaCake ◴[] No.42142460[source]
Yeah LLMs are pretty good at doing things like moving a lambda function to the right spot or refactoring two overlapping classes to a base class. Often it only saves five minutes but that adds up over time.
3. whazor ◴[] No.42142747[source]
Imagine a single file full of complicated logic, where messing with one if statement might cause serious bugs. Here an AI will likely struggle, whereas a human could spend a couple of hours trying to work out the connections.

But if you have a code base with predictable software architectural patterns, the AI will likely recognise and help with all the boilerplate.

Of course there is a lot of middle ground between bad and good.

4. physicles ◴[] No.42143257[source]
Do you mind getting into specifics about how you've been using AI to restructure your code? What tools are you using, and how large is the code base you're working with?
replies(1): >>42153961 #
5. inSenCite ◴[] No.42153961[source]
Using a combination of both chatgpt and claude/sonnet. Codebase is not very complex or cutting edge (e.g., data pipeline to maintain a local db, and an analytics system). These are not enterprise or even public facing applications.

For additional context I have not been a software engineer professionally for over a decade but still am in the engineering field.

Usually I will feed in a few functions (or just 1), sometimes a whole module if it small enough, and prompt it for general performance, and maintainability improvements. I just kinda iterate from there. I also restart chats often