2 ms·
> Seems like a great way to learn absolutely nothing about the candidate. They learned that as the spec became more complicated and twisted, his code got more
by jancsika 2y ago
> Seems like a great way to learn absolutely nothing about the candidate.
They learned that as the spec became more complicated and twisted, his code got more and more clever.
I guarantee that there were other candidates whose code got simplified and more commented as the spec grew.
They even gave both a general hint:
> An example of this was that a 50 lines solution with a line of 110 characters would be considered.
... and a custom-tailored hint directly to the candidate:
> Asked the interviewer if it was OK to rewrite it using only types, she asked her partner and he told me it was but that he couldn’t see the point of it and advised me it would not be the right tool for the problem given that there would be many more rules.
Be honest: if you were dealing with a monstrously complicated spec would you rather read straightforward code with comments like, "Have to special case -0 here, ugh" or see two lines that inexplicably make everything into base 15?
- lcnPylGDnU4H9OF 2y ago> Be honest: if you were dealing with a monstrously complicated spec would you rather read straightforward code with comments like, "Have to special case -0 here, ugh" or see two lines that inexplicably make everything into base 15? Unquestionably the latter. Especially if its behavior matched the spec flawlessly. Doubly so if I can demonstrably break it by modifying/removing those two lines. I’m not totally sure why that’s controversial; of course, I understand that I might inherit this nonsense without the author around to explain themself but it sounds fun to be faced with that.
- williamdclt 2y agoDepends on the requirements. If they’re a complex tangle of special cases and heuristics, I want the code as imperative or low level as possible so that I can tweak the fine details with precision. If they’re clearly set rules, I want the code as declarative or high level as possible (even if it becomes a strange DSL) so that I have confidence it matches the rules,that it enforces invariants and that adding new rules won’t introduce edge cases in existing ones
- adammarples 2y agoThe base 15 thing is a great example of thinking more deeply and then precisely solving the problem in its own domain of complexity
- Dylan16807 2y ago> They learned that as the spec became more complicated and twisted, his code got more and more clever. > I guarantee that there were other candidates whose code got simplified and more commented as the spec grew. I don't understand this criticism. His code only got weird and clever when he was told not to use numbers. That is a very reasonable consequence for such a huge restriction. And then with the switch to base 15 his code went back to being nice and simple.