8 ms·
You're not supposed to trust the tool, you're supposed to review and rework the code before submitting for external review. I use AI for rather complex tasks.
by yodsanklai 2y ago
You're not supposed to trust the tool, you're supposed to review and rework the code before submitting for external review.
I use AI for rather complex tasks. It's impressive. It can make a bunch of non-trivial changes to several files, and have the code compile without warnings. But I need to iterate a few times so that the code looks like what I want.
That being said, I also lose time pretty regularly. There's a learning curve, and the tool would be much more useful if it was faster. It takes a few minutes to make changes, and there may be several iterations.
- deleted 2y ago[deleted]
- ryandrake 2y ago> You're not supposed to trust the tool, you're supposed to review and rework the code before submitting for external review. It sounds like the guys in this article should not have trusted AI to go fully open loop on their customer support system. That should be well understood by all "customers" of AI. You can't trust it to do anything correctly without human feedback/review and human quality control.
- schmichael 2y ago> You're not supposed to trust the tool This is just an incredible statement. I can't think of another development tool we'd say this about. I'm not saying you're wrong, or that it's wrong to have tools we can't just, just... wow... what a sea change.
- theonething 2y ago> I can't think of another development tool we'd say this about. Because no other dev tool actually generates unique code like AI does. So you treat it like the other components of your team that generates code, the other developers. Do you trust other developers to write good code without mistakes without getting it reviewed by others. Of course not.
- anonymars 2y agoI trust my colleagues to write code that compiles, at the very least
- ModernMech 2y agoOh at the very least I trust them to not take code that compiles and immediately assess that it's broken.
- chrisweekly 2y agoBut of course everyone absolutely NEEDS to use AI for codereviews! How else could the huge volume of AI-generated code be managed?
- seabird 2y agoYes, actually, I do! I trust my teammates with tens of thousands of hours of experience in programming, embedded hardware, our problem spaces, etc. to write from a fully formed worldview, and for their code to work as intended (as far as anybody can tell before it enters preliminary testing by users) by the time the rest of the team reviews it. Most code review is uneventful. Have some pride in your work and you'll be amazed at what's possible.
- theonething 2y agoso your saying that yes you do "trust other developers to write good code without mistakes without getting it reviewed by others." And then you say "by the time the rest of the team reviews it. Most code review is uneventful." So you trust your team to develop without the need for code review but yet, your team does code review. So what is the purpose of these code reviews? Is it the case that you actually don't think they are necessary, but perhaps management insists on them? You actually answer this question yourself: > Most code review is uneventful. Keyword here is "most" as opposed to "all" So based your team's applied practices and your own words, code review is for the purpose of catching mistakes and other needed corrections. But it seems to me if you trust your team not to make mistakes, code review is superfluous. As an aside, it seems your team culture doesn't make room for juniors because if your team had juniors I think it would be even more foolish to trust them not to make mistakes. Maybe a junior free culture works for your company, but that's not the case for every company. My main point is code review is not superfluous no matter the skill level; junior, senior, or AI simply because everyone and every AI makes mistakes. So I don't trust those three classes of code emitters to not ever make mistakes or bad choices (i.e. be perfect) and therefore I think code review is useful. Have some honesty and humility and you'll amazed at what's possible.
- ryandrake 2y agoImagine if your compiler just randomly and non-deterministically compiled valid code to incorrect binaries, and the tool's developer couldn't really tell you why it happens, how often it was expected to happen, how severe the problem was expected to be, and told you to just not trust your compiler to create correct machine code. Imagine if your calculator app randomly and non-deterministically performed arithmetic incorrectly, and you similarly couldn't get correctness expectations from the developer. Imagine if any of your communication tools randomly and non-deterministically translated your messages into gibberish... I think we'd all throw away such tools, but we are expected to accept it if it's an "AI tool?"
- deleted 2y ago[deleted]
- andrei_says_ 2y agoImagine that you yourself never use these tools directly but your employees do. And the sellers of said tools swear that the tools are amazing and correct and will save you millions. They keep telling you that any employee who highlights problems with the tools are just trying to save their job. Your investors tell you that the toolmakers are already saving money for your competitors. Now, do you want that second house and white lotus vacation or not? Making good tools is difficult. Bending perception (“is reality”) is easier and enterprise sales, just like good propaganda, work. The gold rush will leave a lot of bodies behind but the shovelmakers will make a killing.
- ModernMech 2y agoI feel like there's a lot of motivated reasoning going on, yeah.
- ToValueFunfetti 2y agoIf the only calculators that existed failed at 5% of the calculations, or if the only communication tools miscommunicated 5% of the time, we would still use both all the time. They would be far less than 95% as useful as perfect versions, but drastically better then not having the tools at all.
- shipp02 2y agoIn Mechanical Engineering, this is 100% a thing with fluid dynamics simulation. You need to know if the output is BS based on a number of factors that I don't understand.
- tevon 2y agoStackoverflow is like this, you read an answer but are not fully sure if its right or if it fits your needs. Of course there is a review system for a reason, but we frequently use "untrusted" tools in development. That one guy in a github issue that said "this worked for me"
- ModernMech 2y agoImagine! Imagine if 0.05% of the time gcc just injected random code into your binaries. Imagine, you swing a hammer and 1% of the time it just phases into the wall. Tools are supposed to be reliable.
- arvinsim 2y agoThere are no existing AI tools that guarantee correct code 100% of the time. If there is such a tool, programmers will be on path of immediate reskilling or lose their jobs very quickly.
- gtirloni 2y ago1) Once you get it to output something you like, do you check all the lines it changed? Is there a threshold after which you just... hope? 2) No matter what the learning curve, you're using a statistical tool that outputs in probabilities. If that's fine for your workflow/company, go for it. It's just not what a lot of developers are okay with. Of course it's a spectrum with the AI deniers in one corner and the vibe coders in the other. I personally won't be relying 100% on a tool and letting my own critical thinking atrophy, which seems to be happening, considering recent studies posted here.
- senordevnyc 2y ago1) Yes, I review every line it changed. 2) I find the tool analogy helpful but it has limits. Yes, it’s a stochastic tool, but in that sense it’s more like another mind, not a tool. And this mind is neither junior nor senior, but rather a savant.
- pjerem 2y ago> 1) Once you get it to output something you like, do you check all the lines it changed? Is there a threshold after which you just... hope? Not op but yes. It sometimes takes a lot of time but I read everything. It still faster than nothing. Also, I ask very precise changes to the AI so it doesn’t generate huge diffs anyway. Also for new code, TDD works wonders with AI : let it write the unit tests (you still have to be mindful of what you want to implement) and ask it to implement the code that run the tests. Since you talk the probabilistic output, the tool is incredibly good at iterating over things (running and checking tests) and also, unit tests are, in themselves, a pretty perfect prompt.
- iforgotpassword 2y ago> It sometimes takes a lot of time but I read everything. It still faster than nothing. Opposite experience for me. It reliably fails at more involved tasks so that I don't even try anymore. Smaller tasks that are around a hundred lines maybe take me longer to review that I can just do it myself, even though it's mundane and boring. The only time I found it useful is if I'm unfamiliar with a language or framework, where I'd have to spend a lot of time looking up how to do stuff, understand class structures etc. Then I just ask the AI and have to slowly step through everything anyways, but at least there's all the classes and methods that are relevant to my goal and I get to learn along the way.
- bigstrat2003 2y ago> You're not supposed to trust the tool, you're supposed to review and rework the code before submitting for external review. Then it's not a useful tool, and I will decline to waste time on it.
- mrheosuper 2y agoIf i dont trust my tool, i would never use it, or use something else better
- e3bc54b2 2y ago> You're not supposed to trust the tool, you're supposed to review and rework the code before submitting for external review. The vibe coding guy said to forget the code exists and give in to vibes, letting the AI 'take care' of things. Review and rework sounds more like 'work' and less like 'vibe'. /s
- jorvi 2y ago> But I need to iterate a few times so that the code looks like what I want. The LLM too. You can get a pretty big improvement by telling the LLM to "iterate 4 times on whichever code I want you to generate, but only show me the final iteration, and then continue as expected". I personally just inject the request for 4 iterations into the system prompt.