• Zach (unregistered)

    Why do people have to be "clever"? They create clusterfucks that seem to only show up after they leave their jobs

  • trainbrain27 (unregistered)

    https://matthewmazur.files.wordpress.com/2013/04/5goodideafairy.jpg

  • b.a. freeman (unregistered) in reply to Zach

    an added benefit is that the clever hans who defecated the crapcode will put it on his resume and use it to get a better job than the poor sap who has to pooper-scoop the mess he left behind.

  • Decius (unregistered)

    I disbelieve that there are 65 disjoint functions that a food additive can perform.

  • (nodebb) in reply to Decius

    Colour, colour_new, colour_prod, colour_dev. It starts to add up!

  • Wizard (unregistered) in reply to Decius

    @Decius - why would there not be more than 64 functions? It does say in the text: "every legal additive to food so that paranoid hippies can call them liars and insist they all cause cancer and autism. "

    So it probably started out as something like enum hippyComplaint { Color = 1, SweetFlavour = 2, SourFlavour = 4, Cancer = 8, Autism = 16, BowelCancer = 32, ProstateCancer = 64, MakesYouThinkYouCanFlyOffBuildings = 128, StopsYouListeningToJanisJoplin = 256 .....

    }

  • nasch (unregistered)

    "I disbelieve that there are 65 disjoint functions that a food additive can perform."

    Wikipedia lists 21 major categories of effect. It doesn't take many subcategories to get above 65.

    https://en.wikipedia.org/wiki/Food_additive

  • sizer99 (google) in reply to Decius

    I disbelieve that you've never seen out of control bitmask creep, especially when a specific bitmask can never, ever be re-used as another indicator and other flags unrelated to function start sneaking in. Of course if they threw it all out and started over again they might end up with less than 64 - but luckily in this case all they had to do was throw it all out.

  • annanonymous coward (unregistered)

    the best part is changing it to a float, if it was actually used as a bitmask, would REALLY fudge things up

  • Actually Cass (Not my real name) (unregistered)

    Nasch, pretty much has it right. The wikipedia list is more or less the same as what we used, but there are subcategories and the like. What actually happened on that day though, was that we added regulations for a new country that managed its additives slightly differently so on the data entry side, we all of a sudden had an extra 20 or so "different" additives, and that pushed us up to 67.

  • Actually Cass (Not my real name) (unregistered)

    Bonus funny: my manager really pushed back on deleting the code. "I'm sure they wrote that for a reason." I had to sit him down and explain that that's what source control is for, and demo "undeleting" something using git, before he reluctantly allowed me to make my changes.

  • LaughingItOff (unregistered)

    Bitmask are such a foolish idea in the 21st century. We can "waste" memory with serialized strings, now.

  • sizer99 (google) in reply to Actually Cass (Not my real name)

    Ha! I was going to comment with something like 'I hope you didn't tell management, because they'd have sh@#fit about deleting anything in "working" code', but I got distracted. That you were able to convince him puts him above the usual.

  • (nodebb) in reply to Actually Cass (Not my real name)

    ... or there may have been a reason at the time, but the callers have all since been removed.

  • American (unregistered) in reply to Zemm

    Also color, color_new, color_prod and color_dev.

Leave a comment on “2018: Another Bitmask Fail”

Log In or post as a guest

Replying to comment #:

« Return to Article