How to succeed with coding challenges for development positions

Coding challenges and tests for developers

Last Updated on 4 years by Christopher G Mendla

Many development positions require a coding challenge as part of the interview process. Some of these challenges can be time consuming. Here are some things to consider. 

Coding challenges or tests are common. There are a number of ways companies can preset a challenge or test. 

Types of challenges

There are a number of challenges you can encounter such as whiteboarding, coding tests, coding challenges and paired programming.

Whiteboarding

This is where you are given a problem and asked to code or pseudo code the solution on a whiteboard. Due to Covid-19 the prevalence of this type of exercise has dropped quickly. You can prep to some degree for this by searching for common whiteboard exercises. One of the more popular is to “Invert a Binary Tree”. I have never had to do anything remotely close to this in 5 years of Rails development.

This is probably the least intrusive exercise in terms of time. You are there for the interview anyway.

A variation of this is to do a virtual whiteboarding using a collaboration tool.

Coding tests

A coding test is an exercise that is rather limited in scope. There are providers who have banks of tests. In most cases, if you are using a test from a provider, you will get feedback immediately. In most cases, these are not ‘multiple choice’ tests but rather a platform where you write the code and the code passes or fails.

Proctored vs non proctored

Some coding tests are proctored where someone might be watching while you complete the test.

Editors.

The editors are limited. You may experience a bit of a learning curve for each test vendor. You generally won’t have tools such as debuggers available. In most cases, you can use a browser to search. Some tests ask you to verify that you are only looking at the language’s API and nothing else.

Yep, in the real world I wouldn’t think of doing a search and looking at StackOverflow or blogs in order to help solve a problem </sarc>

Succeeding in coding tests.

One could argue that these types of tests can be easier for someone just out of school or boot camp. The tests might involve something such as creating an intricate array in Rails and pushing and popping characters in and out of the array.  I’ve found that reality is more along the lines of “We need to add an ability to email a PDF to the user documenting their transaction” or “We need to update from Rails 5.1 to 5.2 because of a vulnerability”. 

Many of the testing sites allow you to practice the actual questions.  Hackerrank is one. Leetcode is another.

Coding challenges

These are a more open ended version of a coding test. You will be given a problem to solve. 

Complete application or a limited scope?

I have run into challenges that require completely building a rails application. Most developers spend little time actually building an application from the ground up. Their time is spent maintaining the application, adding features, removing tech debt, responding to vulnerabilities  and other tasks. 

I’ve also found some of the coding challenges to be a bit unrealistic. For example: “Create an application that does x,y,z with testing.  It should take you about 4 hours”.  REALLY?? SERIOUSLY? . The problem was about a full page. The idea was to read in 30 CSV files, some with errors, into the database. Then produce a report based on three associated files. In our sizing meetings, we would never size that at a half day. Consider the following needs to be done:

  • Understand the problem – This can take a little bit of time.
  • Build a basic Rails application – For serious developers, you won’t use scaffolding. However, you have to set up the application and do some basic configuration. In most cases the challenge won’t specify a Ruby or Rails version. If it does, you have to install that
  • Create the database, users and permissions – In most cases, they will specify a common database such as MySQL.
  • Create a private Github repo. – Many unproctored coding challenges will want to see a github repo to track your progress. This helps prevent cheating to some extent. It also facilitates cheating in some cases because there will be inevitable candidate who does not make the repo private.
  • Create the models, controller, views, helpers etc.
  • Write the tests – One challenge said “write the tests as if the app were going to production”. That alone, would take a minimum of 2 hours.

If you look at the tasks above, it seems obvious that the challenge will take a lot more than 4 hours for most developers. I have heard of cases where the challenge took a few days.

The problem with coding challenges and tests

Time

The primary issue with coding challenges and tests is the amount of time required. In the case of paired programming, the employer is willing to invest their time. In the case of challenges and tests, the candidate must be willing to invest the time.

When you are doing a coding challenge, you will probably have conflicts with your job search

Interruptions

There is a huge difference in the amount of incoming phone calls and how you respond to them when unemployed and in a job search vs when you are working while employed including when working remotely.

