this post was submitted on 27 May 2025
1850 points (99.5% liked)

Programmer Humor

23497 readers
1131 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] pennomi@lemmy.world 67 points 1 day ago (4 children)

To be fair, if I wrote 3000 new lines of code in one shot, it probably wouldn’t run either.

LLMs are good for simple bits of logic under around 200 lines of code, or things that are strictly boilerplate. People who are trying to force it to do things beyond that are just being silly.

[–] Boomkop3@reddthat.com 36 points 1 day ago (2 children)

You managed to get an ai to do 200 lines of code and it actually compiled?

[–] pennomi@lemmy.world 27 points 1 day ago* (last edited 1 day ago) (3 children)

Uh yeah, like all the time. Anyone who says otherwise really hasn’t tried recently. I know it’s a meme that AI can’t code (and still in many cases that’s true, eg. I don’t have the AI do anything with OpenCV or complex math) but it’s very routine these days for common use cases like web development.

[–] Maalus@lemmy.world 14 points 1 day ago (1 children)

I recently tried it for scripting simple things in python for a game. Yaknow, change char's color if they are targetted. It output a shitton of word salad and code about my specific use case in the specific scripting jargon for the game.

It all based on "Misc.changeHue(player)". A function that doesn't exist and never has, because the game is unable to color other mobs / players like that for scripting.

Anything I tried with AI ends up the same way. Broken code in 10 lines of a script, halucinations and bullshit spewed as the absolute truth. Anything out of the ordinary is met with "yes this can totally be done, this is how" and "how" doesn't work, and after sifting forums / asking devs you find out "sadly that's impossible" or "we dont actually use cpython so libraries don't work like that" etc.

[–] GreenMartian@lemmy.dbzer0.com 9 points 1 day ago (1 children)

They have been pretty good on popular technologies like python & web development.

I tried to do Kotlin for Android, and they kept tripping over themselves; it's hilarious and frustrating at the same time.

[–] doktormerlin@feddit.org 4 points 1 day ago (1 children)

I use ChatGPT for Go programming all the time and it rarely has problems, I think Go is more niche than Kotlin

[–] Opisek@lemmy.world 2 points 1 day ago (1 children)

I get a bit frustrated at it trying to replicate everyone else's code in my code base. Once my project became large enough, I felt it necessary to implement my own error handling instead of go's standard, which was not sufficient for me anymore. Copilot will respect that for a while, until I switch to a different file. At that point it will try to force standard go errors everywhere.

[–] doktormerlin@feddit.org 1 points 16 hours ago

Yes, you can't use Copilot to generate files in your code structure way if you start from scratch. I usually start by coding a skaffold and then use Copilot to complete the rest, which works quite good most of the time. Another possibility is to create comment templates that will give instructions to Copilot. So every new Go file starts with coding structure comments and Copilot will respect that. Junior Devs might also respect that, but I am not so sure about them

[–] Boomkop3@reddthat.com 9 points 1 day ago (1 children)

You must be a big fan of boilerplate

[–] pennomi@lemmy.world 5 points 1 day ago

Not sure what you mean, boilerplate code is one of the things AI is good at.

Take a straightforward Django project for example. Given a models.py file, AI can easily write the corresponding admin file, or a RESTful API file. That’s generally just tedious boilerplate work that requires no decision making - perfect for an AI.

More than that and you are probably babysitting the AI so hard that it is faster to just write it yourself.

[–] subtleorbit@lemmy.world 5 points 1 day ago (2 children)

4o has been able to do this for months.

[–] Boomkop3@reddthat.com 6 points 1 day ago

I tried, it can't get trough four lines without messing up. Unless I give it tasks that ate so stupendously simple that I'm faster typing them myself while watching tv

[–] wischi@programming.dev 6 points 1 day ago

Play ASCII tic tac toe against 4o a few times. A model that can't even draw a tic tac toe game consistently shouldn't write production code.

[–] wischi@programming.dev 12 points 1 day ago* (last edited 17 hours ago) (2 children)

Practically all LLMs aren't good for any logic. Try to play ASCII tic tac toe against it. All GPT models lost against my four year old niece and I wouldn't trust her writing production code 🤣

