Slashdot Mirror


Tech-Interview Riddles

An anonymous submitter writes "A computer engineering student at UC Berkeley has made a comprehensive archive of riddles from technical interviews. Very challenging and loads of fun. Also useful for interview preparation."

251 of 747 comments (clear)

  1. "Microsoft was responsible" by siliconshock.com · · Score: 4, Funny

    I believe Microsoft was responsible for popularizing the usage of riddles in interviews

    Yes, but they still have not been able to find anyone who can solve the "why does windows crash" riddle!!

    1. Re:"Microsoft was responsible" by Anonvmous+Coward · · Score: 2
      Yes, but they still have not been able to find anyone who can solve the "why does windows crash" riddle!!
      Gravity!!!

      Heh. :)
    2. Re:"Microsoft was responsible" by Fat+Casper · · Score: 2
      they still have not been able to find anyone who can solve the "why does windows crash" riddle!!

      They found a lot of them. They just didn't hire any of them.

      --
      I spent a year in Iraq looking for WMD and all I found was this lousy sig.
  2. more info... by onby2000 · · Score: 5, Informative

    for more tech interview questions and answers try http://www.techinterview.org/

    1. Re:more info... by levik · · Score: 2

      [plug] I recently made a site for riddles/questions of this type, if anyone is interested. http://www.flooble.com/perplexus/ [/plug]

      --
      Ñ'
  3. Why do interviewers use "riddles"? by Turing+Machine · · Score: 5, Insightful

    What's up with using this type of question for interviews, anyway? Sure, they can be fun, but they're perfectly useless as far as telling whether someone can actually write solid code. 9 times out of 10, all they tell you is whether the interviewee has heard that one before.

    To interviewers: Do you really think that the answers to these questions don't spread through the entire department within 15 minutes after your first interview? I realize that "knowing the answer" makes you feel smarter than the prospective employee in some sense, but how about actually doing your job for a change?

    1. Re:Why do interviewers use "riddles"? by Brant · · Score: 3, Insightful

      You've got to use the right questions. As someone else has pointed out, there's a great web site called techinterview.org that has similar questions. They talk about something called the "aha factor". If something has a high aha factor, then you'll only get it if you've heard the question before. These aren't very useful as interview questions.

      If something has a low aha factor, then it's a useful question even if they've heard it before. The idea is to watch the interviewee's reasoning process, not to make sure they get the right answer. When I interview people, I ask these types of questions. I find it an invaluable probe of their ability to reason and think logically.

      One of my favourites is this:
      "How many trailing zeroes are there on 100! (100! = 100x99x98x97x...x3x2x1)."

      Try it. It's reasonably straightforward to get, but you have to show an understanding of factoring and multiplication to get it. The answer is on techinterview.org if you want to check yours.

      Scott

    2. Re:Why do interviewers use "riddles"? by Stinking+Pig · · Score: 3, Insightful

      Those points are true if you're hiring a contractor to come in, do a job, and get out. They are not true if you're hiring a flexible team player who is going to handle a demanding job which is guranteed to throw new challenges on a daily basis.

      If you're hiring the latter type of person, you want to know how they'll react to not knowing the answer in a high stress situation. I've done a lot of interviewing for sales engineering positions, and I can tell you some good ways to not get hired when this question comes up:
      a) lie, convincingly or otherwise
      b) go silent
      c) act like a teenager trying to ask for a date.

      The proper response for me at least is to say "I don't know, but based on these things I do know, this is what I think." I choose people for the way they think in addition to what they know, because that tells me something about what they'll be able to learn.

      That said, most interviewees never make it to a question like that because they get stumped on my initial tech question after "how are you and where did you work before":

      "Describe in as much detail as you are comfortable using exactly what happens from a network perspective when you use that laptop to visit a web site. I'm looking for which packets go where."

      If you tell me about ARP, DNS, and HTTP and you can name the port numbers and transport layers, that's fine. DHCP, load-balancing, firewalls, SSL, proxy servers, server-side processors, databases, that's all extra credit. If you can't talk about these things, you're not yet ready for a professional career in this industry.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    3. Re:Why do interviewers use "riddles"? by MayorQ · · Score: 2, Insightful

      True, while these questions do not answer "Can this candidate code well?" they can provide insight into how the candidate thinks. They are merely "thinking" questions and are only useful if the candidate thinks outloud. It lets you see how they think and how they attack a problem. Are they being logical? If they can logically put several thoughts together, they can code in most any language. Learning syntax is a given.

      - MayorQ

    4. Re:Why do interviewers use "riddles"? by Turing+Machine · · Score: 3, Insightful

      Would you guys feel comfortable going to a lawyer or doctor who'd been hired on the basis of his answer to a bunch of "brain teasers", or would you opt for the doctor or lawyer who'd, oh, I don't know, actually been asked questions about law and medicine?

      Asking about TCP/IP is fine. Asking about sorting algorithms is fine. Asking "how would you lay out a data structure to represent this problem?" is fine.

      Asking goofy questions about the shape of manhole covers is idiotic (especially since the "official" answer to that question is dead wrong).

    5. Re:Why do interviewers use "riddles"? by Dahan · · Score: 2
      Great. Too bad the answer they gave is wrong. Its actually 24.

      Heh, really... there's no way there are 100 factorial trailing 0s in 100 factorial :) And there aren't 100 trailing 0s either. You get a trailing 0 for each time you have a 2 times a 5. If you take the prime factorization of each number between 1 and 100, there are gonna be more 2s than 5s, so we'll just count the 5s. There are 20 multiples of 5 between 1 and 100. However, multiples of 25 contribute two 5s, so add in 4 more for the multiples of 25. Answer = 24.

      BTW, 100 factorial is:
      93326215443944152681699238856266700490715968264381 62146859296389521759999322991560894146397615651828 62536979208272237582511852109168640000000000000000 00000000

    6. Re:Why do interviewers use "riddles"? by MisterBlister · · Score: 4, Interesting
      If you tell me about ARP, DNS, and HTTP and you can name the port numbers and transport layers, that's fine. DHCP, load-balancing, firewalls, SSL, proxy servers, server-side processors, databases, that's all extra credit. If you can't talk about these things, you're not yet ready for a professional career in this industry.

      'this industry', meaning network admins who focus on web sites only, right? Not admins or programmers in general?

      Because I'd have an easy time talking about all of that stuff, but I know people as or more intelligent than I am that wouldn't simply because they haven't been exposed to any of that directly.

      It seems to me your question is flawed. You're asking too much about details that can be learned by any intelligent technical individual in a matter of days. Just because they don't know the answer when you ask it doesn't say shit about how good they might be at the job, especially if the job is something more than simple web admin.

    7. Re:Why do interviewers use "riddles"? by Turing+Machine · · Score: 4, Informative

      The "official" answer (which Microsoft was still using as recently as a couple of years ago, according to some friends of mine who interviewed there) is so the covers won't fall through the hole.

      This answer fails on at least two levels:

      1) There are plenty of manhole covers (or manhole-cover-like-objects) that aren't round. If you've been observant enough to notice this, you fail.

      2) There are plenty of other curves of constant width; an infinite number, in fact. The old Wankel rotary engine used such a shape. Though a circle is the only curve of constant *radius*, that's not the issue. If you know enough math to realize this, you fail.

      Another possible answer is that it makes it easier to roll a heavy cover out of the way. Again, one of the other curves of constant width would do just about as well.

      The REAL answer is that no one knows.

      Personally, I think Microsoft would be better off asking people why using fixed-sized buffers for user input is a bad idea, but hey.....

    8. Re:Why do interviewers use "riddles"? by Latent+IT · · Score: 2

      The... answer... they... gave... was... 24...

      So, I guess I don't see your point.

      From the site: So if I'm counting correctly, that'd be 10 + 10 + 1 + 3== 24 zeroes.

      So uh... yeah.

    9. Re:Why do interviewers use "riddles"? by Latent+IT · · Score: 4, Informative

      Well, crikey. But ask yourself this - if not round, well, what?

      Okay, so you're a guy, and you have to put a hole in the street, and put a cover on it. What shape do you make it? Triangular? Well, uh, why? It's pointy, and can fall through the hole. So you wouldn't do that. Square? Well, you really can't roll it, and TRUCKS have to drive over it, so it'll be heavy, so you'd *want* to roll it, rather than heft it.

      Hey, circles can roll.

      Oh, yeah. And that crap about a Wankel. Why would you want to fiddle around in traffic trying to get it to be oriented properly when a circle HAS a constant radius, as you point out? You can thump it down any old way. Fits!

      So, answer: Because it's just better than any other shape.

    10. Re:Why do interviewers use "riddles"? by cwikla · · Score: 4, Insightful

      The problem with "light bulb" questions is that people tend to like to come up with their own ones, which usually tend to be crappy, or ones, as earlier mentioned, that someone stumped them on, and now they think they are clever for knowing the answer. Even "technical" questions sometimes fall into this one.

      Some experiences in my past:

      A couple of years ago I was asked: How many gas stations are there in the US?

      My answer: I don't know, I'd probably check a search engine.

      After I insisted that I couldn't come up with an answer on my own, I was informed that they were looking for people who "think out of the box" and only people that hazarded a guess made it to level two interviews.

      I laughed, and explained that if someone I was interviewing made up some bullshit answer with absolutely no backing I'd be afraid that would carry over to their real work and it was a silly prerequisite. Knowing where and how to find an/the answer can be even more useful then making up an unfounded answer. Lots of smart people out there. Lots of stuff already been done.

      Hmmm, come to think of it I never did get a second interview.

      Or the time I was asked to come up with a string hash function. So I quickly threw together a loop just adding all the bytes, shifting some bits each iteration. Simple, not great, not perfect, but a decent 10 cent solution. I was then walked through the "correct" answer that covered, number of bits in byte being used, average word length, etc, etc...and told this was the "correct" answer. Researching later, I believe the solution was either in a Knuth book, or was another Microsoft tidbit. But I'm sure the interviewer would have come up with the solution independently given the same question in the interview...

      Finally, my FAVORITE is being asked some hard technical question. You ponder, you falter, and come up with some sort of a solution, but aren't quite satisfied it. Of course the interviewer then informs you it's a problem they are currently working on and they are trying to come up with something themselves. Seems like you should be paid contractor rates at least for that part, no?

      I find that having people talk about their work, explain what they did, and WHY they did it pretty much can measure a candidate against your bullshit meter in a matter of minutes.

    11. Re:Why do interviewers use "riddles"? by The+Cat · · Score: 2

      Those points are true if you're hiring a contractor to come in, do a job, and get out.

      That's all employees now.

    12. Re:Why do interviewers use "riddles"? by UncleFluffy · · Score: 3, Informative

      I only ask one "tech" question when interviewing prospective programmers:

      void echo(void)
      {
      char *s;
      gets(s);
      puts(s);
      }

      What is wrong with this code ?

      The scary thing is, over 50% of the people I ask can't answer it.

      --

      What would Lemmy do?

    13. Re:Why do interviewers use "riddles"? by JamieF · · Score: 2

      You make a good point about the "how do you learn things you don't already know" process that a person has. What I disagree with is the idea that skills aren't important, and that problem-solving ability is what matters since that will lead to the right solution. (Well, I guess it will, but only after you make all the same mistakes that have been made by your predecessors!)

      I suppose that my assumption is that someone with a certain amount of skill and knowledge of industry standard solutions to common problems got that knowledge somehow and so they must have a process for learning. But I like the idea of explicitly interviewing for that.

    14. Re:Why do interviewers use "riddles"? by sql*kitten · · Score: 2

      If you tell me about ARP, DNS, and HTTP and you can name the port numbers and transport layers, that's fine. DHCP, load-balancing, firewalls, SSL, proxy servers, server-side processors, databases, that's all extra credit. If you can't talk about these things, you're not yet ready for a professional career in this industry.

      These aren't useful questions, because port numbers and protocols are just something you can look up. I've used Unix for years, but I still grep /etc/services from time to time to look up a port number, and I look up stuff in the RFCs from time to time too. Your questions don't tell you anything about how the candidate would deal with a situation in which knowing the raw facts doesn't help, which is most troubleshooting situations.

    15. Re:Why do interviewers use "riddles"? by JamieF · · Score: 4, Insightful

      >You can focus on code centric questions, but will that person still
      >perform well if they move to writing specs, managing people, or
      >developing an advertizing plan?

      Good, experienced developers should be really good at writing specs since they know what level of detail is needed. In fact I think they stand a better chance of writing an implementable spec than an Analyst who has never coded.

      As for managing people or developing an advertising plan, those are totally different skill sets from development. Have you ever worked with a manager who totally sucked as a manager but was a really smart developer? I have, several times. It's painful, and it drives home the point that managing well takes skill.

      The idea that you can just dump a bunch of smart people onto any problem and outperform a bunch of experienced people who aren't quite as smart strikes me as terribly naive. Or, in Microsoft's case, conceited: it's pointless to learn from the past because we're all smarter than they were. So we'll get it right the first time and come up with a more clever solution on our own than if we just READ A DAMN BOOK. And so you get badly designed, bug-ridden software that solves problems that were already solved better 10 years beforehand. Oops.

      Perhaps if you're truly working on something novel it would clearly be better to have smart people than not smart people, but in that case it's not possible to hire for experience anyway so it's not germane to this discussion.

      You want good ads, hire someone who's good at doing ads. You want a good manager, hire a good manager. Or, train someone who is partway there. But don't just throw bright young people at any task and assume that they'll do better than an experienced person. I've worked in companies where that was the explicit philosophy and it's a disaster. After a few nightmare projects that smart manager might figure out some techniques that a less smart manager took a lifetime to develop, but that less smart manager wrote it all down in a book 30 years ago. Don't you wish the smart manager had read it BEFORE their first project as a manager?

      Show me a chess club that can beat Marines at paintball and maybe you'll change my mind.

    16. Re:Why do interviewers use "riddles"? by RedWizzard · · Score: 2

      Due to the incredibly poor design of the site a number of people have obviously taken "Solution: 100!" as the answer and not as a link to the answer (which it is).

    17. Re:Why do interviewers use "riddles"? by krugdm · · Score: 2

      Because it's that shape of the people that climb down the holes?

    18. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      port numbers and protocols are just something you can look up

      In other words, either "I'm too stupid to remember stuff I've looked up fifty times" or "I'm so inexperienced that I haven't looked those up very much." If you don't KNOW that SMTP is 25 and HTTP is 80, I don't want you working on my mail or web servers.

    19. Re:Why do interviewers use "riddles"? by jeremyp · · Score: 2

      If I was interviewing a programmer, I would not expect them to carry the man page for gets(3) in their head. If you give them the man page, it gives away most of the answer. OTOH if they already know the semantics of gets(3), it probably means they have used it before in which case I would seriously consider showing them the door.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    20. Re:Why do interviewers use "riddles"? by kaisyain · · Score: 2

      So you're a guy and you have to put a hole in the street and put a cover on it. You realize if you make it a big fucking square then the union needs to assign another guy to job to help you with the damn thing and your buddy gets on the $20/hour city job gravy train.

    21. Re:Why do interviewers use "riddles"? by jeremyp · · Score: 2

      The indentation style is the one advocated by Steve McConnell in Code Complete.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    22. Re:Why do interviewers use "riddles"? by jeremyp · · Score: 3, Informative

      In 1998 I was interviewed by the Technical Director of a small company in the UK. Their standard tech question was "write a function to rotate a monochrome bitmap". The idea was not to come up with necessarily the correct answer (as if there was *one* correct answer), but to see how you tackled the problem. The only problem with that particular question is that there was a danger that some otherwise perfectly adequate programmers would freeze like a rabbit caught in headlights.

      OTOH I've never seen a company with a higher concentration of good programming skills.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    23. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      Why bother to remember them?
      It's not a bother. I've telnetted to mail servers maybe ten times in my short career. The first 4-5 times I had to look up the port number. The last few times I've done so I haven't.

      Save your memory for more important things.
      You can't save your memory. The brain remembers what it experiences frequently. I don't necessarily recommend that you review lists of port numbers thousands of times so that you can memorize them, but if you look up particular ports frequently, you WILL remember them.

      I stand by my statements; if you haven't looked up the SMTP and HTTP ports frequently enough to remember them, you haven't worked with them enough for me to hire you to work on such servers.

      you're elitest./I
      It's "elitist." And yes I am. It's not a bad thing; merely recognition that some people are better prepared for some tasks than other people are.

    24. Re:Why do interviewers use "riddles"? by rsmah · · Score: 2, Insightful

      A couple of years ago I was asked: How many gas stations are there in the US? My answer: I don't know, I'd probably check a search engine. This is why this is a good interview question. It provides insight into whether the prospective candidate is willing to think about answers to questions with very little available or non-obvious information. I wouldn't hire you because you refuse to THINK. To "correct" answer is to use information that you know (i.e. population of the US) to come up with a "common sense" answer. For example: 200mil people in the US => about 100 mil cars @ $1 gas/car/day => $100 mil in sales/day => $30 bil sales/yr @ $1mil/station => 30,000 stations. Sanity check... that's 1 station for every 200,000/30 => 7,000 people...perhaps a bit too low. Fudge up to maybe 60,000 stations. This is probably correct to an order of magnitude. But that doesn't even really matter. The *point* of these questions is to guage whether or not the person can *think* or not. End of story.

    25. Re:Why do interviewers use "riddles"? by SerpentMage · · Score: 3, Informative

      Actually you do not need the man pages. Correct me if I am wrong here... BUT...

      char *s; get(s); put(s);

      Well s is not initialized and pointing at anything. Hence even if get allocated a buffer that value will not be carried back since it is a single pointer. For that to work you would need write get( &s) and then that would work.

      Yes?

      --

      "You can't make a race horse of a pig"
      "No," said Samuel, "but you can make very fast pig"
    26. Re:Why do interviewers use "riddles"? by daoine · · Score: 4, Interesting
      My answer:I don't know, I'd probably check a search engine.

      Funny, I had a similar interview for a question at a consulting company. It was basically another 'estimation' type question.

      My first answer was that I'd check google. They didn't like that at all, saying that they needed to be able to come up with these stats quickly, and that an employee shouldn't have to rely on anything. I said that part of solving a problem is knowing when to NOT reinvent the wheel and using information that's readily available.

      Didn't get a second interview either. Not even a phone call saying thanks for interviewing.

      Personally, I love interview puzzles and riddles. But I HATE people who refuse to accept an answer different from the one they have written down. That's not the point. An interview puzzle's supposed to give you an idea of how a person solves problems...not how quickly they solve it the "right" (*snicker*) way.

    27. Re:Why do interviewers use "riddles"? by sql*kitten · · Score: 3, Insightful

      In other words, either "I'm too stupid to remember stuff I've looked up fifty times" or "I'm so inexperienced that I haven't looked those up very much." If you don't KNOW that SMTP is 25 and HTTP is 80, I don't want you working on my mail or web servers.

      Without looking it up, tell me the ports for all the kerberos daemons. Or x400.

      You forget - or perhaps are too inexperienced yourself to realize - that there is a lot more to the IT industry than the web or even the internet. Someone could be a highly skilled Unix administrator, and have never run a web server in a production setting. For example, how many public web servers are there running on Dynix? Not many I'd wager, but that particular Unix is common in transaction processing. Have you even heard of Dynix? Memorizing lists of ports is the hallmark of a wannabe.

    28. Re:Why do interviewers use "riddles"? by pongo000 · · Score: 4, Interesting

      Those points are true if you're hiring a contractor to come in, do a job, and get out. They are not true if you're hiring a flexible team player who is going to handle a demanding job which is guranteed to throw new challenges on a daily basis.

      Please. Do you really think some silly-ass riddles will separate the wheat from the chaff? In a previous life, I was an air traffic controller (9 years). I was thrown new challenges several times an hour. I don't recall riddles being asked on my interview.

      I can tell you, however, that the three months of indoctrination in Oklahoma City was a head game unto itself. The point being it took three months to sort the psychologically strong from the weak. I seriously doubt a few puzzles on an hour-long interview is going to tell you much of anything.

    29. Re:Why do interviewers use "riddles"? by ChaosDiscordSimple · · Score: 3, Informative

      A couple of years ago I was asked: How many gas stations are there in the US?

      My answer: I don't know, I'd probably check a search engine.

      After I insisted that I couldn't come up with an answer on my own, I was informed that they were looking for people who "think out of the box" and only people that hazarded a guess made it to level two interviews.

      It sounds like the interviewer remembered a typical "impossible" question, but forgot why you ask it. The purpose isn't to think out of the box, the purpose is to examine problem solving skills with a problem the applicant has never seen before. Sure, you don't know anything about gas station density in the US, but you'll eventually be required to answer a question you don't really know anything about. "We've been asked to implement a simple web browser that will run on an embedded system that doesn't exist yet. Give me an estimate for how long it will take." It sucks, but you're going to need to do it.

      Because most engineers are loathe to pull estimates out of thin air, it's only fair to explain that you're only looking for a very rough estimate. If the engineer continues to resist, explain that you know he doesn't have good input to work with.

      That said, your answer, "check a search engine" isn't that bad of a place to start. (That's what reference materials are for!). When you're told that it's a good place to start, but that it's not an option, start making up numbers and guessing. Make it clear when you're guessing at numbers. "Well, there are about 300 million people in the US, about half don't have cards, so 150 million cars. You typically get gas once per week. A gas station can serve 100 people per day. That's 700 people per week, or about 1,000 for ease of doing the calculation. So you'll need about 150,000 gas stations." I promise that I pulled that answer out of the air. I have no idea how many people are in the US, let alone any of the other numbers, but I'm pretty sure that I'm within an order of magnitude. In fact, quickly searching the web it looks like I'm very close.

      Similar logic can get you surprisingly accurate numbers for the volume of water that flows out of the Mississippi each minute, the number of malls, police stations, high schools in the US, or other seemingly hard to know things. Just take what you do know and make educated guesses.

      The string hash function was just stupid, although it might have helped to ask the interviewer what properties he wanted out of the hash. In general, bouncing questions about the problem off the interviewer looks good and can often make the solution easy. The question does sound like an esoteric knowledge question, and those are the worst.

      Being asked to solve a tricky technical question? Well, it's a legit, real problem. It's a fair way to gauge your problem solving ability (did you stumble across the same things they did? Good. Did you suggest something new? Great.). I wouldn't worry about their "stealing" your answer. If the problem really is hard, it's unlikely in the ten or twenty minute interview question that you'll find a superior answer to them.

    30. Re:Why do interviewers use "riddles"? by UncleFluffy · · Score: 2

      It's possible to spot the mistake without knowing the semantics of gets()- knowing the rules of the base language is enough.

      Hmm, I see you work for Sendmail ... ;-)

      --

      What would Lemmy do?

    31. Re:Why do interviewers use "riddles"? by cwikla · · Score: 2, Insightful

      I take the exact opposite view. With no information available I see it as Garbage in, Garbage out. If you were working for me, I'd rather you admitted ignorance (not stupidity) to the problem at hand, and the answer, "I don't know, let me go research it", is a much more "correct" answer to me.

      Too bad you wouldn't hire me... It would be fun just making stuff up all day!

    32. Re:Why do interviewers use "riddles"? by t · · Score: 2
      It depends on how it is phrased. I would ask one of two questions

      1) Estimate how many gas stations there are in the US.
      2) How many gas stations are there in the US?

      Note the importance of wording. Your answer is clearly wrong for question (2). For question (1) I would expect your type of answer but for question (2) I would expect an answer such as, going to the proper government agency that gives licenses to sell gas and ask them how many active licenses there are. That would be as exact an answer you could get.

      t.

    33. Re:Why do interviewers use "riddles"? by Fulcrum+of+Evil · · Score: 2

      Being asked to solve a tricky technical question? Well, it's a legit, real problem. It's a fair way to gauge your problem solving ability (did you stumble across the same things they did? Good. Did you suggest something new? Great.). I wouldn't worry about their "stealing" your answer. If the problem really is hard, it's unlikely in the ten or twenty minute interview question that you'll find a superior answer to them.

      Well, I have heard of a number of times where companies go on an interview, get the tough problem and solve it, only to find out later that all they really wanted was the answer to the problem.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    34. Re:Why do interviewers use "riddles"? by t · · Score: 2
      The question is silly. First of all, if there was no hole there would be no need for a cover. Thus the hole must have come first. How do you make a hole like that? Usually with a large drill. Drills make circular holes. Pipes to put into the holes are also circular because they don't crush very easily, e.g., a square shape would need a triangle support member to make it incompressible. Thus when faced with a hole in the ground that is circular, you put a circular cover on it. The remaining qualites such as not being able to fall into the hole are free extras.

      t.

    35. Re:Why do interviewers use "riddles"? by richieb · · Score: 2
      Just like the question: "How many turns are there on all the roads in the US?" Answer: "Two, left and right".....

      --
      ...richie - It is a good day to code.
    36. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      Without looking it up, tell me the ports for all the kerberos daemons. Or x400.

      I can't tell you any of them. (I didn't even know that X.400 had well-defined TCP/IP ports.)

      My stance is that my ignorance suggests either stupidity (I've looked 'em up a thousand times but I'm too dumb to remember) or inexperience (um...isn't Kerberos the dog who guards Hades? What does that have to do with computers?)

      If you disagree with my stance, then you believe that my ignorance of Kerberos and X.400 ports tells you ZERO about my ability or experience with these products.

      there is a lot more to the IT industry than the web or even the internet
      True. I picked a couple of examples. That's all they were. I stand by my statement - I would never hire someone to admin a mail server who didn't know the SMTP port; I would never hire someone to admin a web server who didn't know the HTTP port.

      Memorizing lists of ports is the hallmark of a wannabe.
      Absolute agreement. Knowledge is not a predictor of success and doesn't necessarily suggest experience (did I mention that I passed several McTests for Windows NT without ever having even seen it?). That was not my point. My point was that ignorance is a predictor of failure.

      Tell me why you disagree.

    37. Re:Why do interviewers use "riddles"? by (outer-limits) · · Score: 2

      Sounds like you are rejecting all the best salesmen to me. Thats how they all act.

      --

      Microsoft - Where would you like to go today, Maybe Jail?

    38. Re:Why do interviewers use "riddles"? by SerpentMage · · Score: 2

      Lets go through the source again

      char *s;
      get(s);
      put(s);

      In the case as shown if get copies data to s then it will crash, because s is not initialized and points to nothing legit.

      If however get has an internal buffer that it allocates (like some routines do) then that is not the correct syntax because s is not a pointer to a pointer. For that to work then you would have to use the notation get( &s).

      But in either case the program is wrong and you do not need to know about the implementation of get at all and you do not need to care how get works.

      --

      "You can't make a race horse of a pig"
      "No," said Samuel, "but you can make very fast pig"
    39. Re:Why do interviewers use "riddles"? by h4x0r-3l337 · · Score: 2

      Sorry, but you're the one who is wrong. An equilateral triangle with sides of length A will have a height (from one of the tips to the opposing side) of sqrt(3/4)A, which is about .87*A. Therefore you can easily slide the cover through the hole by holding it so one of the sides is vertical and then lowering it near the edge of the hole.
      Obviously you can get around this problem by making the cover about 13% bigger than the hole, but you wouldn't need to do this (as much) for a circle.

    40. Re:Why do interviewers use "riddles"? by dillon_rinker · · Score: 2

      Silly coward...you've been speaking English for how many years and you've never heard of the subjunctive? I'm in no position to hire anyone.

    41. Re:Why do interviewers use "riddles"? by skotte · · Score: 2

      this seems awfully complicated. and you're right. it's WAY too low. try tripling that number.

      actually, i would look at this way:

      we know and can assume most major intersections have 2 gas stations. (some have 4, some have none, and some stations arent even at any corner. but we are talking averages. so we will allow 2 per major intersection.) so we simply have to fFind the number of major intersections and double that. the trick becomes simply defining what is a major intersection. just do the hard part, and conduct bit of a quick land survey (it's probably easier than you might think it would be). pull out a map, and count the number of small towns in a given area, say in a 10 county area, multiply that by the number of counties in the state (most average states have around 100 counties) use sample counties which should include at least one sizable twon, and several outlying towns. dont worry too much about vacuous counties like in the midwest. just redo a new sample area. you'll probably fFind larger states like nevada also have larger counties, which give them just as much stuff in each county.

      i'm not sure what the answer would be honestly. i'll work it up. but you see where i'm going.

      and as you say, the point is not getting a right answer: it's getting ANY answer.

  4. These are pretty easy by SlugLord · · Score: 3, Interesting

    I sampled a few of the "relatively hard" puzzles... They're interesting, but they only take a minute to figure out. Am I correct in thinking that these are relatively easy, or am I being an ass and flaunting my ability to solve little puzzles?

    (In case of the latter, do you want to hire me? I live in Cleveland and go to Cornell University...)

    1. Re:These are pretty easy by RadioheadKid · · Score: 5, Funny

      My first thought was, where are the answers. My second thought was, thank god I have a job.

      --
      "Karma can only be portioned out by the cosmos." -Homer Simpson
    2. Re:These are pretty easy by stuffman64 · · Score: 2

      cake slice:

      one cut on x axis (in half)
      one cut on y axis (in half again)
      one cut on z axis (instead of cutting down into the cake, cut horizontally through it)

      remember, you need to double the number of slices with each cut (2^3=8). Try to think of cutting it on all sides, not just the top

      --
      --- At my sig, unleash hell.
    3. Re:These are pretty easy by WilliamWu · · Score: 2, Informative

      hi! thanks for checking out the site. i decided to not post answers because i figured it would take the joy out of doing these riddles; part of that joy is banging on blackboards and repeating to yourself that things are impossible and pulling your hair out. this torture then makes the solution all the more joyful :) if i made the solutions available, i think most people would be tempted to click on the answers after just a few minutes of thought at most, and that would kinda ruin the learning experience.

      --
      William Wu http://www.ocf.berkeley.edu/~wwu
    4. Re:These are pretty easy by krugdm · · Score: 2
      Try to think of cutting it on all sides, not just the top

      Actually, you can do this with three cuts through the top. Make the first two cuts above, then make a circular cut through the top to give you eight pieces.

      This way, everyone gets frosting!

    5. Re:These are pretty easy by ConsumedByTV · · Score: 2

      I have a few questions for you:

      Do you have access to your server logs for your area of the server?
      If so can you post some stats?
      What kind of bandwidth are you using up?

      Thanks for the neat questions :)

      --


      "Not my manner of thinking but the manner of thinking of others has been the source of my unhappiness." - M
  5. One of my favorites by Reality+Master+101 · · Score: 5, Interesting

    I used to put this one on my programming tests. It's actually shocking how many people get it wrong...

    You are writing a parser that reads a C program and translates all the variable names into new names of the form "VAR######", where ###### is an integer incremented for each unique variable name. Discuss what is needed for the case where the C program already contains a variable of the form "VAR######".

    --
    Sometimes it's best to just let stupid people be stupid.
    1. Re:One of my favorites by Horizon_99 · · Score: 2, Insightful

      Doesn't matter, the variable will be renamed along with the others.

      Now I get a gold star right? ;)

    2. Re:One of my favorites by gmack · · Score: 3, Insightful

      Is the answer .. nothing?

      You shouldn't have to special case that since it's just another variable name.

    3. Re:One of my favorites by Reality+Master+101 · · Score: 4, Interesting

      You the man! Here is your honorary degree.

      Now, for this honorary Ph.D., answer this question (another one of my favorites):

      You have a 32 bit unsigned integer. You want it to be really reliable, so you store it three times (triple redundancy). Write a subroutine that takes three unsigned, 32 bit integer arguments, and returns a single unsigned 32 bit integer that is constructed by having the bit in each bit-position "vote" for the corresponding output bit (e.g. if at least two of the low-order bits in the passed in arguments are 1, then the low-order bit in the output is a 1).

      Hint: There's an easy, fast way, and there's a hard, slow way. I'm looking for the easy, fast way.

      I actually got this question on an interview once (and of course figured out the right answer :) ).

      --
      Sometimes it's best to just let stupid people be stupid.
    4. Re:One of my favorites by Reality+Master+101 · · Score: 2

      Close, but I have to mark you down for assuming that "unsigned" is 32 bits... it's only guaranteed to be at least 16 bits. :)

      Of course, I also prefer the more l33t version...

      return ((a & b) | (b & c) | (a & c));

      --
      Sometimes it's best to just let stupid people be stupid.
    5. Re:One of my favorites by flonker · · Score: 2

      That seems simple enough.

      (A & B) | (B & C) | (A & C)

      If any two agree that the bit is 1, then it gets ORed in.

    6. Re:One of my favorites by gmack · · Score: 2

      Damn this is so much more fun than the "lets do this the stupid way so when we show you the next function you will see how much it's needed" classes I had. I mught have bothered to continue :P Ohh well I was broke anyways.

      I see someone else got the second riddle)and that is pretty close to what I was thinking of)

    7. Re:One of my favorites by djohnsto · · Score: 2

      If the inputs are A, B, and C, then is:

      (A&B)|(B&C)|(A&C)

      the easy way or the hard way? It's only 5 instructions (well 9 if you count loading and storing to memory).

      --
      Dan
    8. Re:One of my favorites by Reality+Master+101 · · Score: 2

      It's simple enough for people who understand bits, but there are a LOT of people out there who don't understand bits and logical operators. Most people write a loop that does it one bit at a time.

      What I like about this question is that it tests whether someone understands bits without being a big "gotcha" question.

      OK, here's another one that I used to test someone's ability to think mathematically:

      Write a subroutine that given month, day and year, returns the day of the week.

      --
      Sometimes it's best to just let stupid people be stupid.
    9. Re:One of my favorites by flonker · · Score: 2

      It's simple enough for people who understand bits, but there are a LOT of people out there who don't understand bits and logical operators. Most people write a loop that does it one bit at a time.

      True enough. The subroutine thing requires too much actual work for me to try my hand at right now. I'd end up looking up the month in an array, getting the number of days passed so far this year, adding 1 if leap year and (month>2), then add year and some constant, and mod by 7.

      Here's a fun one. Without using any temporary variables, how would you exchange the values of two variables?

      Hint: There are at least two ways to do it in three basic instructions.

    10. Re:One of my favorites by Reality+Master+101 · · Score: 2

      That's an old ASM trick:

      A ^= (B ^ A)
      B ^= A;
      A ^= B;

      The second solution is to use addition/subtraction (which I leave as an exercise to the other readers. :) )

      --
      Sometimes it's best to just let stupid people be stupid.
    11. Re:One of my favorites by IpalindromeI · · Score: 2, Funny

      Can't you just xor all three numbers?

      return (a^b^c);

      --

      --
      Promoting critical thinking since 1994.
    12. Re:One of my favorites by Gulthek · · Score: 2

      Because he's assuming that the parser program works like this:

      Say the program has a few variables, and that those variables are used multiple times within the program:

      integer1
      integer47
      var00002
      integer29

      As this process moves through the program, outputing a program with differed variable names, integer1 and all occurances of it become var00001, integer47 and all occurances of it become var00002. Hence, when the parser then reaches the variable that was initially var00002 it will conclude that var00002 is another one of the renamed integer47's. The parser can't simply increment and rename the variables if they occur multiple times. To do so would create a program containing entirely unique variable names, which could be a potential Bad Thing.

    13. Re:One of my favorites by dietz · · Score: 2

      But that is, of course, a rather awkward way to write the program. You end up having to go through the entire program n times, where n is the number of different variables.

      Easier is to keep a hashtable of variable names. The first time you encounter 'integer29', you assign it to be, for example, 'var00005' and store that in a hashtable. The second time you encounter it, you check your hashtable and see that it's already been assigned as 'var00005' and replace it as such.

      Now when you run into existing variable 'var00023' for the first time, you check your hashtable and see that you don't already have an old variable named 'var00023', so you assign it a new name: 'var00046', for example. From now on, all 'var00023' become 'var00046'.

      This way, you rename all the variables in the entire program in one single pass.

    14. Re:One of my favorites by Anonymous+DWord · · Score: 2

      How 'bout in Perl:
      ($var1, $var2) = ($var2, $var1);

      C is for suckas who like to type. :-P

      --
      "If he thinks he can hide and run from the United States and our allies, he's sorely mistaken." Bush on bin Laden
    15. Re:One of my favorites by flonker · · Score: 2

      I think you misremembered that. It's actually, A ^= B B ^= A A ^= B For example, A = 1100 B = 1010 And to prove it: A^B= 0110 =1100^1010 B^A= 1100 =1010^0110 A^B= 1010 =0110^1100

    16. Re:One of my favorites by flonker · · Score: 2

      Oops, forgot to post as "Plain Old Text"

      I think you misremembered that. It's actually,
      A ^= B
      B ^= A
      A ^= B

      For example,
      A = 1100
      B = 1010

      And to prove it:
      A^B= 0110 =1100^1010
      B^A= 1100 =1010^0110
      A^B= 1010 =0110^1100

      The other solution is:
      A=A+B
      B=B-A
      A=A-B

    17. Re:One of my favorites by Henry+V+.009 · · Score: 5, Funny

      How is the view from the Ivory Tower?

      Here is what actually happens:

      I have 25 minutes to write out the parser. It's 11:35am September 30th, and our guys in marketing promised that C-Checker 5500 would be out in September. If its not finished on time, management will start complaining that we need to double the number of programmers or something crazy like that.
      The hard part of the problem is variable identifiction. Have to look up the standard keywords again and type them in, and make allowance for a couple of other things.
      After finishing that part I've got 10 minutes left.
      Now I zip through with a little routine that takes the first varible it comes across and replaces it and all future occurences of it with VAR#1, and so on.
      So I run my program on the main development project to test it out.
      I press compile on the modified program. Cherchunketa, cherchunketa --- boom! Compilier error messages out the wazoo.
      Who the hell named his loop counter VAR#37534? Goddamn that bastard! Who the hell does something that crazy?
      Now I have 3 minutes to implement the fix. Do I write in the simple check algorithm that all the CS students you managed to trick came up with?
      Hardly, I rename the thing to VARXY750#XXXXXX, and wait for a bug report.

      As for the triple redundancy problem. Before you start going into your ANDs and ORs and wherefores, there are a few things to keep in mind. First off, if its really important, you need some non-local copies. What if there is a hard-drive crash? Or a nuclear war? The internet will still be around even if the main office is a glassed over glowing area in the North Western U.S. If it's important enough for triple redundancy, it's important to survive any forseeable catastrophe isn't it? So now you have to encrypt the numbers coming and going, and sign it, to keep the hackers from fooling you.

      And so what is the easiest way to implement all this? Simple--there is no simple way. It'll take a lot of work. So you might as well throw your computer out of the window and tattoo the number to the back of your hand.

    18. Re:One of my favorites by obsidian+head · · Score: 3, Interesting

      Optimize the common case, which usually is if the numbers are identical:

      ; XOR the ints, and OR the result
      (or (xor int1 int2) (xor int1 int3))

      If the result of this expression is 0, just return int1.

      Profiling of course is needed.

    19. Re:One of my favorites by The+Cat · · Score: 5, Insightful

      I've caught some really bright people with it.

      So, what's the point again? Proving people aren't as bright as they think? Making people sit there and squirm because they really need a job, are nervous anyway, and have some "three cups and a white marble" puzzle standing between them and feeding their kids?

      I don't get it. My first question would be "why don't we just hire the bright people and get back to work?"

    20. Re:One of my favorites by po8 · · Score: 3, Informative

      You're neither one as 1334 as you think.
      Here's 4 operations:
      return (a ^ b) & c | a & b;
      (Extra parens are for wimps.)

      Show that it can be done in 3 C ops, or
      prove it impossible.

    21. Re:One of my favorites by plumby · · Score: 2

      Great if the variables are numeric. Works less well with strings.

    22. Re:One of my favorites by krugdm · · Score: 2

      Use this...

    23. Re:One of my favorites by spotter · · Score: 2

      3 integer variables a, b, c

      (a & b) | (b & c) | (c & a)

      so the "and's" are any 2 of the variables, if the bit is true, it will be one, and the "or's" will accumulate the multiple "votes"

      anyways, thats just what I thought of off the cuff, perhaps thats the slow way you mentioned.

    24. Re:One of my favorites by Fjord · · Score: 2

      Hmmm, I got a completely different answer:
      d=a^b;
      return d&a|~d

      d holds where a and b agree, and thus outvote c. ~d is logically where c must be partaking in a winning vote (although it could be winning in some d bits as well).

      --
      -no broken link
    25. Re:One of my favorites by jeremyp · · Score: 2


      (1 xor 1) xor 0 = 0 xor 0 = 0

      Not what you wanted.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    26. Re:One of my favorites by Kris+Warkentin · · Score: 2

      My first cut was (( A | B ) & C ) | (( C | B ) & A ) but I'm sure it can be simplified yet.

      --

      In Soviet Russia, hot grits put YOU down THEIR pants.
    27. Re:One of my favorites by Reality+Master+101 · · Score: 2

      Oops... you're right. I knew I shouldn't have posted just before I went to bed. :)

      --
      Sometimes it's best to just let stupid people be stupid.
    28. Re:One of my favorites by Reality+Master+101 · · Score: 2

      Actually, that question I always put on the end of the test as a "bonus question that doesn't count" just to see how they're doing under pressure. :)

      My first question would be "why don't we just hire the bright people and get back to work?"

      Have you ever actually hired anyone before? When you put a job ad in the paper (depending on the job market, of course) you get about 100 resumes. Of that, you have to pair it down to 5-10 applicants to call in. Generally speaking, the people who are the best bullshitters are the worst employees, so you need to have SOME sort of system to filter those out. Just having a conversation is the worst way to do it -- you introduce your own biases into the interview process, and hire based on whether you like them or not.

      If only it was as easy as "hire the bright people". That's what the test is supposed to figure out. Who is bright and who isn't. The trick of course is giving good questions that don't require you know the "gotcha" to get right.

      --
      Sometimes it's best to just let stupid people be stupid.
    29. Re:One of my favorites by flonker · · Score: 2

      heh. You're right, of course. oops.

    30. Re:One of my favorites by Virtex · · Score: 2

      If you're making a pass through a program and see a variable, then you have to replace it, period. The only variables that have been converted have already been passed by your parser. So you would want to convert every variable you come to. Deciding what to convert it to is accomplished by a table.

      To answer the original question, if you come across a variable VAR######, you would convert it just like any other variable. As an example, suppose I have a program with these 3 variables:

      loop
      sum
      VAR000001

      They could be converted like this:

      loop --> VAR000001
      sum --> VAR000002
      VAR000001 --> VAR000003

      Get it?

      --
      For every post, there is an equal and opposite re-post.
    31. Re:One of my favorites by Tablizer · · Score: 2

      Making people sit there and squirm because they really need a job, are nervous anyway, and have some "three cups and a white marble" puzzle standing between them and feeding their kids?

      Yip, life sucks.

      Anyhow, I wonder what would happen if an organization hired only people with top grades and/or scored well on such puzzles?

      The closest I know are some government agencies that are characterized as being full of rude insular aholes.

      (Jeez, I'm qalified.)

    32. Re:One of my favorites by The+Cat · · Score: 2

      Have you ever actually hired anyone before?

      Yes I have, as a matter of fact. It took me all of 10 minutes to determine whether someone was qualified, and they were working in 11. I don't have time for all the esoteric middle management seminar strategies.

      If they don't know all the details, they can learn. Just hiring good *people* solves all the other problems, and saves a ton of time in the process.

      your own biases into the interview process, and hire based on whether you like them or not.

      This is exactly what most companies do, and it is exactly why they a) can't produce anything of value and b) go out of business. The empire-building middle managers don't have the foggiest idea how to build or lead a team, and they most certainly aren't going to listen to anyone's advice, because they are *so* much smarter than everyone else.

      If only it was as easy as "hire the bright people".

      It is that easy. The reason the workplace is so screwed up is because companies make things far more complicated than they need to be. Hire the right person and MOVE ON. It doesn't have to become a major six-week CYA production.

    33. Re:One of my favorites by Reality+Master+101 · · Score: 2

      It took me all of 10 minutes to determine whether someone was qualified [...] Just hiring good *people* solves all the other problems, and saves a ton of time in the process.

      Well, I congratulate you on your psychic abilities to figure out someone's intelligence in 10 minutes.

      This is just absurd. If you actually hired someone very valuable off the street this way, then you either 1) got lucky, 2) trusted the resume (and got lucky), or 3) have pretty low standards.

      Why do you think I administer a test of someone's thinking ability, rather than just quiz them on their "qualifications" for 10 minutes and then roll the dice? The whole point of the testing process is to see if someone is capable of solving problems, not just quoting qualifications at me. If someone can think, then chances are they can learn to do the job.

      and they most certainly aren't going to listen to anyone's advice, because they are *so* much smarter than everyone else.

      Sorry, but if you're flippantly judging people in 10 minutes, you're not impressing me with your intelligent hiring process. Maybe your managers really are smarter than you, and you just have an attitude problem.

      --
      Sometimes it's best to just let stupid people be stupid.
    34. Re:One of my favorites by The+Cat · · Score: 2

      Well, I congratulate you on your psychic abilities to figure out someone's intelligence in 10 minutes.

      It doesn't take psychic abilities. After 10 minutes, I can tell if someone has the motivation and ability to do a job. Anything more than that, and the interviewer is luxuriating in their self-important "more-senior-than-thou" role. Those kinds of interviews are not tolerated in my company.

      This is just absurd. If you actually hired someone very valuable off the street this way, then you either 1) got lucky, 2) trusted the resume (and got lucky), or 3) have pretty low standards.

      Yeah. That must be it. I've got low standards. It's got to be *something* other than "I think this person can do the job."

      Why do you think I administer a test of someone's thinking ability, rather than just quiz them on their "qualifications" for 10 minutes and then roll the dice?

      I have no idea. It's a roll of the dice anyway.

      I like putting qualifications in quotes. So every candidate is lying and really isn't qualified, right? They're all slick con-artists who don't know anything. The degree and the years of experience? All skate-through half-baked lies, right?

      Hey, I already knew this is what is going through an interviewers mind. Every candidate starts from their own 10 yard line. Of course, this is also why companies can fire thousands at the slightest whim.

      W-4 employment is pointless.

      No wonder we have the highest unemployment in over 10 years.

      Sorry, but if you're flippantly judging people in 10 minutes, you're not impressing me with your intelligent hiring process.

      Yes, it's got to be flippant. That must be it.

      Maybe your managers really are smarter than you, and you just have an attitude problem.

      I don't have a manager, but if I did, I'm sure they would think I have an attitude problem, mainly because I probably wouldn't agree with them 100% of the time. No, I know I wouldn't agree with them 100% of the time.

      Modern business has no tolerance for any contrary views, no tolerance for discussion and debate, and no tolerance for real, responsible decision making from management.

      Middle management's ONLY JOB is to make decisions, and they abrogate that role by drenching everything in backtracking documentation and self-important committee-think "initiatives" which accomplish nothing except to provide the illusion that something is happening when in reality they aren't doing their job.

      When these managers make mistakes, they then proceed to make excuse after excuse: "well, the resume said.." or "well, the interview committee standards are..." or whatever. What they SHOULD do is say "Yeah, I made the call, and I screwed up." and MOVE ON.

      It is for this reason that modern business cannot a) produce anything of value or b) stay in business very long. The entire business day is voice mail, meetings, coffee rooms, talking to "Bob" and donut lists. Actually *producing* anything is left to the cubicle drones, if they ever hire any.

    35. Re:One of my favorites by Reality+Master+101 · · Score: 2

      So every candidate is lying and really isn't qualified, right? They're all slick con-artists who don't know anything. The degree and the years of experience? All skate-through half-baked lies, right?

      If you actually had any experience with a testing process, and hiring a lot of people, you would know that YES YES YES the majority of people skate through half-baked lies. I couldn't have put it better myself.

      I'm sure they would think I have an attitude problem, mainly because I probably wouldn't agree with them 100% of the time. No, I know I wouldn't agree with them 100% of the time.

      I just have to laugh at this. Don't think that JUST MAYBE if you are disagreeing with someone 100% of the time, then you have severe problems with authority? That you don't really have any opinions of your own; you only have opinions contrary to whomever you interpret as an authority figure?

      Modern business has no tolerance for any contrary views, no tolerance for discussion and debate, and no tolerance for real, responsible decision making from management.

      Sorry, but you have absolutely no idea what you're talking about. That whole rant is so divorced from reality, I doubt that you have very much experience in the real world. This is so caricatured it's kind of nutty.

      Yes, it's got to be flippant. That must be it.

      If you are judging someone in 10 minutes, then by definition it's a flippant decision.

      --
      Sometimes it's best to just let stupid people be stupid.
    36. Re:One of my favorites by The+Cat · · Score: 2

      Don't think that JUST MAYBE if you are disagreeing with someone 100% of the time, then you have severe problems with authority?

      Well, aside from the fact that you misread the sentence, yes, I have problems with self-appointed "authority" who is far more concerned with reminding people of the power vested in them by the power vested in them than they are with supporting the people who work hard for them and earning their respect.

      That you don't really have any opinions of your own; you only have opinions contrary to whomever you interpret as an authority figure?

      I have many opinions of my own. I am very well educated and have a lot of experience. Most companies I have worked for have actively and vigorously discouraged the application of that knowledge to my job, and done the exact same thing to EVERY SINGLE OTHER PERSON I KNOW OR HAVE EVER WORKED WITH.

      Sorry, but you have absolutely no idea what you're talking about. That whole rant is so divorced from reality, I doubt that you have very much experience in the real world.

      No idea what I'm talking about. lol I have seven years of experience as a senior engineer.

      I have seen people with five years of seniority FIRED because they disagreed passionately about a "flippant" management decision. They stood up for what they believed in, and it cost them their careers. That's reality in "corporate" business these days, and it's a crying tragic shame.

      I know one person in particular who was labeled a "troublemaker" because they offered a dissenting opinion in front of senior managment during a "standards process" presentation. Two months later, the three middle managers (who were shown to be wrong at that presentation by the way) had that person fired. One year later, he, his wife and their three small children lost their house. It took him 15 months to find another job. Why? He disagreed.

      If you are judging someone in 10 minutes, then by definition it's a flippant decision.

      I'm not "judging" anyone. I'm making a *decision* as to whether they can do the work and if they are motivated.

    37. Re:One of my favorites by Reality+Master+101 · · Score: 3, Interesting

      and done the exact same thing to EVERY SINGLE OTHER PERSON I KNOW OR HAVE EVER WORKED WITH.

      Sorry, but you just don't sound credible. You sound like a prima donna who walks around with a chip on her shoulder.

      I have seen people with five years of seniority FIRED because they disagreed passionately about a "flippant" management decision.

      And I've seen people fired because they can't get over themselves and the fact that a decision has been made contrary to what they want. And then they cry like little babies, and are finally fired because of a constant pattern of not being able to handle not always getting their own way.

      Just because you're arrogant doesn't make you always right.

      I know one person in particular who was labeled a "troublemaker" because they offered a dissenting opinion in front of senior managment during a "standards process" presentation.

      And once again, you just don't seem credible on this. I have a feeling that there is a LOT more to the story and this person's historical pattern of behavior.

      I'm not "judging" anyone.

      Oh please, spare me the politically correct "I never judge anyone" nonsense. Unless you always hire whoever is in front of you, you are making a judgement.

      I'm making a *decision* as to whether they can do the work and if they are motivated.

      Right, a 10 minute decision. Let me turn this around -- if you went for an interview, and some guy talks to you for 10 minutes, and then says "Sorry, your resume is fine, but based on this interview I just don't get the feeling you can handle this job" (assuming he was a rude SOB), are you going to feel that you got a fair interview?

      --
      Sometimes it's best to just let stupid people be stupid.
    38. Re:One of my favorites by Tablizer · · Score: 2

      (* That one's easy. The business would be knee-deep in discrimination lawsuits. *)

      What kind of discrimination? Mental discrimination? Or do you mean like minority X will complain that because they are brought up "without opportunities" that they will score lower? (Which does not explain why dirt-poor vietnamese refugees often excell in school.)

    39. Re:One of my favorites by Tablizer · · Score: 2

      US law prohibits any testing which doesn't a) directly apply to the job the applicant is applying for and b) have equivalent (percentage) scoring outcomes regardless of gender or race.....
      For example, if a higher proportion of females pass a given pre-employment test than men, the business is automatically wide-open to discrimination lawsuits. The business is guilty of discriminating against men in that example.


      Are you sure about this? It sounds a little suspect.

    40. Re:One of my favorites by The+Cat · · Score: 2

      And I've seen people fired because they can't get over themselves

      Well, there you go. They don't give management their proper respect by supplicating their own confidence, so the wheels turn them out in the street along with all their knowledge and ability so management can go back to meetings and donuts without being interrupted by competence and initiative.

      These same managers advertise for self-starters: highly intelligent, well-educated, motivated people with sparkling resumes, advanced degrees and years of huge achievements and experience who *once they are hired* are expected to shut up, sit down and do as they are told (just like Junior High School). If they open their mouths, they get fired.

      People with all those achievements and education are rarely (if ever) people who don't have some fairly well-ingrained ideas of how things should be done. They wouldn't *have* those resumes if it were otherwise. Yet management expects them to just do as they are told and *refrain from offering any input or contribution* or pack up and leave.

      That's not the right way to run a company. Hire, delegate and MOVE ON.

      And once again, you just don't seem credible on this. I have a feeling that there is a LOT more to the story and this person's historical pattern of behavior.

      You mean prior to being hired? (Note: I don't really care if I "seem credible")

      He had been working there about as long as I had, say four to five months. They hired him (and me and several others) *specifically* because of his knowledge of software development.

      He was fired because he disagreed. Period. He was told in the week prior (during a project status meeting, what a surprise) that management "felt" he wasn't being enough of a "team player."

      I quit three weeks after he was fired. Of the 10 people hired for our team, all had left (or been fired) within six months. The company was out of business within a year, when 200 more lost their jobs.

      if you went for an interview, and some guy talks to you for 10 minutes, and then says "Sorry, your resume is fine, but based on this interview I just don't get the feeling you can handle this job"

      I'd throw a party to celebrate the return of honesty to the job market.

    41. Re:One of my favorites by adamsc · · Score: 2

      If it changes *every* variable there's no difference between "Tom" and "VAR000002" - neither variable will have its original name in the end. This also illustrates why this problem isn't just a repeated string replacement.

    42. Re:One of my favorites by Tablizer · · Score: 2

      This is the only part I saw relavent:

      "But even this last requirement is changing. Some rejected job applicants have filed suit under the Americans with Disabilities Act, claiming that they suffer from learning disabilities and charging that they were illegally discriminated against because they weren't given extra time to take a pre-employment test. Blind applicants may need to have tests provided in something other than written form (such as braille), and deaf applicants may need to have translators provided to assist them in the test taking process."

      I suppose the "learning disabilities" issue may come up if it is a non-technical or non-clerical job. I hardly think anybody would complain if it was a technical or clerical job, where learning disabilities may clearly affect the job performance.

  6. Riddler by Anonymous Coward · · Score: 3, Interesting

    It's Turing complete. It weeps, it bites, it smiles and it loves. It can be made, it can be had, it can be taken. It was one, it was two then it became sixty two. It needs time, it need paitence it needs to be pruned. When time comes it needs a fourier series to make it look good. What is it?

    1. Re:Riddler by David+Gerard · · Score: 2

      Emacs, obviously.

      --
      http://rocknerd.co.uk
  7. Re:Riddles by chaidawg · · Score: 2
    Since a woodchuck is actually a groundhog (or so I've been told):

    How much ground could a groundhog grind if a groundhog could grind ground?

  8. I Believe! (RE: Important) by Anonymous Coward · · Score: 2, Funny
    "For 52 years I have turned the cheeks in all directions to the actions of people like you."

    I believe you are the guy on goatse.cx.

  9. Well, he failed one riddle: by Hektor_Troy · · Score: 2

    "Write a program that will display a "spiral" of NxN numbers, using constant space (no arrays allowed). For example, here's what the spiral looks like for N=10:"

    And then he displays a spiral that's 11x10 ... nice ...

    --
    We do not live in the 21st century. We live in the 20 second century.
  10. TWO CONDOMS, THREE WOMEN by 0xdeadbeef · · Score: 5, Funny

    A man would like to have safe sex with three women, any of whom may be carrying an STD. Given two condoms, how can he do so, while ensuring that no STD is passed from one woman (or possibly himself) to another (or to himself)?

    This is a common situation on the job. Who says riddles aren't relevant in interviews?

    1. Re:TWO CONDOMS, THREE WOMEN by Anonvmous+Coward · · Score: 2
      A man would like to have safe sex with three women, any of whom may be carrying an STD. Given two condoms, how can he do so, while ensuring that no STD is passed from one woman (or possibly himself) to another (or to himself)?
      Hmm I think your post is the sole reason that the site got Slashdotted.
    2. Re:TWO CONDOMS, THREE WOMEN by jred · · Score: 5, Funny

      Ok, I like the other guys' answer, about wearing both & flipping it. But I think that would suck. I don't mind wearing one, but two at once just isn't going to work for me. So I use condom 1 on girl 1, condom 2 on girl 2, meanwhile having sent girl 3 to the store to get more condoms :)

      --

      jred
      I'm not a mechanic but I play one in my garage...
    3. Re:TWO CONDOMS, THREE WOMEN by Elwood+P+Dowd · · Score: 5, Interesting

      Wear one condom. Wear the 2nd one outside the first one. Have sex with 1st woman.

      Remove the 2nd, outer condom, have sex with the 2nd one with just one condom (the 1st one).

      Fold the just removed condom inside out and wear it over the 1st one. Have fun with the last woman.

      Who says that you can't use "Economic engineering" knowledge on bed, :-)


      If this is the correct answer, then I would be at an unfair disadvantage answering this question. Because I *listened* in sex ed when they said that using two condoms at the same time was dangerous. It's too likely that air will get caught between the condoms. Some parts will stick and some parts will stretch, leading to two broken condoms.

      --

      There are no trails. There are no trees out here.
    4. Re:TWO CONDOMS, THREE WOMEN by Asprin · · Score: 2

      If this is the correct answer, then I would be at an unfair disadvantage answering this question. Because I *listened* in sex ed when they said that using two condoms at the same time was dangerous. It's too likely that air will get caught between the condoms. Some parts will stick and some parts will stretch, leading to two broken condoms.

      Indeed. My answer is not to have sex with any them.

      Seriously, think about it. Are you gonna trust a condom if you KNOW you're having sex with infected partners? Sorta makes you wonder if it's a good idea even when you *don't* know whether or not they're infected.

      --
      "Lawyers are for sucks."
      - Doug McKenzie
    5. Re:TWO CONDOMS, THREE WOMEN by Anonymous Coward · · Score: 5, Funny

      Easy, its just a riddle... Very unlikely to occur in a real world situtation. It seems you guy are actually planning what you would do in such an event!

      "Oh no, 3 horny women and only 2 condoms...Thank god I read slashdot".

    6. Re:TWO CONDOMS, THREE WOMEN by vidnet · · Score: 2, Funny
      Use the first condom on the first woman.
      Use the second condom on the second woman.
      Have the third woman pour motoroil over you, hang you upside down wrapped in gladwrap, and spank you with a bag of stale mushrooms.

      All work and no date makes Jack's imagination run wild.

  11. Re:The date is the riddle. by Derleth · · Score: 2, Informative

    January 1, 1970 0000 GMT is the standard *nix epoch, so the clock must have been set to zero at the time it spat up that little gem.

    --
    How can you use my intestines as a gift? -Actual Hong Kong subtitle.
  12. Re:Riddles by MrResistor · · Score: 2

    A woodchuck would chuck as much wood as he could chuck if a woodchuck could chuck wood.

    That's one of my dad's favorites.

    --
    Under capitalism man exploits man. Under communism it's the other way around.
  13. Weird entries in the Microsoft category... by Succa · · Score: 2

    The MS category has some real toughies, like:

    "y do u think u r smart"
    "y do u wanna work at Microsoft?"

    and a great catalyst for catastrophe...

    "If you could remove any of the 50 states, which state would it be and why?"

    These toughies are gonna keep me up all night!

    1. Re:Weird entries in the Microsoft category... by jtdubs · · Score: 2

      The correct answer of course:

      "Whatever state you are from... Ass..."

      Justin Dubs

  14. google cache.. by neo8750 · · Score: 2, Informative
    here ya go

    Google Cahce is Ace

  15. Re:WARNING!!! WARNING!!! by Anonvmous+Coward · · Score: 2
    ARRRRRGGGHH!!! He didn't post the answers anywhere!!!
    I know why. My company recruited for engineers through a headhunter service. For the first couple of days, the 'riddles' we used were getting only soso results from the candidates. By the 3rd day, everybody was getting perfect scores.

    Think about it.
  16. Incense riddle by Anonymous+Squonk · · Score: 2, Interesting

    A stick of incense takes exactly one hour to burn out. Given nothing but a lighter and three sticks of incense, how can you accurately measure 1 hour and 45 minutes of time?

    1. Re:Incense riddle by Anonymous Coward · · Score: 2, Interesting

      Light the first stick at both ends, so it will consume itself in half
      an hour.

      At the same time, light the second stick at one end.

      When the first stick expires, the second stick will have half an hour
      left. But if you light it's other end at the same time the first
      stick expires, the second stick will expire in 15 minutes.

      When the second stick has expired, it will be 45 minutes from when you
      started, and you can just light the third stick at one end to get 1
      hour and 45 minutes.

    2. Re:Incense riddle by Anonymous+Squonk · · Score: 2, Informative

      The original riddle comes from a Japanese TV show, and they used a katorisenkou, a mosquito releeant which is shaped like a spiral and burns lying down. But none of you would know what that is, so incense was the closest I could think of to that...

  17. Re:An Answer! by Anonymous+Squonk · · Score: 2
    Okay, after puzzling over it for some time I think I have it. Guy puts both condoms on and has sex with woman 1. He the takes the outside condom off and has sex with woman 2. The he flips the condom he'd taken off inside out, and puts it back on and has sex with woman 3.
    Well, besides the fact that it's damned near impossible to put on a used condom inside out, and assuming he hasn't released any seminal fluid at all into it already, wouldn't he now be in contact with the fluids from engaging in sex with woman 1?
  18. Riddle by buck_wild · · Score: 3, Interesting

    What is:
    Greater than god
    More evil than the devil
    Poor people have it
    Rich people want it
    If you eat it, you'll die?

    --
    If all you have is a hammer, everything looks like a nail.
    1. Re:Riddle by DJayC · · Score: 2, Funny

      Nothing.. unless you're an atheist in which case your riddle isn't cross-platform ;-)

    2. Re:Riddle by wcspxyx · · Score: 3, Funny

      Oh, that's easy. Martha Stewart.

      --
      Sig? What sig? Do I have to have a sig!?!?
  19. Why College is Required for a Programmer by Enonu · · Score: 3, Interesting

    Karnaugh Maps (brought to you by CSE 120 at ASU):

    Your problem:

    !B!C !BC BC B!C
    A-----------------
    0 | 0 0 1 0
    1 | 0 1 1 1

    Answer: BC | AB | AC

    Ta da!

    1. Re:Why College is Required for a Programmer by Cryptnotic · · Score: 2

      Dude. Why did you write out a Karnaugh map if you weren't going to reduce the expression? See that !B!C being 0 regardless of what A is? You can remove an operation. Watch:

      (A & (B | C)) | (B & C)

      Only 4 ops. Yours is 5.

      --
      My other first post is car post.
  20. Interviewing at Microsoft by shird · · Score: 2, Insightful

    This is a great site for more information on interviewing at Microsoft. It has some sample questions, study materials and testimonials etc.

    --
    I.O.U One Sig.
  21. That riddle is impossible! by Anonymous+Squonk · · Score: 2, Funny

    I thought for days about this riddle, but it is impossible! I give up! Nothing could be the answer to that!

  22. again, hiring managers don't get it by e40 · · Score: 2

    (and I'm a hiring manager)

    I rarely find that people fall down on the job because they lack intelligence, especially the kind it takes to solve these riddles. Many people don't use the intelligence they have because of laziness, bad habits, or can't communicate what they know. Most people are smart enough to hide this in interviews, too.

    The reason people can't do their jobs, 99% of the time, is they don't play well with others and/or have poor communication skills.

    Give me an above average, hard working, honest, good communicator over that prima donna MIT grad anyday. Don't get hung up on the MIT example, it could easily be Stanford, UC Berkeley, or whatever. The point is that institutions like these select for intelligence, and let's face it high intellegence and good communications skills rarely go hand in hand. It's a beautiful thing, though, when they do. (Lucky bastards!)

    1. Re:again, hiring managers don't get it by teamhasnoi · · Score: 2

      I AgrE intirelY. I am one ov those bestest talker-makers an sm4ertis brane uSer havEHrs. tAwker-makers an brane user makers are not in na mane ruums. Bobo go sleep now.

  23. Maybe some Spoilers? by codewolf · · Score: 2

    Answers here (post more):
    Q: Coin in bottle

    A: Simply push the cork into the bottle and shake the coin out.

    --
    http://www.codewolf.com - Just good stuff to waste time
  24. Re:Riddle - spolier warning... by WIAKywbfatw · · Score: 2

    Come on, I've never heard that one but the answer's got to be "nothing".

    I don't know what that says about the riddle, me or people who spend days thinking of the right answer but it's hardly a tough one is it?

    (My apologies if this comes across as smug and arrogant, it's not meant to be. At the very least this post provides those that weren't as instantly inspired as myself with the correct answer.)

    --

    "Accept that some days you are the pigeon, and some days you are the statue." - David Brent, Wernham Hogg
  25. whee this is better than games magazine by graveyhead · · Score: 2
    At a fork in the road between two cities, you see 2 people. One always tells the truth, and comes from the city of safety. The other person always lies and comes from the city of cannibals, where they will eat you. They both look exactly the same. You must ask them one and only one question (no compound questions either). What question could you ask to find out which path leads to the city of safety?

    Did they steal this from the Dr. Who "Pyramids of Mars" episode, or was it the other way 'round? Anyone know?

    Also, pretty sure I figured this one out, but have no college math, & would appreciate a more technical answer.

    You are standing at the start of an infinite sequence of quarters. Someone tells you that 20 of them are tails and the rest are heads. He says that if you can split the quarters into 2 piles where the number of tails quarters is the same in both piles then you win all of the quarters. You are allowed to move the quarters and to flip them over, but you can never tell what state a quarter currently is (i.e. you are blind and you cannot feel which side is heads and which side is tails). How do you partition the quarters?

    So, if you flip the first 20 coins, and partition between 20 and 21, you have the best chance for success, right? Doesn't that mean that there is a 20/inf. and therefore a 1/inf chance that one of the tails coins is in the first 20?

    --
    std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
    1. Re:whee this is better than games magazine by The+Dark · · Score: 2, Insightful

      It doesn't matter if there is a tail in the first 20, if there is then it becomes a head, so you end up with 19 tails in the first 20 and 19 tails in the next infinity.

      --
      sig's not here
  26. Common Interview Question: by wirefarm · · Score: 5, Funny

    "What will it say in the newspaper about you when you die? In effect, write your own obituary:"

    All-time best answer:
    "Gunman shoots nine, then self."

    My friens Marc *swears* he said this in an interview.

    Cheers,
    Jim in Tokyo

    --
    -- My Weblog.
    1. Re:Common Interview Question: by Billly+Gates · · Score: 2

      lol.

      I would mod you up if I havent posted here already.

    2. Re:Common Interview Question: by Sheridan · · Score: 4, Funny
      (this isn't one of mine - its a variant on a .sig either here or on usenet soemwhere):-

      "Where did he get the plutonium?"

    3. Re:Common Interview Question: by leob · · Score: 2
      "What will it say in the newspaper about you when you die? In effect, write your own obituary:"

      I'd prefer The world's oldest man dies in his sleep.

  27. you forgot the end by Edmund+Blackadder · · Score: 2

    older than this riddle

  28. Re:Regarding my favourite riddle... by Edmund+Blackadder · · Score: 2

    cheque

  29. Flashback! by JabberWokky · · Score: 2
    For some reason this made me flashback to my childhood and the quite excellent (for the agr group they are aimed at) Childcraft books from the publishers of the World Book Encyclopedia. I read all of those until I knew them back and forth, and then read the encyclopedia the same way. One of them was full of riddles, and some of the wording of several of these riddles seems to be the exact same.

    --
    Evan

    --
    "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  30. Microsoft interview questions by MillionthMonkey · · Score: 5, Funny

    You have a monopoly in a given market. A company creates a groundbreaking product and establishes a new, completely different market. Assuming you cannot buy the company, how do you smash it and extend your monopoly in the old market to the new one?

    How would you go about designing an email client that executes any code that is sent to it?

    If you could remove any of the fifty states (thus rendering federal antitrust statutes inapplicable to corporations in that state) which state would you remove and why?

    How would you go about designing an operating system for people who hate computers and who just want to use their machines for pay-per-view entertainment?

    An End User License Agreement (EULA) appears in a window with "I Agree" and "I Disagree" buttons. The text area in which the EULA appears is eighty columns wide. How many lines of text can be included in the EULA before a computer that just meets your system requirements is unable to load it into memory?

    At a fork in the road between two cities, you see 2 people. One always tells the truth, and comes from the city of safety. The other person always lies and comes from the city of cannibals, where they will eat you. Which one do you hire to write up licensing agreements for your legal department?

    An Arab sheikh is old and must will his fortune to one of his two sons. He makes a proposition. His two sons will use their computers, and whichever computer gets a blue screen of death first will win the fortune for its owner. During the race, the two brothers do nothing on their computers, neither willing to risk a blue screen of death. In desperation, they ask a wise man for advice. He tells them something; then the brothers immediately jump onto the computers and start installing new hardware, sharing files, and downloading hastily written security updates. What did the wise man say?

    1. Re:Microsoft interview questions by ch-chuck · · Score: 2, Insightful

      Man, that's great. But isn't this backwards:

      "whichever computer gets a blue screen of death first will win the fortune for its owner."

      To work, shouldn't it be "whichever computer gets a BSOD first will lose the fortune for it's owner." ??

      --
      try { do() || do_not(); } catch (JediException err) { yoda(err); }
  31. Spoiler: 100 prisoners and a light bulb by Anonymous Coward · · Score: 2, Insightful

    This was a nifty riddle, I never saw it before, and I do think it's appropriate for the programming mind set.

    Essentially the prisoners have to come up with some programs for themselves. They become little finite state machines with an unlimited number of internal states, one input bit, and one output bit. Then the jailer picks one prisoner at a time, randomly, and lets the prisoner run his state machine.

    First I noticed that there aren't enough different truth tables for 100 prisoners, which led me to think about the state machines.

    Then I looked around for some kind of protocol where prisoner #1 could signal that he had rendez-voused with the lightbulb, and then hand off a notional "token" to prisoner #2, and so on for 100 prisoners, eventually to make a token ring. That wasn't working out very well. I got up to 4 prisoners that way, and I wasn't coming up with a general mechanism.

    Then I thought: okay, try client-server, make one prisoner the "boss" with one program, and 99 other prisoners are "drones" with a second program.

    That worked out pretty well!

    The next problem is communicating the strategy to the prisoners:

    "Okay, all you mugs, listen to me, because I was a smart guy on the outside!"

    "You, KILLER, you are the BOSS. It's your job to keep the count. Whenever you go in that room -- if the lamp is on, you turn it off, and you make another tally mark on your roster. If the lamp is off, you leave it off. When you get to 99 tally marks, you tell the warden that everyone's been in there, and we can all go".

    "All the rest of you joes, listen up. If you go in the room, and the lamp is off, you turn it on -- but ONLY ONCE. JUST ONCE. After you do that, you never touch the lamp again. Ever. I don't care how many times you go in the room."

    "All you joes -- if the lamp is already on, don't touch it. Leave it on. That just means that someone else turned it on and Killer here hasn't seen it yet. If the lamp is off, and you touched it before, leave it the hell off! Cause if you turn it on again, Killer's count is gonna get messed up, and we're all going to die."

    "Killer, you got pencil and paper? Good. Maybe you want to tell Numbers here to do the counting instead? It doesn't matter who does it, as long as we all agree RIGHT NOW who's going to keep the count. Because if you blow the count -- either we are going to be waiting here forever, or you are going to pipe to the warden too soon and we'll all fry."

    "Any questions?"

    (One of my buddies has to be pre-arranged to ask this): "Yeah! What if I go in the room and the light's already on? What do I do?"

    "Answer: you do nothing! You turn around and walk out! If you haven't turned on the light for yourself yet -- this doesn't count."

    Q: What if I turned on the light and the jailer calls me back and it's still on?

    A: "Same as above ... you do nothing! You turn around and walk out! Look at it this way. All you joes are never going to turn the lamp off. Ever. That's Number's job. And each of you joes are going to turn on a dark lamp and make it bright exactly ONCE in your life. Just ONCE. No more, no less. If you can count up to 1, you can do this. Numbers has to count to 100, and I know he can handle that. And we'll all be out of here eventually."

    Then we train the guys using a couple of decks of playing cards, and a lamp, so they can see how it works.

    1. Re:Spoiler: 100 prisoners and a light bulb by Jhan · · Score: 2, Informative

      Unfortunately, Numbers will only be able to increase his tally by one, each time he's picked (less actually, since after a while there will be a high probability that no 'untallied' prisoner has been in the room since he was last there).

      If Numbers is called on the average every 100 days, and can increase the tally by one each time, the procedure will take a bit less than 30 years!

      Not that my solution is much better:

      The prisoners make up their own calendar, in which every month has 100 days. Each prisoner is also assigned a number (1-100).

      Now, if a prisoner is called on day N of the 'month', turning the light on is a signal to next guy that he knows for sure that prisoner number N has been in the room. Turning the light off is a signal that he doesn't have a clue about prisoner N.

      If a prisoner is called on day N and sees a light, he makes a note that guy number N-1 has been in the room. The first prisoner that has all 100 checked can get the lot sprung.

      Initially, each prisoner can only be sure of himself, so things will not start moving until by chance a prisoner is called on his own day. This should happen several times during the first month though. Knowledge of who has been in the room will then slowly spread among the prisoners.

      The process won't complete until (some time after) every prisoner has been called on his day at least once. I tried to calculate how long that would be but my math isn't up to it. Probably some decades :-(

      --

      I choose to remain celibate, like my father and his father before him.

  32. Here's the riddle I wish Microsoft would use... by JamieF · · Score: 5, Funny

    "So there's a programmer writing some code, in C. That programmer needs to use a buffer to store some data. How does the programmer write the code such that an unexpectedly large amount of data doesn't overwrite the stack and result in a remote root exploit?"

  33. I know the answer! by benwaggoner · · Score: 5, Funny

    Because the holes are round.

    I mean, really, any other shape wouldn't fit...

    *ducking*

    1. Re:I know the answer! by BarefootClown · · Score: 2

      Honestly, this answer would probably get an applicant hired, in my book. I consider a good sense of humor to be critical in any job that involves working with other people (hint: almost every job). If he has a sense of humor, odds are he'll get along with other members of his team, and I'd rather have a good (but not great) programmer who gets along with everybody and contributes to a low-stress work environment than a great programmer who's an ass. Just my two cents.

      --

      "Make it ten--I am only a poor corrupt official."
      --Captain Louis Renault (Claude Rains), Casablanca

  34. 100 Prisoners and a Light Bulb by Dan+Crash · · Score: 3, Insightful
    Well, I came up with a solution, but somehow it just seems inelegant to me. Any other solutions out there?
    100 prisoners in solitary cells. There's a central living room with one light bulb; the bulb is initially off. Everyday, the warden picks a prisoner at random, and that prisoner goes to the central living room. While there, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven't been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity. The prisoners are allowed to get together one night, to discuss a plan. What plan should they agree on, so that eventually, someone will make a correct assertion?
    * SPOILER *

    .

    * SPOILER *

    .

    * SPOILER *

    .

    * SPOILER *

    The rule is: Turn on the light if it's off, unless you've already done this once, in which case, do nothing.

    The day all 100 of you meet, designate one person to turn off the light. Have them count each light they turn off. When they reach 100, they will know everyone else has been out already, and can safely demand their freedom.

    (Of course, assuming the warden really does pick someone at random, he could pick the same person every day, forever. Or not pick one person, every day, forever. Either way, there's no guarantee you're ever getting out.)

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
    1. Re:100 Prisoners and a Light Bulb by CProgrammer98 · · Score: 2

      A better solution is for each prisoner to just toggle the switch if this is the first visit, else leave it alone. Everyone can then count the state changes. As soon as the 100th guy changes the state, they ALL know it's gettin-out time. No need for a "master controller"

      With the "master" counter, you'd have to wait for him to be picked again so he could state that they'd all visited.

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    2. Re:100 Prisoners and a Light Bulb by Dan+Crash · · Score: 2
      Your solution seems to be essentially the same one proposed by an A.C. here with one difference. Tell me if I misunderstand anything.

      In both systems:
      1. Everyone is assigned a number from 0 - 99.

      2. Everyone keeps track of the days since the meeting.

      3. You turn on the light when the last two digits of the day you are chosen match your own ID #.

      4. You observe whether the light is off or on when you enter the room, and infer the ID # of whoever was last in the room if the light was on.

      5. You make a list which records all IDs which you know have entered the room.

      6. If it is your turn, you may turn on the light if the last two digits of the day are the same as an ID on your list.
      Where your solution differs is that instead of relying on the length of the lists made by each prisoner to determine the Freedom Date, you rely on cooperation between prisoners to create an unbroken string of lit-bulb days that lasts for 100 days, telling anyone chosen that day that they may demand their freedom.

      My own hunch is that it's more likely that someone will achieve a full list of all IDs first, since ID info propagates laterally while the lights have to propagate hierarchically. (As your solution is stated, someone who had a list of all 100 IDs but was only number 44 in the chain couldn't claim freedom for everyone.)

      The obvious solution is to use both methods -- anyone can demand freedom if:

      a) their list includes all ID numbers, or;
      b) they enter the room on day 99 and the light is on.

      I said my hunch was the lists would be faster because it's only a hunch. Since all these solutions rely on random data, the only way to say one is faster than another is on average. It would be cool to write some code for each one of these solutions and have a Bulb-Off: Run each solution program for X iterations and see which ones come out with the lowest average amount of days spent in prison!

      I might try that in the next couple of days. If you write some code for your solution, post a link to the source and the results here.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
    3. Re:100 Prisoners and a Light Bulb by Dan+Crash · · Score: 2

      Wow! Thanks for the analysis.

      I just finished writing up the code to see how many days it would take for my Master Counter solution to work, and on average it takes between 9,000 to 11,000 days, just as you pointed out. That's approx. 25 - 30 years, though! Ouch. Not as great as I'd hoped.

      I'll work on coding yours in when I get a chance to see how it compares.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
  35. Re:100% OT: sales engineering positions? by Latent+IT · · Score: 2

    I'd imagine it's the incredibly rare job held buy a guy who actually knows how to use what he's selling. =)

  36. My random crappy question: by Latent+IT · · Score: 2

    You're a racecar driver on a one mile track. You drive one lap, averaging 30 mph. How fast do you have to average on the second lap to get a total average speed of 60 mph over the two combined laps?

    1. Re:My random crappy question: by Latent+IT · · Score: 2

      Bingo. Have a cookie. =)

    2. Re:My random crappy question: by dylan_- · · Score: 2

      I don't get this? Used up all what time? There was no time limit mentioned...or am I just being thick?

      ps. That daft Vanishing Dollar riddle shouldn't have been in the "hard" section...

      --
      Igor Presnyakov stole my hat
    3. Re:My random crappy question: by dylan_- · · Score: 2


      Doh! Yup, I'm thick (today, at least ;-))

      --
      Igor Presnyakov stole my hat
  37. some selected answers: by SlugLord · · Score: 4, Informative

    Some answers from the hard section:

    Criminal cupbearers:
    Let's assume we only have 10 prisoners and that they each drink from up to 512 bottles. Number the bottles from 0 to 999. Prisoner 9 samples 0 to 511. Prisoner 8 samples 0 to 255 and 512 to 999. Prisoner 7 samples 0 to 127, 256 to 383, 512 to 639, etc. (prisoners alternating between sampling and not sampling blocks of wine in decreasing powers of 2 -- prisoner 0 drinks from every other bottle) Now line up the prisoners after onen month and treat corpses as ones and living prisoners as zeros and you have your answer in binary.

    Mysterious Triangle area
    Well, to make a long story short, they're not triangles.

    100 Prisoners and a Lightbulb
    Well if we assume they can all see the bulb every day, they can just toggle the bulb iff this is the first time they've been selected. If the last prisoner has counted the number of times the bulb has been toggled, he can assert that he is the last one to be selected.

    Square Formation
    Move the "notched" piece to teh righth of the current larger square and put the small square piece in the notch. put the larger of the triangular pieces at the top, horizontal edge of the new formation.

    Calendar Cubes
    I like this one. You need all the numbers from 0 through 9 plus 0 through 3. That's 14 faces. You will never need 00 though, so you can remove one of the 0s. Also, you will only ever need the 3 with 0 or 1, so you can remove it from one of the blocks. The solution: the numbers 1-6 on one block, and 7-9 and 0-2 on the other. Yeah it works.

    Mystery Matrix
    4. Entry from row plus Entry from row 2 plus 1 mod 10.

    Fork in the road I
    "is that the city you come from?" If the response is yes, go there, otherwise turn away.

    Fork in the road II
    Assume each person is standing on his respective road. "Is one of you a liar?" Yes means he's a truth teller, no means he's a liar.

    Egg Dropping
    18. Drop from the 10th, 20th, 30th, etc. After it breaks, go back 9 floors and start dropping every floor. You use 18 drops if it can drop from the 98th or 99th floors.

    Greedy Pirates
    It's not apparent to me that this is the intended answer, but "Throw pirates 3 and 4 overboard and divide up the rest between 1,2, and 5. Pirates 1 and 2 will agree to the largest share, and pirate 5 always has a say after that, since 3 and 4 can't agree to anything, so he's needed for the majority.

    Hmm, well it's getting late so I'll just do one more:
    Card Game
    Bob takes any card over 9. The probability that none will show up is roughly .2 with an average payoff of $5. That means that the probability of getting a face card is .8 with a payoff of 11.5. Using more precise figures, i.e. not .2 and .8, the average payoff is about 10.0857 (706/70)

    1. Re:some selected answers: by jsse · · Score: 2

      Fork in the road II
      Assume each person is standing on his respective road. "Is one of you a liar?" Yes means he's a truth teller, no means he's a liar.


      This is not the standard answer, but it's logically correct. How smart you are.

      The standard answer is, the man ask one of the boy "If I asked the other boy which road is leading to village A, what will he answer?" Any of them will point you to the wrong road.

    2. Re:some selected answers: by yason · · Score: 2, Interesting
      Calendar Cubes
      I like this one. You need all the numbers from 0 through 9 plus 0 through 3. That's 14 faces. You will never need 00 though, so you can remove one of the 0s. Also, you will only ever need the 3 with 0 or 1, so you can remove it from one of the blocks. The solution: the numbers 1-6 on one block, and 7-9 and 0-2 on the other. Yeah it works.

      If one has 1-6 and the other has 7-9/0-2, then how do you represent 7 as 07 (which was a requirement IIRC)?

      The right answer seems to be {0,1,2,3,4,5} and {0,1,2,6,7,8} since you can turn the 6 to 9 and vice versa. Then you can represent %02d representation of [1,31].

    3. Re:some selected answers: by epsalon · · Score: 2

      Your solution to the egg dropping problem is wrong. Check out my riddles site for a correct solution (and a few extra riddles).

    4. Re:some selected answers: by Yunzil · · Score: 2

      Egg Dropping
      18. Drop from the 10th, 20th, 30th, etc. After it breaks, go back 9 floors and start dropping every floor. You use 18 drops if it can drop from the 98th or 99th floors.


      Or you could just do a binary search.

    5. Re:some selected answers: by dbretton · · Score: 2

      Fork in the Road II

      "Which direction do you come from?"

      And go that way.

    6. Re:some selected answers: by Yunzil · · Score: 2

      Ah, I didn't quite get it.

      But you're answer is still wrong. :)

      You would need 19 drops.

      Worst case is: 10th floor, 20th, 30th, 40th, 50th, 60th, 70th, 80th, 90th, 100th (break #1), 91, 92, 93, 94, 95, 96, 97, 98, 99 (break #2).

      Starting with every ten floors is one of the best choices. Anything between every 8 floors and every 13 floors all require 19 drops.

      It's fairly easy to show 10 is "optimal". The number of drops required is (100 / F) + (F - 1). Take the derivative, set equal to 0 and solve for F. But I've spent enough time on this already. :)

  38. These tech interview questions are STUPID by JamieF · · Score: 5, Insightful

    Am I the only one who thinks this interviewing technique is retarded?

    Because Microsoft does something most definitely isn't a reason to emulate it. Microsoft isn't exactly known for producing well designed software, nor software that reuses proven patterns or algorithms that solved known problems 20 years ago. Better to hire a bunch of 21 year old college grads who can solve word problems from 8th grade algebra, and pretend that Microsoft invented computers! Whee.

    When I hire developers I want them to be good developers, not promising young interns. My interview questions typically involve technology questions, process questions, some theoretical PROGRAMMING questions, and some social / communication questions. I'm not saying that hiring smart people is a bad idea, but ignoring skills and only looking at generic problem solving ability is a recipe for unbelievably bad code. It's like hiring musicians based on measured hearing sensitivity and reflexes. OK, maybe that matters if you want to figure out which 5 year old is going to be a prodigy, but hand them an instrument and the noise that comes out is going to sound like ASS.

    Examples of things that "smart" developers I've worked with before have totally missed:
    - the existence of more efficient data structures than arrays
    - generalizing code into reusable chunks (functions, objects, whatever)
    - regular expressions
    - the difference between "client" and "server"
    - the reason for using descriptive variable names
    - collection libraries with built in sorting ("whatcha workin' on?" / "coding up a quicksort algorithm" / "in a J2EE app!?!?")

    You can't just get this from reading a book, either, although that definitely helps. You have to have some degree of EXPERIENCE too: at least a few projects, and some awareness of things like performance tuning, security, coding for maintainability, etc.

    I would use these "tech interview questions" only for hiring interns or recent college grads where the expectation is zero experience, zero clue, zero skill, and a correspondingly low salary. After all you're investing in someone. But for someone that commands a market rate developer salary in the high five figures, screw the brain teasers - just spend a couple of hours grilling them on skills, experience, discipline, etc. They will respect you big time in return because they know when you extend an offer that they won't be working with a bunch of dumb-asses who can get the explorers across the river without being eaten by the headhunters but who can't code their way out of a soggy paper bag.

    1. Re:These tech interview questions are STUPID by MeerCat · · Score: 4, Insightful

      Precisely why companies end up with the wrong employees. My usual answer to these questions is "Sorry, the interview ends here, you failed", or (if I feel like baiting them) to "think outside the box" eg the bridge/flashlight/limited time issue "so, one guy is lighter than the others and they realise they can cross together, or they wait til their eyes adjust to the darkness and they're fine, or they check their watch and realise they have more time than they thought". If the interviewer says "no, wrong answer" I tell them they've missed "the big picture" and they need to "free their minds from the imagined constraints", and then ask them what we're doing next...

      On a similar note, I do NOT want to hire staff who can put a list of obscure C++ operators in order of precedence, I want to hire those who say "well, I'd look it up if need be, but to make sure the next guy reading my code doesn't get confused I'd simplify the expressions with braces"... bingo - instant pass !

      Interview questions should be open, not closed.

      --
      T

      --
      I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
    2. Re:These tech interview questions are STUPID by randombit · · Score: 2

      Am I the only one who thinks this interviewing technique is retarded?

      In terms of actually finding people who are skilled and will do the job correctly, yes.

      The only time I had to go through an actual interview process of any sort was a Unix sysadmin job (part time assistant admin, specifically), and it was a pretty good way to run it, I think.

      First the guy asks me some random questions about experience, etc. Then he asked me what various things were, like "What does IMAP stand for and what does it do?" Finally, he pulls out some sort of SPARC. My memory is hazy but IIRC it was an Ultra. Probably an Ulra5. Anyway, so he starts pointing at stuff inside and asking "What is this?" The idea is to see how well I could figure out some random piece of hardware I'd never seen before.

      I thought, given the envoronment there (wildly hetergenous setup - OS X, Linux, Ultrix, Solaris, NeXT, who knows what else) it was pretty good, if relativly trivial, test.

      I would use these "tech interview questions" only for hiring interns or recent college grads where the expectation is zero experience, zero clue, zero skill, and a correspondingly low salary.

      I am sort of vaguely insulted by that (as I am still in college for the next 6 months). I would agree that many people around here have no clue, but there are a decent number (and I include myself in the category) who are reasonably skilled. Probably that's because about 90% of what I know about creating software has come from working either on projects at work (like real software that people actually use) or free software.

      Certainly I would agree that someone who just did the work in class would not be particular good, since it's pretty rare to have a class project that's really large enough (and long-lived enough) to really teach you about things like maintainability, portablity, security, etc.

    3. Re:These tech interview questions are STUPID by rufusdufus · · Score: 2

      I have mostly seen the reverse problem when it comes to arrays. Everyone studied linked lists, trees, splays, what-have-you in school so they use them everywhere. Most of the time (in boiler-plate code) arrays are the right answer. Arrays are simple, memory efficient and fast.
      Granted, when arrays start causing algorithmic inefficiencies in larger data sets, you gotta know when and how to switch.

      Regular expressions are apparently not understood by the most successful programmers in the world, because severval of the billionaire and hundred-millionaire coders I know made their dough on the most hideous hacks I've ever seen. They made something that worked once, and now whole companies are reliant on their hacks. Kind of sad, but not for them.

  39. rec.puzzles by valentyn · · Score: 3, Informative
    There are lots of these sorts of puzzle sites. One of the older/more famous is the rec.puzzles archive. Find it at here.

    Another good resource: the Princeton Mathclub

    --
    my other sig is a 500 page novel
  40. Infuriating,,, by Grape+Shasta · · Score: 4, Interesting
    The thing that drives me nuts is not having the "right" answer to check my answers against. Look at this one, for example:

    willywutang is hanging out on a heavily forested island that's really narrow: it's a narrow strip of land that's ten miles long. let's label one end of the strip A, and the other end B. a fire has started at A, and the fire is moving toward B at the rate of 1 mph. at the same time, there's a 2 mph wind blowing in the direction from A toward B. what can willywu do to save himself from burning to death?! assume that willywu can't swim and there are no boats, jetcopters, teleportation devices, etc.. (if he does nothing, willywu will be toast after at most 10 hours, since 10 miles / 1 mph = 10 hours)

    There's many possible answers, so how do I know if I've got the answer they want? He's in a heavily forested area, so grabbing a log and paddling out around the fire shouldn't be hard. Or he could dig a little moat, though that might not be too effective. So, is there some other, clever answer, I should look for, or am I done? Grrrrrrrrr!

    --

    "I am a cipher, a cipher, wrapped in an enigma, smothered in secret sauce" -Jimmy James
    1. Re:Infuriating,,, by Grape+Shasta · · Score: 2
      Well, obviously I do like the site, or I wouldn't be bothering with it. You're probably right, it's infuriating in a good way.

      I don't care for this particular riddle, though... most of them have an aha! type of answer, which when you think of it is clearly the right one. But how could this guy make a firebreak? Does he have tools to cut down the trees? It just doesn't seem like an answer that must be the right one. I find the idea of making a raft from logs in the woods more likely. Oh well..

      --

      "I am a cipher, a cipher, wrapped in an enigma, smothered in secret sauce" -Jimmy James
    2. Re:Infuriating,,, by nils · · Score: 2, Informative
      willywutang is hanging out on a heavily forested island that's really narrow: it's a narrow strip of land that's ten miles long. let's label one end of the strip A, and the other end B. a fire has started at A, and the fire is moving toward B at the rate of 1 mph. at the same time, there's a 2 mph wind blowing in the direction from A toward B. what can willywu do to save himself from burning to death?! assume that willywu can't swim and there are no boats, jetcopters, teleportation devices, etc.. (if he does nothing, willywu will be toast after at most 10 hours, since 10 miles / 1 mph = 10 hours)
      It's easy: willywutang grabs a burning log from the fire, runs to let's say the middle of the island, sets fire to the wood there, watches the wood turn into ashes (with the fire moving towards B) and when the fire coming from A would reach him, he can easily retreat to the no longer burning ashes.
    3. Re:Infuriating,,, by Trak · · Score: 2, Informative

      The answer they are looking for has to do with starting a second fire between the burning end of the island and the safe end. Then when the first fire reaches willy, he just steps into the burned-out space from the second fire which he started.

    4. Re:Infuriating,,, by Just+Some+Guy · · Score: 2
      [T]he clever answer is a firebreak.

      I disagree. That's one answer, but it's not particularly clever. Better, in my opinion, are:

      • Wade (not swim!) a short distance into the water, go around the fire, and come back.
      • Use whatever vehicle or method he used to get onto the island to get back off. If he's there involuntarily (i.e. by shipwreck), then:
        • If he has fireproof storage for his food, then get in it. Otherwise:
        • When the fire has decimated the whole island, he will shortly starve to death, unless he has a reasonable fishing beach or small boat, in which case see my first answer. He needs to decide between the painful-but-quick death or the painful-but-slow death.
      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:Infuriating,,, by jcsehak · · Score: 2

      Huh? I don't see how this would work. The fire is at A, and Willy runs to C (the center point of the island), and starts a fire (for simplicity's sake let's say he uses matches, rather than grabbing a burning log). Okay, now he's got a fire going from A to B, C to B and C back at him up to A! Is a 2 mph wind strong enough to hold back the fire going from C to A? I doubt it--the island is heavily forested. The other solution would be to simply dig a ditch, but that's also impossible in a heavily forested area, unless he's got a chainsaw. The only acceptable solution I can think of is to wade out in the water, which seems like a cop-out, as far as answers to riddles go.

      --

      c-hack.com |
    6. Re:Infuriating,,, by Jerf · · Score: 2

      This is what annoys me about this problem. The same 'force' driving the fire (most likely the wind) will drive the smoke in the same direction, so anybody approaching it from the to-be-burned side will die before being able to grab a burning stick.

      Too many of these questions disintegrate when considered as a real situation, leaving anybody knowlegable about the subject material out of luck. (Not that I'm a fire expert, but I know something about the topic, which is that Mr. Stuck On The Island better learn to hold his breath. People only rarely burn to death, smoke inhalation is tens or hundreds of times more common.)

  41. Cynical by The+Cat · · Score: 2

    Asking questions like this during an interview makes a mockery of the interview process, patronizes the candidate and is usually suggested by a career middle-manager seeking to assert their importance at the expense of the dignity of the candidate.

    People's careers should not depend on the last five pages of a 99 cent brain teaser book.

    The answer to all of them (in an interview) is "thanks for the coffee."

    1. Re:Cynical by Asic+Eng · · Score: 2
      Well, it's the old garbage in/garbage out thingy. If your interview process focusses on riddles you'll end up hiring people who are good at riddles.

      Alternatively you could focuss the interview on e.g. software development.

      I imagine in that case you can't just pick up a book and look up the answers however - you need to actually thoroughly understand the topic, to evaluate the candidate.

  42. Real-world questions by Animats · · Score: 3, Interesting
    • Explain why the stock market just crashed, outline the expected future of the economy for the next year or two, and indicate a general strategy for the company for this difficult time.
    • Will Microsoft's new approach to security work? Why or why not?
    • Based on recent news events, what level of effort should be applied to defending against info-war attacks?
    • Should we port to Itanium, Sledgehammer, or neither?
    • In an environment of Windows and Mac desktops, and Linux servers, what are the major integration problems?
    • How can we avoid an SPA audit?
    • We'd like to cut the load on our web site servers in half without losing any revenue. What should we do?
    • Historically, what copy-protection systems have worked successfully? Why?
    • Should we use C#? Why?
  43. What's the solution to 5 pieces to form square? by Mustang+Matt · · Score: 2

    I printed it out and cut them up. It's late, but I'm just not getting it. Any hints?

    It's under the hard difficulty.

    --
    The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
  44. stupid non-standardized logical notation by Bastian · · Score: 2

    So if ^ is XOR, what is AND?

  45. You can see where this has led Microsoft by g4dget · · Score: 3, Insightful

    Yes, these questions look exactly what Microsoft optimizes for: employees who are really "smart" in a Mensa-sort-of-way. Too bad that programming isn't about being "smart", it's about craftsmanship, taste, engineering tradeoffs, tradition, experience, and long-term dedication. And, not surprisingly, those are areas where Microsoft is sadly lacking.

  46. UNIX Admin Questions by Anonymous Coward · · Score: 2, Funny

    I was once asked in an interview the following question in order to assert my UNIX administration capabilities:

    "Name a sendmail exploit, past or present and quote a line from '2001'."

  47. It would suck. . . by Bastian · · Score: 2

    Since with two condoms on the likelihood of both breaking is pretty high.

  48. Call me kinky. . . by Bastian · · Score: 2

    Just have a co-ed circle jerk.

  49. One from Lewis Carroll (well- Charles Dodgson) by Chris+Johnson · · Score: 2

    If it takes two men three and a half hours to build a brick wall, how long does it take twenty thousand men?

    1. Re:One from Lewis Carroll (well- Charles Dodgson) by Uttles · · Score: 2

      43 days 8 hours 25 minutes

      --

      ~ now you know
  50. Re:The date is the riddle. by Gordonjcp · · Score: 2
    Or the function that prints the time was fed 0. If you did something like:

    $time_now = unixtime(); // gives time in seconds from Unix epoch
    // code
    print "Last Modified: "+texttime($timenow); // Prints time as DDMMYY hh:mm but notice there's no underscore

    then the second function would be passed an unset variable, which would be zero. That would give you 0000GMT, 1/1/1970.

  51. bunch of riddles and answers... by mgblst · · Score: 3, Interesting

    This site contains answers to many of the microsoft questions.

    http://www.acetheinterview.com/cgi-bin/qanda.cgi ?a ction=topics&number=3

    i suppose the answer to many riddles is, look it up on google?

  52. The Chicken from Minsk by perky · · Score: 2

    For more of this kind of thing, I recomend a book called The Chicken from Minsk. It has some pretty tough questions, and they are posed in such a way that they often make you giggle.

    --
    "The new wave is not value-added; it's garbage-subtracted" - Esther Dyson, Dec 1994
    1. Re:The Chicken from Minsk by Laplace · · Score: 2

      they are posed in such a way that they often make you giggle.

      Only if you're a poofta.

      --
      The middle mind speaks!
  53. Re:Riddles by GMontag451 · · Score: 2
    How many mitts could a nitwit knit if a nitwit could knit mitts?

    Damn, that one is even hard to type!

  54. Argh! by Chris+Johnson · · Score: 3, Funny
    *probable spoilers, only without workings* Anyone else having this problem? With certain puzzles, I'm struck forcefully with an answer but I can't (currently) come up with the rationalization to show it is unarguably correct.

    For instance: Brown Eyes and Red Eyes. I have this sense that upon being told by the outsider 'at least one of you has red eyes' (no top limit to the number), ALL the monks go commit suicide at midnight. I can see they still can't communicate, and can't prove they're not among the not-red-eyed, but there are links in the logical chain missing here- yet it points to that result somehow, due to their non-self-awareness and the confirmation that there are red-eyes present.

    By the same token- The mother is 21 years older than the child. In 6 years from now, the mother will be 5 times as old as the child. Question: Where's the father? I have to say: on top of the mother, conceiving the child- but I can't get the numbers to add up to anything sensible, it's just the only intersection that would give you the location of the father! *rrrrr*

    And finally, 0.999999... is not 1.0000000.... really it's not, though in practice, well...

    1. Re:Argh! by Lazarus+Short · · Score: 2

      (hints and spoilers in this post)

      HINT:

      Brown/Red Eyed Monks: Start by considering the case where exactly one monk has red eyes. What does he know? Now what if there are two of them? Generalize from there.

      (Answer to that, and the mother/child one below)

      SPOILERS

      SPOILERS

      SPOILERS

      SPOILERS

      SPOILERS

      SPOILERS

      Brown/Red Eyed Monks: If there's one red-eyed monk, he'll look around and see that nobody else has red eyes. Since at least one monk must have them, it must be himself. So Alan kills hiself at midnight.

      Now, if there are two red-eyed monks, they each see the other, and expect him to kill himself at midnight. When that doesn't happen, they both realize that there are two of them, the other (which they can see) and themselves (which they've just deduced). So they kill themselves at midnight on the second day.

      In general, if there are N red-eyed monks, they'll kill themselves after N days.

      As for the mother/child problem, it's simple algebra. If x is the age of the child, then x+21 is the age of the mother, so

      (x+6)*5 = ((x+21)+6)

      Solve that for x = -3/4 years, so the child is 9 months shy of being born.

      --
      The most valuable commodity I know of is information. - Michael Douglas as Gordon Gekko, Wall Street
    2. Re:Argh! by oGMo · · Score: 2

      I'm not sure about the first problem, since it would work out fine with one monk with red eyes, further cases of course present problems.

      The second I think you're right. The only other alternative (besides "I don't know") is "six feet under," but if you do a little math, your answer seems correct:

      M_a = C_a + 21
      M_a + 6 = (C_a + 6) * 5

      Do the math (where M_a is the mother's age, and C_a is the child's age, of course), and the child comes out to be -3/4 of a year old. Which indicates you're probably right.

      --

      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage

    3. Re:Argh! by wunderhorn1 · · Score: 2
      I think it falls apart at 2 monks.

      The tourist said that at least 1 monk has red eyes. If there is only one red-eyed monk, this statement is notable because the one red-eye now looks around and sees that no one else has red eyes.
      If there were two red-eyed monks, the fact that there is at least one red-eye would already be known. Each red-eyed monk would already noticed the other, and any scenario where the two monks wake up the next morning and realize it's them would have played itself out earlier.

      Do I get them job now? ;-)

      --
      Karma: Bored. (Thinking about resurrecting the "Anyone else is an imposter" joke.)
    4. Re:Argh! by wunderhorn1 · · Score: 2
      The tourist says (I just went back and checked), "At least one of you has red eyes."

      First, how does that make the case of a single red eyed monk untenable? Second, how does the scenario you lay out in the last 3 paragraphs depend on what the tourist said?

      --
      Karma: Bored. (Thinking about resurrecting the "Anyone else is an imposter" joke.)
  55. Re:A Dilemma: by kwishot · · Score: 2

    Although it's more circumstantial than anything, would it be possible that they wouldn't show you a losing door under certain circumstances and they would under others?
    Ex: Would they only show you a losing door if you had chosen the winning door, to try to "coax" you away? Have you ever tried to see them convince you to pick the *right* door?
    By this logic, it would be adviseable not to switch.

    -kwishot

  56. Re:Riddle me this Batman by seosamh · · Score: 2

    The one whose answer is 42.

  57. Why I never asked riddles.... by rufusdufus · · Score: 5, Informative

    I did a lot of interviews at MS when I was there, and I quickly learned not to ask riddles. First off, it makes people who don't get them uncomfortable and angry. Second, it doesn't actually show that the person can write software.

    I used a much simpler approach, so simple most people think its silly. But thats the point; nobody leaves the interview thinking they were tricked or duped. I always started with implementation of strcpy(). Half of the candidates failed right there! They took most of the hour to get it right (or not), but were able to see point-blank that they were not ready for the job.
    Next, I would ask about crashing cases, and if they figured out overlapping memory locations, have them write a 'fixed' version. This weeded out another big chunk. After that, I went into some color counting algorithms.
    I stayed well withing the field of what the candidate would expect, and did not try to trick him or make him nervous with off the wall riddles.

    This approach worked great, and didn't leave anyone feeling robbed and abused. The ability to solve riddles *is* an indicator of how smart the person is, but it is *not* an indicator of how good a programmer they will be.

    1. Re:Why I never asked riddles.... by rufusdufus · · Score: 2

      No. A *necessary* skill is for MS engineers to be able to implement strcpy(). The question is a filter for candidates who, with a BS or even an MS with all the right stuff on their resume who cant code at all. As I said, most candidates fail, even though as noted above, the canonical strcpy() is one line of code.
      Completing the rest of the interview is of escalating difficulty where the color counting problem gets arbitrarily sophisticated. By the end I will know how competent *and* how smart the person is.

    2. Re:Why I never asked riddles.... by rufusdufus · · Score: 2

      Oh yeah, those people are "no hire". However, I don't need to rub it in their face. They will fail in the less aggressive interview as well. They will just feel better about the failure, and not come onto slashdot posting how microsoft is full of bs and hate them forever.

  58. reading the question is required. by leuk_he · · Score: 2

    Write a subroutine

    quite an interesting language you chose to write it in.

    The point is: reading the question correct is half the answer. You got only 50% correct.!

    1. Re:reading the question is required. by Enonu · · Score: 2

      I hope you never become a professor. My solution is language agnostic since it's defined mathematically. I'll take your 50% proudly.

  59. Re:Manhole covers by mccalli · · Score: 2
    Why are manholes round? Note: This is a famous Microsoft question.

    Aah....that's where this rubbish comes from is it? I got asked that question whilst interviewing for a job at a major US bank (in London). My answer was "manhole covers are round to fit round manholes, and beyond that I do not consider manhole covers". I was quite sharp.

    It took them back a bit, but companies forget that this is an interview, ie. you aquire a view of them as they aquire a view of you. My view of them was influenced by that question - it showed they were a fad-based set of idiots, and immediately that question was asked I no longer had any interest in working there.

    I didn't get the job of course. The feedback I got was "he was technically fine, but I don't think he took the interview seriously....". Naah. Really? Can't think why.

    Cheers,
    Ian

  60. Re:A Dilemma: by rufusdufus · · Score: 2

    The correct answer for this is "flip a coin", this guarantee's you a 50-50 chance of winning.
    (the logic give in the parent mail is incorrect, if Monty hall is not biased, the odds are 66% if you switch. Write a program...)
    The canonical answer 'switch' is not best because it does not take into account the intentions of Monty Hall. If Monty wants you to lose (and he knows where the goats are), he will give you a second chance in only the cases that you picked correctly the first time. Of course, if he wants you to win (for ratings and ads we presume), he will give you a second chance only if you didnt pick correctly the first time. Given a total lack of information on Monty's information and intentions, you do best to go with a coin flip.

  61. There is no 'right' answer by Martin+Spamer · · Score: 2

    'The thing that drives me nuts is not having the "right" answer to check my answers against.'

    The point is there is no *single* right answer, sometimes there multiple good answers, sometimes there are none. The point of the question is to examine the candidates problem solving ability, the ability to think under pressure and produce new answers and sometime the ability to be honest and say I don't know the correct answer. Sometimes the test is will you challenge somebody in obvious authority if they are talking b*ll*cks and can you do it diplomatically. Indeed you answer to this problem indicates [to me] you tend to apply cargo cult type solutions. You want to parachute in the correct answer without understanding why it is the 'correct' answer.

  62. Re:An Answer! by sehryan · · Score: 2

    How can that be the correct answer? Fluids from the second woman are going to be on the outside of the condom, so when you flip it for the third, you now have the second's fluids "inside" the condom. That will work to keep her from getting pregnant, but doesn't do a damn against STDs. I hope some of you guys weren't actually using this method thinking it would work.

    --
    The world moves for love. It kneels before it in awe.
  63. Re:Is God so big that he can make a rock so big by Anonymous Coward · · Score: 2, Funny

    Could Jesus Microwave a Burrito so HOT That Even HE Couldn't eat it?

  64. Re:Manhole covers by Ratface · · Score: 2

    Umm, also because the round shape allows for the largest possible object to be fitted through at any orientation for the given surface area.

    Say you have a fat workman who represents the maximum size person you require to be fitted down a manhole. Measuring his body in cross-sections you find that the largest diameter across his body is 75cm. A circular manhole that has a diameter of 76cm (giving him a little extra room) has a smaller surface area than a square with sides measuring 76cm. The smaller the surface area, the cheaper the manhole!

    Sound right??

    --

    A little planning goes a long way...
  65. Re:PARC prior art Re:"Microsoft... responsible" NO by Destoo · · Score: 2, Funny

    >Any other prior art that others can remember from the ancient days???

    The Sphinx.

    'nuff said.

    --
    Nouvelles de jeux et technologies en français. TC
  66. Worst one ever... by dmorin · · Score: 2
    ...came from the dude who asked me, "Describe November." I kept asking him what the hell he was talking about, and he just kept repeating "Describe November" over and over again. When I finally said something about "Thanksgiving... leaves... fall... colors...." he was willing to move on to the next question. He later told me that he'd read somewhere that the question was good for determining true engineers because the engineers would respond mathematically (i.e. 11th month, 30 days...) whereas those that responded more descriptively were probably not good engineers.

    I got the job but only because a friend (this guy's peer) wanted to hire me. And, last time I checked, the guy who asked the question was still looking for work.

    One of my favorites to ask people is questions about languages they don't know. Stresses the concepts over the syntax. For instance, "You know OO programming, right? ok, Smalltalk is an OO language. Tell me a little bit about what it probably has." My favorite answer was from the college kid who had written Prolog on his resume because one of his courses did a week on it. I asked him to describe the language, and he couldn't, so I described it for him. Then I asked him to think about what uses the language might have, what applications it would be good for. He said, "none, I guess."

  67. Re:A Dilemma: by Gingko · · Score: 2

    Actually, you're wrong. It's really counter intuitive, and people take forever to be convinced, but you should switch (assuming this is your only chance, Monty is unbiased etc.).

    Monty opening the door and revealing a goat tells you nothing. You already know that there's a goat behind one of those doors.

    Here's a better example. Imagine a pack of cards. Monty asks you to choose which card is the Ace of Spades. You choose one at random. Now, Monty asks whether you'd like to stick, or change your decision to whether the Ace of Spades lies in the other 51 cards. Once you have made the decision, Monty then throws away 50 cards from the pile which aren't the Ace of Spades. Have the probabilities changed? Not at all. You'd still go with choosing the larger pile.

    Henry

    --
    i don't do sigs. oops.
  68. Um... no. by fizbin · · Score: 2

    What do you do when all three numbers are zero?

    Of course, the real way to do this is to build the triple redundancy into your memory unit, hardwire the logic (probably using one triple-input nand gate and three two-input nand gates for each bit) and not have the cpu deal with this at all.

  69. Re:Light bulb riddle [SPOILER] by bje2 · · Score: 2

    turn switch 1 on for 5 mins...turn it off...turn switch 2 on...go into the room...the lighbulb that is on is switch 2, the lightbulb that is off & warm is switch 1...the lightbulb that is off & not warm is switch 3...

    --

    "Facts are meaningless. You could use facts to prove anything that's even remotely true." - Homer Simpson
  70. Re:Mastermind II Impossible by CProgrammer98 · · Score: 2

    So, how come the solution is Yellow, Yellow, Yellow, Light Blue (left to right) ???

    --
    And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
  71. Using riddles by DustMagnet · · Score: 2, Insightful
    I've given more interviews than I've taken. Once I asked a programmer a kind of programming riddle. It was a simple one to learn if he understood that readability was usually more important that optimization. (You know that don't you?)

    The guy freaked. He started complaining that it was unfair and things like that. The funny part was I wasn't judging based on what answer he gave, but how he answered the question. He could have done well, by just rambling about the tradeoffs between different answers. Hell, he could have picked any answer and still got the job, but to lose it over a single question. That was unacceptable.

    Where I work, things are often unfair. You can't freak out about it, or you're lost. He was the only person we interviewed for the job. We didn't hire anyone.

    --
    'SBEMAIL!' is better than a goat!!
  72. The Master Counter by Dan+Crash · · Score: 2

    I think the problem here, though, is that state changes will occur that not everyone sees, so their count will be off, and you run the risk of never getting out.

    Imagine you're picked for the first time on the 51st day. The light is off. How many people have been picked before you? You have no idea.

    (Well, you know at least two people have been picked, but perhaps the warden's been alternating between those two for the past 50 days. But on the other hand, 50 people could have been out. If so, and you started your state-change count at two now, you'd never reach 100.)

    Without some accurate way of counting, no one can be sure they've seen all the state changes, and so no one can say with positivity that all 100 people have been out. You end up with a prison full of people with inaccurate counts waiting to reach a number that never comes. Right?

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
    1. Re:The Master Counter by CProgrammer98 · · Score: 2

      As with all these puzzles, you have to make assumtions...
      (1) All the inmates can see the bulb.
      (2) They can all count and remeber the count
      (3) They will all witness each state change
      (4) The next guy only flips teh switch if he has never done so before

      so, whenever the light goes on, or off, they add 1 to their counter. When it gets to 100, they're free.

      --
      And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
    2. Re:The Master Counter by Dan+Crash · · Score: 2

      What the other guys said. If you're told you're going to be held in solitary confinement, you shouldn't assume there's going to be windows in all of them, which is what your solution requires. I'd say your first and third assumptions aren't supported by the problem.

      However, your post made me realize that you should encourage everyone to prepare to count, not just the Master Counter. The Master Counter is the only one assured of seeing every state change, but there's a possibility that the first or second light flipper may witness every state change, too. They just have to count how many times they see the light cycle from off to on. If they see it cycle 99 times, they know that all 100 people have been out, and are simply waiting for the Master Counter's cell to be chosen again. They can save everyone the wait and demand their freedom that day.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
    3. Re:The Master Counter by Dan+Crash · · Score: 2

      Heh, yeah, this was my first solution, too.

      I knew it wasn't a great one, though, because the chance of all of you being picked in order is 1 in 1x2x3x4x5....x99x100, which calc.exe tells me is 1.0715102881254669231835467595192e-158. So you'd be in there a while. :)

      Still, it's a solution. So there's three ways I've seen so far. I'm working on a fourth. Boredom will do funny things to you. Maybe I identify with these prisoners too much.

      --
      He who refuses to do arithmetic is doomed to talk nonsense.
  73. Better interview question by fizbin · · Score: 2

    Favorite technical interview question I've ever heard:

    So you're working on a program using the foobarlib library and calling its function baz(), which according to the documentation returns an integer from 1 to 10 that means something or other. Suddenly, you discover that your program is blowing up because baz() is apparently returning -17. What do you do?

    The ultimate correct answer that this person was looking for is that you ask your colleagues for help. These days, of course, you also get credit for first searching the web and newsgroups relevant to the package. Surprisingly, many people give up after suggesting things ("Well, first I have my debugger trace everything very carefully to make sure that baz is really doing this, then I re-read the foobarlib documentation") and being told "Ok, you try that, and it doesn't work."

    Some people have actually told the interviewer flat-out that "that would never happen; it's impossible". However, those people have usually already demonstrated their unsuitability in other ways.

  74. Always check the obvious by Andy_R · · Score: 2

    I interviewed people for a DTP post that required people with knowledge of Quark Xpress and proofreading ability.

    About 70% of the applicants got the name of the package wrong on their CV ('express').

    --
    A pizza of radius z and thickness a has a volume of pi z z a
    1. Re:Always check the obvious by Megane · · Score: 2

      Are you sure it wasn't the fault of an idiot pimp^H^H^H^Hrecruiter? Maybe even a recruiter who used a spelling checker in idiot ("yes to all") mode?

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  75. Re:A Dilemma: by CProgrammer98 · · Score: 2

    Your odds have improved to 50/50 from 33/67. i.e. your first choice is probably wrong. so you're better off switching.
    Actually, the Mail is correct.

    By switching, you are GUARANTEEING odds of 50/50. By not switching, your odds are still 33/67

    If you don't beleive me, write a program to simulate it... Proof of the pudding....

    This is an old Mensa puzzle and was discussed endlessly in the noew defunct Mensa forum on Compuserve

    --
    And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
  76. I'm envious, my question was too easy by Ex-Parrot · · Score: 2, Interesting
    When I interviewed for my current job, I was asked a riddle. It was nothing compared to these, though. I actually got it wrong on my first try (I started writing pseudo code to try to compute an answer, wasting lots of time), but he gave me a second chance. I got it right after I realized that I hadn't read the directions carefully enough. I looked, but didn't see it either here or on the riddle site. Here it is if you're interested:

    There are three vending machines. One dispenses only Cokes, one dispenses only Pepsis, and one dispenses either Cokes or Pepsis at random. Someone rearranges the labels on the machines so that none of the machines are labeled correctly. Given that you have no prior knowledge of which machine is which and no way to open the machines, how many drinks will you have to buy to determine which machine is which?

    --
    To many, total abstinence is easier than perfect moderation. -- St. Augustine
  77. Why I Failed My Microsoft Interview by JohnnyO · · Score: 2, Insightful
    I'm not sure if this question is on the page or not, as I can't access it. (Slashdot effect anyone)

    Anyway, during my Microsoft interview when I was an undergrad, they asked me the following question, which I got "wrong"

    You have a 7kg bar of gold (assumed rectangular). Your employee gets paid 1kg of gold a day for seven days (because apparently Microsoft people don't get the weekend off). What is the minimal number of cuts to make such that you can pay him 1kg every day?

    I came up with some creative solutions, such as:
    • Cutting in 3/4 section, stacking the sections, and recutting, so one cut breaks two pieces.
    • Cutting a cosine wave into the bar which just brushed the edges with period 7.
    • A whole bunch of other ideas, all of which were "wrong".
    Anyway, after much back and forth, he basically hinted away that the answer he wanted was to cut the bar into sections of 1kg, 2kg, and 4kg. Then you give him 1kg the first day, then on the second day, give him the 2kg and ask for the 1kg back, etc etc. (ie binary arithmetic basically)

    Personally, this seemed like the stupidest answer ever to me, in that you were making the assumption that your employee would a) not spend any of the gold you gave him and b) bring it back to work with him the next day.

    Long story short, I didn't get the job, but I think that it shows that people are too fixated on what they think is the "right" answer to something like this, when in reality, there are other solutions.

    I could also add some good natured Microsoft bashing about how they make stupid assumption like this in code, but then you wouldn't have anything to reply with :)

    1. Re:Why I Failed My Microsoft Interview by Fulcrum+of+Evil · · Score: 2

      You have a 7kg bar of gold (assumed rectangular). Your employee gets paid 1kg of gold a day for seven days (because apparently Microsoft people don't get the weekend off). What is the minimal number of cuts to make such that you can pay him 1kg every day?

      Zero. The pay period isn't specified, and weekly or biweekly intervals are normal. Besides, do you want to hire someone that earns 7kg/week, yet is living hand to mouth?

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  78. Riddle me this by imadork · · Score: 2
    This is the story where all the Managers who read /. will show themselves!

    But seriously, I have no problem with these riddles in interviews, as long as they're used properly. The point of asking the question should not be to get a "correct" answer. It should be to see how people react under pressure, how creative and resourceful they are, and how flexible they can be in the presence of (possibly) incomplete information.

    Even someone who gets one of these answers "wrong" (perhaps because they overlooked some obscure point) would score points in my book if they could explain somewhat sound reasoning behind it and not get flustered while doing it.

    The best interviews I've had were right out of college, when the interviewer asked me about one of my grad school projects, then told me to explain it on a whiteboard, on the spot. Those were also the places I thought I'd most like to work at!

  79. Re:A Dilemma: by CProgrammer98 · · Score: 2, Informative

    There's excellent explanations of why it's correct to switch here and here

    --
    And the people shall be oppressed, every one by another, and every one by his neighbour Isaiah 3:5
  80. tbe circular jail cell question by WebMasterJoe · · Score: 2

    from the site...

    How many prisoners found their doors open after 100 rounds? The answer of course, is none - after the first drunken round, the prisoners have awoken, left their cells, and are busy drinking at the nearest strip club.

    --
    I really hate signatures, but go to my website.
  81. Re:Riddles by UnknownSoldier · · Score: 2

    > How much wood could a woodchuck chuck if a woodchuck could chuck wood?

    9 cords.

    (Apologies to Monkey Island 2 :-)

  82. Just be a smart ass by Uttles · · Score: 2

    I've never answered a riddle question correctly in an interview. I just act like such a blatant smart ass that the interviewer gets frustrated and or impressed with my attention to detail. In this way I have probably lost job opportunities, but you know what, I don't give a fuck. I didn't go to college and major in engineering, a major lacking any female contact, so that I could graduate and be asked to solve riddles. If an interviewer is going to waste my time by asking me stupid questions rather than asking about past real problems I've had to solve, projects, and accomplishments at other jobs, then they'd better be prepared for a barrage of equally stupid questions/remarks.

    --

    ~ now you know
  83. My favorite by sharkey · · Score: 2

    Alive without breath,
    As cold as death;
    Never thirsty, ever drinking,
    All in mail never clinking.

    --

    --
    "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  84. Because Manholes, Wells, and Tunnels are round by scotpurl · · Score: 2

    Manhole covers are round because manholes are round. Manholes are round because the tube shape naturally resists the crushing pressure of the ground surrounding it.

    It is for this reason that very old water wells (like in Africa and southern Asia) are round. The rocks you form the walls with resist compression quite well (pun unintended), and you get a sturdy, low-maintenance water source.

    Most of the old wells I've seen have rectangular covers, but the ones that people walk over have round covers so that the edge sits flush with the surrounding ground. Most of the flush-mounted ones are in built-up cities (like old London), and I imagine that the local barrel maker manufactured those as well. The edge of these is a row of stone/cobble that's set deeper into the ground than the surrounding cobblestone street.

    I think the modern answer (of geometry and axes) is quite boring, and ignores history and tradition too much.

  85. This is what I used for interviews by Bodhammer · · Score: 2, Interesting
    I used this last year as a interview techique for Semiconductor Applications engineers - EE's and embedded programmers. I gave them about 2 1/2 hours and 1/2 hour to talk about it and then I took them to lunch.

    ------ Exercise Instructions

    Dear Candidate,

    This exercise is intended to break the monotony of the standard interview questions like "Tell me about your strengths and weaknesses." Please read this document thoroughly before you start!

    Your instructions are simple: Build something using the Lego Mindstorms Robotics Invention System and then tell us about your experience!

    There are no constraints on the simplicity or complexity of your project though you are expected to do programming as well as mechanical assembly. You are free to use the examples in the kit or the provided documentation (O'Reilly Mindstorms book) as a starting point.

    System Setup

    The computer has the Lego Mindstorms software loaded and tested.

    The firmware has been loaded into the RCX module and tested. COMM 1 is working for the IR Module connection. Batteries should be good (let us know if you have system problems - they are not part of the exercise!).

    In addition, on the computer is an additional programming system called RCX Command Center (Version 3.1) that uses NQC (Not Quite C) and a graphical interface for programming. This has also been tested and documentation is provided. You are free to use either the Lego software or RCX Command Center for programming your robot. The CD-Rom case has instructions on how to bypass the Lego Tutorial.

    Presentation

    At the end of the exercise you will give a presentation and demonstration (5 -10 minutes) of your project. Feel free to use the whiteboard and/or flipcharts for your presentation if needed. Please address the following topics in your presentation:

    How did you set about the exercise in terms of planning, architecture, and construction?

    What did you intend your robot to do and what does it really do? Why?

    What obstacles did you encounter during construction? How did you overcome or bypass them?

    What would you do different if you were given another session?

    There is no "right answer" to this exercise and there are no hidden tricks or traps. The intent is to give you an opportunity to show your creativity, learning skills, problem solving, time management, and explanation skills in a different way.

    Please have FUN!

    --
    "I say we take off, nuke the site from orbit. It's the only way to be sure."
  86. Re:No answers to the riddles by pokeyburro · · Score: 2

    Try sneezing. It's like an orgasm without the sex. ;-)

    (Or the dinner & movie, or the having to call afterward, or the child support...)

    --
    Lately democracy seems to be based on the skybox, the Happy Meal box, the X-box, and the idiot box.
  87. Yeah, I screwed that one up. by MillionthMonkey · · Score: 2

    Guess I won't be interviewing candidates at Microsoft!

  88. Well you obviously don't... by WIAKywbfatw · · Score: 2

    I interviewed people for a DTP post that required people with knowledge of Quark Xpress and proofreading ability.

    About 70% of the applicants got the name of the package wrong on their CV ('express').


    Err, the package is called QuarkXPress, not Quark Xpress, QuarkXpress or any other derivative. One word, only one 'e' and with the 'q', 'x' and 'p' capitalised.

    By the way, do you know how to spell irony? I bet you do...

    --

    "Accept that some days you are the pigeon, and some days you are the statue." - David Brent, Wernham Hogg
  89. How you should really interview by bruckie · · Score: 2

    One of interview methods that makes the most sense to me is described in the The Guerrilla Guide to Interviewing.

    Interviews should determine two things: whether a person can do the job, and whether they will do the job. Riddles don't really figure into either of those.

    --Bruce

    --
    There are 10 kinds of people in the world: those who understand binary, and those who don't.
  90. What am I doing wrong... by Mustang+Matt · · Score: 2

    Admittedly, I'm not very good at math, but here's what I've come up with...

    If I remember my geometry correctly area of a square is (base x height) and a triangle is (base x height / 2)

    Big Triangle: 5x9.5cm Area: 23.75
    Small Triangle: 7x3.5cm Area: 12.25
    Dual Triangle: 5x9.5 and 2x5 Area: 28.75
    Square: 3x3 Area: 9
    Square Triangle: 5x4.5 and 2x4.5 Area: 27

    Total Area: 100.75cm
    Sqrt: Approx: 10cm

    Am I right so far?

    I'm still not getting it.

    --
    The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
  91. U2 Riddle by schmaltz · · Score: 2

    I dig the challenge of riddles. Far worse are the syntax quizzes! Knowing about semicolons after function declarations or 'else' is the compiler's job and not a strong indicator of creativity or capability in a programmer.

    The riddle:

    "U2" has a concert that starts in 17 minutes and they must all cross a bridge to get there. All four men begin on the same side of the bridge. You must help them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each band member walks at a different speed. A pair must walk together at the rate of the slower man's pace:

    * Bono: - 1 minute to cross
    * Edge: - 2 minutes to cross
    * Adam: - 5 minutes to cross
    * Larry: - 10 minutes to cross

    For example: if Bono and Larry walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Larry then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission.
    ---
    Another:

    You are given 10 baskets. 9 of the baskets each have 10 balls weighing 10kg per ball, however one basket has 10 balls weiging 9kg each. All the balls and baskets are identical in appearance. You are asked to determine which basket contains the 9kg balls. You have a suitable scale, but may only take a single measurement. No other measurements may be taken (like trying to determine by hand). You may remove balls from the baskets but may still only take one measurement. How do you do it?

    --
    Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma ... where's Siggy?
  92. My riddles page... by epsalon · · Score: 2

    I have put up my own little riddles page. Time for a little slashdotting... ;)

  93. my stab at a proof by invictus · · Score: 2, Informative

    000 0
    001 0
    010 0
    011 1
    100 0
    101 1
    110 1
    111 1

    (a & b) | (a & c) | (b & c ) | ((a & b) & c))

    Karnaugh Mapping...
    'a'b 'a b a'b a b
    c _ x x x

    'c _ _ _ x

    so the simplifications that can be made....

    (c & (a | b) ) | (a & b)

    there are no other 'little circles' that can be made on the map (as my EE101 prof was so fond of saying) therefore there are no further simplifications.

    --
    --Ks9
    1. Re:my stab at a proof by invictus · · Score: 2, Informative
      ack. that got all messed up... (well the map anyway)
      well, i cant seem to get it to line up... lets see it this way...
      .
      -.|a'|a'|a.|a.|
      -.|b'|b.|b'|b.|
      --+--+--+--+--+
      c.|..|x.|x.|x |
      --+--+--+--+--+
      c'|..|..|..|x.|
      wow, that was a PITA
      --
      --Ks9
  94. Re:I'm a moron by Sir+Tristam · · Score: 2
    I couldn't answer 1 of those dumb things...
    Yeah, I couldn't get one, either. Which was the one that was giving you problems?

    Chris Beckenbach

  95. Re:Manhole covers by bluGill · · Score: 2

    But what if the object you need to fit down the manhole is not round? Say a normal skinny persona is asked to get a stove down the hole. (Why is byond the scope of this discussion) Stoves are big, and square. So the ideal shape would be a square hole just biiger then the stove, so it can be lowered into the hole. Nobody in their right mind would carry a stove down the ladder, so they would have to get a tripod to lower it, therefore they just need enough room for the stove to fit, with straps on.

  96. Bingo! Nice Solution by ASeed · · Score: 2, Insightful

    I would call it "the Bingo solution"...

    - You are asuming that everyone has paper and pencil (or similar instruments).
    - They have to be careful (not to loose the count of the days so that incorrect info is transmited)
    - If the prisoners were taken at a regular pattern, they would never go out, but the text says "Everyday, the warden picks a prisoner at random" so there in no regular pattern.

    The first days:
    In average, in the first 100 days one should be picked in his own day, so himself and the next one who visits the room know that he has been there. Both can tell about it if they are chosen in that day.

    The last dyas:
    Probably, the last days before freedom many of them have their "bingo cards" almost complete and they are waiting for the last to be chosen to visit the room in his own day.

    --

    --
    ACid
  97. Thanks! by Dan+Crash · · Score: 2

    This is the elegant solution I was looking for. I started trying something like this but didn't get it quite worked out, so I tried another tack. I'm glad you figured it out.

    The only weird sort of problem with this solution is that if you are picked in order every day, you'll never leave. In fact, there are many orders in which numbers can be essentially "segregated" from each other, so that no one ever knows that everyone has already been picked.

    But if distribution really is random, then this is definitely the best strategy. It'll certainly be quicker than my Master Counter way. Thanks!

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
  98. 100 Prisoners and a Lightbulb by Dan+Crash · · Score: 2

    They're being held in solitary confinement. There's no reason to assume they can all see the bulb every day. The Prisoner's and the Lightbulb is discussed more here.

    --
    He who refuses to do arithmetic is doomed to talk nonsense.
  99. Re:? Re:One from Lewis Carroll (well- Charles Dodg by Kredal · · Score: 2

    43 days 8 hours 25 minutes

    They spend 24 days forming a union, demanding equal rights for black and migrant workers, spend another 4 days deciding what kind of bricks they should make the wall out of. 23 more days are spent trying to determine which company should provide the bricks for the wall, then they all rest for 8 hours (lunch break, you understand) and finish the actual construction of the wall in 25 minutes.

    Just like any gov't project.

    --
    Whoever stated that signature sizes should be limited to one hundred and twenty characters can just go ahead and kiss my
  100. THE MORAL OF THE STORY IS... by Anonymous+Squonk · · Score: 2

    Always carry at least three condoms with you at all times, in case you a cornered by a group of women who demand immediate safe sex.

  101. Final Exam by Sax+Maniac · · Score: 2

    Jeez, folks, stop hiring such morons who can only answer trivia questions. All interviewees are worthless unless they can pass the Final Exam.

    --
    I can explanate how to administrate your network. You must configurate and segmentate it, so it can computate.
  102. Where's the father? Answer. (SPOILER) by Rui+del-Negro · · Score: 2

    Let's call the mother's age M and the child's age C (in years).

    We know that:

    M = C + 21

    and

    M + 6 = (C + 6) * 5

    So solving the system we get:

    M + 6 = 5C + 30

    21 + C + 6 = 5C + 30

    C + 27 = 5C + 30

    C - 5C = 30 - 27

    -4C = 3

    C = -3/4

    1/4 of a year is 3 months. 3/4 is 9 months. If the child is -9 months old, that means he or she will be born in 9 months, so has just been conceived.

    The father isn't necessarily on top of the mother (fertilisation can happen up to 2 days after sex), but he's probably still around.

    He may be trying to hold up his pants while running from her father.

    Actually there would be another possible "smart" answer if the mother was a few years younger: the father is probably in jail. :)

    RMN
    ~~~