- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
--Put water into both jugs, stopping when they're about 3/4 full.
--Add malted barley which you've prepared into wort, and yeast.
--Cap both container with a valve to let the CO2 off and wait a few days until the fermentation is done.
--Bottle contents with a little finishing sugar, cap, and wait a little more.
--Enjoy!
Admin
Bzzzzzt! Wrong! But thanks for playing. The exact question is "How would you get four gallons of water?". NOT "How would you end up with 4 gallons of water in one of the containers?". In ENGLISH (the language I'm speaking, and the language the problem is written in), "get 4 gallons" does not MEAN or even IMPLY that it has to end up in the 5-gallon jug. You may ASSUME that's what it means, but that's just an assumption. And based on the puerile cheapshot at the end of your post (which I suppose you think strengthens your argument), I'd say the first 3 letters certainly apply. And if you still disagree, please post the EXACT WORDS that indicate SPECIFICALLY that the water should end up in one of the jugs, WITHOUT requiring an assumption. I'm not gonna hold my breath...
Admin
I would imagine the weight of the fuel would cause the undercarriage suspension to compress a little so the height would also change ... I'd be rather worried if it didn't :o)
Admin
wow, not hired. Inability to have enough ass in his pants.
Admin
I did not know the water problem before, but I solved it in head on the spot. But it did not make me happy to came with so trivial solution, so I also elaborated couple of others, some of which was also in comments ... it all depends on the REASON to solve such restricted problem in unusual ways ... and on your creativity :)
About manipulating water without planet or celestial body - it is also not problem, if you can accelerate/decelerate/rotate your space vehicle :)
And the car problem have also nice ultimate solution to make happy all (provided you cannot mobile for help etc.) - let your friend drive your car, the dying person will came into luggage hold (well it is dying, so the transport is more important than comfort). You sit on the other seat in car, which left the only logical and possigle place for the hottie - to sit on your lap. Drive to hospital first, then to friends target, then you can take the hottie home alone :) Everybody get ride, everybody satisfied :)
(Well actually i had seen many project programed in this way - to carry 4 people in 2 seat car)
Admin
When I was a little kid, that was on a test the school gave me -- given 5 and 3 quart jars, obtain exactly two quarts of water. I had walked them through how, given a stick of a fixed length, and the noon sun, you could make markings at reasonable distances on one of the jars, and finally the tester gave up and told me about the idea of filling the 5 quart jar, filling the 3 quart jar from it, and having 2 quarts left.
I stared blankly for some period of time, then announced "You can get any number from one through eight."
I still don't know whether I got credit, but I'd guess I didn't.
Admin
Your answer is correct. You can have a beef against people who'd say your answer is incorrect but there's nothing wrong with the problem itself. Maybe you've just interacted with the wrong kind of problem-askers.
A good asker might go with "yes, that's correct. Now suppose the fishtank is too heavy to carry, and it's far from the spout. Could you find a way to put the 4 gallons in without taking as many trips back and forth?" He'd do that if he wants to give you another interesting problem (assuming you'r doing them for fun), or because (for some reason) he realizes he forgot to make the assumption explicit, so he fixes that now.
Admin
wow, fired. Inability to understand the difference between a correct answer and a good answer.
If you can't communicate with your customer then you are only 10% as useful as someone who can. Doesn't matter how well you can use dev-speak.
Admin
That would leave a gallon of water weighing 10 pounds, which is does not. A gallon of water weighs slightly over 8 pounds, part of which will be the weight of the container I used to hold the water while I weighed it. I was unable to set a tare weight due to the fact that I used a seaped gallon of purified water, and I didn't have another gallon jug handy. Also, this calculation was made approximately 745 feet above sea level, very near midnight local time, with a waning gibbous moon.
Admin
Admin
I go to Boeing, and offer to trade a barometer for the service manual.
Admin
I find these puzzles interesting, but as interview tools I think they're horrible, not because they're ridiculous or easy to look up, but because they ARE effectively trick questions if you don't already know the solution, which moreover depends on how well you already know the subject matter of the puzzle:
Water bottle puzzle:
"3 girls, 2 condoms and 1 guy" puzzle:
Box with 3 switches and 3 light bulbs inside:
Admin
WHARTON, lol!
Admin
If you think programmers need to add and subtract tiny integers in their heads to be able to program well, please stop interviewing them immediately.
I've been a programmer -- largely, but not only, as a hobbyist -- for over ten years and I'm rarely ever required to do it. And no, I'm not particularly good at it. I don't need to be good at it. Can you name even one programming problem where that skill is required or even particularly useful? The computer is perfectly capable of adding and subtracting numbers so I don't have to.
It's not just me, though. I know that some of the greatest mathematical minds in history were not particularly good at adding or subtracting small numbers without using a calculator (or at least pencil and paper). There is surprisingly little correlation between mental calculation and general mathematical or computational skill. Don't believe me? Try to get Rain Man to solve the water bottle puzzle.
Admin
Admin
Your being paid to be a typist. You'll be paid the same as a typist?
Admin
You jest, but....
In Basic, on a Prime machine (IIRC) circa 1981, this was actually possible. If you made a typo like "LET 5=4;" and then printed the value of the number 5, it would print 4.
Oh, the pain....
Admin
Admin
Admin
Demonstrating basic familiarity with the things you wrote on the resume is often the first goal of an interviewer. It doesn't take long and allows you to quickly eliminate a surprising number of people.
Admin
Admin
Heck, I came up with two different methods which require a basin.
-2x5 in the basin -2x3 out of the basin -Done!
Admin
Well, you can always just rotate. Inertia takes care of the rest.
Admin
I never understood why the water 'puzzle' is defined as a 'logic' problem, it's just to do the ONLY move that doesn't end in an initial state and it's completely linear. It's like solving a 3-move chess/go problem.
Correct me if I'm wrong: 5* 0; 2 3*; 2 0; 0 2; 5* 2; 4 3*; done
The 'pair programmer' doesn't look like a bad part-time position, really. Has TDWTF degraded into laughing at people who actually might know what they're doing but who don't necessarily have the exact words to describe them? And before you complain about the 'excellent English skills' part, that's just what's in every (non-British, since that's discrimination over there) application anyway.
Admin
No its not a good question the containers are described as bottles try putting a normal size coke bottle inside a 1.5L coke Bottle some time.
And if they where open topped cans it wouldnt realy be 4 Gallons as the 3 gal container would displace slightly more than 3 gals of water the container it's self would displace water.
Admin
at least the ad for pair programmer was honest! I've seen one too many cases where one person severely dominates while "pairing"...it gives the whole process a bad name.
Admin
I especially like the part where two gallons magically disappear out of bottle #1!
CAPTCHA: acsi - a crime scene investigator?
Admin
The Ideal Pair Programmer - OMG! WTF?!? Please - do yourself a huge favor - go to the http://broadstreetanalytics.com/team.html page and have a look at their 'team'. Read carefully, but try not to annoy those near you with subsequent chuckles, chortles, guffaws, and/or giggles. Highlights - the CEO lists his high school graduation; his big-time experience is in the MBS market - yes, that's "Mortgage Backed Securities" - where he was in charge of developing their mortgage credit model - OMG!!! The COO has apparently dropped out of the Ph.D. program at Wharton, but he's still shown on their website at http://opimweb.wharton.upenn.edu/people/faculty.cfm?id=74. Run screaming!; the "Senior Designer" has multiple degrees in Architecture - not Software Architecture, but the kind involved in putting up buildings - he's in charge of their wonderful website, so check this page http://broadstreetanalytics.com/technology.html and note that the white text bleeds off into the white background on the right - but hey, he's got multiple degrees so it must be great; and their Software Developer (Pair Programmer???) has an MS in Comp Sci to top off his BS in International Studies - WTF? ROFLMAO!
Admin
Although I've watched all the Die Hard movies, I do not remember the water riddle; however, because no requirement was given to put water in both bottles I'd just put four gallons into the five gallon bottle and be done with it. As an added bonus, just take a typical five gallon office bottle and pour it in, no measurement required.
Admin
Oops, I created my own WTF. Ok, pour five gallons from the office bottle into the four gallon container and let the rest spill out. Done!
Admin
Fill the 5g, fill 3g from 5g, point to the 5g and say "I have 2 gal, let me know when you need 2 more"
When the interviewer balks, tell him you are demonstrating an asynchronous function, caching and reducing processor load by eliminating needless steps.
Admin
None. I have no eggs or hens.
Two cars are driving towards each other at 60 mph, on the front bumper of one car is a fly who will fly back and forth between the cars until they crash together, the fly can fly 120 mph at all times, given the cars are two miles apart, how far will the fly fly before it meets its fate?
Fast as you can, name 3 animals whose names start with a double letter -- ex. Ccat.
How about a really hard one?
Given a specified desktop area, with a set of randomly placed windows, give an algorithm that would pick the window most like a target window in terms of size, location, and proportion. Solution should correct for any results that would appear non-intuitive to a human should they exist.
Bounds and limits: Windows max size is the desktop, and windows will always have some portion showing on the desktop.
Admin
First of all, to get all technical on your 'spec' -- I believe that there is only ONE molecule of water in any cohesive glob of water. At least I heard that somewhere.
Second, your spec also uses analog measure in the beginning, why not simply say "reach into the 5 gal container and extract the appropriate number of ATOMS that will be sufficient to produce 4 gallons of water at the given temperature and air pressure."?
Your solution 'violates the analogy' IMO. It would be like saying "We can unit test by peeling the top off our CPU and Memory at the right moment and peer in with an electron microscope to see if the results are as expected"
Sure, all this is possible, if you happen to be GOD.
I will give my answer again that I have already posted, because so far, I think its the best:
Fill 5g, dump 3g into 3g, point at the 2g remaining in the 5g and say to the interviewer "I now have 2g, let me know when you need the other 2g"
When he balks, tell him you are demonstrating an asynchronous function, caching, and also reducing processor workload compared to the typical solution.
Admin
Old post I realize but perhaps the senior developer is a code ninja but has CTS or something. They don't want to lose their rockstar so they are willing to pay $20/hr extra for a secretary.
Admin
Congratulations! You now have four metric gallons of water.
Admin
http://www.ufora.com/company/team/ ROFL