8 ms·
I like this idea a lot. We routinely screen people with a really simple programming task to just make sure they aren't completely lying (which happens more than
by kikibobo69 16y ago
I like this idea a lot. We routinely screen people with a really simple programming task to just make sure they aren't completely lying (which happens more than I can believe).
1. I took a test, implemented reverseWords (which is a test we often give candidates), and was rather shocked to discover that in your estimation, I failed. Yet, pasting the code into vim, and the unit test you say I failed ... I didn't fail. The fact you failed me when I should have passed, isn't great. :) More info on the failure would be helpful.
2. If I were using this on a real candidate, I would like to know how long it took them to do the test.
I think it's a great idea; I'd consider using it for pre-screening once the kinks are worked out.
- kikibobo69 16y agoOops, I'm an idiot. I printed the output of strcmp() == 0, not strcmp() :^). Still, it would be very nice to see what was the result of the test.
- kranner 16y agoIf you entered a valid email address, it should mail you a report that includes a description of the testcase that failed.
- kranner 16y agoCould you paste your code here or email it to me at karan@codeboff.in? I'd love to find out what happened. In my experience code that runs on OS X often fails on linux, because gcc on OS X seems to initialize newly malloc'd memory to zero, when gcc on linux doesn't (and it shouldn't, according to malloc's man page). Thanks!
- calloc 16y agoShouldn't? malloc doesn't make any guarantees that the memory is initialised or not. In the Linux malloc man page it specifically says it is not cleared, on Mac OS X it doesn't specifically mention that it is initialised. On FreeBSD it says it is initialised Yes, programmers should make sure that memory is indeed cleared, preferably by using calloc or memset. I just ran a test on my FreeBSD laptop, allocating 256 MB of ram (on a 64 MB physical ram laptop), and then walking through it, and with just malloc I got all 0's. I then had the program write random out to those 256 MB, free it, re-run the program, still no garbage values. Same on Mac OS X. I don't currently have access to a Linux machine so it is not possible for me to run the test there. So apparently that way may run on Mac OS X and FreeBSD could fail on Linux.