The Tyranny of the Timed Coding Test

Creating code which just barely works in the absolute minimum amount of time is a skill which, if I were hiring, I would select against, not for.The sites running these tests actually acknowledge this..One, such site, for example, cautions that although good coding usually involves things like good variable naming, you should not worry about that when doing the timed tests, since typing longer identifiers could eat up valuable seconds — so just go with a, b, and c..Another one recommends that if you have trouble with the timed tests you could spend your time just practicing taking more and more timed tests on a site like Codility until, like a well-trained monkey, you can ride the bike a little better.Even if we limit our attention to “coding”, as opposed to all the other more important skills that developers must have, all the people involved in these timed coding tests have a fundamental miunderstanding of the nature of coding: they think it’s typing characters into a terminal..They don’t even understand the basic notion that there is an internal, mental design process..For good programmers, this part of the process can take up to 50% of more of all the time spent getting to shipping code..Even the simplest problem has meaningful design issues that need to be worked out before putting pen to paper.This misguided notion of “coding” as nothing more than typing a series of magic incantations into a computer — the faster the better — pervades the industry..It also has permeated popular opinion and lies behind simplistic social visions of “teaching everyone to code”..This is the “coding as laying bricks” view — where the only relevant metric is the length of the walls the bricklayer lays and how fast he lays them..Nothing could be further from the truth..But we digress.The tic-tac-toe exampleLet’s consider writing a tic-tac-toe game..We will say, hypothetically, that the testing site in question allocates us 30 minutes to finish writing this as a console-based game..The hapless testee is instructed to write code (as a “class” in the OOP sense — more on that later) which can represent the board, make a move, render the board, determine if the board is full or the game is won, and manage the sequence of man-machine moves.We need to decide on the basic data representation for the board.. More details

Leave a Reply