Mailing List Archive

has anybody use ChatGPT for programming?
Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list

I had a bash script to copy file from usb to HD
--------

if mount | grep -q '/run/media/fd/KIOXIA'; then
rsync -av /run/media/fd/KIOXIA/SCILOG/ /home/thelma/business/backup/SCILOG/
else
echo "disk not mounted"
fi
-------

I asked ChatGPT to rewrite me the script utilizing zenity to show progress bar on a desktop, here is what I got:

------
!/bin/sh

if mount | grep -q '/run/media/fd/KIOXIA'; then
zenity --progress --title="Backup Progress" --text="Backing up files..." --auto-close --auto-kill --pulsate &
PID=$!
rsync -av --info=progress2 /run/media/fd/KIOXIA/SCILOG/ /home/thelma/business/backup/SCILOG/ | while read line; do
if [[ $line == *%* ]]; then
percent=$(echo $line | awk '{print $2}' | tr -d '%')
echo $percent
echo "# Backing up files: $percent%"
echo $percent | zenity --progress --title="Backup Progress" --text="Backing up files..." --auto-close --auto-kill --percentage=$(cat) &
fi
done
wait $PID
zenity --info --title="Backup Completed" --text="Backup has completed successfully." --timeout=5
else
zenity --error --title="Error" --text="Disk not mounted."
fi
-----------

PS. I think I will try to utilize ChatGPT to upgrade my old osCommerce from php 7.4 to php 8
It will not be easy but I'll try.
Re: has anybody use ChatGPT for programming? [ In reply to ]
On Mon, Mar 20, 2023 at 5:52?PM <thelma@sys-concept.com> wrote:
>
> Has anybody use ChatGPT for programming? I think it would very very
handy (less bugs) and less questions on the mailing-list
>

I've used it very early on to write some python code to read some text
files and place them in numpy arrays, etc.

It worked, the files were read correctly, then they cut off my access due
to too many users and I haven't bothered since.
Re: has anybody use ChatGPT for programming? [ In reply to ]
It's still early tech, sometimes I do use chatgpt but I prefer searching, stack overflow and official docs.

On March 21, 2023 8:57:56 AM GMT+08:00, Mark Knecht <markknecht@gmail.com> wrote:
>On Mon, Mar 20, 2023 at 5:52?PM <thelma@sys-concept.com> wrote:
>>
>> Has anybody use ChatGPT for programming? I think it would very very
>handy (less bugs) and less questions on the mailing-list
>>
>
>I've used it very early on to write some python code to read some text
>files and place them in numpy arrays, etc.
>
>It worked, the files were read correctly, then they cut off my access due
>to too many users and I haven't bothered since.
Re: has anybody use ChatGPT for programming? [ In reply to ]
> Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list

I've tried a bit but ultimatly gave up using it.

At least on my experience, it's results are wildly inconsistent for
code, specially for something non-trival. It can be confidently wrong,
and thus would still require you to know what you want to do and fact
check the reply...

Trivial things I usually can do them myself from the get go, and for
non-trivial stuff, reading man pages and searching online is usually
faster than trying to fix whatever chatgpt gives me.

Tho, GPT-4 is getting out and that may or may not change things.
Re: has anybody use ChatGPT for programming? [ In reply to ]
On Tue, Mar 21, 2023 at 9:25?AM Anna <navi@vlhl.dev> wrote:
>
> > Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list
>
> At least on my experience, it's results are wildly inconsistent for
> code, specially for something non-trival. It can be confidently wrong,
> and thus would still require you to know what you want to do and fact
> check the reply...
>

I know Home Assistant banned posting AI-generated responses on their
forums when some users decided to create bots that would take
questions from newbies, run them through ChatGPT, and then auto-post
the responses as replies.

The result was mass confusion as often the answers seemed plausible
but contained subtle errors. Dealing with the resulting frustration
and chaos took more volunteer time from those hanging out on the
forums than just dealing with the original questions.

Now, as an individual running a question through such an AI can be
useful, but you have to realize that it has no real measure of
confidence attached to the answers, and it will make up an answer if
it isn't sure. It is very human-like in that sense, but that includes
all the downsides of humans.

I've used it a little - it can be good for giving you alternative
ideas or suggesting starting points, but you have to realize that just
like humans it isn't infallible, and you aren't talking to the
programmer who wrote whatever it is you're trying to deal with. If
you use it for code I'd use it more as a suggestion or template, or
maybe when you already have an approach worked out maybe see if it has
another approach that you might want to consider.

--
Rich
Re: has anybody use ChatGPT for programming? [ In reply to ]
On 21/03/2023 14:09, Rich Freeman wrote:
> On Tue, Mar 21, 2023 at 9:25?AM Anna<navi@vlhl.dev> wrote:
>>> Has anybody use ChatGPT for programming? I think it would very very handy (less bugs) and less questions on the mailing-list
>> At least on my experience, it's results are wildly inconsistent for
>> code, specially for something non-trival. It can be confidently wrong,
>> and thus would still require you to know what you want to do and fact
>> check the reply...
>>
> I know Home Assistant banned posting AI-generated responses on their
> forums when some users decided to create bots that would take
> questions from newbies, run them through ChatGPT, and then auto-post
> the responses as replies.
>
> The result was mass confusion as often the answers seemed plausible
> but contained subtle errors. Dealing with the resulting frustration
> and chaos took more volunteer time from those hanging out on the
> forums than just dealing with the original questions.

The results I've come across suggest this is the norm.

So code APPEARS better, but is usually WORSE, than code you actually
wrote yourself.

So it's probably good for study, or if you want a template to follow,
but don't blindly use any code. It's only as good as the data it's
trained on, and as a doctor I know said to me "We select doctors from
the general population, and if half the population are below average
what does that say about doctors?".

ChatGPT (code especially) is probably trained mostly on student output.
Do you really want to be "writing" student grade code?

Cheers,
Wol