198
top 50 comments
sorted by: hot top controversial new old
[-] forrcaho@lemmy.world 8 points 23 hours ago

I recently asked ChatGPT to generate some boilerplate code in C to use libsndfile to write out a WAV file with samples from a function I would fill in. The code it generated casted the double samples from the placeholder function it wrote to floats to use sf_writef_float to write to the file. Having coded with libsndfile over a decade ago, I knew that sf_writef_double existed and would write my calculated sample values with no loss of precision. It probably wouldn't have made any audible difference to my finished result but it was still obviously stupidly inferior code for no reason.

This is the kind of stupid shit LLMs do all the time. I know I've also realized months later that some LLM-generated code I used was doing something in a stupid way, but I can't remember the details now.

LLMs can get you started and generate boilerplate, but if you're asking it to write code in a domain you're not familiar with, you have to understand that — if the code even works — it's highly likely that it's doing something in a boneheaded way.

[-] filister@lemmy.world 7 points 1 day ago

It's not only coding.

Idiocracy incoming in 3, 2, 1

[-] melfie@lemy.lol 67 points 2 days ago

One major problem I have with Copilot is it can’t seem to RTFM when building against an API, SDK, etc. Instead, it just makes shit up. If I have to go through line by line and fix everything, I might as well do it myself in the first place.

[-] pennomi@lemmy.world 8 points 1 day ago

Or even distinguish between two versions of the same library. Absolutely stupid that LLMs default to writing deprecated code just because it was more common in the training data.

[-] MinFapper@startrek.website 2 points 1 day ago

It will if you explicitly ask it to. Otherwise it will either make stuff up or use some really outdated patterns.

I usually start by asking Claude code to search the Internet for current best practices of whatever framework. Then if I ask it to build something using that framework while that summary is in the context window, it'll actually follow it

[-] Evotech@lemmy.world 1 points 1 day ago* (last edited 1 day ago)

I use ai for my docker compose services. I basically just point it at a repo and ask it to Start the service for me. It creates docker compose files tries to run it, rwads logs and troubleshoots without intervention

When I need to update an image i just ask it to do so.

Ai also controls my git workflow. I tell it to create a branch and push or revert or do whatever. Super nice

Ai isn't perfect but it's hella nice for us who used to work closely with tech a decade ago but have since moved to move architect / resale roles with kids and just don't have the time and resources.

I know I'll get hate for this on lemmy though

But yeah, I think it's pretty great. As long as you have basic understanding of whatever it's going you can get pretty far and do a lot of fun stuff

[-] aev_software@programming.dev 1 points 5 hours ago

Wait... you asked your AI to create a git branch instead of creating the git branch?

Why?

[-] Evotech@lemmy.world 1 points 5 hours ago

Just easier?

I'm glad you found something that works for you but giving ai control over a git workflow sounds like a catastrophy waiting to happen, how do you ensure it doesn't do something stupid?

[-] Evotech@lemmy.world 1 points 23 hours ago

You just whitelisted commands. It can't do anything destructive

[-] AllHailTheSheep@sh.itjust.works 1 points 23 hours ago

interesting. what do you use as the model and how is that config set up? I'm not disinterested in trying it I just don't know much about using it for workflows, is there an article you'd recommend?

[-] Evotech@lemmy.world 2 points 23 hours ago

I just use Cursor. Nice vscode IDE.

But tog can also use n8n etc to interface with git in a more automated manner

[-] AllHailTheSheep@sh.itjust.works 1 points 22 hours ago

thanks, I'll check it out!

[-] pyr0ball@lemmy.dbzer0.com 1 points 1 day ago

You read the commits before pushing, and test before committing. I also find it helpful to have a reference for any dev tickets you have in your git tracker

[-] floofloof@lemmy.ca 44 points 2 days ago* (last edited 2 days ago)

Yeah, the places to use it are (1) boilerplate code that is so predictable a machine can do it, and (2) with a big pinch of salt for advice when a web search didn't give you what you need. In the second case, expect at best a half-right answer that's enough to get you thinking. You can't use it for anything sophisticated or critical. But you now have a bit more time to think that stuff through because the LLM cranked out some of the more tedious code.

[-] amju_wolf@pawb.social 3 points 1 day ago

They do make excellent rubber duckies.

[-] Corngood@lemmy.ml 51 points 2 days ago

(1) boilerplate code that is so predictable a machine can do it

The thing I hate most about it is that we should be putting effort into removing the need for boilerplate. Generating it with a non-deterministic 3rd party black box is insane.

[-] pennomi@lemmy.world 11 points 2 days ago

Hard disagree. There is a certain level of boilerplate that is necessary for an app to do everything it needs. Django, for example, requires you to specify model files, admin files, view files, form files, etc. that all look quite similar but are dependent on your specific use case. You can easily have an AI write these boilerplate for you because they are strongly related to one another, but they can’t easily be distilled down to something simpler because there are key decisions that need specified.

[-] expr@programming.dev 3 points 1 day ago

All of that can be automated with tools built for the task. None of this is actually that hard to solve at all. We should automate away pain points instead of boiling the world in the hopes that a linguistic, stochastic model can just so happen to accurately predictively generate the tokens you want in order to save a few fucking hours.

The hubris around this whole topic is astounding to me.

[-] pennomi@lemmy.world 0 points 1 day ago

I think you underestimate the amount of business logic contained in boilerplate. (Or maybe we’re just talking about different definitions of what boilerplate is). LLMs can understand that business need while most code generators cannot.

[-] expr@programming.dev 2 points 21 hours ago

LLMs do not understand anything. There is no semantic understanding whatsoever. It is merely stochastic generation of tokens according to a probability distribution derived from linguistic correlations in its training data.

Also, it is incredibly common for engineers at businesses to have their engineers write code to automate away boilerplate and otherwise inefficient processes. Nowhere did I say that automation must always be done via open source tooling (though that is certainly preferable when possible, of course).

What do you think people and businesses were doing before all of this LLM insanity? Exactly what I'm describing. It's hardly novel or even interesting.

[-] pennomi@lemmy.world 1 points 20 hours ago

OK sure if you want to be pedantic. The point is that LLMs can do things traditional code generators can’t.

You don’t have to like it or use it. I myself am very vocal about the weaknesses and existential dangers of AI code. It’s going to cause the worst security nightmares in humanity’s recorded history. I recommend to companies that they DON’T trust LLMs for their coding because it creates unmaintainable nightmares of spaghetti code.

But pretending that they have NO advantages over traditional code generators is utter silliness perpetuated by people who refuse to argue in good faith.

[-] Feyd@programming.dev 17 points 2 days ago

Why does it have to be AI instead of a purpose built, deterministic tool?

[-] pennomi@lemmy.world 9 points 2 days ago

Because it’s not worth inventing a whole tool for a one-time use. Maybe you’re the kind of person who has to spin up 20 similar Django projects a year and it would be valuable to you.

But for the average person, it’s far more efficient to just have an LLM kick out the first 90% of the boilerplate and code up the last 10% themself.

[-] Feyd@programming.dev 19 points 2 days ago

I'd rather use some tool bundled with the framework that outputs code that is up to the current standards and patterns than a tool that will pull defunct patterns from it's training data, make shit up, and make mistakes that easily missed by a reviewer glazing over it

load more comments (4 replies)
load more comments (3 replies)
[-] codeinabox@programming.dev 4 points 2 days ago

Back in the day, I used CakePHP to build websites, and it had a tool that could "bake" all the boilerplate code.

You could use a snippet engine or templates with your editor, but unless you get a lot of reuse out of them, it's probably easier and quicker to use an LLM for the boilerplate.

[-] Feyd@programming.dev 8 points 2 days ago

Easier and quicker, but finding subtle errors in what looks like it should be extremely hard to fuck up code because someone used an LLM for it is getting really fucking old already, and I shudder at all the things like that are surely being missed. "It will be reviewed" is obviously not sufficient

load more comments (4 replies)
[-] irelephant@programming.dev 20 points 2 days ago

I've tried vibe coding two scripts before, and it's honestly brain-fog-inducing.

