• Anon (unregistered) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    The real WTF in the second story is that this "promising candidate" was presumably not even called in for an interview for failing to do some lame-ass trick puzzle question.

    The story said "the next round of interviews" so presumably this was in some stage of interviews that may have been on-site. Either way, not being able to do it is one thing, giving an answer so clearly stupid is another. I wouldn't call him in either based on that.

  • Pentium100 (unregistered) in reply to Me
    Me:
    ...

    And everyone knows you weigh a 747 by putting it in a bath and weighing the displaced water.

    No, you would measure the volume of the 747.

    You measure the weight of a 747 by disassembling it and weighing each part separately.

  • (cs) in reply to Hans
    Hans:
    The problem made no explicit mention of the presence of a tap.

    Good point. I will assume that I am in a resting state, ergo, my pulse should be, on average, constant. Begin measuring my pulse and start filling the 5 gallon container. Count the pulses.

    Repeat this trial a few times and mentally take the average. Multiply by 4/5, and that's how many pulses you'll need to fill the container to four gallons. You can keep the 3 gallon container.

  • jdw (unregistered) in reply to AndersI
    AndersI:
    I would put the five gallon bottle on the scale and fill water into it until it is 4 kg heavier.
    Good job. You now have just over one US gallon. Also, you've broken the rules.
  • Zapp Brannigan (unregistered) in reply to alegr
    alegr:
    AndersI:
    I would put the five gallon bottle on the scale and fill water into it until it is 4 kg heavier.
    Who would have thought one gallon weights one kilogram... Oh, wait...
    No one specified the planet. Are you assuming it's Earth?
  • Anonymous (unregistered) in reply to Kiss me I'm Polish
    Kiss me I'm Polish:
    - the bus stop problem (you drive a small 2-person car, and you see a bus stop where 3 people gathered: a friend of yours, a woman with whom you instantly fall in love, and a dying person who needs medical attention to survive. Oh and it's raining. What do you do? There is a *right* answer, and either you know it or you lose)
    They're already at a bus stop so why do I need to take them anywhere? I lose, don't I?
  • wcw (unregistered) in reply to Igni
    Igni:
    Those of you that think that job posting is bizarre have obviously never had RSI. Just sayin'.

    What's bizarre is that they expect to get a smart, capable kid who can type fast in Manhattan for $20 an hour. What that kind of money in NYC actually buys you is something else entirely, like maybe a hand job from a crack whore in Jersey.

  • (cs) in reply to jdw
    jdw:
    AndersI:
    I would put the five gallon bottle on the scale and fill water into it until it is 4 kg heavier.
    Good job. You now have just over one US gallon. Also, you've broken the rules.

    For crying out loud.

    Just give the customer the full five-gallon container.

    The extra gallon doesn't cost you anything significant. You've saved the time needed to figure this out. You've avoided any chance of screwing up and giving the customer only three gallons. The customer is happy cuz he has 25% extra for free.

  • Anonymous (unregistered) in reply to D-Coder
    D-Coder:
    Just give the customer the full five-gallon container.

    The extra gallon doesn't cost you anything significant. You've saved the time needed to figure this out. You've avoided any chance of screwing up and giving the customer only three gallons. The customer is happy cuz he has 25% extra for free.

    You sir, are a genius. This is the absolute best answer to this problem. Everyone wins.

  • Mike (unregistered)

    3 gallons should be enough for anyone.

  • TheAnonCoward (unregistered) in reply to anon
    anon:
    I'd find the weight of the 747 by reading the service manual.

    That's the right answer, right?

    That's an RTFM win right there.

  • FuBar (unregistered)

    Surely someone here must know the SQL statement that would calculate the weight of a 747?

  • Mike (unregistered) in reply to Da' Man
    Da' Man:
    DEFINE 5 4;

    I have a feeling that may cause another problem down the road.

  • jrh (unregistered) in reply to wcw
    wcw:
    What's bizarre is that they expect to get a smart, capable kid who can type fast in Manhattan for $20 an hour. What that kind of money in NYC actually buys you is something else entirely, like maybe a hand job from a crack whore in Jersey.

    Actually a hand job in Jersey isn't something you'd buy in NYC.

  • Worf (unregistered) in reply to Zapp Brannigan
    Zapp Brannigan:
    alegr:
    AndersI:
    I would put the five gallon bottle on the scale and fill water into it until it is 4 kg heavier.
    Who would have thought one gallon weights one kilogram... Oh, wait...
    No one specified the planet. Are you assuming it's Earth?

    Mass balances are gravity-agnostic (well, they assume that over their span that gravity is the same, which means practically anywhere except near or in a black hole). They measure mass, not weight. Add in the mass of 4 gallons of water. Which depends on the type of gallon you're talking about...

    Now, using a scale, that depends on the local gravity.

  • Bruce (unregistered)

    The real WTF is in the second to last paragraph:

    ...In early 2008, Braxton left Ellington Management Group, a leading mortgage trading hedge fund, where he was Head of MBS and ABS Credit Modeling...

    So this is one of the guys responsible for tanking the economy, and we think he'll be able to run a start-up?

  • Mike (unregistered) in reply to FuBar
    FuBar:
    Surely someone here must know the SQL statement that would calculate the weight of a 747?

    SELECT WeightInPoundsAtSeaLevelOnEarth FROM tblUselessWTFAirplaneData WHERE VehicleType='Boeing747'

  • Problem Solver (unregistered)

    How would you get four gallons of water? I'd get a four gallon container, and fill it.

    What is the height of a 747 on the runway? Call the tower, ask for the elevation of the runway. Filled with fuel? Check the tires for proper air pressure.

    Oh you mean what does the 747 weigh? Have it take off. Now it is in flight, and weightless. Answer = zero. Wait, what? Oh. Well then land it in the ocean and do something with the water. OK I'm getting confused here.

    A 747, assuming the carpets were recently vacuumed, weighs exactly 217,454 quatloms. Prove me wrong.

    Oh and you can take your puzzle job and shove it because while you and I were sitting here farting around your competition just invented facebook.

  • Mike (unregistered) in reply to Bruce
    Bruce:
    The real WTF is in the second to last paragraph:

    ...In early 2008, Braxton left Ellington Management Group, a leading mortgage trading hedge fund, where he was Head of MBS and ABS Credit Modeling...

    So this is one of the guys responsible for tanking the economy, and we think he'll be able to run a start-up?

    How to run a successful start-up if you're a complete moron who has already destroyed the world economy:

    1. Start-up
    2. Get funding
    3. Grow
    4. Get more funding based on growth
    5. PROFIT
    6. Get out
  • Does my answer count? (unregistered)

    Fill the three gallon bottle while counting with a steady rhythm. Multiply the result by 4/3. Fill the five gallon bottle while counting to that number. Shut off the faucet.

    Sell the four gallons to the customer while everyone else is spilling water all over themselves. Take the leftover 3 gallons with you and go collect your prize for saving Good Mother Earth by not wasting any water. Live happily ever after.

  • K (unregistered)

    A colleague of mine with RSI once hired an "assistant programmer". Apparently it does help if they have programming experience and have typed code before.

  • (cs) in reply to DeepThought
    DeepThought:
    Patrick:
    Does the Senior Programmer have no hands with which to type?

    Or has a sever case of carpal tunnel syndrome.

    I think a 'sever case' is something entirely different from carpal tunnel syndrome.

  • Hatterson (unregistered) in reply to Problem Solver
    Problem Solver:
    Oh you mean what does the 747 weigh? Have it take off. Now it is in flight, and weightless. Answer = zero. Wait, what? Oh. Well then land it in the ocean and do something with the water. OK I'm getting confused here.

    You're saying something in flight has no weight? Interesting. I believe your solution to the puzzle told me all I need to know

  • Hatterson (unregistered) in reply to Does my answer count?
    Does my answer count?:
    Fill the three gallon bottle while counting with a steady rhythm. Multiply the result by 4/3. Fill the five gallon bottle while counting to that number. Shut off the faucet.

    Sell the four gallons to the customer while everyone else is spilling water all over themselves. Take the leftover 3 gallons with you and go collect your prize for saving Good Mother Earth by not wasting any water. Live happily ever after.

    Why not simply take those 3 gallons, pour them into the 5 gallon jug and then pour for an additional 1/3 of the time?

  • usitas (unregistered) in reply to Hatterson
    Hatterson:
    Problem Solver:
    Oh you mean what does the 747 weigh? Have it take off. Now it is in flight, and weightless. Answer = zero. Wait, what? Oh. Well then land it in the ocean and do something with the water. OK I'm getting confused here.

    You're saying something in flight has no weight? Interesting. I believe your solution to the puzzle told me all I need to know

    And yet...he's right. It has everything to do with weight and nothing to do with mass.

  • (cs) in reply to jrh
    jrh:
    wcw:
    What's bizarre is that they expect to get a smart, capable kid who can type fast in Manhattan for $20 an hour. What that kind of money in NYC actually buys you is something else entirely, like maybe a hand job from a crack whore in Jersey.

    Actually a hand job in Jersey isn't something you'd buy in NYC.

    ... without taking a few blue pills first.

  • agrif (unregistered) in reply to Anon
    Anon:
    AndersI:
    I would put the five gallon bottle on the scale and fill water into it until it is 4 kg heavier.

    Great answer. Put it on the scale that the problem explicitly stated that you didn't have.

    Even better, 4 kg of water is 4 liters, not 4 gallons. You'd want 32 pounds (a pint's a pound the world around, unless you lived in civilized nations where a pound is for dogs)

  • Stark (unregistered) in reply to Kiss me I'm Polish
    Kiss me I'm Polish:
    ... - the bus stop problem (you drive a small 2-person car, and you see a bus stop where 3 people gathered: a friend of yours, a woman with whom you instantly fall in love, and a dying person who needs medical attention to survive. Oh and it's raining. What do you do? There is a *right* answer, and either you know it or you lose)

    That, or you know, you have a little thing called ethics and deliver the proper answer becomes it comes naturally. I think this is a good question for business people, but not programmers.

  • (cs)

    Fill 3 gallon container. Pour into 5 gallon container. Mark the half-way point of the height of the remaining air space in the 5 gallon container, fill to that level.

    Perfectly accurate if the container is perfectly cylindrical, will be a bit off if the container tapers. But you won't have wasted all that water you throw away using the "correct" solution.

    Or, bring the 3 and 5 gallon jugs to the thrift shop and trade for a 4 gallon jug.

  • Crabs (unregistered) in reply to Pentium100
    Pentium100:
    Me:
    ...

    And everyone knows you weigh a 747 by putting it in a bath and weighing the displaced water.

    No, you would measure the volume of the 747.

    You measure the weight of a 747 by disassembling it and weighing each part separately.

    Well that would take forever. I would have it take off, measure the speed it was going when it left the ground and the angle of attack of it's wings, and calculate the lift. The lifting force should be equal to the weight at that point.

  • Hatterson (unregistered) in reply to usitas
    usitas:
    Hatterson:
    Problem Solver:
    Oh you mean what does the 747 weigh? Have it take off. Now it is in flight, and weightless. Answer = zero. Wait, what? Oh. Well then land it in the ocean and do something with the water. OK I'm getting confused here.

    You're saying something in flight has no weight? Interesting. I believe your solution to the puzzle told me all I need to know

    And yet...he's right. It has everything to do with weight and nothing to do with mass.

    A plane in flight is no more weightless than a plane sitting on the ground. Simply because the counter force to gravity comes from aerolift produced by the wings rather than a reaction force from the ground does not mean it is weightless.

    Go do some research on 'weightless' (perhaps google can help)

  • Mike (unregistered) in reply to Kiss me I'm Polish
    Kiss me I'm Polish:
    I hate the Boeing 747 question. It's one of those "A-ha!" questions. Either you know the correct reply, or you don't - there's no actual analysis or programming skills involved. I remember Joel Spolsky ranting about it, and he got that one right. Other "a-ha" questions I met during interviews include: - the depth of Thames under a bridge in London (reply: "under which one" to win), - the bus stop problem (you drive a small 2-person car, and you see a bus stop where 3 people gathered: a friend of yours, a woman with whom you instantly fall in love, and a dying person who needs medical attention to survive. Oh and it's raining. What do you do? There is a *right* answer, and either you know it or you lose) Here it is, smart boy: You tell the friend to drive the dying person to a hospital, while you stay at the bus stop with the hottie and start the sweet talk. - the woodchuck question, which is just silly. The water jugs problem is better, because it can be solved. It has an "a-ha" moment, when you have to stop adding numbers and think about substraction, but it's not impossible.

    Meh, not just one right answer to me though this is probably assuming the interviewer isn't a geek...

    • Put a scale under each wheel (or gear leg anyway) and add up the weight
    • Pick it up with a hydraulic crane and measure the force necessary.
    • Use hydraulics in the landing gear and measure the pressure necessary to keep the plane level.
    • Weigh each piece and gallon of fuel as you put the 747 together.
    • Find a dam that is about ready to overflow, toss the 747 in and measure the amount of water that overflows.

    I'm sure there are a ton more :)

  • caper (unregistered)

    Ok everyone, into the car.

  • Capt. Obvious (unregistered) in reply to Anon
    Anon:
    Anon:
    Jeff Dege:
    Actually, I was more interested in the "how would you weight a 747" question, from the click-thru.

    I'd weigh it the same way I weight my dog. He's a small dog, but he won't sit still on the scale, so I have to hold him.

    So, first I stand on the scale and weigh myself. Then I pick up the 747 and step on the scale again.

    Then I subtract.

    A friend of mine was asked this in an interview for a business-consulting (non-IT role). The interviewer obvisouly didn't read his resume (which included pilotting 747s). So when he was asked about it and he quoted the exact height (both unladen and full of fuel), it left the interviewer dumbstruck.

    I was also dumbstruck. I didn't know that the height of a 747 changed depending on whether or not it was full of fuel. On the other hand, how much does it weigh?

    Given shock absorbers, height changes as a function of weight.

  • Wesha (unregistered)

    Don't you realize? The Founder is a die hard programmer. But he has lost his vision.

    Did ANY ONE OF YOU EVER THINK how YOU will fuel your passion for computing if this ever happens to you?..

  • (cs)

    Best question ever:

    If a hen-and-a-half can lay an egg-and-a-half in a day-and-a-half, how many one-and-a-half egg omelettes can you make in a week-and-a-half?

  • Wesha (unregistered) in reply to Kiss me I'm Polish

    (you drive a small 2-person car, and you see a bus stop where 3 people gathered: a friend of yours, a woman with whom you instantly fall in love, and a dying person who needs medical attention to survive. Oh and it's raining. What do you do? There is a right answer, and either you know it or you lose) Here it is, smart boy: You tell the friend to drive the dying person to a hospital, while you stay at the bus stop with the hottie and start the sweet talk.

    It all depends, my dear, it all depends. Your "universal" answer does not consider the possibilities:

    1. The dying person might be Hitler...
    2. I might be gay...
  • Anon (unregistered) in reply to Kiss me I'm Polish
    Kiss me I'm Polish:
    - the bus stop problem (you drive a small 2-person car, and you see a bus stop where 3 people gathered: a friend of yours, a woman with whom you instantly fall in love, and a dying person who needs medical attention to survive. Oh and it's raining. What do you do? There is a *right* answer, and either you know it or you lose)

    Does the car have a trunk or luggage ties on the roof?

    Kiss me I'm Polish:
    Here it is, smart boy: You tell the friend to drive the dying person to a hospital, while you stay at the bus stop with the hottie and start the sweet talk.

    Which is of course an asshole move in some ways since your friend presumably had something to do other than drive a dying guy to the hospital. Not to mention moving a dying person yourself is usually a bad thing compared to performing first aid while waiting for an ambulance. If nothing else it may very well take longer to drive to a hospital than it is to have an ambulance do it (speed limits, traffic lights, unfamiliar area, no idea where hospitals are, etc.).

    Since neither my friend nor the woman have done that yet I can assume they're both useless. So the woman may look hot but honestly if she's that useless I doubt I'd want to deal with her after ten minutes. So no, love it is not. Still might be a good lay mind you.

    Anyway. I'd have instead called an ambulance and did whatever the dispatcher said till the ambulance came. Then if I had something important to do and found the woman to be the bimbo I assume she is then I'd have just given my friend a lift. Plenty of hot bimbos in the world. If I did want to go for the woman I'd give my friend the car on the pretense that my friend was likely late and we weren't going to the same place. Then I'd wait with the woman on the bus stop, my display of trying to save the man's life while keeping the situation under control having likely increasing her view of me immensely (especially contrasted to my friend's uselessness).

    I summary I found the expected answer to have the same lack of forethought that exemplifies badly designed products.

  • (cs) in reply to Does my answer count?
    Does my answer count?:
    Fill the three gallon bottle while counting with a steady rhythm. Multiply the result by 4/3. Fill the five gallon bottle while counting to that number. Shut off the faucet.

    Sell the four gallons to the customer while everyone else is spilling water all over themselves. Take the leftover 3 gallons with you and go collect your prize for saving Good Mother Earth by not wasting any water. Live happily ever after.

    No, no, no -- A. Fill the three gallon bottle while counting, as above. B. Divide the result by 3 (giving you the "time" for 1 gallon). C. Pour the three gallon bottle into the 5 gallon bottle. D. Add water to the 5 gallon container for the time period indicated by B. E. Profit

    That way, you don't have to use any scary fractions. And you don't waste any water.

  • Kef Schecter (unregistered) in reply to Name
    Name:
    For those who wonder about the bottles:
    3 5 -- #1 and #2
    ---------------
    0 5 -- fill #2
    3 2 -- put 3 in #1
    0 2 -- empty #1
    2 0 -- empty #2 in #1
    2 5 -- fill #2
    3 4 -- fill #1 with #2

    I came up with a "lateral thinking" solution, though it does require the bottles to be transparent or translucent (but the problem description implied they were):

    1. Fill the large bottle.
    2. Fill the small bottle with the large bottle. The large bottle now has two gallons.
    3. Empty the small bottle and fill it with the two gallons.
    4. Mark the two-gallon mark. If you have no marker, you can keep a finger or thumb held there to mark the place.
    5. Fill the small bottle, empty it into the big bottle (so it now has 3 gallons).
    6. Fill the small bottle again.
    7. Empty one gallon from the small bottle into the large bottle. How do you know how much is one gallon? Well, you marked the 2-gallon point, and it's a 3-gallon bottle, so the space from the marker to the top of the bottle must be one gallon.
    8. The large bottle now contains 4 gallons.

    The only problem with this solution -- assuming you're forced to use your finger or thumbs to mark the position -- is that, obviously, 3-gallon and 5-gallon containers are much too big to be held with one hand, so you may have trouble keeping the place marked accurately. I think this solution is creative enough to at least allow some credit, though. TIMTOWTDI. :)

    • Kef
  • Anonymous (unregistered)

    Craigslist shouldn't count as a WTF. 99% of those job postings are asking for slave labor. I see too many of those "We're making the next Facebook" and "10 years experience with this ginourmous list of skills" for $20/hr to go and look there seriously.

    The candidates I've interviewed from job postings are also kind of a WTF also. I swear one of them was a closet skinhead.

  • FuBar (unregistered) in reply to Hatterson
    Hatterson:
    A plane in flight is no more weightless than a plane sitting on the ground. Simply because the counter force to gravity comes from aerolift produced by the wings rather than a reaction force from the ground does not mean it is weightless.
    Which leads us to another way of measuring. Fly the plane at a known velocity into an object of known elasticity and measure the resulting displacement. Calculate the mass, and hence the weight, from that.

    (hope this wasn't in bad taste)

  • RandomUser423670 (unregistered) in reply to Hatterson
    Hatterson:
    usitas:
    Hatterson:
    Problem Solver:
    Oh you mean what does the 747 weigh? Have it take off. Now it is in flight, and weightless. Answer = zero. Wait, what? Oh. Well then land it in the ocean and do something with the water. OK I'm getting confused here.
    You're saying something in flight has no weight? Interesting. I believe your solution to the puzzle told me all I need to know
    And yet...he's right. It has everything to do with weight and nothing to do with mass.
    A plane in flight is no more weightless than a plane sitting on the ground. Simply because the counter force to gravity comes from aerolift produced by the wings rather than a reaction force from the ground does not mean it is weightless.

    Go do some research on 'weightless' (perhaps google can help)

    Clearly he meant for the plane to "take off" into orbit, somehow. (Yes, yes. Even then, is it really weightless? Your results may vary by physics model.)

  • Anon (unregistered) in reply to Medezark
    Medezark:
    Does my answer count?:
    Fill the three gallon bottle while counting with a steady rhythm. Multiply the result by 4/3. Fill the five gallon bottle while counting to that number. Shut off the faucet.

    Sell the four gallons to the customer while everyone else is spilling water all over themselves. Take the leftover 3 gallons with you and go collect your prize for saving Good Mother Earth by not wasting any water. Live happily ever after.

    No, no, no -- A. Fill the three gallon bottle while counting, as above. B. Divide the result by 3 (giving you the "time" for 1 gallon). C. Pour the three gallon bottle into the 5 gallon bottle. D. Add water to the 5 gallon container for the time period indicated by B. E. Profit

    That way, you don't have to use any scary fractions. And you don't waste any water.

    All these "time how long it takes to fill x" assume you can add water at a constant rate via some kind of tap or spigot. That wasn't stated in the problem. You could have a large tub of water and you need to fill the containers from that. Also, wasn't this puzzle from Lethal Weapon, not Die Hard? I seem to vaguely remember Danny Glover and Mel Gibson doing this and they had to fill the containers from the basin of a fountain or a bomb was going to explode.

  • Marc B (unregistered)

    I have a 4 gallon jug at home, if you just told me ahead of time, I would have brought it to the interview.

  • Anon (unregistered) in reply to Wesha
    Wesha:
    > (you drive a small 2-person car, and you see a bus stop where 3 people gathered: a friend of yours, a woman with whom you instantly fall in love, and a dying person who needs medical attention to survive. Oh and it's raining. What do you do? There is a *right* answer, and either you know it or you lose) Here it is, smart boy: You tell the friend to drive the dying person to a hospital, while you stay at the bus stop with the hottie and start the sweet talk.

    It all depends, my dear, it all depends. Your "universal" answer does not consider the possibilities:

    1. The dying person might be Hitler...
    2. I might be gay...

    This^. The right answer absolutely depends on your objective. The "right" answer as the OP puts it suggests that your ultimate objective is to get in the girl's pants, which isn't the moral or ethical decision. The right answer would be to take the dying person to hospital yourself because a) Your friend was waiting for the bus anyway, if you hadn't come along, they'd still be wait, so no loss on their part and b) stop thinking with your dick.

  • (cs) in reply to agrif
    agrif:
    ...(a pint's a pound the world around, unless you lived in civilized nations where a pound is for dogs)

    Please take your metric snobbery elsewhere. Don't you people get it? Use of Imperial Units is a trade barrier-- sorta like the CE mark.

  • Lego (unregistered) in reply to jrh
    jrh:
    wcw:
    What's bizarre is that they expect to get a smart, capable kid who can type fast in Manhattan for $20 an hour. What that kind of money in NYC actually buys you is something else entirely, like maybe a hand job from a crack whore in Jersey.

    Actually a hand job in Jersey isn't something you'd buy in NYC.

    This sounds like interstate commerce. Careful or the federal government may take over your business.

  • Me (unregistered) in reply to Name
    Name:
    For those who wonder about the bottles:
    3 5 -- #1 and #2
    ---------------
    0 5 -- fill #2
    3 2 -- put 3 in #1
    0 2 -- empty #1
    2 0 -- empty #2 in #1
    2 5 -- fill #2
    3 4 -- fill #1 with #2

    Fill #1 & #2. Empty both over your head.

    Captcha: nobis - how appropriate.

  • (cs) in reply to Anon
    Anon:
    This^. The right answer absolutely depends on your objective. The "right" answer as the OP puts it suggests that your ultimate objective is to get in the girl's pants, which isn't the moral or ethical decision. The right answer would be to take the dying person to hospital yourself because a) Your friend was waiting for the bus anyway, if you hadn't come along, they'd still be wait, so no loss on their part and b) stop thinking with your dick.

    I'd take the dying person to the hospital myself - I can drive much faster than any of my friends.

Leave a comment on “All Over the Map, Odd Shaped Container, and The Ideal Pair Programmer”

Log In or post as a guest

Replying to comment #:

« Return to Article