In your first snippet, would you expect a candidate to tell you that `f` might be undefined?
In your first snippet, would you expect a candidate to tell you that `f` might be undefined?
No. Because I'd expect the candidate to focus on subtle issues, and not waste time on bleeding obvious ones!
Of course f() might be undefined. Blind Freddy knows that. But Blind Freddy can't necessarily see the other (much more subtle) problems in those 4 lines of code.
I want to know, is this candidate more than Blind Freddy? Does he inhabit what some of us call "the real world", where things like division by zero are things to be consciously managed by proper coding practices?
(Edits for clarity)
But its the lack of communication on your front that would make people fail your test, not their lack of competence.
Anyone can summon an obscure puzzle and claim its easy when they know the key.
isn't this a bit reductive?
I posted a detailed exposition of my own approach to interviewing. I expected nothing more than some intelligent comments thereon.
In response, someone says I'm "prejudiced", and why would he "give a fuck" about my concerns; another says my concerns exist "in a parallel universe"; and another says my views are "religious"!
Equeeze me if I don't take well to copping random insults in what is meant to be an intelligent discussion forum. Particularly from people who've contributed zero to the discussion so far - like you! I suggest you get out of the basement and get some exercise. Maybe ask your mum for a bike?