mycodesucks to Programmer Humor@lemmy.ml • 11 months agoIt's not greatmedia.kbin.socialimagemessage-square67fedilinkarrow-up11.48Kfile-text
arrow-up11.48KimageIt's not greatmedia.kbin.socialmycodesucks to Programmer Humor@lemmy.ml • 11 months agomessage-square67fedilinkfile-text
minus-square@Gecko@lemmy.worldlinkfedilinkEnglish31•11 months agongl, I’m annoyed whenever someone creates an application but doesn’t want to publish their code cause it looks bad. Like no one cares that your code is bad and by publishing it, you can get others to help you improve it.
minus-square@rmuk@feddit.uklinkfedilinkEnglish11•11 months agoSteadily increasing unsigned integer on a long-running piece of infrastructure: bonjour
minus-square@socsa@lemmy.mllinkfedilink3•edit-211 months agoLaughs in struct LooooongCounter { long highPart; long lowPart; };
minus-square@TheyCallMeHacked@discuss.tchncs.delinkfedilink3•11 months agoLooooongCounter operator++(const LooooongCounter& c) { if(c.lowPart == ULONG_MAX) { c.highPart++; c.lowPart = 0; } else c.lowPart++; }
ngl, I’m annoyed whenever someone creates an application but doesn’t want to publish their code cause it looks bad. Like no one cares that your code is bad and by publishing it, you can get others to help you improve it.
I think you convinced me to actually do it
If it works, it works.
Steadily increasing unsigned integer on a long-running piece of infrastructure: bonjour
Laughs in
struct LooooongCounter { long highPart; long lowPart; };
LooooongCounter operator++(const LooooongCounter& c) { if(c.lowPart == ULONG_MAX) { c.highPart++; c.lowPart = 0; } else c.lowPart++; }