mycodesucks@kbin.social to Programmer Humor · 2 年前It's not greatmedia.kbin.socialimagemessage-square66fedilinkarrow-up11.49Karrow-down131file-text
arrow-up11.46Karrow-down1imageIt's not greatmedia.kbin.socialmycodesucks@kbin.social to Programmer Humor · 2 年前message-square66fedilinkfile-text
minus-squareGecko@lemmy.worldlinkfedilinkEnglisharrow-up32·2 年前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.
minus-squarermuk@feddit.uklinkfedilinkEnglisharrow-up11·2 年前Steadily increasing unsigned integer on a long-running piece of infrastructure: bonjour
minus-squaresocsalinkfedilinkarrow-up3·edit-22 年前Laughs in struct LooooongCounter { long highPart; long lowPart; };
minus-squareTheyCallMeHacked@discuss.tchncs.delinkfedilinkarrow-up3·2 年前LooooongCounter 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.
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++; }
I think you convinced me to actually do it