A wife tells her programmer husband: “Go to the store and buy a gallon of milk. If they have eggs, get six.”

He comes back with six gallons of milk. When she asks why, he replies: “They had eggs".

  • Feyd@programming.dev
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    4 days ago

    I’ve never liked this joke. I guess it’s supposed to be that the husband does the literal action as described, but instead it’s just that they interpreted ambiguity opposite than expected? It just really doesn’t work very well :/

    • rockerface🇺🇦@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 days ago

      The joke is bad because the husband is supposed to bring seven gallons of milk. Since the egg condition is checked after he already got one.

      • NaibofTabr@infosec.pub
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        4 days ago

        No no, the imperative “get six” overrides the previous “buy a gallon of milk” if the “they have eggs” condition is met.

        “get six” implies x === 6 not x = x + 6, that would be “get six more

        The real problem is that “buy” was only specified in the first case. Because the conditional was met, he should get six gallons of milk but not buy them.

    • jbrains@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      Given the stereotypical difficulty of “product folks” and programmers agreeing on and building shared understanding of what to build, this joke seems clear and straightforward. It works because of course, the customer and the programmer failed to agree on something simple.