|
If talking about screwing things up, what profession is the first person who comes to your mind?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
"ex-wife".
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Hell of a profession. I suppose she has "Alimony Collector" on her passport.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Politician
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Absolutely - and soaring iPhone sales prove you to be correct!
(OK - I fixed it).
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
"you're"
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Hey, Guys! ...
Oh, we already did that one, didn't we?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
...this grocery thing. The request was quite clear. "Get a gallon of milk. If they have eggs, get six." He should bring home six gallons of milk (unless the store is out of eggs, of course). There is no recursion, and there is no ambiguity. Am I missing something?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 4-Apr-16 12:48pm.
|
|
|
|
|
To be exact it is one or six gallons of milk - depending on the eggs...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Precisely.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Best would be to return a List<GallonOfMilk> whose count depends on the HaveAnyEgg boolean variable.
Or maybe an abstract factory?
You always obtain more by being rather polite and armed than polite only.
|
|
|
|
|
Was "they" declared and initialised properly?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
"they" is an external reference that automatically gets cast to "this" once the programmer arrives at the store.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Then I'm afraid I'm as lost as you are, Mate. I can't see the problem.
Ship it.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Yeap: the punctuation.
In your case is the "." higher priority delimiter, so the "get six" belong to the eggs. So
- get a gallon of milk
- if the have eggs, get six.
Get a gallon of milk, if they have eggs, get six. Translates into
- get a gallon of milk
- if the have eggs, get six gallons of milk.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Exactly my thought!
He got the story wrong!
|
|
|
|
|
You clearly aren't spending long enough in QA - you missed the obvious recursion:
private List<Produce> shopping = new List<Produce>();
public void GetMilk(int count)
{
while (count > 0)
{
shopping.Add(new Milk());
if (shop.HasEggs()) GetMilk(6);
count--;
}
}
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
This one?[^]
"While you're out can you get milk, if they have eggs can you get 6"
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
They only sell eggs in 12 and 18 packs where I shop. So does she mean 6 containers of 12 eggs?
Hogan
|
|
|
|
|
Who the heck buys milk in gallons (or sells it that way, come to that)?
I am not a number. I am a ... no, wait!
|
|
|
|
|
'Mericans [^]
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Correct me if I'm wrong (I'm not) but I'm pretty sure there's a 1000 millifeet in a foot, and 1000 yards in a kiloyard too. The basic units don't become any less arbitrary because you stick a predefined multiplier in front of them when you want something a bit bigger. And surely the farce by which we are now required to fly in the face of all logic and define a kB as literally 1000 bytes just because should prove that beyond all doubt. You can keep your measurements for the functionally innumerate. I'll die happy in the knowledge that throughout my life I was able to calculate in diverse number bases without the slightest trouble as a result of my education in proper units. They don't call them Imperial for nothing, you know!
Now if you don't mind, I have to take the dog for her half mile walk to buy a couple of pints of milk and a quarter pound of mushrooms. I hope they've moved that yard of sand that was blocking the path yesetrday!
Edit: oops, for got the point of this reply. It was the size of the 'portions' that I was referring to, not the units that they were measured in! Though, you probably got the latter point already!
I am not a number. I am a ... no, wait!
|
|
|
|
|
Perhaps the person was using the more sensible metric system and didn't know how much a gallon was?
|
|
|
|
|
John Simmons / outlaw programmer wrote: Am I missing something?
Yes. The "While you're out".
|
|
|
|
|
There was a While loop!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|