Date: 2010-12-21 01:42 pm (UTC)
From: [identity profile] pseudomonas.livejournal.com
That's what I assumed - even coders aren't devoid of common sense.

Also: "a dozen" is ambiguous as to its referent. A JokeCoderâ„¢ would refuse to compile go out without clarification.

Date: 2010-12-21 01:58 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
"a dozen" is ambiguous as to its referent.

Yeah. I think the joke -- if we haven't finished dissecting it enough yet -- is that it's ambiguous, but any normal person would not see that because it's SO OBVIOUS which is intended. But a coder, used to interpreting code literally without regard to common sense (because they have to see what it actually will do, as well as what it ought to do) can see it either way, so in order to make that point in the more humorous fashion, the joke portrays them taking the alternative meaning, whether or not the natural meaning is at least as valid :)

Date: 2010-12-21 02:02 pm (UTC)
From: [identity profile] pseudomonas.livejournal.com
But also (because I know you're not averse to a point being belaboured) the instructions are being given in natural language, and one key to a useful coder's approach to natural language is to use as much context and domain knowledge as possible to produce the most likely guess as to what the speaker meant.

Date: 2010-12-23 06:01 am (UTC)
ext_3294: Tux (Default)
From: [identity profile] technoshaman.livejournal.com
Also: "a dozen" is ambiguous as to its referent. A JokeCoderâ„¢ would refuse to compile go out without clarification.

Precisiment. A pedantic coder would throw an undefined referent error.

Date: 2010-12-21 01:54 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
I might legitimately say a brought home 12 cartons of milk, or actually do it if it kept, for the sake of the joke, but bring the eggs surreptitiously.

For that matter, it would fall flat in real life unless the request were in txt/email, because the person saying it would have forgotten their exact phrasing.

In real life, I would obviously do the right thing. But for the sake of the poll I voted "12" because I think that's what the joke wants more than "13"

Date: 2010-12-21 01:47 pm (UTC)
From: [identity profile] drainboy.livejournal.com
You left your number_of_eggs variable uninitialised so I don't know which way the function pointer went.

Date: 2010-12-21 02:01 pm (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
A Perl programmer would Do What I Mean and bring 1 milk, 12 eggs if eggs.

Date: 2010-12-21 03:43 pm (UTC)
From: [identity profile] chipuni.livejournal.com
...and bring 0 milk, 0 eggs if no eggs.

Date: 2010-12-21 02:35 pm (UTC)
From: [identity profile] eatsoylentgreen.livejournal.com
he would post it on a public post and gather data

Date: 2010-12-21 03:03 pm (UTC)
From: [identity profile] lpetrazickis.livejournal.com
IMHO, this is a joke about noun elision in English grammar, not about programming. Unless there's some stereotype I'm unaware of (absentmindedness?), a more appropriate target would be English majors.

Date: 2010-12-21 03:24 pm (UTC)
From: [identity profile] blearyboy.livejournal.com
I think this would produce a type mismatch error. By which I mean that the non-coder would end up saying "we're really mismatched, you're just not my type".

Date: 2010-12-21 03:37 pm (UTC)
From: [identity profile] channelpenguin.livejournal.com
Depends on their sense of humour I suppose. I have been known to amuse myself by taking people very literally when I know they don't mean it. I might flag up the ambiguity - though that's also an annoying thing to do. I have grown out of such behaviour mostly, so carton of milk and a dozen eggs I suppose.

Date: 2010-12-21 05:10 pm (UTC)
darkoshi: (Default)
From: [personal profile] darkoshi
I think most coders would have enough sense to infer the correct intended meaning. If it were indeed unclear and the coder was not able to get back in contact with the instructor to get the command clarified, they might bring back 13 cartons of milk and a dozen eggs, to make sure that they got all possibilities covered.

I suppose it might be funny if you came back to the refrigerator in your flat being stuffed full of milk and egg cartons?

Date: 2010-12-21 05:24 pm (UTC)
zz: (Default)
From: [personal profile] zz
the available answers all assume eggs is true, which it might not be.

Date: 2010-12-21 07:43 pm (UTC)
dpolicar: (Default)
From: [personal profile] dpolicar
It depends on whether we're talking about an interpreted coder or a compiled coder. An interpreted coder would either return a carton of milk or say "a dozen what?" in front of the egg display and then terminate, dropping a carton of milk on the floor. A compiled coder would say "a dozen what?" before heading out to the store.

Date: 2010-12-21 10:41 pm (UTC)
From: [identity profile] elmyra.livejournal.com
Either a carton of milk or 13, depending on the presence of egg which you haven't specified.

Date: 2010-12-21 10:53 pm (UTC)
From: [identity profile] elmyra.livejournal.com
In all fairness I'm not a coder but I went for strictest interpretation of the natural language instruction, and that "and" for me means 13. :-)

Date: 2010-12-21 10:46 pm (UTC)
From: [identity profile] elmyra.livejournal.com
Oh, and upon me reading this out to him, Paul said "I would never do this really... except to annoy you... I might ask you if you were sure before I went to the shop..." ;-)

Date: 2010-12-21 10:52 pm (UTC)
From: [identity profile] elmyra.livejournal.com
Oh no, he'd ask if I was sure and if I didn't pick up what he meant, he'd totally bring 13 cartons of milk. ;-)

(He is a nuclear physicist but that's close enough.)

Date: 2010-12-22 06:49 am (UTC)
From: [identity profile] stillcarl.livejournal.com
The coder would bring home a carton of milk, they not having any eggs.

April 2026

S M T W T F S
    1 2 34
567 8 9 10 11
12131415161718
19202122232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 12th, 2026 06:55 pm
Powered by Dreamwidth Studios