A programmer's wife sends him to get groceries. “Get a gallon of milk” she says. “And if they have eggs, get a dozen”. The programmer returns with 1 dozen gallons of milks
.
Some people have complained that this is not funny, or not sufficiently programmer-y because the
syntax doesn't make sense.
But since this joke is pretty much made for overanalyzing, let's take a look at how this could actually happen.
Being a coder stereotype, he's not an idiot. He can listen with his ears. But in this case, perhaps he didn't.
Perhaps he invented an Alexa-like to-do list app or similar, that allows you to use voice commands
to send texts, but also rephrases the message for clarity. Useless? Maybe, but coders do this kind of toy app all the time.
Presumably the language is some kind of NLP intent processor, not truly a programming language.
The syntax seems to involve locking onto the first object mentioned and treating that as the object to be acted upon.
Presumably someone was trying to write a parser to handle stuff like “Get milk, unless we already have some” or “Get milk, but if they have soy milk get that instead”.
And of course, being a programmer who likes tinkering more than actual software, he probably started with a few examples like that, built an oversimplified model of how commands work, and figured out a contrived way to fit most everyday things into that format.
And then of course, being a big fan of simplicity, he decided that it shouldn't be too hard to just teach his family the limitations of the system, so there was no reason to add a proper parse engine or anything more complicated.
And being the smarty pants he is, using an algorithm to parse this stuff instead of just using his ears seemed like a great idea. With a little sunk cost fallacy the system expanded to be almost a part of his identity that would emotionally hurt him to discard.
And so everyone around him has to deal with this hacked together version of Google assistant, that sends people the distilled summary of what you tell it to text them, which can never be truly useful, because that would be bloat, and can't go away, because that would be giving up.
But why does his wife put up with it? And why does she feel the need to speculate about the possibility that eggs might not be in stock?
Well, because she is also a programmer. Any great piece of software handles all the errors and edge cases it may be exposed to. She's in the habit of thinking general purpose. There's almost certainly eggs at the store, but it's only a few extra words. Next week they leave for a country that is experiencing an egg shortage.
Might as well do everything the same, consistent, bulletproof way, because it takes less effort than designing the perfect custom solution for every task. You're gonna need to learn the enterprise grade version anyway, don't mess with the rest.
Or, perhaps, she isn't so much a programmer as a software developer. She makes software. He on the other hand, is a programmer through and through. He clearly loves solving problems and learning new things more than actually making practical apps.
Perhaps it's a good thing that they are married, because pure abstract research sometimes leads to great things, but often just spirals off to nonsense without a few reminders.
Seems pretty plausible to me, even if it requires an uncomfortable amount of gendered stereotypes. But there's not much I can do there, since the stereotypes are in the original joke.