17 ms·
I think that asking a candidate to perform a code review can be an effective method of evaluating quite a few desirable qualities. Can they understand someone e
by davidhyde 8y ago
I think that asking a candidate to perform a code review can be an effective method of evaluating quite a few desirable qualities. Can they understand someone else's code? Can they engage in constructive critical discussion? Are they able to effectively refactor something to make it better? Can they spot mistakes and do they have an opinion about how to avoid such mistakes?
- djhworld 8y agoYeah that's great but what if they can't reverse a binary tree?
- almost_usual 8y agoYou spend a lot of work days reversing binary trees?
- reddit_clone 8y agoI think he was being facetious. :-)
- WilliamEdward 8y agoI know you're joking but... If i had never heard of a binary tree, saw it for the first time in my interview, and didn't at least have an idea of how to attempt solving it, I'm probably a lousy hire. The quality of attempt is what these hard questions are really about.
- abhishekjha 8y agoLooks like I am gonna have to look at the solution as I don't fully get how to achieve that structure. Recursion is good for a few standard problems but those are just standard problems. We shouldn't try doing every possible thing using recursion, even if it is possible to do so. Also, debugging an iterative solutions comes naturally to me compared to recursion. I guess I don't have the right mental model for how to track recursion/recursive calls.
- avip 8y agoThere's a classical test of giving a never seen before programming language (invented for the test), then the candidates need to reason about some code. Never seen that in the industry though.
- cr0sh 8y agoThat would be a rather interesting challenge for an interview; I'd love to be able to try it someday. I recently did something similar, that was of my own devising. At one point several years back I wrote down some "code" in my own "shorthand" form; it was meant to implement a library and some test code for a microcontroller project I was contemplating at the time. I basically wrote it in such a fashion so that I was quick to get my main ideas down without being too "wordy" (whether in code or otherwise). Then I put it away, and didn't revisit it again - until recently. A couple of weeks back I found that code again, and looked at it - worried that I wouldn't be able to recall my shorthand or what I was thinking; in short, worried that my ideas would be "lost". I looked over the code, walked thru it in my mind - and after a few minutes it all came back to me, and I was able to understand again what I had originally created (and where I could make improvements as well). It both left me feeling optimistic about the process, as well as a bit excited that I was able to remember it and improve on it - that I didn't have to worry about it, and that my shorthand "pseudo-code" was legitimate enough that it could have been real code for all that it mattered.
- stephenbez 8y agoYeah that's what we do. As a developer you spend a large amount of time reading/reviewing existing code and making changes to it. I'm surprised there aren't more companies that test for that skill.
- em-bee 8y agoi did something similar with junior candidates a few years ago. put them in front of a piece of code and ask them to fix the problem. not a code review, but debugging. that covers many similar qualities. i didn't expect critical discussion because they were not native english speakers. (in fact they hadn't had an opportunity to even use english outside of talking to their teacher, so when they were able to engage in friendly arguments over how to solve a problem, that was quite an accomplishment, even more so for asian culture which is generally rather submissive (you don't argue with your boss))