712
Bill is a pro grammer (sh.itjust.works)
you are viewing a single comment's thread
view the rest of the comments
[-] magic_lobster_party@kbin.social 79 points 8 months ago

x += 1; // Increases x by one

[-] towerful@programming.dev 63 points 8 months ago* (last edited 8 months ago)

// increase the dynamically allocated memory space of a word sized integer stored at the memory address represented by the symbol "x" by the integer 1 and terminate the instruction

[-] morrowind@lemmy.ml 38 points 8 months ago

Wait why is it dynamically allocated and why are you increasing the memory. Something is very wrong here

[-] floofloof@lemmy.ca 34 points 8 months ago

Found the bug. Thank goodness for comments.

[-] Anders429@programming.dev 3 points 8 months ago

Oh, is this what they meant by "commenting your code"?

[-] Anders429@programming.dev 11 points 8 months ago

Why the heck does it need to be dynamically allocated? Just put that puppy on the stack.

[-] towerful@programming.dev 6 points 8 months ago

That's what it used to do.
But it was a bug, and the code has been fixed.

[-] mryessir 1 points 8 months ago

Please elaborate on the "1" more clearly. Other occurences specify the number base in their comments.

load more comments (7 replies)
this post was submitted on 26 Nov 2023
712 points (89.3% liked)

Programmer Humor

18907 readers
486 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS