News for hackers. Stuff that matters.
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by JTbane on Friday May 18, 2018 @09:29AM (#17101250)
Whiteboards are not the problem- rather the questions that candidates are asked are bad.

Asking someone to solve an obscure mathematical problem (the Two Egg problem seems to be in fashion) doesn't do much except test whether the candidate has memorized the answer.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by reificator on Friday May 18, 2018 @10:36AM (#17101786)
> the Two Egg problem seems to be in fashion

When not in an an interview I like playing with these kinds of problems, but if I look it up I'll probably find interview prep where it shows the answer as well.

Could you summarize just the problem please?

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by trevorcreech on Friday May 18, 2018 @10:43AM (#17101838)
"You are given two eggs, and access to a 100-storey building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. If an egg is dropped and does not break, it is undamaged and can be dropped again. However, once an egg is broken, that’s it for that egg.

If an egg breaks when dropped from floor n, then it would also have broken from any floor above that. If an egg survives a fall, then it will survive any fall shorter than that.

The question is: What strategy should you adopt to minimize the number egg drops it takes to find the solution?. (And what is the worst case for the number of drops it will take?)"

http://datagenetics.com/blog/july22012/index.html

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by Clubber on Friday May 18, 2018 @03:04PM (#17104059)
Uh, if you drop an egg out of the first floor window onto cement, it will break.

The answer should be a form of binary search, but since you only have two eggs, you'd have to do a sequential search from the bottom floor. You have one chance at a mistake, so I would almost say start with the 2nd floor, but I know it will break on the first floor.

I don't see how that in any way gauges programming what so ever.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by blueline on Friday May 18, 2018 @04:29PM (#17104716)
>The answer should be a form of binary search, but since you only have two eggs, you'd have to do a sequential search from the bottom floor. You have one chance at a mistake, so I would almost say start with the 2nd floor, but I know it will break on the first floor.

yeah, sorta. essentially you partition the 100 floors into some number of groups (i forget what partition length is optimal) and drop the first egg at each segment until it breaks, then go linearly from the previous one

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by taurath on Friday May 18, 2018 @04:55PM (#17104875)
A quick naive not completely optimal but still relevant solution:

Since you have 2 eggs you can start on the 33rd floor. It breaks you can use the 2nd egg from 1st to 32nd floor.

If it doesn't break, use the first egg on the 66th floor. If it does break, the answer is between 33 and 65, if it doesn't the answer is between 66 and 100. That cuts the maximal testing time time from splitting at 1/2 (1st egg at flr 50), to 1/3rd.

To optimize further, since in the bad case we'd have to search up to 34/35 floors, you can mathmatically find a number where you split the drops at an interval (IIRC the "real" optimal answer is 14, then 13, then 12, etc), which means you're doing less explicit checking.

At 14 - i, you have 10 drops to find a range of 13 - i floors in which the optimal path is found. So instead of a worst case of 35, you have a worst case of around 17.

I find the best way to approach this sort of problem is to first find one optimization, and then use the same process to find if there are further optimizations.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by sireat on Friday May 18, 2018 @04:47PM (#17104821)
It's not the worst type of puzzle except if you do not know of a solution it might take a while to figure it out.

It does relate to programmer's ability to amortize worst case running time.

Once you realize that 1 egg requires linear search you just have to realize that with 2 eggs you have to decrease the level increase by 1 on each success.

Of course those must be some crazy genetically modified eggs.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by Clubber on Saturday May 19, 2018 @11:52AM (#17108369)
>It's not the worst type of puzzle except if you do not know of a solution it might take a while to figure it out.

I would guess the interviewer probably rates people who have memorized the solution far higher than people who have never encountered it and solved it with their brains.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by reificator on Friday May 18, 2018 @11:12AM (#17102101)
Much appreciated.

Hmmm, that's an interesting question. It's the Price is Right closest without going over solver...

Practical answer, drop from the first floor and then the second. You're probably not going to make it to the third.

I don't want to put my actual answer in case others want to solve it. But I will say there's an obvious solution, but if you apply one of the hard problems of computer science you might eke out a bit of an edge.

EDIT: Actually I don't think that's right. I think the answer varies based on your expectations, and should be tuned after each run if you run the same test multiple times. I do have a good starting point in mind though.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by reificator on Friday May 18, 2018 @05:34PM (#17105134)
Final edit but too late to edit my post:

After thinking about it on the ride home today, I was not quite on the right track before. Again don't want to post my solution because the entire point in asking was so that people could see the question and work it through themselves.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by robotmlg on Friday May 18, 2018 @11:20AM (#17102169)
> closest without going over

That's The Price Is Right, not Wheel of Fortune ;-)

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by reificator on Friday May 18, 2018 @11:31AM (#17102263)
My bad, I haven't watched either in at least a decade.

I was definitely picturing The Price is Right at least.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by chrisbennet on Friday May 18, 2018 @04:38PM (#17104777)
Because eggs that don’t break when dropped even 3 ft (never mind multiple floors) are a thing? Perhaps I am just projecting my Earth based experience...
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by kowdermeister on Saturday May 19, 2018 @06:09AM (#17107275)
Maybe it's a shittest if you actually try to apply some theory rather than using your common sense and say that "Based on the last time I was in New York, it will definitely break dropped from the first floor"
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by ybrah on Friday May 18, 2018 @09:58AM (#17101477)
Whiteboard problems are used to show that you can work through a problem, while communicating well about your thought process. They're also good general intelligence tests, if administered correctly.
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by ivanche on Friday May 18, 2018 @10:37AM (#17101799)
I think an obvious reason for this type of interview problems is because developers at work usually talk loudly while solving problems and write code without the help of any external resource while the clock is ticking in the background. Oh, wait...
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by lordCarbonFiber on Friday May 18, 2018 @11:40AM (#17102333)
What both you and the parent post you're deriding are missing is white-boarding (when done correctly) isn't about the problem at all. It's just an easy way to get a candidate in the room and construct a technical conversation.

As an employer I don't care how great your skills are, if you can't walk me through your thought process for 45 minutes you're not going to be overly successful. If you can't incorporate feed back or engage when pressed to change your design you're probably not going to be successful.

Do your recruiting right and you shouldn't need the white board to simulate whether the candidate can code at all (I think white-boarding with the intent of looking for named algorithms is a waste of everyone's time), instead you want to see if they can synthesize information, engage with other people, and otherwise display the soft skills that tend to be much more useful metrics for employee success than coding aptitude.

Granted, my industry is known for not having deep coding problems to solve, this strategy might not be as useful in verticals that require more technology chops.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by krisdol on Friday May 18, 2018 @01:18PM (#17103170)
>As an employer I don't care how great your skills are, if you can't walk me through your thought process for 45 minutes you're not going to be overly successful. If you can't incorporate feed back or engage when pressed to change your design you're probably not going to be successful.

The post you're responding to makes a great point that this isn't the normal working environment for 99% of actually-writing-code developers. I discuss and iterate designs with my coworkers/leads/managers/architects just fine, but a surprise algorithmic problem you have to simultaneously solve, draw on a whiteboard, and constantly present to an audience while being timed isn't something I have been great at. I bet many others aren't either. I got good at it after a few interviews last time I was looking for a job; but if I hit the interview trail again today, I'm confident that I would flounder in that setting for a while.

Imagine if, instead, the candidate worked out a project -- maybe at home, or maybe in an interview room for some time -- then you take time to review and understand their work and then go through this back-and-forth process of discussing their work. This would also benefit the candidate's understanding of how you collaborate to problem solve in your work environment.

The problem with this approach is that it requires the interviewer to actually invest time to understand the candidate's work.

Anyway, I hope you see why many see it as a problem that the process for a candidate to succeed at a job interview is to practice interviewing skills rather than demonstrating their engineer skills.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by clarry on Saturday May 19, 2018 @06:38AM (#17107319)
> As an employer I don't care how great your skills are, if you can't walk me through your thought process for 45 minutes you're not going to be overly successful.

As an investor, I don't care how great your skills are, if you can't come up with your new business idea on the spot and walk me through your thought process as you're doing it, you probably suck.. right?

Nah.

Unless you already have the answer, the first step is to come up with the solution. This could involve time spent alone just thinking, or brainstorming with coworkers, or researching the problem on the net, etcetra. What the right steps are depend on the problem, available resources, your background, even your preferred way of working.

The second step is to present and dissect the solution. I dare say this is the point at which the majority of engineers have no problem whatsoever talking about their thought process.

Do you work in an industry where engineers genuinely have to walk somebody through their thought process while they're trying to think up a solution?

If a problem comes up at a meeting and you don't have a solution on the spot, you take note and discuss it later or add it on the agenda for the next meeting. I think that's how people work.

I don't care about where, when, and how you came up with the idea. I care that you can present and discuss it once it's ready for that.

I think this is why many prefer the take-home test. They can focus on the solution. Then, at the interview, they can focus on the talk about the solution. It's also a great equalizer as e.g. people coming to work in a domain they have less experience with can take more time to research the solution space.

The complaints about homework taking up too much time may be valid, but I'd be most happy to trade 2 hours of interviews for about 75 minutes of homework and 45 minutes of interview.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by ivanche on Friday May 18, 2018 @12:46PM (#17102885)
"When done correctly" is the key here. Alas, in my experience I was usually heavily penalized if I kept my mouth shut for as little as 15-20 seconds because interviewer "couldn't see my thought process". At the same time expecting from me to write syntactically and semantically correct, industrial strength bug-free code with optimum space and time performance for a problem I never ever encountered with the interviewer "helpfully" distracting me 4-5 times a minute.
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by sidlls on Friday May 18, 2018 @10:02AM (#17101520)
That they're used for those things doesn't mean they work. They're especially not good general intelligence tests.
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by ybrah on Friday May 18, 2018 @10:10AM (#17101592)
I'd wager that the fact that many high power companies use whiteboards for interviews point to the fact that they're useful.
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by sixstringtheory on Friday May 18, 2018 @10:20AM (#17101656)
This is appealing to authority/popularity.

But since we’ve gone there, many high power companies also have a lot of chuckleheads running around.

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by baal232 on Friday May 18, 2018 @02:30PM (#17103781)
Divining rods are trusted by many, and have been in use for centuries. If they weren't a good way of locating water, why would so many people use them?
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by pjmlp on Friday May 18, 2018 @10:19AM (#17101653)
The fact that there are so many successful fast food chains points to the fact that the food is good and healthy.
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by aianus on Friday May 18, 2018 @11:44AM (#17102369)
Maybe they're only useful when you're a high power company with $200k+ total comp and more applicants than you know what to do with.
Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by spamizbad on Friday May 18, 2018 @10:51AM (#17101916)
> They're also good general intelligence tests, if administered correctly.

Is there any scientific evidence to support that, or is that just industry hokum?

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by jaredklewis on Saturday May 19, 2018 @12:20AM (#17106638)
> They're also good general intelligence tests, if administered correctly.

And communism probably redistributes wealth if it is administered correctly.

If companies want to hire based on general intelligence (not personality, team work, communication and so on) then they should administer IQ tests, which are based on a century of rigorous research. That would at least give you a fighting chance of measuring G.

Why do you think white boarding can measure general intelligence?

Re:Show HN: Whiteboardfree – Developer Jobs at Companies Tha... by brokenwren on Friday May 18, 2018 @11:28AM (#17102239)
Well said!