2 ms·
> The amount of unqualified candidates that have a decent CV and are reasonable to talk to, but completely unable to correctly write a while loop is too damn hi
by AllegedAlec 7y ago
> The amount of unqualified candidates that have a decent CV and are reasonable to talk to, but completely unable to correctly write a while loop is too damn high.
There was some research into this, and IIRC, only half the programmers, both experienced and junior, got a while loop right (IE: no off by ones etc) the first time.
- indecisive_user 7y agoI had to write a while loop in an interview recently, and I also made the off by one error on my first attempt. But after I ran through a couple test cases by hand, it was pretty easy to see the mistake and fix it. I wouldn't say getting it right on the first try is the most important thing. Writing code, logically thinking it through, and running through test cases to fix mistakes is pretty similar to how coding on the job is, albeit with less contrived problems.
- perl4ever 7y agoA long, long time ago, somebody wrote about how most supposedly competent programmers can't write a correct binary search under test conditions.
- hvidgaard 7y agoUnless we simplify it significantly, it's surprisingly hard to do. And completely irrelevant anyway.