3 ms·
I think the interviewer would be looking for you to show how you might implement string[::-1] as an algorithm - rather than how to invoke the existing string re
by georgerobinson 11y ago
I think the interviewer would be looking for you to show how you might implement string[::-1] as an algorithm - rather than how to invoke the existing string reversal algorithm in cPython.
- brudgers 11y agoThat's the problem with these questions, the expected answers are steeped in poor engineering practice. When a string needs reversing a library call is always the best first answer. Always. Always. Always. Because the library call has already been debugged.
- bartonfink 11y agoHypothetical response: "Of course, brudgers, and with your experience I'd hope that you would understand that we don't expect you to replace the $LANGUAGE standard library on this job. However, it's still important to us to know that you have some idea how to do that, even if only as a proxy for the sort of work we do expect you to do on this job. So, mind humoring us and taking a stab at it?"
- brudgers 11y ago1. When the absolutely best correct technical answer is unacceptable then how can the question measure technical competence accurately? 2. When the acceptable answers encourage suboptimal engineering practice what in an empirical and non-magical world is the question likely to select for? 3. When an organization is committed to an empirical approach, what is there besides: :does it pass the test? :does it need refactoring? 4. Once one notices how quickly the hypothetical response elided into measuring the willingness of the candidate to produce objectively worse code upon instruction, should you be surprised if the question selects for people? The formal rejecting the correct and best answer is a tribal more steeped in "real men write their own string reversal algorithms" culture. For a junior engineer it sends the message that writing your own string reversal algorithm is a good thing. For a senior engineer, absent the sort of conversation we are having -- and isn't this the sort of conversation one would want to have with a senior engineer? -- the question selects for something other than sound engineering judgement. It's not that the question is bad, per se. It's that when the best objectively correct answer is unacceptable, the belief that it objectively measures competence is a rationalized superstition because it mostly measures, "is this someone who I want to drink beer with?"