Author Topic: Is ChatGPT any good at writing code?  (Read 62824 times)

0 Members and 1 Guest are viewing this topic.

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7563
  • Country: nl
  • Current job: ATEX product design
Re: Is ChatGPT any good at writing code?
« Reply #25 on: April 05, 2024, 02:45:11 pm »
I gave it a try yesterday because I wanted to automate something.
It made python code that converted some pdfs to png. The second code already did what I wanted to do.
Maybe it can still make useful code.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12015
  • Country: us
Re: Is ChatGPT any good at writing code?
« Reply #26 on: April 05, 2024, 03:01:17 pm »
LLMs will become a integrated tool in IDEs to make coding easier and quicker.

I think it's important to recognize that LLM/GPT tools are "dumb" in that they do not have any logical understanding of the output they are producing.

They basically work by making statistical predictions based on a very large database of source text.

If an LLM is going to work well at generating code, then it needs to be based on a very large database of relevant and high quality code samples. This leads to the question of where will such a database come from? The code corpus needs to be freely available without legal restrictions, and it needs to be of acceptable quality. There is a lot of bad code out there today, and if you have an LLM learn from bad code, it will generate bad code as output.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19948
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Is ChatGPT any good at writing code?
« Reply #27 on: April 05, 2024, 03:27:56 pm »
LLMs will become a integrated tool in IDEs to make coding easier and quicker.

I think it's important to recognize that LLM/GPT tools are "dumb" in that they do not have any logical understanding of the output they are producing.

They basically work by making statistical predictions based on a very large database of source text.

If an LLM is going to work well at generating code, then it needs to be based on a very large database of relevant and high quality code samples. This leads to the question of where will such a database come from? The code corpus needs to be freely available without legal restrictions, and it needs to be of acceptable quality. There is a lot of bad code out there today, and if you have an LLM learn from bad code, it will generate bad code as output.

Pretty much.

LLMs repeat "an average" of what they've ingested, with a few permutations.

That leads to one of the nightmares of the LLM fraternity: what happens when LLMs ingest other LLM output. If LLMs are as successful as their fraternity hope/claim, then most of the stuff they ingest will be LLM output.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3568
  • Country: ua
Re: Is ChatGPT any good at writing code?
« Reply #28 on: April 24, 2024, 04:28:08 pm »
Is ChatGPT any good at writing code?

No. It can write some basic code (like examples from some book) compiled from his database, but if you're needs to do something specific, you won't get working code from it.

ChatGPT has some fundamental problem which prevent it to solve some issue in his code. So, if first sample code compiled from his database is not enough for you, you can't get something else. It just will propose the same code for any your request to change or fix something in his code. From this point of view, it seems to be programmed to use the broken record technique.

In short, it often provide you with a wrong or mistaken code (which at a glance looks good, but when you analyze it you will found issue) and when you're asking to fix it, it just repeat that code again and again with keeping issue in the code. And there is no way to learn it to solve it.
« Last Edit: April 24, 2024, 04:31:53 pm by radiolistener »
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2691
  • Country: us
  • Not An Expert
Re: Is ChatGPT any good at writing code?
« Reply #29 on: April 24, 2024, 09:37:22 pm »
Is ChatGPT any good at writing code?

No. It can write some basic code (like examples from some book) compiled from his database, but if you're needs to do something specific, you won't get working code from it.

ChatGPT has some fundamental problem which prevent it to solve some issue in his code. So, if first sample code compiled from his database is not enough for you, you can't get something else. It just will propose the same code for any your request to change or fix something in his code. From this point of view, it seems to be programmed to use the broken record technique.

In short, it often provide you with a wrong or mistaken code (which at a glance looks good, but when you analyze it you will found issue) and when you're asking to fix it, it just repeat that code again and again with keeping issue in the code. And there is no way to learn it to solve it.

While yes, it's better at basic tasks it's seen before, it can also synthesize those basic tasks together into something bigger.
I've had ChatGPT create basic python GUIs in tkinter based on a description of the layout and functionality I gave it as text in the prompt.  There was no way it had ever seen that exact layout and code before, but it got it working after a reasonable amount of bug fixes.

A buddy was telling me about a new LLM that writes code (sorry, forgot what he said it was exactly).  It actually runs the code in it's own sandbox and debugs it itself on the fly.  Pretty cool.
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 2000
  • Country: us
    • netstuff
Re: Is ChatGPT any good at writing code?
« Reply #30 on: April 25, 2024, 01:18:35 am »
as others have said, in general, I think this is a time bomb that humanity will not recover from.  once it explodes.  and it will.

not in a single bang, but over time, so much will be changed and we cant change (ourselves) fast enough to keep up.

dan dennett (rip) also echoed this caution.

but hey, we're just stupid humans.  we dont really think thru our actions.  so, go right ahead, guys.  I'm an older guy; the youngers ones are who are really going to pay for this.

(btw, all this applies to regular people.  if you are in the controlling elite, this is the best time in the history of mankind for YOU.)

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7652
  • Country: au
Re: Is ChatGPT any good at writing code?
« Reply #31 on: April 25, 2024, 01:46:46 am »
So, no, you won't get redundant. But you're likely to get frustrated as more and more people expect these LLMs to do your job, and then come back to you to help them get out of the mess they have put themselves in. Get prepared to this to get over the frustration (the "I told you" syndrome), and you'll be fine with probably no shortage of work to do for years to come.

That's no different to what I've experienced repeatedly since the 80s: "Your $10,000 quote is too high, we found a student who said he can do it for $500".

Two years pass ...

"Hi, the student's code never worked. Can you fix it?"

ChatGPT coding might save you some typing, but it's really very much like the messages we get here and on Reddit etc all the time about student assignments "My code doesn't work, what's wrong?"  Uhhh .. everything?

It's all about perceptions.
The MBA Boss knows nothing about technology & believes all the fairytales that come out of the media, so they really believe that Chat GPT  & the like can do all these things better than a human.
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3568
  • Country: ua
Re: Is ChatGPT any good at writing code?
« Reply #32 on: April 25, 2024, 02:37:37 pm »
It's all about perceptions.
The MBA Boss knows nothing about technology & believes all the fairytales that come out of the media, so they really believe that Chat GPT  & the like can do all these things better than a human.

Yes, but I think it's like some newbie which found some financial fraud platform like forex thinks that he can earn big money with that. He invest all their money into it... Some of them cannot learn lesson even when they lose all their money. So it can be big end for a big bosses  :)
« Last Edit: April 25, 2024, 02:39:50 pm by radiolistener »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf