Cows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 2 years agoBill is a pro grammersh.itjust.worksimagemessage-square98fedilinkarrow-up1813arrow-down197
arrow-up1716arrow-down1imageBill is a pro grammersh.itjust.worksCows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 2 years agomessage-square98fedilink
minus-squaremagic_lobster_party@kbin.sociallinkfedilinkarrow-up79·2 years agox += 1; // Increases x by one
minus-squaretowerful@programming.devlinkfedilinkarrow-up66arrow-down3·edit-22 years 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
minus-squaremorrowind@lemmy.mllinkfedilinkarrow-up38·2 years agoWait why is it dynamically allocated and why are you increasing the memory. Something is very wrong here
minus-squarefloofloof@lemmy.calinkfedilinkEnglisharrow-up34·2 years agoFound the bug. Thank goodness for comments.
minus-squareAnders429@programming.devlinkfedilinkarrow-up3·2 years agoOh, is this what they meant by “commenting your code”?
minus-squareAnders429@programming.devlinkfedilinkarrow-up11·2 years agoWhy the heck does it need to be dynamically allocated? Just put that puppy on the stack.
minus-squaretowerful@programming.devlinkfedilinkarrow-up6·2 years agoThat’s what it used to do. But it was a bug, and the code has been fixed.
minus-squaremryessirlinkfedilinkarrow-up1·2 years agoPlease elaborate on the “1” more clearly. Other occurences specify the number base in their comments.
minus-squareautokludge@programming.devlinkfedilinkEnglisharrow-up20·edit-22 years ago…Years later x += config.increment; // Increases x by one """ config.yaml increment: -2 """
minus-squareZILtoid1991@kbin.sociallinkfedilinkarrow-up16arrow-down1·2 years agox++; // Move X position forward by one There, I made that kind of comment more useful!
minus-squareLostXOR@kbin.sociallinkfedilinkarrow-up9·2 years agox++; // Set x to the incrementation of the value of x Much better.
x += 1; // Increases x by one
// 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
Wait why is it dynamically allocated and why are you increasing the memory. Something is very wrong here
Found the bug. Thank goodness for comments.
Oh, is this what they meant by “commenting your code”?
Why the heck does it need to be dynamically allocated? Just put that puppy on the stack.
That’s what it used to do.
But it was a bug, and the code has been fixed.
Please elaborate on the “1” more clearly. Other occurences specify the number base in their comments.
…Years later
x += config.increment; // Increases x by one
""" config.yaml increment: -2 """
x++; // Move X position forward by one
There, I made that kind of comment more useful!
x++; // Set x to the incrementation of the value of x
Much better.
// Move to the right