By “good” I mean code that is written professionally and concisely (and obviously works as intended). Apart from personal interest and understanding what the machine spits out, is there any legit reason anyone should learn advanced coding techniques? Specifically in an engineering perspective?
If not, learning how to write code seems a tad trivial now.
That all depends on where the data set comes from. The code you’ll get out of an LLM is the average code of the data set. If it’s scraped from the internet (which is very likely) the code you’ll get will be an amalgam of concise examples from one website, incorrect examples from another, bits from blogs with all the typos and all the gunk and garbage that’s out there.
Getting LLM code to work well takes an understanding of what the code it gives you actually does and why it’s bad. It will always be bad because it cannot be better than the dataset and in order for a dataset to be big enough to train an LLM it’ll have to have everything they can get including all the trash. But it can be good for providing you a framework to start with. It is however never going to replace actual programming and understanding of programming. The talk of LLMs completely replacing programers is mostly coming from people who do not understand coding or LLMs at all.
Can’t LLM’s eventually gain some form of “sentience”, and be able to self correct? A sort of thinking before speaking kind of situation.
This question right here perfectly encapsulates everything wrong with LLMs right now. They could be good tools but the people pushing them have no idea what they even are. LLMs do not make decisions. All the decisions an LLM appears to make were made in the dataset. All those things that an LLM does that make it seem intelligent were done or said by a human somewhere on the internet. It is a statistical model that determines what output is mostly likely to come next. That is it. It is nothing else. It is not smart. It does not and cannot make decisions. It is an algorithm that searches a dataset and when it can’t find something it’ll provide convincing-looking gibberish instead.
Listen think of it like this; a man decides to take exams to become a doctor in France, but for some reason he doesn’t learn either french or medicine. No, no instead he studies every former exam and all the answers to them. He gets very good at regurgitating those answers so much so that he can even pass the exam. But at no point does he understand what any of it means and when asked new and novel questions he provides utter nonsense answers. No matter how good he gets at memorising those answers he will never get any better at medicine. LLMs are as likely to gain sentience as my excel spreadsheets are.
It is an algorithm that searches a dataset and when it can’t find something it’ll provide convincing-looking gibberish instead.
This is very misleading. An LLM doesn’t have access to its training dataset in order to “search” it. Producing convincing looking gibberish is what it always does, that’s its only mode of operation. The key is that the gibberish that comes out of today’s models is so convincing that it actually becomes broadly useful.
That also means that no, not everything an LLM produces has to have been in its training dataset, they can absolutely output things that have never been said before. There’s even research showing that LLMs are capable of creating actual internal models of real world concepts, which suggests a deeper kind of understanding than what the “stochastic parrot” moniker wants you to believe.
LLMs do not make decisions.
What do you mean by “decisions”? LLMs constantly make decisions about which token comes next, that’s all they do really. And in doing so, on a higher, emergent level they can make any kind of decision that you ask them to, the only question is how good those decisions are going be, which in turn entirely depends on the training data, how good the model is, and how good your prompt is.
deleted by creator
I worry for the future generations of people who can use chatgpt to write code but have absolutely no idea what said code is doing.
My CTO thoroughly believes that within 4-6 years we will no longer need to know how to read or write code, just how to ask an AI to do it. Coincidentally, he also doesn’t code anymore and hasn’t for over 15 years.
From a business perspective, no shareholder cares at how good an employee is at personally achieving a high degree of skill. They only care about selling and earning, and to a lesser degree an enduring reputation for longer term earnings.
Economics could very well drive this forward. But I don’t think the craft will be lost. People will need to supervise this progress as well as collaborate with the machines to extend its capabilities and dictate its purposes.
I couldn’t tell you if we’re talking on a time scale of months or decades, but I do think “we” will get there.
Hackers and hobbiests will persist despite any economics. Much of what they do I don’t see AI replacing, as AI creates based off of what it “knows”, which is mostly things it has previously ingested.
We are not (yet?) at the point where LLM does anything other than put together code snippets it’s seen or derived. If you ask it to find a new attack vector or code dissimilar to something it’s seen before the results are poor.
But the counterpoint every developer needs to keep in mind: AI will only get better. It’s not going to lose any of the current capabilities to generate code, and very likely will continue to expand on what it can accomplish. It’d be naive to assume it can never achieve these new capabilities… The question is just when & how much it costs (in terms of processing and storage).
Agree, and the point I always want to make is that any LLM or neural net or any other AI tech is going to be a mere component in a powerful product, rather than the entirety of the product.
The way I think of it is that my brain is of little value without my body, and my person is of little value without my team at work. I don’t exist in a vacuum but I can be highly productive within my environment.
I think he’s correct and there’s a ton of cope going on on lemmy right now. I also think tons of art/graphic design jobs will disappear never to return.
That’s some 40k shit.
“What does it mean?” “I do not know, but it appeases the machine spirit. Quickly, recite the canticles.”
This is directly how we’re getting to a 40k future and I hate it. The bad future!
If we must I might join the Mechanicus though. I’m good at chanting and doing things by rote.
Don’t be, there will come a time when nearly all code is AI created, and not human readable.
You need to worry for the future when big data sites are running code they literally don’t know how it works and have no way to verify because of how cheap and relatively effective it is.
Then after that LLMs will get better at coding than any human can achieve, but will still be black box human unreadable code but there will be no chain of discipline left to teach new programmers.
Hardly anyone is taking this seriously because corporations stand to make a fucktonne of money and normal people are in general clueless about complex subjects that require a nuanced understanding, yet strangely arrogant about their ignorant opinions based on movies and their drinking buddies malformed opinions.
Writing code is probably one of the few things LLMs actually excell at. Few people want to program something nobody has ever done before. Most people are just reimplimenting the same things over and over with small modifications for their use case. If imports of generic code someone else wrote make up 90% of your project, what’s the difference in getting an LLM to write 90% of your code?
I see where you’re coming from, sort of like the phrase “don’t reinvent the wheel”. However, considering ethics, that doesn’t sound far off from plagiarism.
IMO this perspective that we’re all just “reimplementing basic CRUD” applications is the reason why so many software projects fail.
Yes, in small bits, after several tries, with human supervision. For now.
No in large amounts, too hard to human review, they’re still doing it anyway.
Technically it’s possible, but it’s neither probable nor likely, and it’s especially not effective. From what I understand, a lot of devs who do try to use something like ChatGPT to write code end up spending as much or more time debugging it, and just generally trying to get it to work, than they would have if they’d just written it themselves. Additionally, you have to know how to code to be able to figure out why it’s not working, and even when all of that is done, it’s almost impossible to get it to integrate with a larger project without just rewriting the whole thing anyway.
So to answer the question you intend to ask, no, LLMs will not be replacing programmers any time soon. They may serve as a tool of dubious value, but the idea that programmers will be replaced is only taken seriously by by people who manage programmers, and not the programmers themselves.
Theoretically, I would say yes it’s possible, insofar as we could break down most subtasks of the development process into training parameters. But we are a long way from that currently.
ETA: I suspect LLM’s best use-case in this hypothetical would not be in architecting or implementation, but rather limited to tasks with human interfaces (requirements gathering, project planning and logistics, test scaffolding, feedback collection/distribution, etc).
If the unironic goal is to develop things without any engineering oversight (mistake) then there’s no point to using programming languages at all. The machine might as well just output assembly or bin code.
What’s more likely in the short term are software LLMs generating partial solutions that human engineers then are asked to “finish” (fix) and maintain. The effort and hours required to do so will, at a guess, balloon terribly and will often be at best proportional to the resources saved by the use of the automatic spaghetti generator.
I eagerly await these post mortems.
For small boilerplate or very common small pieces of code, for instance a famous algorithm implementation. Yes. As they are just probably giving you the top stack overflow answer for a classic question.
Anything that the LLM would need to mix or refactor would be terrible.
Yes and no. GPT usually gives me clever solutions I wouldn’t have thought of. Very often GPT also screws up, and I need to fine tune variable names, function parameters and such.
I think the best thing about GPTis that it knows the documentation of every function, so I can ask technical questions. For example, can this function really handle dataframes, or will it internally convert the variable into a matrix and then spit out a dataframe as if nothing happened? Such conversions tend to screw up the data, which explains some strange errors I bump into. You could read all of the documentation to find out, or you could just ask GPT about it. Alternatively, you could show how badly the data got screwed up after a particular function, and GPT would tell that it’s because this function uses matrices internally, even though it looks like it works with dataframes.
I think of GPT as an assistant painter some famous artists had. The artist tells the assistant to paint the boring trees in the background and the rough shape of the main subject. Once that’s done, the artist can work on the fine details, sign the painting, send it to the local king and charge a thousand gold coins.
In my experience, not at all. But sometimes they help with creativity when you hit a wall or challenge you can’t resolve.
They have been trained off internet examples where everyone has a different style/method of coding, like writing style. It’s all very messy and very unreliable. It will be years for LLMs to code “good” and will require a lot of training that isn’t scraping.
AI can only really complete tasks that are both simple and routine. I’d compare the output skill to that of a late-first-year University student, but with the added risk of halucination. Anything too unique or too compex tends to result in significant mistakes.
In terms of replacing programmers, I’d put it more in the ballpark of predictive text and/or autocorrect for a writer. It can help speed up the process a little bit, and point out simple mistakes but if you want to make a career out of it, you’ll need to actually learn the skill.
my dad uses this LLM python code generation quite routinely, he says the output’s mostly fine.
For snippets yes, ask him to tell it to make a complete terminal service and see what happens
I use LLMs for C code - most often when I know full well how to code something but I don’t want to spent half a day expressing it and debugging it.
ChatGPT or Copilot will spit out a function or snippet that’s usually pretty close to what I want. I patch it up and move on to the tougher problems LLMs can’t do.
That’s why I said ‘for snippets yes’. But I guess you needed some attention so piggybacked. Welcome to my blocklist.
Fitting username.
After a certain point, learning to code (in the context of application development) becomes less about the lines of code themselves and more about structure and design. In my experience, LLMs can spit out well formatted and reasonably functional short code snippets, with the caveate that it sometimes misunderstands you or if you’re writing ui code, makes very strange decisions (since it has no special/visual reasoning).
Anyone a year or two of practice can write mostly clean code like an LLM. But most codebases are longer than 100 lines long, and your job is to structure that program and introduce patterns to make it maintainable. LLMs can’t do that, and only you can (and you can’t skip learning to code to just get on to architecture and patterns)
Very well put, thank you.
The other thing is, an LLM generally knows about all the existing libraries and what they contain. I don’t. So while I could code a pretty good program in a few days from first principles, an LLM is often able to stitch together some elegant glue code using a collection of existing library functions in seconds.
I think this is the best response in this thread.
Software engineering is a lot more than just writing some lines of code and requires more thought and planning than can be realistically put into a prompt.
Also in my experience LLM can often propose solutions which are working but way too complex.
Story time: just yesterday, in VueJS I was trying to iterate over a list of items and render
.text
of reach item as HTML, but I needed to process it first. Note that in VueJS this is done by adding eg.<span v-html="item.text"></span>
where content of the attribute is the JavaScript expression needed to get the text.First I asked ChatGPT to write the function for processing the text. That worked pretty well and even used part of the JavaScript API which I was not aware about.
Next, I had a “dumb moment” when I did not realize that as I’m iterating through items I can just say
<span v-html="processHtml(item.text)"></span>
, that’s all I really needed. Somehow I thought (or should I say, “hallucinated”, ba dum tsss) for a moment that v-html is special or something (it is used differently than the most abundant type of syntax). So I went ahead and asked ChatGPT how to render processed texts while iterating.It came with a rather contrived solution which involved creating another computed property containing a list of processed texts. I started to integrate it into the existing loop: I would have to add index and use that index to pull the code from the computed property, which already felt a little bit weird.
That’s when it struck me: no, no, no, I can just f*ing use the function.
TL; DR: The point is, while ChatGPT was helpful I still needed to babysit it. And if I didn’t snap from my lazy moment, or if I simply didn’t know better, I would end up with code which is more complex, more surprising, which means harder to reason about for both humans and LLM’s. (For humans because now it forces you to speculate about coder’s intent, and for LLM’s because it’s less likely to be reminiscent of surrounding code in its learning data.)
I’m my experience they do a decent job of whipping out mindless minutea and things that are well known patterns in very popular languages.
They do not solve problems.
I think for an “AI” product to be truly useful at writing code it would need to incorporate the LLM as a mere component, with something facilitating checks through static analysis and maybe some other technologies, maybe even mulling the result through a loop over the components until they’re all satisfied before finally delivering it to the user as a proposal.
It’s a decent starting point for a new language. I had to learn webdev as an embedded C coder, and using a LLM and cross-referencing the official documentation makes a new language much more approachable.
I agree, LLMs have been helpful in pointing me in the right direction and helping me rethink what questions I actually want to ask in disciplines I’m not very familiar with.
Those kinds of patterns are already emerging! That “mulling the result through a loop” step is called “reflection,” and it does a great job of catching mistakes and hallucinations. Nothing is on the scale of doing the whole problem-solving and implementation from business requirements to deployed product-- probably never will be, IMO-- but this “making the LLM a component in a broader system with diverse tools” is definitely something that we’re currently figuring out patterns for.
deleted by creator
This seems like the most sane take.
A computer can do a lot. But if you give the computer to a regular fish instead of a regular human, that’s just a regular fish next to a computer. Not very useful.
deleted by creator