3 ms·
> We can simple review the interviewee’s code prioritizing simplicity over things like did he/she consider every corner case. That sounds like a recipe for dis
by TeMPOraL 7y ago
> We can simple review the interviewee’s code prioritizing simplicity over things like did he/she consider every corner case.
That sounds like a recipe for disaster, though. Simplicity that doesn't account for every corner case in the domain of the code[0] is false simplicity, a bad abstraction. The challenge of writing simple code is this: threading a single, unifying concept through all corner cases.
--
[0] - I.e. when writing a function, you don't necessarily have to account for e.g. the off chance of heap getting corrupted externally in the middle of execution of your code. But you'd better account for all the values your function might be called with, in all combinations.
- flowerlad 7y ago>threading a single, unifying concept through all corner cases Some corner cases influence the core algorithm some don’t. Checking for degenerate cases and so on may not influence the core algorithm, if so need not be done in an interview.