Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

Login

Username

Password

Not registered yet?

#1 2009-08-16 08:42:09

MathsIsFun
Administrator

Offline

Programming Joke

A programmer is sent to the supermarket with instructions to "buy butter and if they have eggs then buy a dozen."

Returning with 12 butters, the programmer says, "they had eggs".


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

#2 2009-08-16 09:32:14

bobbym
Administrator

Offline

Re: Programming Joke

Hi MathsisFun;

I think he did the right thing.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#3 2009-08-16 18:01:17

Tigeree
Legendary Member

Offline

Re: Programming Joke

It took me a while to get it but that's pretty kool! My friend got an email about something like that...


People don't notice whether it's winter or summer when they're happy.
~ Anton Chekhov
Cheer up, emo kid.

#4 2010-01-24 05:42:02

John E. Franklin
Star Member

Offline

Re: Programming Joke

Good One!  (read it 6 months late)


igloo myrtilles fourmis

#5 2010-02-24 07:31:16

crystal123
Novice

Offline

Re: Programming Joke

i dont get it
im only young thats why
someone explain it plz wink

#6 2010-02-24 07:33:09

crystal123
Novice

Offline

Re: Programming Joke

roflol         roflol          roflol
     
          roflol          roflol

roflol            roflol        roflol

        roflol               roflol

#7 2010-03-01 00:24:28

bob farey
Guest

Re: Programming Joke

crystal,

It is not a very good joke.

"buy butter and if they have eggs then buy a dozen."

Coders are seen as pedantic persons with absolutely no common sense. This coder was told definitely to buy butter. He was then told that if they have eggs, buy a dozen. The stupid coder thought "the condition IF THEY HAVE EGGS has been met, so I must follow the next instruction, which is buy a dozen. Only an idiot would think that buy a dozen referred to butter. This is because eggs come in dozens, and are a normal purchase, and nobody would buy 12 packs of butter....

#8 2010-03-01 01:33:08

Devantè
Real Member

Offline

Re: Programming Joke

Way to go?

#9 2010-03-01 03:11:36

mathsyperson
Moderator

Offline

Re: Programming Joke

Hey, it's not the programmer's fault if he got bad instructions.


Why did the vector cross the road?
It wanted to be normal.

#10 2010-03-03 07:28:32

Sarah Rebekah 13
Guest

Re: Programming Joke

Very good Joke Funny Toroflol

#11 2010-03-04 06:04:56

misheeru
Star Member

Offline

Re: Programming Joke

why is this a joke? I would have done the same thing.... wouldn't everyone have done that too?  I no get it  >_<


Of Moons, Birds and Monsters

#12 2010-03-05 07:39:47

Sarah Rebekah 13
Guest

Re: Programming Joke

I dont know.

#13 2010-03-10 04:06:50

bob farey
Guest

Re: Programming Joke

buy butter is a specific instruction, so pop a block into your basket

and      means more instructions are coming


if they have eggs     means  if there are eggs on sale, chicken duck or ostrich, it doesn't matter, read the next instruction
if there are no eggs on sale, you have finished, proceed to checkout

buy a dozen          means I don't want 6 or 24   now proceed to checkout

#14 2010-03-10 08:04:22

Sarah Rebekah 13
Guest

Re: Programming Joke

Hum why i didt come up with the answer

#15 2010-03-10 08:25:27

phrontister
Real Member

Offline

Re: Programming Joke

bob farey wrote:

if they have eggs     means  if there are eggs on sale

Why now limit the eggs to those that are on sale? That adds a constraint to the original instructions.

Last edited by phrontister (2010-03-10 09:24:23)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

#16 2010-03-10 09:21:30

Sarah Rebekah 13
Guest

Re: Programming Joke

Yes I Agree.

#17 2010-03-10 09:51:12

misheeru
Star Member

Offline

Re: Programming Joke

>_>

<_<

>_<

it looks like everyone gets it except me...

^_^

oh well


Of Moons, Birds and Monsters

#18 2010-03-11 02:49:46

Sarah Rebekah 13
Guest

Re: Programming Joke

Dont be sad.smile

#19 2010-03-11 04:28:55

misheeru
Star Member

Offline

Re: Programming Joke

hahahaa, thanks big_smile


Of Moons, Birds and Monsters

#20 2010-03-12 05:50:38

Sarah Rebekah 13
Guest

Re: Programming Joke

You are welcome:)

#21 2010-06-08 04:11:10

KrazyKyngeKorny
Member

Offline

Re: Programming Joke

I knew a fellow, early twenties, who aspired to be a professional programmer.

He showed me some code for a program he was writing (BASIC).

At one point he had code like

if x < 10 then
if x < 8 then
    (code)
else if x < 5 then
    (code)

Unfortunately, much of this sort of thing goes on in professional programming.

#22 2010-07-06 03:10:29

jk22
Member

Offline

Re: Programming Joke

programmers have noticed it's much easier to program an automatic insult generator than a worship generator.

and that death of people was always the same : enough money was put in the bet, that it was worth programming the death of with certainty : take bill with the more money corresponding, say the cause.

Last edited by jk22 (2010-07-06 03:20:06)

#23 2010-08-25 14:20:22

hiyatran
Novice

Offline

Re: Programming Joke

misheeru wrote:

>_>

<_<

>_<

it looks like everyone gets it except me...

^_^

oh well

apparently, I'm in the same boat as you...

#24 2011-12-02 17:23:53

DaveRobinsonUK1
Member

Offline

Re: Programming Joke

KrazyKyngeKorny wrote:

I knew a fellow, early twenties, who aspired to be a professional programmer.

He showed me some code for a program he was writing (BASIC).

At one point he had code like

if x < 10 then
if x < 8 then
    (code)
else if x < 5 then
    (code)

Unfortunately, much of this sort of thing goes on in professional programming.

Yeah! tell me about it. I work with artists who think because they have learned how write a small script
they are somehow equivalent to god. Not only do they do things like this, they also NEVER comment their
code. Then to add further complication they needlessly split functions out into separate files. Also they
don't document or provide test data for the program. As a result when you come to make some changes
you have to go through the whole thing line by line. They don't seem to understand the concept of making
it work on paper before going anywhere near a keyboard.

These people are a menace and have no business being in charge of a programming language.down


I see it, but I don't believe it.

#25 2011-12-02 20:13:53

bobbym
Administrator

Offline

Re: Programming Joke

Hi DaveRobinsonUK1;

Calm down Dave. Thoughts like that only elevate your blood pressure. They do not change the way they work.

But between you and I, you are absolutely correct.

They don't seem to understand the concept of making
it work on paper before going anywhere near a keyboard.

I did not think anyone coded like that anymore or even knew about it.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Board footer

Powered by FluxBB