Live data from Hacker News

Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

news.ycombinator.com

51–59 of 59 posts

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#51
post #49

Earlier quoted context omitted.

Dang that's impressive then. I've been a programmer of different languages for a while and I tried to learn/use rust ehh... but that's cool to hear.

It's not the easiest language to learn, and in some respects it's one of the hardest. Luckily, tooling is good. It's one of those things where "trying" to learn it doesn't work. You should commit yourself to it and do it. Don't try too hard to understand all the abstractions and concepts. Just write an incredible amount of code. Your brain, over time, will pick up the patterns and make sense of the abstractions. It w…

yeah it's just a very strict language, I felt like everything I was typing was wrong (red syntax highlight). I get it though have to want it but also use it. For the moment I'm getting by with JS/Python/C++ some Swift.

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#52
post #29

> How often do you catch AI trying to make breaking changes? I 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 ti…

100% ownership is required. Blaming AI is a craftsman blaming the tools. The craftsman is the one that buys/makes the tools, and maintains them. Things can not have responsibility only people can.

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#53
post #29

> How often do you catch AI trying to make breaking changes? I 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 ti…

That’s what I used to do but now I think it is a major handicap. I haven’t perfected it yet, but I’ve had good luck letting AI write entire (smallish) programs and do major updates to those.

I find this fascinating because even using the last models more often than not asking the AI to generate even a test file for a simple module with some controlled state will result in an incorrect test setup that simply won't run, or nonsensical tests that clearly don't reflect what the code is doing.

I often use a coding assistant to handle boilerplate for me or write additional tests after I've given it some correct ones to work of off, but when I read accounts like these I always wonder what's different about our experiences that you feel you can give it bigger asks like that.

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#54
post #53

Earlier quoted context omitted.

That’s what I used to do but now I think it is a major handicap. I haven’t perfected it yet, but I’ve had good luck letting AI write entire (smallish) programs and do major updates to those.

I find this fascinating because even using the last models more often than not asking the AI to generate even a test file for a simple module with some controlled state will result in an incorrect test setup that simply won't run, or nonsensical tests that clearly don't reflect what the code is doing. I often use a coding assistant to handle boilerplate for me or write additional tests after I've given it some correc…

Wouldn’t fine-tuning make a difference? Granted, majority of HN users don’t invest the extra effort to do this.

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#55

I use aider to work on the aider code base, which is approaching 30k lines of python. Aider writes about 70% of the new code in each release [0]. So it's doing some fairly heavy lifting in a non-trivial code base. Some pragmatic tips: - Work with AI like a junior developer, except with unlimited energy and no problem being corrected repeatedly. - Provide the AI with guidance about conventions you expect in your code…

When using aider for development, do you typically review the generated diffs in aider itself or do you use an external tool?

Trying to figure out what a good workflow looks like.

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#56
post #29

> How often do you catch AI trying to make breaking changes? I 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 ti…

> The AI isn't breaking your code, the engineers are. AI is just a tool,

Teams with CAPS LOCK on their keyboards, HOW DO YOU PREVENT THIS FROM GOING OUT OF CONTROL?

(A common trick is to unbind CAPS LOCK forcing developers to hold down shift while typing uppercase letters.)

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#57
post #55

I use aider to work on the aider code base, which is approaching 30k lines of python. Aider writes about 70% of the new code in each release [0]. So it's doing some fairly heavy lifting in a non-trivial code base. Some pragmatic tips: - Work with AI like a junior developer, except with unlimited energy and no problem being corrected repeatedly. - Provide the AI with guidance about conventions you expect in your code…

When using aider for development, do you typically review the generated diffs in aider itself or do you use an external tool? Trying to figure out what a good workflow looks like.

Mostly I just review the chat output. But I also use /diff to see actual unified diffs of the last AI change. Or if I have made a sequence of changes, I'll use my normal git tools to diff the entire branch, etc.

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#58
post #53

Earlier quoted context omitted.

I find this fascinating because even using the last models more often than not asking the AI to generate even a test file for a simple module with some controlled state will result in an incorrect test setup that simply won't run, or nonsensical tests that clearly don't reflect what the code is doing. I often use a coding assistant to handle boilerplate for me or write additional tests after I've given it some correc…

Wouldn’t fine-tuning make a difference? Granted, majority of HN users don’t invest the extra effort to do this.

Finetuning is as finnicky as coding it yourself directly. If you already have a toolset why bother with another that is statistically wrong as many times as it is right.

Re: Ask HN: Teams using AI – how do you prevent it from breaking your codebase?

#59

I use aider to work on the aider code base, which is approaching 30k lines of python. Aider writes about 70% of the new code in each release [0]. So it's doing some fairly heavy lifting in a non-trivial code base. Some pragmatic tips: - Work with AI like a junior developer, except with unlimited energy and no problem being corrected repeatedly. - Provide the AI with guidance about conventions you expect in your code…

i know it might be too much to ask, but can you record one of your coding session and share it on youtube? like, one hour session using aider to implement some features for aider.
Post reply on HN