|
|
|
|
|
by gilleain
3157 days ago
|
|
We do the same. It's amazing to me how many people with superficially impressive CVs do one or more of: * Cheat * Fail to follow simple instructions * Write no tests for there code (even the given examples!) * Just horribly fail to implement an algorithm All in all, it's just a filter to be used before proper face-to-face interviews. |
|
Well, I've been on the fence on this one. With imperative languages, testing is pretty much a requirement because of side effects and scope-creep (nahh, throw it into global).
Tests can be a good sanity check for simple checks like "I fixed a bug where X is supposed to give 22. Lets verify that"... But the problem is the tests are then code that can update and rot as main code changes occur.
I've preferred a more functional method. I don't want to test - I want to prove a function handles its inputs and provides the correct outputs. Unless there's a good reason for state , I prefer keeping functions clean. And even then, with state (say, a tally function for bandwidth), I prefer to have the variable updated with its own function. Keeps clean/nonclean separate.
Now.. one thing that's absolutely not acceptable is not commenting code. "Magic sequence in perl doing 6 things unintuitively" is not code comments. :(