Once a single model (doesn't have to be a LLM) can beat Stockfish in chess, AlphaGo in Go, my niece in tic tac toe and can one-shot (on the surface, scratch-pad allowed) a Rust program that compiles and works, than we can start thinking about replacing engineers.

Just take a look at the dotnet runtime source code where Microsoft employees currently try to work with copilot, which writes PRs with errors like forgetting to add files to projects. Write code that doesn't compile, fix symptoms instead of underlying problems, etc. (just take a look yourself).

I don't say that AI (especially AGI) can't replace humans. It definitely can and will, it's just a matter of time, but state of the Art LLMs are basically just extremely good "search engines" or interactive versions of "stack overflow" but not good enough to do real "thinking tasks".

[–] MonkeMischief@lemmy.today 6 points 1 day ago

extremely good "search engines" or interactive versions of "stack overflow"

Which is such a decent use of them! I've used it on my own hardware a few times just to say "Hey give me a comparison of these things", or "How would I write a function that does this?" Or "Please explain this more simply...more simply....more simply..."

I see it as a search engine that connects nodes of concepts together, basically.

And it's great for that. And it's impressive!

But all the hype monkeys out there are trying to pedestal it like some kind of techno-super-intelligence, completely ignoring what it is good for in favor of "It'll replace all human coders" fever dreams.

[–] pennomi@lemmy.world 0 points 1 day ago (1 children)

Cherry picking the things it doesn’t do well is fine, but you shouldn’t ignore the fact that it DOES do some things easily also.

Like all tools, use them for what they’re good at.

[–] wischi@programming.dev 4 points 1 day ago (1 children)

I don't think it's cherry picking. Why would I trust a tool with way more complex logic, when it can't even prevent three crosses in a row? Writing pretty much any software that does more than render a few buttons typically requires a lot of planning and thinking and those models clearly don't have the capability to plan and think when they lose tic tac toe games.

[–] pennomi@lemmy.world -4 points 1 day ago (2 children)

Why would I trust a drill press when it can’t even cut a board in half?

[–] wischi@programming.dev 12 points 1 day ago* (last edited 1 day ago) (1 children)

A drill press (or the inventors) don't claim that it can do that, but with LLMs they claim to replace humans on a lot of thinking tasks. They even brag with test benchmarks, claim Bachelor, Master and Phd level intelligence, call them "reasoning" models, but still fail to beat my niece in tic tac toe, which by the way doesn't have a PhD in anything 🤣

LLMs are typically good in things that happened a lot during training. If you are writing software there certainly are things which the LLM saw a lot of during training. But this actually is the biggest problem, it will happily generate code that might look ok, even during PR review but might blow up in your face a few weeks later.

If they can't handle things they even saw during training (but sparsely, like tic tac toe) it wouldn't be able to produce code you should use in production. I wouldn't trust any junior dev that doesn't set their O right next to the two Xs.

[–] pennomi@lemmy.world 1 points 1 day ago (1 children)

Sure, the marketing of LLMs is wildly overstated. I would never argue otherwise. This is entirely a red herring, however.

I’m saying you should use the tools for what they’re good at, and don’t use them for what they’re bad at. I don’t see why this is controversial at all. You can personally decide that they are good for nothing. Great! Nobody is forcing you to use AI in your work. (Though if they are, you should find a new employer.)

[–] wischi@programming.dev 2 points 1 day ago

Totally agree with that and I don't think anybody would see that as controversial. LLMs are actually good in a lot of things, but not thinking and typically not if you are an expert. That's why LLMs know more about the anatomy of humans than I do, but probably not more than most people with a medical degree.

[–] dependencyinjection@discuss.tchncs.de 1 points 1 day ago (1 children)

It’s futile even trying to highlight the things LLMs do very well as Lemmy is incredibly biased against them.

[–] wischi@programming.dev 3 points 1 day ago (1 children)

I can't speak for Lemmy but I'm personally not against LLMs and also use them on a regular basis. As Pennomi said (and I totally agree with that) LLMs are a tool and we should use that tool for things it's good for. But "thinking" is not one of the things LLMs are good at. And software engineering requires a ton of thinking. Of course there are things (boilerplate, etc.) where no real thinking is required, but non-AI tools like code completion/intellisense, macros, code snippets/templates can help with that and never was I bottle-necked by my typing speed when writing software.

It was always the time I needed to plan the structure of the software, design good and correct abstractions and the overall architecture. Exactly the things LLMs can't do.

Copilot even fails to stick to coding style from the same file, just because it saw a different style more often during training.

[–] Zexks@lemmy.world 0 points 21 hours ago (1 children)

"I'm not again LLMs I just never say anything useful about them and constantly point out how I can't use them." The other guy is right and you just prove his point.

[–] wischi@programming.dev 1 points 17 hours ago* (last edited 17 hours ago)

I don't see how that follows because I did point out in another comment that they are very useful if used like search engines or interactive stack overflow or Wikipedia.

LLMs are extremely knowledgeable (as in they "know" a lot) but are completely dumb.

If you want to anthropomorphise it, current LLMs are like a person that read the entire internet, remembered a lot of it, but still is too stupid to win/draw tic tac toe.

So there is value in LLMs, if you use them for their knowledge.

[–] Opisek@lemmy.world 8 points 1 day ago (1 children)

Perhaps 5 LOC. Maybe 3. And even then I'll analyze every single character in wrote. And then I will in fact find bugs. Most often it hallucinates some functions that would be fantastic to use - if they existed.

[–] Buddahriffic@lemmy.world 6 points 1 day ago

My guess is what's going on is there's tons of psuedo code out there that looks like it's a real language but has functions that don't exist as placeholders and the LLM noticed the pattern to the point where it just makes up functions, not realizing they need to be implemented (because LLMs don't realize things but just pattern match very complex patterns).

[–] iAvicenna@lemmy.world 4 points 14 hours ago (1 children)

I am on you with this one. It is also very helpful in argument heavy libraries like plotly. If I ask a simple question like "in plotly how do I do this and that to the xaxis" etc it generally gives correct answers, saving me having to do internet research for 5-10 minutes or read documentations for functions with 1000 inputs. I even managed to get it to render a simple scene of cloud of points with some interactivity in 3js after about 30 minutes of back and forth. Not knowing much javascript, that would take me at least a couple hours. So yeah it can be useful as an assistant to someone who already knows coding (so the person can vet and debug the code).

Though if you weigh pros and cons of how LLMs are used (tons of fake internet garbage, tons of energy used, very convincing disinformation bots), I am not convinced benefits are worth the damages.

[–] Strawberry@lemmy.blahaj.zone 1 points 4 hours ago (1 children)

Why do you want AI to save you for learning and understanding the tools you use?

[–] iAvicenna@lemmy.world 2 points 2 hours ago* (last edited 2 hours ago)

If you do it through AI you can still learn. After all I go through the code to understand what is going on. And for not so complex tasks LLMs are good at commenting the code (though it can bullshit from time to time so you have to approach it critically).

But anyways the stuff I ask LLMs are generally just one off tasks. If I need to use something more frequently, I do prefer reading stuff for more in depth understanding.