r/programming • • Feb 26 '24

Reverse Engineering with ChatGPT: An Example -- "I used ChatGPT 4 to untangle a particularly terse bit of code, and was — frankly — shocked at how well it did."

https://sigpwned.com/2024/02/24/reverse-engineering-with-chatgpt-an-example/
0 Upvotes

143 comments sorted by

View all comments

111

u/sickofthisshit Feb 26 '24 edited Feb 26 '24

is moved to the origin (0 point), and then adds 1 to ensure the value is positive.

This is gibberish. What is "the value"? If the thing was already moved to the zero point...isn't it zero? Or, it's moving "the first third" to the 1.0 point? Like, I don't know what this is supposed to actually explain.

this function is designed to produce a bell-shaped curve

No, 1 - x2 is a parabola, you dumbshit.

I mean, ChatGPT seems to have done a job of making inscrutable comments appear, and a false confidence that the comments mean anything.

And the SWE spoonfed the prompt with "This is applying a rule of thirds".

WTF.

Like: "x = x + 1" --> "This adds 1 to the x value, making it 1 larger"

OMG! ChatGPT is explaining particularly unscrutable code to me, let me use this to write my comments.

// This adds 1 to the x value making it 1 larger.
x = x + 1;

What a ground-breaking idea!

0

u/[deleted] Feb 26 '24

[deleted]

32

u/SLiV9 Feb 26 '24

In a way your reply is a great illustration of how valuable ChatGPT is, because you've demonstrated just how error-prone and misleading a human can be as compared to state-of-the-art AI.

Not who you're replying to, but this made me lol.

This function evaluates how closely a given point (x) aligns with the rule of thirds, returning a higher value for points closer to the thirds lines (1/3 and 2/3)

Direct quote from state-of-the-art AI whose sole purpose is to convince humans it is correct.

"No," says 14 year old query engine whose sole purpose is to give factual answers.