←back to thread

323 points timbilt | 8 comments | | HN request time: 0.001s | source | bottom
Show context
RobinL ◴[] No.42129191[source]
I think this is pretty good advice.

I think often AI sceptics go too far in assuming users blindly use the AI to do everything (write all the code, write the whole essay). The advice in this article largely mirrors - by analogy - how I use AI for coding. To rubber duck, to generate ideas, to ask for feedback, to ask for alternatives and for criticism.

Usually it cannot write the whole thing (essay, program )in one go, but by iterating bewteen the AI and myself, I definitely end up with better results.

replies(6): >>42129299 #>>42129921 #>>42130127 #>>42132063 #>>42133352 #>>42133641 #
SunlitCat ◴[] No.42129299[source]
Well, I got chatgpt (gpt4o) to write me a very basic json parser once (and a gltf parser). Although it was very basic and lacking any error checking, it did what i asked it (although not in one go, i had to refine my questions multiple times).
replies(2): >>42129595 #>>42129620 #
amelius ◴[] No.42129595[source]
Chatgpt is great for writing regular expressions by the way.
replies(2): >>42129641 #>>42130956 #
1. WalterBright ◴[] No.42129641[source]
Just because it spits out a RE doesn't mean the RE is what you wanted. For one thing, you'll need to be precise in your prompt.
replies(3): >>42130337 #>>42131549 #>>42132017 #
2. amelius ◴[] No.42130337[source]
You don't need to be precise. Just give it an example string and tell it what information you want to extract from it and it usually works. It is just way faster than doing it manually.
replies(1): >>42131189 #
3. zikduruqe ◴[] No.42131189[source]
Claude/ChatGPT has become my man pages.
4. ojosilva ◴[] No.42131549[source]
Yeah, in line with the old RE adage: I had a problem. I used AI. Now I have two problems.
5. antod ◴[] No.42132017[source]
Rhetorical question: Can you ever fully be sure you have the regex you wanted?
replies(1): >>42132275 #
6. rjh29 ◴[] No.42132275[source]
Writing regexes by hand is hard so there will always be some level of testing involved. But reading a regex and verifying it works is easier than writing one from scratch.
replies(1): >>42132410 #
7. antod ◴[] No.42132410{3}[source]
My overly snide point about regexes was that most of the time "verifying it works" is more like finding and fixing a few more edge cases on the asymptotic journey towards no more brokenness.
replies(1): >>42135712 #
8. rjh29 ◴[] No.42135712{4}[source]
Yeah I agree with that! 100% test coverage seems impossible when every part of the regex is basically an if condition.
replies(1): >>42143219 #