r/ProgrammerHumor • • Oct 26 '26 • Bravo 6

instanceof Trend thisIsVeryTrue

Post image
27k Upvotes

1.6k comments sorted by

View all comments

Show parent comment

79

u/MikeW86 Oct 26 '26

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)

60

u/Difficult-Lime2555 Oct 26 '26

I find it likes to reinvent the wheel. Although a simple “see if this pattern is already in use” will catch it.

24

u/MikeW86 Oct 26 '26

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.

6

u/Difficult-Lime2555 Oct 26 '26

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.

6

u/MikeW86 Oct 26 '26

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.

5

u/Difficult-Lime2555 Oct 26 '26

I mean, with IDEs/linting/tests, do those bugs ever occur anymore?

It’s great giving Claude logs and getting a quick root cause analysis. Just need to watch it doesn’t over engineer the solution.

1

u/MikeW86 Oct 26 '26

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.

4

u/Difficult-Lime2555 Oct 26 '26

I think running your linter and test harness should be faster than having Claude run your linter and test harness.

1

u/wonklebobb Oct 26 '26

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

7

u/QuietSilentArachnid Oct 26 '26

Definitely. It loves copying pre-existing functions in the code and not reusing it lol

6

u/Donny-Moscow Oct 26 '26

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.

5

u/DoctorWaluigiTime Oct 26 '26

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.

27

u/gurgelblaster Oct 26 '26

AI will never accidentally redeclare or subtly mispell a variable, use assignment instead of equality, or incorrectly nest a for loop.

lmao

11

u/LeSeanMcoy Oct 26 '26

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.

8

u/MikeW86 Oct 26 '26

Ah, good point.

2

u/iruleatants Oct 26 '26

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.

3

u/r2d2rigo Oct 26 '26

You're right, it does it on purpose because it doesn't know better than regurgitate stolen code.

2

u/pine_ary Oct 26 '26

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.

3

u/MikeW86 Oct 26 '26

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.

1

u/HydrA- Oct 27 '26

You’re talking about AI two years ago. Everything changed since November last year. We are light years beyond this with opus 5.5 and Sol 6.1