Here’s a (very old) joke I like to tell on tech forums sometimes; it nicely encapsulates how they communicate. Most people get it, but there’s always a few who don’t think it’s funny:

A programer’s wife asks him to do some shopping: “Please buy a loaf of bread, and if they have eggs, buy a dozen.”
He comes back with 12 loaves of bread.
The wife asks: “Why on earth would you get 12 loaves of bread?”
“They had eggs.”

Thing with this joke that his me wrong is that isn’t how if statements are written. The else does not come before the condition in any language I’ve ever used or seen.

At the very least. It should be that he comes back with 1 or 13 loaves.

Buy a loaf If they have eggs

Buy a dozen loaves

loaves = 1 if (eggs) loaves = 12
I see that as requiring an instruction of replacement, like buy a dozen instead.
No, she said “and if,” so that should be loaves += 12, so he should have returned with 13 loaves.