The Hardest Interview Puzzle Question Ever

Jaster said : There are no States in the UK
The UK IS a state.

From Wikipedia : The United Kingdom is a unitary state consisting of four countries: England, Northern Ireland, Scotland and Wales.

So … I guess you don’t get the job.

The simplest way to figure out if someone can program is to ask them to write a small program. During the intervew.

Say: Here’s a PC (not connected to the internet), I want you to write a program to (pick one):

a. convert a string to an integer without using the library routine that does it for you.
b. backup every file in a given directory and that directories’ children to another directory.

In one book I read, back in the days when I was reading books about how to run a development team, the author said something like the way most of us hire programmers is like hiring a juggler without actually asking him to juggle in front of you before you hire him.

Other techniques I’ve used with success include asking a programmer to bring in a program or part of a program she wrote that she was proud of and discuss briefly what it was that she found most interesting. One candidate brought a 1,000 page print out and couldn’t tell me anything about it. She didn’t get the job.

My wife and I also just birthed our first kid at Alta Bates (your photo of the footprint blanket is the giveaway) and I must agree that the constant flux of nurses is ridiculous. They even send in head nurses just to ask you questions about how good a job the other nurses are doing! You can imagine I had some fun coming up with the answers that I didn’t give them.

And I have an unrelated question based on the same post. (Reading your segueways between disparate topics is always fun and has often reminded me of William Poundstone, which is really funny because today is also the first time I’ve seen you mention one of his books…!)

The question is about your interview process. My favorite interview is to ask the candidate about a recent project. (No prep time, but also no audience other than me.) I then make up a way to enhance the product he tells me about, and ask him how he’d build that enhancement. It’s a new feature, or an optimization, or a public API for the product, or whatever. This seems like a logical extension of your favorite type of interview, so the question is, have you done that before and was it informative?

By the way, the company I know that asks puzzle questions is full of very smart geeks and they ask puzzle questions simply to gauge whether the personality fits – not to gauge software skills.

Congratulations on your new son and on making my work partners laugh when I showed them his hello world message.

A little bit OT, but relating to interviews – well, to job postings that might lead to interviews…

My primary coding language is C#. When coding web functionality, I also use ASP.NET, JavaScript, HTML, and CSS. Many job postings, however, require .NET programming experience. From the context, it appears employers, or at least the HR departments, think of .NET programming as something other than C#, VB.NET, and ASP.NET. They seem to think that my years of experience with C# and ASP.NET aren’t relevant to .NET programming, even though the job description says, Create and enhance company web site, or create/update company application to foobar widgets.

So, what does .NET programming experience really mean?

Thanks.

I guess I think a little differently than most developers.

The question about moving a mountain made me think about a couple of Zen parables. In one, the wise man answers on bucket at a time. This is probably a variation on the story of a monk who comes upon an empty well at the foot of a mountain and, having only a spoon, starts trekking up and down the mountain to bring melted snow to the well, a spoonful at a time. In either case, the story prmpts consideration of the nobility (or foolishness) in pursuing the futile cause. In the another parable, the ultimate answer to the question is walk away from the mountain. You can’t actually move a mountain, but by moving yourself, you can achieve the same practical result.

The are many other references to moving a mountain in various cultures. Faith can move a mountain. If the mountain won’t come to Mohammed, Mohammed must go to the mountain. In each, the mountain symbolizes the impossible, and the lesson of the story is found in the value of attempting the impossible.

There are many things that a software developer could learn from contemplating moving the mountain. The least of these is how to actually move a mountain. We do that all the time these days, though seldom to any good effect in the end. Admittedly, I have a bias toward mountain meadows and against strip mines. To my way of thinking, the only valid answer to this question is in the question posed by another, Why would you move mount Fuji.

I have to go now. It is Saturday, and I am spending my weekend getting a website ready for a demo on Tuesday. The site is the product of a two year old project that has meandered through a series of developers without any architectural direction, coding discipline, documented requirements or design, or meaningful software development process of any sort. I joined the project in January. How do you refactor a mess like that? One spoonful at a time…

Interviewers, by and large, seem to be a bunch of useless, unintelligent people, at least the ones who ask these sort of questions. They are trying to look for an easy way out. I have thought about this problem, and come up with the same solution as you have. Ask them about a project they have worked on recently, and tailor your questions to that. Ask what they think went right, what went wrong, what they would do better. Ask about the technologies used, and how they could have used other technologies. Maybe this requires more from the interviewer, they might have to actually think about it, rather than reading something from their printouts. But it might actually stop them getting too bored.

