Discussion
zac510 said:
KenBlocksPants said:
snowy slopes said:
JonRB said:
y282 said:
zac510 said:
I think I read this one on here actually.
One day a wife was in the kitchen and realised she needed some things from the shop. She called on her developer husband to run down the shop and pick up the goods. "I need you to pick up a loaf of bread and if they have eggs, get half a dozen."
A short while later the husband returns to wife with 6 loaves of bread.
"They had eggs!" the husband explained.
i just read that 3 times, the third very slowly, possibly mouthing it.One day a wife was in the kitchen and realised she needed some things from the shop. She called on her developer husband to run down the shop and pick up the goods. "I need you to pick up a loaf of bread and if they have eggs, get half a dozen."
A short while later the husband returns to wife with 6 loaves of bread.
"They had eggs!" the husband explained.
then i found it very, very funny.
if(shop.hasEggs()) shop.getBread(6);
else shop.getBread(1);
does that help?
marshalla said:
Frankthered said:
jas xjr said:
How can you tell if a geekengineer is an extrovert ? He looks at your shoes as he talks to you
EFA@marshalla this was just as good on page 1!
Famous Graham said:
SVX said:
wombat172a said:
SVX said:
My favourite:
God, I hate Perl so much! I pray I never have to code in that again.JonRB said:
JonRB said:
shop.purchase(eBread, shop.itemAvailable(eEggs)?6:1);
Edit: also I'm the only one who seems to have considered the maintenance overhead of having a new function and/or variables for each thing to buy rather than the item being a parameter on generic item availability and purchasing methods. Bloody amateurs. JonRB said:
Salgar said:
Pray tell what does the 'e' stand for in your Hungarian notation.
It's not Hungarian. It denotes it's an enum value. Just happens to be the coding style used where I am at the moment. I guess it could be less confusingly written as
shop.purchase(ITEM_BREAD, shop.itemAvailable(ITEM_EGGS)?6:1);
tribbles said:
Munter said:
tribbles said:
(See page 19)
Someone on a nerd thread who is not using man size pages! Next he'll let on he's not using the Big Blue skin!This is page 10!
Frankthered said:
Goa'uld said:
Had this as my wallpaper on the work machine for ages, still makes me chuckle - not a geek joke as such, but only geeks seem to find it funny. Only a little NSFW due to one naughty word.
Geeky
I really did LOL! Geeky
Showed it to (non-geek) Mrs FTR ...
(Had to explain!)
james_tigerwoods said:
IDFA if you're wanting to have a "Little" challenge
Or, the very useful, IDBEHOLD - or blatant cheat of IDCLIP.
idclip only worked in doom2, doom1 for walking through walls was idspispopd (from memory) and stands for Smashing Pumpkins Into Small Piles Of Putrid Debris, because ID liked the band the smashing pumpkins. To reciprocate, the smashing pumpkins included the doom rocket launcher sound in their song 'where boys fear to tread' Or, the very useful, IDBEHOLD - or blatant cheat of IDCLIP.
This argument reminds me of this problem:
You are given 8 identical-looking balls, one of which is heavier than the other 7 (all of which weigh the same). Using an old-fashioned mechanical set of scales you must identify the heavier ball using the scale as few times as possible. The scale is constructed using two bowls and an arm enabling the bowls to either balance or have one bowl rising while the other (and heavier bowl) falling.
What is the smallest number of steps it takes to identify which ball is heaviest?
If you know the answer already don't say, let someone work it out.
You are given 8 identical-looking balls, one of which is heavier than the other 7 (all of which weigh the same). Using an old-fashioned mechanical set of scales you must identify the heavier ball using the scale as few times as possible. The scale is constructed using two bowls and an arm enabling the bowls to either balance or have one bowl rising while the other (and heavier bowl) falling.
What is the smallest number of steps it takes to identify which ball is heaviest?
If you know the answer already don't say, let someone work it out.
doogz said:
Salgar said:
This argument reminds me of this problem:
You are given 8 identical-looking balls, one of which is heavier than the other 7 (all of which weigh the same). Using an old-fashioned mechanical set of scales you must identify the heavier ball using the scale as few times as possible. The scale is constructed using two bowls and an arm enabling the bowls to either balance or have one bowl rising while the other (and heavier bowl) falling.
What is the smallest number of steps it takes to identify which ball is heaviest?
If you know the answer already don't say, let someone work it out.
Can you put more than one ball into each bowl at once?You are given 8 identical-looking balls, one of which is heavier than the other 7 (all of which weigh the same). Using an old-fashioned mechanical set of scales you must identify the heavier ball using the scale as few times as possible. The scale is constructed using two bowls and an arm enabling the bowls to either balance or have one bowl rising while the other (and heavier bowl) falling.
What is the smallest number of steps it takes to identify which ball is heaviest?
If you know the answer already don't say, let someone work it out.
i.e 4 in each bowl, to narrow it down quicker?
Hugo a Gogo said:
louiebaby said:
If it's not 3, I'll stay out this thread for a while...
i think 2 steps1. weigh 3 and 3, they balance - you've got two left
2. weigh those other two, one is the heavy one
or
1. weigh 3 and 3, one side is heavy
2. weigh 1 and 1 from the heavy 3, leave one - if they balance, you know it's the other one, if they don't you have your heavy one
Where did louiebaby's post go?
plasticpig said:
Jinx said:
They've all forgotton the necessary negative number indicator (surely a geek wouldn't only want positive integers? ) only +/- 511 is possible
Inefficient use of digits there. You can indicate negative or positive numbers by having your palms facing away from you to indicate negative and towards you to indicate positive Gassing Station | The Lounge | Top of Page | What's New | My Stuff