knowing GPT users, this is probably not satire.
Programming Horror
Welcome to Programming Horror!
This is a place to share strange or terrible code you come across.
For more general memes about programming there's also Programmer Humor.
Looking for mods. If youre interested in moderating the community feel free to dm @[email protected]
Rules
- Keep content in english
- No advertisements (this includes both code in advertisements and advertisement in posts)
- No generated code (a person has to have made it)
Credits
From my experience with ChatGPT:
- It will NEVER consistently give you only the value in the response. It will always eventually add in some introductory text like it’s talking to a human. No matter how many times I tried to get it to just give me back the answer alone, it never consistently did.
- ChatGPT is terrible with numbers. It can’t count, do math, none of that. So asking it to do byte math is asking for a world of hurt.
If this isn’t joke code, that is scary.
I refuse to believe you are not certain this is a joke
I know it is, but I’ve also seen people try to use ChatGPT for similar things as a serious endeavor.
Friendly reminder that CalcGPT exists
how is it different from a calculator or say a Python REPL? i'm asking b/c i'm too old to try out young folks inefficiently engineered "solutions".
Neat! Never seen this one before.
For 1, that's why you say "Format your answer in this exact sentence: The number of bytes required (rounded up) is exactly # bytes.
, where # is the number of bytes." And then regex for that sentence. What could go wrong?
Also, it can do math somewhat consistently if you let it show its work, but I still wouldn't rely on it as a cog in code execution. It's not nearly reliable enough for that.
Money generator for bug bounty hunters
You don't need to cast the return value from malloc.
True. Although given how easy it is to cast void pointers to the wrong damn thing, it would be nice if you did, makes refactoring much easier. Makes me appreciate std::any
all the more.