by _Codemonkeyism · 10y ago · 0 comments
I tell people they can use the language I hire (Ruby,JS,Java) but I'm fine with other languages or pseudo code.
I tell people I don't care about semicolons or braces, I don't hire them for being a compiler.
Factorial I also use sometimes. Recursive is fine with me if it works, I've seen many people to go the recursive way - hey it's factorial - and then screw up. I sometimes ask people to do an iterative solution, or I ask if the recursion went flawless to write it as tail recursion.
You can definitely step through your program by hand and follow the logic etc, and you should totally be able to do that, but most programmers will not be in the habit of doing this. And neither should they, because it's slow, tedious and error-prone to hand-simulate your algorithms, or even just your for-loops. Not to mention recursive, or larger stuff.
I guess what I'm saying is that programmers are used to "lean on the compiler" and you don't have that on a whiteboard exercise, so it's a bit artificial.
[Full disclosure: I'm in the habit of hand-simming my stuff especially in the last year where I've been developing a grammar induction algorithm, so I'm not worried that I'll have to stand on a whiteboard and not know how to step through a loop, but I still think it's not very useful to make people do that).