3 ms·
Would a better interview test be to ask the candidate to review code rather than write it themselves? That is, give them a code sample, describe what it aims to
by HorizonXP 7y ago
Would a better interview test be to ask the candidate to review code rather than write it themselves? That is, give them a code sample, describe what it aims to do, and ask:
1) Does this code accomplish the goal?
2) How would you improve this code to make it more readable? More efficient?
Personally, I think I'd rather work with people that know how to review code and provide feedback/commentary, since that usually means they can write good code themselves. It should lead to a better team dynamic.
- granshaw 7y agoI think both the ability to write, and (read+understand+effectively explain and give an opinion on existing code) are important, and the latter is severely under-appreciated in interviews
- oldandtired 7y agoMany years ago, I was given a piece of code and asked to explain what the code did. I got the job because I starting asking questions about what the code was expected to do and what sort of evnironment the code was running in. Even though it was only three or four lines, without first understanding the contextual questions, the code itself could have been doing a variety of tasks. Since I did become the maintainer of the code base, it did turn out that there were quite a few non-obvious effects occuring in that piece of code. There are plenty of programmers who would have jumped right in and explained what the code was doing (surface appearance) and missed the simple fact that there was nowhere enough information present to actually know what that code was actually doing. So even with you two questions, which are a start, getting them to indicate they understand the context/environmental problems can be a more challenging process.