When you are employed and not in a job search, you can ignore or screen calls.

When you are between jobs and in an active job search, any incoming call could be “THE CALL”, the call that connects you with a position. Trying to work on a major project while being interrupted is problematical. You could set aside time at night or on the weekends to minimize disruptions.

Opportunity Cost.

Suppose a coding challenge will take four hours. There is an opportunity cost. You could be searching through job postings. You could be working on obtaining some side gigs. Maybe you could be doing practice interviews.

The odds.

There is no guarantee that knocking the challenge out of the park will get you an offer. Let me repeat that. You could submit a brilliant response to the challenge and still not land the position. There are a few things that factor in:

  • They just liked someone better. Maybe you were too old. Perhaps they found something on social media and didn’t like your politics.
  • You were in the number 2 position. In many cases, you won’t be the only person submitting a response to a coding challenge. Maybe someone else’s submission was judged to be a little bit better.
  • The grading is subjective. I have yet to see a coding challenge with a Rubric. Your response will be judged by one or more individuals. Some ‘senior’ developers get a bit egotistical. You might have submitted a perfectly good response but it wasn’t the way they would have done it.
  • The position might end up being unfilled. Budget shortfalls or other factors could result in the position not being filled.

TIP – In some cases, the coding isn’t as important as your overall approach to the problem. The ‘grader’ might be looking for documentation or explanations of what you did . In some cases, you might go down a road where the code isn’t optimal. It might pay to add a comment explaining that you are aware of the deficiency and what you would do to remedy it.

Fairness

A well known You-tuber brought up the fact that no one will know if different people get different challenges. He said something to the effect of “If I don’t like someone I can just make their challenge more difficult”. I don’t think he is the type of person who would do that but he pointed out the obvious. That type of discrimination would be almost impossible to prove.

What you should do

Decisions.

You need to determine how you will respond to a coding challenge or test. Will you take it or will you pass? This might depend on the position itself.

Questions to ask

  • Salary Range – The recruiter may or may not want to answer this. My policy going forward is that I won’t do a test or challenge unless I know the salary range and benefits package. This includes PTO, 401k matching, medical benefits and any other benefits. I would hate to spend a day on a coding project only to find that they are offering 20 percent less than market.
  • How many current candidates are there? Again, the recruiter might not want to answer this but it is a fair question. If they say that they have ‘narrowed it to five’ then you have roughly a one in five chance.
  • What is the expected timeframe? If you can work on it over a weekend, that eliminates working during the day when you are interrupted with recruiter calls. On the other hand, you might lose out to a candidate who chooses to drop everything to work on the challenge and submits it the next day.
  • Can I ask for clarification? Even a well written challenge could have ambiguity. Is there a POC that you can contact for clarification?

Follow up and results

In some cases, you will either hear nothing or get a simple rejection. In other cases, the hiring team may contact you to discuss how you handled the project. This is one way to weed out those people who either cut and pasted or had someone complete the exercise for them.

Coding challenges and tests for developers
qimono / Pixabay

Addendum

Code Linters.

In some cases, you may be writing code on your own development machine. If this is the case, it would be a great idea to run it through a code linter if you have the time. A code linter such as Rubocop for Ruby on Rails will highlight formatting errors as well as other issues. 

Create an in depth site as a portfolio site. 

I am in the process of building a Ruby on Rails site to serve as a portfolio site. The site, christopherg.mendla.com is a summary of my qualifications similar to what I have on my LinkedIn Profile. I still have a lot of work to do on it as of October 2020 such as adding database and authentication capabilities.

My thought is to make the Github repository public. My thought is that a company might be flexible enough to look at the portfolio site instead of demanding a coding challenge. That would probably only work in a limited range of situations. Consider though a scenario where you might be interested in a certain position but just don’t have the time for a four hour coding challenge. If you can convince them to check out your portfolio site, they might accept that.

I will create a post later arguing that portfolio sites might be a far better alternative to coding challenges.

About the author Christopher G Mendla

I am a full stack web developer, IT Manager, Project Manager, Educator, Technologist and someone who maintains a keen interest in life and the world around me.

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}