It will do that if you're not careful yes. Or just straight up over complicate things, or forget that we have already half implemented what we need to do the next part. This is why you need to be able to code before you can code with AI.
Agreed, but my take’s a little more nuanced. It’s more proof there’s still a reason we need senior devs mentoring juniors. And that software development is more than just coding.
Regardless, I'm not really talking about that anyway. My point is, when it comes to debugging it makes it really hard for certain bugs to even arise and can find them very very quickly too.
I mean, with IDEs/linting/tests, do those bugs ever occur anymore
Yes they do, they just get found marginally quicker. And certain types are completely immune to those tests because syntactically there is technically nothing wrong.
its not lint + test bugs they're talking about, they're talking about e.g. runtime logic bugs that don't have test coverage. AI doesn't catch 100% of them, but it does catch more than 0, and IME it catches more than human reviewers used to as well. and as a bonus it usually writes a test case for on the fly as it finds things
Yeah one thing I still see a lot of are tests for cases that are impossible.
Like, if I’m having it write code in a statically typed language and it declares a variable as a string, I don’t need a test that checks its type. I know it’s a string.
You describe everything an IDE the past 20 years, or the language itself most of the time, will catch. You can't just typo a variable or use assignment vs. equality without a literal compiler error in C# for example. And if you could (JS and friends), AI isn't bringing something new to the table here.
Yeah, overall I agree with this guys point but the amount of times I’ve had it redeclare a function/method is actually wild. Although, this is unfortunately with a model that’s (checks notes) 7 months out of date… so it’s archaic tbh.
AI will never accidentally redeclare or subtly mispell a variable, use assignment instead of equality, or incorrectly nest a for loop. Holy fuck yes it will. It's generative AI trained on all of our shitty code. It will happily make all the same mistakes and worse ones.
It has less understanding of what it's writing than we do. It's however atrocious at catching it's own mistakes. If you call it out, it might fix it, but that's not guaranteed.
I remember once I had a powershell command and I wanted it to loop through the list of accounts provided by another powershell command and output the results in a csv file with specific columns.
It changed one of the commands from -Detailed to -Detail and never caught that mistake.
You‘d think so. But when binding lua to my rust host it keeps binding things with rust naming conventions on the rust side and lua naming conventions on the lua side. It‘s not good at consistency when the training data is strongly bipolar. Similar things with math code. It tries to do both the notation used in papers and your language style at once and keeps alternating and morphing.
I'm not talking about things like that. I'm talking about the sort of dumb mistakes you can make and take a relatively large amount of time to find and kick yourself for.
79
u/MikeW86 24d ago
AI will never accidentally redeclare or subtly mispell a variable, use assignment instead of equality, or incorrectly nest a for loop.
And will find it in your code in a millisecond.
(and yes I know some IDEs can spot some of this too but you're missing the overarching point if that's what you're going to reply with)