1. 程式人生 > >What Reviewers Look For in a Take-home Coding Assignment

What Reviewers Look For in a Take-home Coding Assignment

? First Impression: the assignment is your business card

Before diving in, I’d like to highlight a general guideline.To the reviewer, the task you’ve submitted reflects your skills and line of thinking in the most unmediated way.To me, it says more about the candidate than his/her resume and LinkedIn profile. Kinda like one’s GitHub account when contributing to open source projects.While hacking the challenge, keep in mind the time and effort you invest in enhancing and bulletproofing your CV or social networks accounts.

? It MUST work!

This may sound obvious to most readers, but the truth is a great deal of submissions fail on execution. Personally, when I encounter a thrown error in the first run attempt I always check whether it’s something I can quickly solve before rejecting the assignment. But you don’t want to count on the reviewer’s kindness, let alone spare debugging time.

The majority of failures are caused due to missing required packages or third-party modules. This means that these libraries were not specified in your solution’s dependencies list (package.json, requirements.txt etc.). They were probably globally installed in your working environment.

Pro tip: My suggestion is to apply the same methodology I practice for testing a candidate’s task — run it on a “clean” environment, to prevent the effect of system-wide installed packages.There are several ways to achieve that such as using a sandboxed environment (

virtualenv for Python, RVM for Ruby etc.), running your code inside a container with a minimal image. Asking a friend to run your code on his/her machine doesn’t guarantee exceptions clean execution.

? 3rd Party Modules to the Rescue

These days most, if not all software companies use open source libraries in their products. Some companies take an extra step and give back to the community by contributing or open sourcing their own written projects. This collaboration improves code quality and generally drives the industry forward. But that’s a little off-topic.

My point here is, don’t assume you’re expected to write the entire solution yourself. Some reviewers, me included, actually appreciate the ability to locate the right packages, integrate and utilize them in your code in a clean elegant way. As it is a common pattern in a developer’s daily routine.

There are countless of examples to where external packages can come in handy and spare you a significant amount of time. One that comes to mind is using a design library, like Bootstrap/Material-UI/Semantic-UI/other, when working on a Frontend or Fullstack exercise.

Disclaimer: the core of the solution should be solved by you, in a way that allows you to “defend” it in the follow-up interview.

Pro tip: Make sure you have at least a basic understanding of the package you’re using, you may be asked about it in the follow-up interview. And again, mention the package in your README.

Source unknown, received via Slack

? Use Style Guide or Linter

Style guides, like Python’s PEP8, improve the readability of code and make it more consistent. This becomes even more important If you’re a Junior Developer and not fully familiar with coding standards in the industry.Linters, like JavaScript’s eslint, adds another layer that helps you avoid errors and potential risks.

You have a limited time, don’t waste it wondering if you should use tabs vs spaces or looking for typos. Style guides and linters also make sure you don’t miss a leftover you forgot to remove like a TODO, comment or print.Most linters even have automatic fixers and are pluggable in most IDEs.It doesn’t matter which style guide/linter you choose, as long as you’re consistent with it throughout your code.

Enforcing a set of rules will help the reviewer focus on what’s really matter — your architecture decisions and the implementation logic (no “bikeshedding” needed).

Pro tip: Remember to state the style guide/linter you chose in your README.

? Source Code Hosting and Version Control

Most companies I know use a web-based hosting service for version control using Git, whether it is GitHub, GitLab, BitBucket or others.Having the option to host both private and open projects makes them the best platform to use for coding exercises. That is why I was pretty surprised when several candidates chose to send their code via email.

While it may not be a requirement, my advice is to always submit your assignment through the code hosting service the company you’re applying to is using, for 2 main reasons:

  1. It makes your interviewers’ life easier — she/he can simply clone it to the working environment as opposed to downloading specific files, moving them around and in some cases even renaming them. An alternative can be to use the code hosting web UI for checking and the post-assignment interview.
  2. As I’ve mentioned before, it has become an industry’s standard.Less experienced developers may be a little intimidated by working with GitHub for example, but the truth is, it is simple enough that companies nowadays expect candidates to know or learn by themselves.

Pro tip #1: If you’re concerned your current employer may see your submitted task, make sure to use a private repo.

Pro tip #2: Break your code into logical commits (if you aren’t already following this paradigm). It helps the reviewer check your assignment and better understand your line of thinking and the development process you followed.It is OK, of course, to rearrange the commits once you’re done, just don’t squash them all together.I wouldn’t go as far as ensuring each change functions independently, like I do in my day-2-day work, especially for tasks that aren’t too complex.