3 ms·
So, so many people miss the point(s) here. Firstly, in my direct, personal experience, just writing a candidate to write a program that compiles and runs gets
by RiderOfGiraffes 17y ago
So, so many people miss the point(s) here.
Firstly, in my direct, personal experience, just writing a candidate to write a program that compiles and runs gets rid of up to 90% of applicants. People here on HN are exceptional, but around 90% of recent applicants for a position I advertised couldn't write a FizzBuzz program that compiled and ran.
Secondly, these are the starting points. From here you can ask what problems the program has. Yes, it's exponential in stack and runtime. You can write an iterative version that runs in constant stack and linear time. More subtle, and more probing, is how do you write a recursive version that also runs in small stack and time.
These are the starting points, the initial cull. Don't assume they're the be all and end all.
- falsestprophet 17y agoOn paper? Or with a computer and compiler/interpreter?
- silentbicycle 17y agoWriting pseudocode on paper will shift focus from correcting minor syntax errors to how well they understand concepts, which is arguably more important. It's still worth requiring them to produce at least a tiny piece of working code, though. I helped interview someone who couldn't explain the trade-offs between a couple different designs for a simple class hierarchy, even an obviously wrong one included as a canary. Then we asked him to write one out, and, after stalling and getting several hints from us, he nervously scratched out a (naive) MySQL schema. Despite what his resume claimed, his only programming experience consisted of PHP and a fairly shallow understanding of SQL.
- RiderOfGiraffes 17y agoSome couldn't produce either. I look for someone to sketch a correct algorithm using any notation they choose. Independently I look for someone to produce working code with an editor and compiler. The former is usually for something like linked lists or quicksort, the second for something like FizzBuzz and then recursive and iterative Fibonnaci. Working code is essential for something, anything, at some point, although really what I want is someone who can then talk sensibly through the issues. Even so, working code for trivial problems is still only seen in about 10% of cases.
- gjm11 17y agoI like to ask candidates to write real code (not pseudocode) on paper, but emphasize to them that I don't really care about superficial syntax errors. Most of the point of this is not in seeing the code they produce, but in watching them think and seeing how they react to questions and suggestions.
- strlen 17y agoEntirely correct. The purpose of a phone screen is to rule out the cases where a candidate will come in, be scheduled for 6-8 hours of interviews and receive a "no" from every interviewer. Recursive Fibonacci numbers are also a good way to work Memoization into the picture.