Take-home coding assignment

In the coding assignment, you are given a set of instructions and provided resources to use, often shared through Github, platforms like CodeSubmit, or files sent to you directly. There is usually a deadline of 1-2 weeks for you to complete the coding assignment, with the assignment graded usually on:

  1. Design: the solution is a well thought out and planned
  2. Execution: the solution runs correctly and outputs the desired result
  3. Specification Satisfaction: the solution follows the instruction properly and meets the goal of the challenge
  4. Code Quality: your code is well-formatted, understandable, simple, and maintainable.
  5. Documentation: your comments are concise, meaningful, well-formatted

With that being said, we will go over tips to help you score well on the above points.

Things to do before writing your first line of code

The first thing you must do is to read the assignment and create a road map. Usually, coding assignments have a deadline of 1-2 weeks, with the expectation that the candidate will spend 3-5 hours to complete the assignment. Before you get started working on the assignment, it is important to make a plan:

  1. Write down the requirements – write down clearly what your code should output. If there are any questions please ask your contact for the interview immediately. Ask yourself, in other to achieve the desired output, do you need to make any assumptions? If yes, write down the assumptions as well. if the assumptions seem like a stretch, again, email your contact for clarification.
  2. Whiteboard session to draw your design – you should create a map that outlines your technical design and architecture. Here, ask yourself if you would be needing any 3rd party modules or libraries (This can save time and your workload). Often, many companies are fine with you using 3rd party modules or libraries, but if you feel unsure, email your contact. Also, if you decide to import a 3rd party module/library, you must clearly document this and add it in the readme.md file.
  3. Test plan – for the coding assignment we recommend you use Test-driven development or write unit-test.

Tips for Coding Assingment

  • Run your code in a sandboxed environment – this makes sure that your code will run as you intended for the interviewer as well. There may be libraries or 3rd party module that you did not mention in your solutions dependencies list. In this case, the interviewer may open your assignment, the code doesn’t run and you may get rejected. To avoid this make sure your code works in a sandboxed environment as well.
  • Make sure to comment and document code in a readable manner – for more details, here is a great article for you to read
  • Use a linter – linters can help with identifying errors when you using standard rules and flag stylistic and programming errors against the rules it knows.
  • Write a good readme.md– readme.md is often the first thing your interviewer will read. Here you can help him understand how you achieved the requirements of the project and writing a readme.md helps the interviewer know that you care about documentation. Here is a link to read about how to write a good readme.md