I mostly copy and paste to and from AI Chats, have it sometimes write a "complete feature or class" but either read the diff between the generated code and the previous existing one thoroughly or test it and go back and forth with the LLM.
Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
21–30 of 59 posts
Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#22Small functions, small modules, small codebases. Keep state as contained as possible. Tightly control interfaces and interactions. Know your paradigms. Example: in Rust multi threading it loves putting things in an Arc. You have to tell it to use MPSC queues instead. I love coding with AI. It has made me 100x more productive. I am able to work on my distributed event processing backend in Rust, then switch to my mobi…
Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#23Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#24I mostly copy and paste to and from AI Chats, have it sometimes write a "complete feature or class" but either read the diff between the generated code and the previous existing one thoroughly or test it and go back and forth with the LLM.
This is similar to how do you prevent copying and pasting from Stackoverflow doesn't break your code or how do you prevent an intern from breaking your code.
Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#25Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#26Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#27I mostly copy and paste to and from AI Chats, have it sometimes write a "complete feature or class" but either read the diff between the generated code and the previous existing one thoroughly or test it and go back and forth with the LLM.
This is similar to how do you prevent copying and pasting from Stackoverflow doesn't break your code or how do you prevent an intern from breaking your code.
Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#28> * AI suggests code that completely ignores existing patterns
> * It recreates components we already have
> * It modifies core architecture without understanding implications
> * It forgets critical context from previous conversations
> * It needs constant reminders about our tech stack decisions
Sounds like a really useful tool!
Serious question: Have you considered just, y'know, learning how to program on your own?
Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#29I think this is the wrong way to think about the problem. The AI isn't breaking your code, the engineers are. AI is just a tool, and you should always keep this in mind when talking about this sort of thing.
But I understand some of the problems you describe while using AI. And the way I work around is to never let the AI write more than a few lines at a time, ideally it should just complete the line I started to type.
Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?
#30I mostly copy and paste to and from AI Chats, have it sometimes write a "complete feature or class" but either read the diff between the generated code and the previous existing one thoroughly or test it and go back and forth with the LLM.
This is similar to how do you prevent copying and pasting from Stackoverflow doesn't break your code or how do you prevent an intern from breaking your code.