If you aren’t familiar with HackerRank & CodeWars, they are sites that enable software developers to test their ability to solve algorithm-type problems by providing a platform to create “problems”, sample inputs & expected outputs. Type in your code, press the submit button and it will test your code against a battery of test cases. This can be fun – it’s rare that a software engineer has to solve these types of problems in the real world. The problem with these types of platforms is that they sell themselves to companies as a way to screen candidates. The clients come up with their own problem, sample inputs and expected outputs. Candidates submit their code and the companies can review their solutions and screen them appropriately. Sounds great doesn’t it?
I was asked to take such a test for a company and I thought why not? On Sunday I took a couple of hours to implement a relatively simple algorithm (determine how many degrees of separation X cities are from city Y based on highways they connect.) This wasn’t a particularly difficult problem, but given that I have never had to implement this algorithm in my professional life (but I did come across it in college, etc.) it took me a good hour to get it right. I fulfilled the test cases given and submitted my code.
The following day I receive an email from the recruiter asking me if I had completed the test, what I thought of it, and my response was:
I think it was a pointless academic exercise that neither proves or disproves my capacity to do the job I’m interviewing for.
A little while later I received another email from the recruiter, stating they were going to pass on me because:
They felt it lacked some structure and was low on error handling.
This left me incredibly frustrated. Nowhere in the problem statement did it mention the code needed to be “production-level” code with proper validation/error handling (in fact there were plenty of assumptions allowed as to the validity of the data they provided.) Given that I did the test in my own free time, I find it rude of them to pass on me because I failed to to polish this pointless exercise – especially when no such expectations were set in the original problem statement. Additionally, none of the tools that I use for writing “production-level” code were at my disposal. I had to use HackerRank’s terrible in-browser editor. Sure, I could have done the work in Visual Studio and then copy/pasted it into HackerRank’s webpage, but I’ve seen occasional compatibility issues between .NET Framework & Mono (which I believe HackerRank utilizes for C# tests,) so I decided to played it safe.
Going forward if a company expects production-level coding tests, I will expect to be paid for my time, and I will expect to be allowed to use the tools of the trade in order to show them what I can actually do. Having said that, I would much rather collaborate with a prospective co-worker/tech-lead on a problem case to determine if there’s a good fit for both parties.