Llm coding won't be a thing after 2027.

[-] yes_this_time@lemmy.world 2 points 1 day ago

What do you expect to replace LLM coding?

[-] expr@programming.dev 3 points 1 day ago

...regular coding, again. We've been doing this for decades now and this LLM bullshit is wholely unnecessary and extremely detrimental.

The AI bubble will pop. Shit will get even more expensive or nonexistent (as these companies go bust, because they are ludicrously unprofitable), because the endless supply of speculative and circular investments will dry up, much like the dotcom crash.

It's such an incredibly stupid thing to not only bet on, but to become dependent on to function. Absolute lunacy.

[-] yes_this_time@lemmy.world 1 points 1 day ago

I would bet on LLMs being around and continuing to be useful for some subset of coding in 10 years.

I would not bet my retirement funds on current AI related companies.

[-] expr@programming.dev 2 points 21 hours ago

They aren't useful now, but even assuming they were, the fundamental issue is that it's extremely expensive to train and run them, and there is no current inkling of a business model where they actually make sense, financially. You would need to charge far more than what people could actually afford to pay to make them anywhere near profitable. Every AI company is burning through cash at an insane rate. When the bubble pops and the money runs out, no one will want to train and host them anymore for commercial purposes.

[-] yes_this_time@lemmy.world 1 points 20 hours ago

They may not be useful to you... but you can't speak for everyone.

You are incorrect on inference costs. But yes training models is expensive and the economics are concerning.

[-] irelephant@programming.dev 15 points 1 day ago

I think that the interest in it will go away, and after the ai bubble pops most of the tools for llm-coding wont be financially viable.

[-] yes_this_time@lemmy.world 1 points 1 day ago

I would agree that the interest will wain in some domains where they aren't aiding in productivity.

But LLMs for coding are productive right now in other domains and people aren't going to want to give that up.

Inference is already financially viable.

Now, I think what could crush the SOTA models is if they get sued into bankruptcy for copyright violations. Which is a related but separate thread.

[-] curiousaur@reddthat.com 4 points 1 day ago

There's viable local models.

[-] chicken@lemmy.dbzer0.com 8 points 1 day ago

We’re replacing that journey and all the learning, with a dialogue with an inconsistent idiot.

I like this about it, because it gets me to write down and organize my thoughts on what I'm trying to do and how, where otherwise I would just be writing code and trying to maintain the higher level outline of it in my head, which will usually have big gaps I don't notice until spending way too long spinning my wheels, or otherwise fail to hold together. Sometimes a LLM will do things better than you would have, in which case you can just use that code. When it gives you code that is wrong, you don't have to use it, you can write it yourself at that point, after having thought about what's wrong with the AI approach and how what you requested should be done instead.

[-] aev_software@programming.dev 1 points 5 hours ago

Try a rubber duck next time. Also, diagrams. Save a forest.

[-] Sxan@piefed.zip -1 points 1 day ago* (last edited 1 day ago)

I oppose AI in its current incarnation for almost everyþing, but you have a great point. Most of us are familiar wiþ Rubber Duck Programming, which originated wiþ R. Feynman, who'd recount how he learned þe value of reframing problems in terms of how you'd describe þe problem to oþer people. IIRC, þe story he'd tell is þat at one place, he was separated from a colleague by several floors, and had to take an elevator. He'd be thinking about how he was gong to explain þe problem to the colleague while waiting for and in þe elevator, and in in the process would come to þe answer himself. I've never seen Rubber Duck Programming give credit to Feynman, but þat's þe first place I heard about þe practice.

Digression aside, AI is probably as good as, or better þan, a rubber duck for þis. Maybe it won't give you any great insights, but being an active listener is probably beneficial. Þat said, you could probably get as much value out of Eliza while burning far less rainforest.

[-] abbadon420@sh.itjust.works 22 points 2 days ago
[-] stinky@redlemmy.com -1 points 1 day ago

i don't think so

load more comments
view more: next ›
this post was submitted on 28 Oct 2025
198 points (96.3% liked)

Programming

23288 readers
390 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS