When applying for jobs in tech, in particular in startups, you will are almost certain to be asked to complete a coding exercise before even getting to the technical interviews. While there is some debate on whether or not this is good practice, it may be hard to escape them if you don’t have significant open-source contributions to showcase your work.
In this post, I will highlight some of the keys to writing to an answer that will get you to the next stage.
Have some minimal high level documentation to explain the overall architecture, how to build the code, and how to run it (could be a few lines in a README.md).
If you’re implementing a more complex algorithm, give a short description of what it does. In your real job, it’s likely that you won’t have to document your code directly, but here you want to make the life of the reviewer easier.
Building and running
Use build scripts and a dependency management system. Your code should build and run with two command line instructions maximum.
If you are asked to write a service, go the extra mile and dockerize it. It’s usually a few minutes effort but will show your concern to make your answer production-ready.
The code itself should be easy to read, and showcase the best of your coding skills. It’s usually a good idea to write self-documenting code. Think of the person reviewing your code, will they understand the design in under 30 seconds?
Generally the problem at hand would be relatively easy, no need to over-engineer your solution, but your code should have proper separation of concerns, reasonable unit test coverage, and show one or two advanced programming techniques such as mocking or dependency injection.
Having reviewed dozens of coding tests, I now know exactly what question I want to be answered:
Will this candidate improve our productivity or decrease it?
Which means that your answer should strike the right balance between good software design, and pragmatism. After all, this is just an exercise that you will most likely do in your free time. Produce solid code that gets the job done.