These questions can betray more about the company, especially if it is some small shop.

Puzzle questions suck…

I usually swap puzzle questions with ones that require an answer that can actually be applied to real solutions.

For my team is better to hire a developer with great social skills and good technical experience, than to hire the genius jerk. I have seen projects collapse and sink because of genius-rotten-apple-jerks.

In the end you have to spend more time with coworkers that you spend with your own family. Making sure those guys are likable people is critical for everyone in long therm. Being likable also covers the communication part. Experience has thought us that the main issue in communication matters has to do with trust and not natural communication skills. People how trust each other tend to communicate better regardless of their natural communication skills.

Faith can move a mountain.

Actually Faith would have some difficulty moving a mountain all by herself but her friend Michelle probably could, she’s a rather, um, big girl.

If I wanted to move a mountain I’d do it the easy way, just move a molehill and then stand back while my wife made a mountain out of it.

Yep, ms doesn’t give these puzzles at interviews anymore. But! Puzzle hunts are regularly held. See the old one here: http://puzzlehunt.isetv.com/.

@glen

re manhole covers are cast casting a circular shape is not has hard as casting say a square one.

and 99% of BT’s Man hole covers arent round

Yes, I know the really good reason manhole covers are round. It’s because that’s the only shape which, no matter how the cover is turned or swiveled, prevents the cover from accidentally falling down the hole.

I have sat in on many interviews, and given my fair number, and it is a bitch to find out much about people. I tried a technical test, with a list of questions (like What id the difference between for, do…while and while…do), but this showed mostly that people studies, not that they did.

The last time I interviewed C++ programmers, I asked them to (gasp) write code and (bigger gasp) design a system. I was amazed how hard people crashed. You may not be able to BS your way through a technical presentation, but you definitely can’t BS your way through writing real code!

There were only three questions, which required about half a page of answer each. One required real code, one required some sort of design and one required discussion. I am happy with the ONE person out of 5 that actually could give me answers, and he has turned out to be pretty much what we expected from the interview.

(Note. One interviewee, who was applying for a C++ job, asked if he could write the simple program in Pearl…)

Hey Jeff,

A couple of years ago my wife had to have spinal surgery in Miami and we came to the same conclusion about the nurses. We found that the night nurses were invariably the worst nurses, but they were also the worst people. Rude pushy automatons who obstinately moved through their shift so they could go home. They were atrocious. It kind of makes sense because you’d figure the better nurses would move up the ranks to the day shift. The day nurses were always polite and they at least communicated as if they cared, even if they didn’t (I couldn’t tell).

I couldn’t agree more! We just laid someone off here - a competent programmer, but he failed to communicate what he was doing, and he couldn’t understand the communications of others enough to apply them to what he was doing. His work was completely lacking in context, to the point where he wouldn’t realize when what he was doing was actually doing harm to the company (say, taking down a production server to work on code directly on the server.) He asked me for a reference - I told him I honestly couldn’t give him a good reference even though I knew he was familiar with certain languages inside and out. He just didn’t have the communication skills - the minimum level - to make it in the business world.

1 Like

Many other puzzles @ http://technical-interview.com/puzzles.aspx

Probably my number one, top-of-the-list interview annoyance is interviewers who ask something unrelated, or only semi-related, to the position for which I’m applying.

For example, one interview I went to went something like this.
Interviewer: "Are you comfortable with writing MySQL queries?"
Me: “Yes.” (I had recently passed the MySQL Certified Associate exam and was studying for the Certified Developer exam at the time.)

Fortunately, having navigated several interviews by now and having marinated in MySQL Developer studies for weeks, I took this in stride and said, "That’s an administrator question. I’ve focused my study on development with MySQL. I’d be happy to answer… "

To refer back to your Phone Screen post, if I was interviewing at a PHP house and they asked me to write something in C++ or Java, I might just walk out (or at least feel like it.)

1 Like

“what is the solution to this puzzle”?

There is no puzzle, just a statement of facts with no goal stated - as several people good at communicating have already stated.

All others have made various assumptions they weren’t asked to make. Those assumptions may be valid, or not, we’d need to ask more questions to determine what the requirements are.

By the way, I teach requirements elicitation and analysis to Master’s students at the ANU, so I better be good at this kind of thing.