James Warren <
jwwar...@gmail.com> writes:
>
> I have read reports of people using chatGPT to write programs.
> It cannot be trusted but if used with some guidance and many
> iterations it can eventually produce working code. In a few cases
> even better code than the programmer.
>
> I don't think it will work woth the instruction "this code is broken, fix it".
> You need to tell it exactly what you want the code to do.
I am using the paid version (one month only.) It's still
overworked in that many times I still can't get on, or it stalls in
mid-session. However, the paid version seems up-to-date and not
limited to what it knew in 2021.
It's far from ready to be turned loose on the general public.
The problem I gave it was simple. I wrote a Python program that
reformatted text. I deleted one line of code that indented the first
line of paragraphs by 4 characters. My question was, "Can you
refactor this code to indent the first line of each paragraph with 4
spaces?" It couldn't. It gave me back versions that made every
paragraph one line. It gave me back versions that indented every
line but the first one. Each time, I carefully said, "No, that's not
correct. It needs to indent the first line of each paragraph by 4
characters, not <whatever it did>."
As I previously said, most versions it provided increased in
length and complexity. Python is the most widely used language
today, and it ought to be better with it than other languages. It
can spit out known procedures like FFTs, sorting algorithms,
statistics packages, etc., that are everywhere on the Internet and
in public code libraries. However, it can't handle new stuff. As a
result, our code or shell scripts with simple bugs stump it most of
the time. If I need to be better at whatever I ask it to check, I
wonder if it's helpful.
I agree it's "too polite" and never gives up. It can't seem to
say, "That's something I'm still working on, and I can't answer your
question yet." We agreed months ago, "No result is better than a bad
result." It doesn't have that capacity.
I didn't try to trick it with logic questions. Instead, I wanted
to use it to debug and optimize code. I tried this for 2 weeks with
various programs and scripts. 90% or more of the time, it failed.
--
HRM Resident