So, you’re applying for a new position or bidding on a project requiring coding skills and you’re faced with a Codility test.
Your Scenario
You’ve been working as a freelance developer for several years.
You’ve had a number of paying clients, and you’ve built out dozens of apps.
You’ve got demo projects on GitHub to show off your coding talents.
You’ve built up practical programming experience through countless hours of coding, debugging, googling error messages, skimming through Stack Overflow questions, and following tutorials.
You’re feeling successful and rightfully confident in your skills.
You’re proud of your work, and want to take it to the next level with a full-time gig.
So you apply for a full-time developer job at company ABC. They liked your resume and the initial phone screen went well. You’re starting to get excited!
It’s on to the next step… an intimidating, fully-automated, high-intensity coding test.
Suddenly you realize, you have ZERO PERCENT chance of landing the job.
It doesn’t matter how many lines of code you’ve written or how elegant of a UI you can create.
You have no chance to land the job because you’ve never seen or used a linked list data structure before.
This is a timed coding challenge—the clock is ticking, and the coding questions are far from a walk in the park, assuming you’re not outright confused by what they mean in the first place.
Table of Contents
You’re smart enough to code a solution to the linked list problem—if you could just slow down and think about it with a clear head, without the stress of the timer counting down.
The minutes quickly slip by. These coding questions are making you question your technical skills, and you’re staring at blank answers as the clock ticks down to zero.
You failed—not because you’re unqualified for the job, but because you weren’t prepared for the coding test.
What is The Codility Test and Why is it Like This?
Some Background
If you’ve read this far and you’re unfamiliar with (or simply new to taking) the Codility test, you’ll understandably have some questions. Here’s a quick overview:
Codility is an online coding platform that launched in 2009 with the purpose of helping big tech companies efficiently evaluate, narrow down, and ultimately select top talent for their in-demand software engineering positions.
In practice it’s a tool used extensively in the hiring process to generally assess basic algorithm understanding, data structure knowledge, and problem-solving coding skills in a timed environment under pressure.
It’s one of many coding tests out there, but it is easily one of the most prevalent in big tech.
But… why?
When you’re one of the biggest companies on the planet with some of the most sought-after positions and your choice of talent amongst tens of thousands of eligible applicants, a phone interview just doesn’t cut it.
At the scale the Codility test was designed for, automation was inherently necessary to help thin out the sheer volume of candidates. In fact, the Microsoft Codility test is probably the most commonly known version coders talk about.
Common Complaints About the Codility Test
- Coders often find the wording of some questions they face in the Codility test to be vague and confusing.
- Because there are typically only 2-4 questions on the Codility test, there’s virtually no room for error or misunderstanding.
- Because of its notoriety, The Codility test is often used today by even small companies and startups, which many argue is misguided, unnecessary, and an ineffective method for building great teams.
- Coders tend to feel that fully automated evaluations like the Codility test ignore some of their most important qualities and skills in favor of efficiency under high stress.
How to Prepare For Your Coding Interview & Codility Test
If it’s your first time interviewing for developer jobs, the coding challenge can be a rude awakening.
I can think of a few other professions that require studying and practicing specialized knowledge that isn’t used day-to-day on the job in order to get the job.
It would be a bit like a hospital requiring surgeon candidates to perform open heart surgery on a random animal to get hired.
You may think it’s ridiculous, a waste of time, and not a good tool to accurately evaluate your development skills—and you may be right.
But this is the reality of the tech industry. There’s no sense in fighting it. If you want to land a full-time developer gig at company ABC, you’ll need to practice all sorts of algorithms and coding challenges.
Essentially, Codility test preparation needs to be a daily habit. You’ll soon become familiar with the most common coding interview questions, and with practice, they’ll get easier and your brain will become a storehouse of patterns that can be applied to various problems.
Along the way, you may even learn to master time complexity and find yourself writing much more efficient code.
So with that in mind, here are the top 6 resources to help you get prepared for your coding interviews.
Cracking the Coding Interview
“Cracking the Coding Interview: 189 Programming Questions and Solutions” by Gayle Laakmann McDowell is the most popular book written on the subject.
The book goes into pretty deep detail on what to expect for an interview at top tech companies and how to prepare yourself, including tips on writing a good resume and what topics you should study. She then goes on to give lots of pointers for the best approach to answering interview questions.
Big O notation is such an important topic that it gets a whole chapter to itself. If you’re a self-taught developer with no formal Computer Science background, there’s a good possibility that you’ve never even heard of Big O, and this alone will doom your chances in many interviews.
In a nutshell, Big O notation can be used to describe the efficiency of an algorithm by showing how many operations must be performed relative to the size of the data set. After studying it just a little, you quickly come to see why nested “for” loops are usually a bad programming solution.
The bulk of the book is dedicated to technical questions and solutions, along with some tips on how to develop strategies for solving problems that you’ve never encountered before.
The author uses Java throughout the book, but it should not be difficult to translate the solutions to whichever programming language you are most familiar with.
Going through the material in the first few chapters of Cracking the Coding Interview will give you a good understanding of the data structures commonly found in coding challenges.
Some of the Topics Covered
- Arrays and Strings
- Linked Lists
- Stacks and Queues
- Trees and Graphs
Programming Interviews Exposed is another good book for interview prep.
Practice Coding Questions With LeetCode
Before you take the actual codility test, do a practice online assessment—or ten.
LeetCode is a top online coding platform for practicing coding challenges. There is a premium version of the site, but there is still a lot that you can do with a free membership.
Problems can be sorted by difficulty level, and you can also search for topics by keyword.
You write and run your code for the solution in the editor window and can supply any test cases you desire. It’s overall an excellent online coding environment to help you get an edge on the actual Codility test before you take it.
Supported Languages on LeetCode
- C
- C++
- C#
- Go
- Java
- JavaScript
- Kotlin
- PHP
- Python
- Ruby
- Rust
- Scala
- Swift
After you’ve run your code and come up with a working solution, you can submit it for evaluation. This lets you see how your solution stacks up against other users regarding runtime and memory.
Most of the problems have accepted solutions that you can learn from (typically in Java and Python). In many cases there are multiple accepted solutions with varying degrees of efficiency.
By comparing the different working solutions, you can develop a sense of which approaches and algorithm designs lead to better runtime and memory efficiency.
There’s also a discussion forum where many users present their versions of solutions.
The thing that I really like about using LeetCode is that you are given the runtime in milliseconds and memory in megabytes for each of your solutions. This lets you compare different ways of solving a problem against yourself, which leads you in the direction of thinking about how to program more efficiently in general.
Understand Codility and the Codility Test
Codility has a setup that’s similar to LeetCode, with the question given on the left side of the screen and the code editor on the right side. As with LeetCode, you’re able to run your code using your own test cases and print out to the console.
The main difference is that Codility tests are timed.
Launguages Supported on Codility
- C
- C++
- C#
- Go
- Java
- JavaScript
- Kotlin
- Lua
- Objective-C
- Pascal
- Perl
- PHP
- Python
- Ruby
- Scala
- Swift
- Visual Basic
You can use the platform to take demo tests for practicing for the coding interview, and one of the biggest benefits of doing this is that you get practice taking timed tests.
Having some experience working under the pressure of a timed coding challenge will come in handy if you find yourself in the same situation during the real interview process.
Another advantage of practicing with Codility is that it’s one of the most common testing platforms that companies actually use. So the more familiar you become with the test environment the more comfortable you’ll be when it comes time to take a real test.
Up Your Game On GeeksforGeeks
GeeksforGeeks is a computer science web portal with tons of educational information on many topics concerning specific programming languages, design patterns, database management systems, and much more. If you’re not going to enroll in a thorough prep course in advance of your interview, at the very least spend some quality time there.
They also have an extensive selection of coding practice questions which can be found under topics depending on the data structure or algorithm type to be tested.
The coding questions are also tagged with the names of big tech companies that are known to use these specific questions in their interviews. If you’ve got your heart set on applying to a certain company, it then makes a lot of sense to systematically go through all the questions found under that companies tag as you prepare for an interview with them.
Get Comfortable On CS Dojo
CS Dojo is a YouTube channel run by a former Google employee. He has lots of videos on coding questions used by real companies such as Google, Facebook, and Amazon in their interviews.
Video is a particularly good medium for learning about coding and algorithms because it helps you to visualize the problem at hand.
I find that YK, who runs CS Dojo, is good at breaking down problems and illustrating the solution steps to the viewer. One tip, though, is to watch his videos at 1.25 speed because he does tend to speak at a casual pace.
Master Codility Test-Style Questions With Codewars
Codewars is a website where developers can train by taking coding challenges in one of 43 different languages.
Programming Language Options on Codewars
- Agda
- BF
- C
- C++
- C#
- Clojure
- CoffeeScript
- Coq
- Crystal
- Dart
- Elixir
- Elm
- Erlang
- Fortran
- F#
- Go
- Groovy
- Haskell
- Idris
- Java
- JavaScript
- Julia
- Kotlin
- Lua
- NASM
- Nim
- Objective-C
- OCaml
- PHP
- PowerShell
- PureScript
- Python
- R
- Racket
- Reason
- Ruby
- Rust
- Scala
- Shell
- Solidity
- SQL
- Swift
- TypeScript
Codewars is a bit unique in that users create the code challenges for other users to solve. After solving each “Kata” (code challenge) you can see all of the solutions that other users submitted.
Upon examining their code solutions, you can leave comments and up-vote solutions based on the criteria of “Best Practices” and “Clever”.
The solutions with the most up-votes will be shown at the top of the list, naturally, and this will allow you to learn from the best coding practices and most clever programming techniques of other users.
You can also filter solutions by showing those of the coders that you follow on the platform.
Codewars can be a fun place to practice coding because of the martial artist training theme that runs through the site. The Kata you are initially given start out relatively easy, too. So you can try a few out rather quickly to get a feel of things.
In Summary: Practice Makes Perfect
If you’ve got tech interviews coming up, it’s a good idea to get in the habit of working a a couple different coding challenges each day. They may not be the funnest thing in the world, but the more experience you have working on these types of problems the more confidence you’ll have when presented with a new one.
In the same regard, you should not turn down any invitations to interview—even if you don’t think that you’ll take the job. The reason for this is that you’ll become more experienced with the process of taking interviews and feel more comfortable with each one you take. That way, your confidence will show up when it really matters.
Another good tip is to practice coding in a plain text editor or with pen on paper. If you’ve been programming for many years you may not realize how much you’ve come to rely on the IDE to autocomplete your syntax and point out errors immediately.
You likely won’t have this available to you in the interview, especially if you’re asked to code on a whiteboard during an on-site interview. So get some practice coding your favorite language unassisted by the computer to become better at remembering proper syntax.
Don’t Disregard The Fundamentals
Finally, good physical and mental health is always of utmost importance when it comes to performing at at top level.
Interviewing is a stressful situation for everyone—it’s totally natural to feel a bit nervous. But you don’t want to increase your stress levels unnecessarily by cutting short on your sleep. Always get a good night’s rest to recharge your brain for the coding interview.