this post was submitted on 18 Oct 2024
250 points (99.2% liked)

Programming Horror

1885 readers
10 users here now

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 @Ategon@programming.dev

Rules

Credits

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] orca@orcas.enjoying.yachts 56 points 3 weeks ago (18 children)

From my experience with ChatGPT:

  1. 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.
  2. 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.

[–] Sotuanduso@lemm.ee 2 points 3 weeks ago

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.

load more comments (17 replies)