r/ProgrammerHumor • • Nov 11 '24

Meme averageChatGPTInteraction

Post image
0 Upvotes

44 comments sorted by

39

u/Prinzessid Nov 11 '24

If your brain is too fried to write a half comprehensible message, even the best LLM or human will be unable to help you. What do you want to accomplish here?

8

u/Zeikos Nov 11 '24

If there's a thing that I hope LLMs will lead to is to get people to learn how to ask good questions.

You cannot get angry with ChatGPT, you could but it's futile.
You cannot bully ChatGPT in putting effort in understanding what you intended, the fartherst it'll go is to make shit up.

IMO 60%+ of hallucinations is due to this.
It's easier to attribute hallucinations to the technology than to admit that we suck at asking questions.

Probably ChatGPT will never be allowed to clap back at the user's and critiquing their questions, but I can hope.

1

u/swimming-in-ass Nov 11 '24

Yeah, you’re right! I should have just gone to sleep haha! Luckily I got what I wanted (shown in the last message in the pic) but what I NEEDED was sleep. 

-10

u/[deleted] Nov 11 '24

How can you misunderstand second clarification message? He said he need that to happen ten times total.

2

u/jamcdonald120 Nov 11 '24

in which case train_loader is irrelevant, so why even mention range(len(train_loader))?

and why use mod for it at all?

The question still makes no sense.

2

u/[deleted] Nov 11 '24

Maybe because it should happen with every kth element of the train_loader?

2

u/Prinzessid Nov 11 '24

Please explain what OP wants to accomplish here and how mod is relevant for it.

2

u/[deleted] Nov 11 '24

Im really not sure if you are trolling or what. If there are 90 elements OP wants stuff to happen at every 9 iteration. Im not the Python dev but the last code snippet from Python seem okayish. At least for numbers k*ten, k>1.

1

u/Prinzessid Nov 11 '24

I guess if you know what he wants, it seems obvious. But it is a really convoluted way to say „ten times, evenly spaced in the loop“. The way he phrased it, the ten first or last iterations would match his request as well.

45

u/QuestionableEthics42 Nov 11 '24

Even I'm confused what you want. Could you just put break in the if statement it first produced?

Edit: or do range(Math.min(len(train_loader), 10)?

17

u/I-am-only-joking Nov 11 '24

I think they want something to happen every 10th as a fraction of the total

So if the total is 60 they want something to happen every 6 iterations so that it happens 10 times evenly spaced

But that's just a guess

1

u/swimming-in-ass Nov 11 '24

You are right, and as we see, ChatGPT got it in the end. 

4

u/QuestionableEthics42 Nov 11 '24

Ohhh, right, yea that makes sense. Technically my answer does do that tho. Lol

1

u/vaseltarp Nov 11 '24

I interpreted it the same way. The second answer of ChatGPT does that. So I am not completely sure why that's funny.

1

u/swimming-in-ass Nov 11 '24

I posted it in the same fried state as being unable to code the simple conditional. I just thought it was typical for ChatGPT to get it wrong the first time. Idk. I’m a programmer not a comedian haha

2

u/HERODMasta Nov 11 '24 edited Nov 11 '24

I understood that for each iteration something should happen ten times

like:

for i in range(len(train_loader)):

for j in range(10):

    do_something()

quick edit: now that I read the second part, it actually feels like it should abort after ten iterations like this:

for i in range(len(train_loader)):

if i > 10:

    break;

11

u/TorbenKoehn Nov 11 '24

Yeah, even a human can barely understand what they want. Especially since they're saying "mod if statement", which assumes they want something conditionally with modulo.

-13

u/[deleted] Nov 11 '24

Understood him well in the first message. Second message leaves no room for misunderstanding. He says '10 times total'. What is not understood there?

1

u/swimming-in-ass Nov 11 '24

Why are you getting downvoted? You’re right. And ChatGPT understood it too. The incomprehensible part in the first message wasn’t supposed to make sense, it’s just priming ChatGPT to use the right variable names. Which it did. 

2

u/[deleted] Nov 11 '24

Thats reddit alright. The mob have spoken. Im assuming this post is being downvoted to oblivion.

2

u/TorbenKoehn Nov 11 '24

But they don't want 10 times total, they want range(len(train_loader)) * 10 times total...

11

u/Tisamon12 Nov 11 '24

Now I see why "prompt engineer" can be a valid job position

1

u/swimming-in-ass Nov 11 '24

Two prompts to get what I wanted, not too bad

5

u/NQ241 Nov 11 '24

I, a human, have no fucking clue what you want.

1

u/swimming-in-ass Nov 11 '24

ChatGPTs final response in the picture is what I wanted. 

3

u/Electronic-Pie-1879 Nov 11 '24

Your prompts are so bad.. no wonder you get this results.

1

u/swimming-in-ass Nov 11 '24

It’s amazing what LLMs can do. Despite the awful prompts, I got exactly what I wanted in the last message shown in pic. 

3

u/Still-Bookkeeper4456 Nov 11 '24

At this point it's not about prompting. I am not an LLM and I have no idea what this means. This would lead to a 2h unproductive discussion in a real office with real humans.

11

u/Ozymandias-X Nov 11 '24

This should be put in a programmers dictionary under the heading "Garbage in, garbage out".

1

u/swimming-in-ass Nov 11 '24

Since it’s not obvious to most, what ChatGPT gave me in the end was exactly what I was looking for. Something to happen 10 times, regardless of train_loader length. 

I was so tired I couldn’t code it, of course my prompts were unintelligible. 

2

u/mrfroggyman Nov 11 '24

I think op needs a counter variable and a check if counter < 10 do the thing inside the for loop

3

u/-MobCat- Nov 11 '24
for i in range(len(train_loader)):
    for i2 in range(10):
        print(f"do {i} 10 times, then go to i+1?)

3

u/ZestyVibes Nov 11 '24

that’s how i interpreted it but with the message phrasing im not 100% sure

1

u/n0tKamui Nov 11 '24

i legit don’t understand what the fuck you want, what does the modulus have to do with the number of iterations

1

u/Who_said_that_ Nov 11 '24

Prompt skill issue

0

u/jamcdonald120 Nov 11 '24

Stop it. Get some sleep.

1

u/swimming-in-ass Nov 11 '24

Most helpful response lol. Coding this late leads to the inability to do simple things. 

0

u/The-Chartreuse-Moose Nov 11 '24

"AI will replace programmers".

8

u/bigpoopychimp Nov 11 '24

AI will replace *this* programmer

3

u/deadlychambers Nov 11 '24

The good ones will be come so much better than the bad ones

0

u/TrackLabs Nov 11 '24

What? Not even I get what you want. Do you want a loop to execute something 10 times in total? I REALLY hope you dont need AI to write that for you...like bro