Passing the DVSA theory test

I recently passed by DVSA theory test, which is a requirement for sitting the practical driving test to legally drive on UK roads. I booked my theory test 3 days ago, grabbing a last minute slot for earlier today, having not studied before then. Normally the waiting time is around 3 weeks, but when checking for future availability I spotted a late cancellation and grabbed it, then made plans to frantically study.

The tests are split into a 50 question theory test, with multiple choice answers, and a “hazard perception” test where you are shown a driving scene where you must click on potential hazards as they arise. There are plenty of guides available for studying for the tests, but the only ones I would trust are the official DVSA ones. You don’t want to fail part of the test by following an incorrect, unofficial guide that might be out of date (for example, in 2013 the DVSA updated the hazard perception test from live video to CGI, making a lot of practice videos obsolete). They’re not that expensive, either.


I was about to download the DVSA theory test PC software, but later found that they provide a mobile phone app that does the same thing. I normally try to avoid apps, because the screen is small and I don’t like giving them access to my phone, but in this case the difference in price was significant (£5 vs £15 for the same software). I also didn’t want to risk the software not working on Linux via Wine, which is what I use (badly written Windows software often can’t be properly emulated on Linux).


Almost all of the theory questions can be studied for simply by reading the Highway Code once, carefully, and using common sense; and of course doing lots of practice questions to check your understanding. You can even skip the parts of the highway code specifically for cyclists, motorcycles and trucks/heavy goods vehicles if you’re lazy, as these won’t be tested directly. Ensure you cover the road signs, as there are many and they aren’t all ones you’d have observed regularly on roads where you live.

The Highway Code took me about 3 hours to read, and I did this first before using the app. The app contains hundreds (~750) of questions, some of which will be asked in the actual test, and written guides to the Highway Code sections. Reading everything in the app, and doing the practice tests for each section, took me about 10 hours split over two days. Mock exams of 50 questions took about 15 minutes each, and I did four or five of those. My average score was 49/50.

Thinking, braking and stopping distances

Questions in the test can involve thinking distances, i.e. the distance travelled by the car between a hazard occurring and you processing it and braking, braking distances, i.e. the distance travelled by a car between you applying pressure to the brake pedal and the car coming to a halt, or both of those combined – the stopping distance. For these distances, you are supposed to just learn the numbers for speeds of 20 to 70 miles per hour. The Highway Code lists the following:

Speed (mph) Actual thinking distance (m) Actual stopping distance (m)
20 6 12
30 9 23
40 12 36
50 15 53
60 18 73
70 21 96

While I could have memorised these numbers with a bit of effort, I find it easier to remember formulae so I came up with some equations. For the thinking distance, simply multiply the speed by 0.3:

\(\text{thinking distance (m)} = 0.3 \times \text{speed (mph)}\)

This gives you the exact thinking distances. For total stopping distances, including thinking and braking, multiply the speed by 1.5, then divide by 100, then add 0.3, and multiply what you get by the speed again:

\(\text{total distance (m)} \approx \text{speed (mph)} \times \left(0.3 + \frac{1.5}{100} \times \text{speed (mph)} \right)\)

This equation is not exact, but the largest error it generates is 1.5 m, which allows you to easily select the correct answer from the multiple choice answers.

Speed (mph) Actual stopping distance (m) Calculated stopping distance (m) Error (%)
 20 12  12  0
 30 23  22.5  2.17
 40 36  36  0
 50 53  52.5  0.94
 60 73  72  1.4
 70 96  94.5  1.6

It may be possible that you are asked about just the thinking distances or braking distances. For the braking distance, calculate first the total stopping distance and subtract the thinking distance (\(0.3 \times \text{speed (mph)}\)), or leave out the \(0.3\) term in the total stopping distance equation.

Hazard perception

To get the hang of hazard perception, you not only need to train your eye to learn what potential hazards look like, but also learn how to play the game the software presents: if you want to score points, you can’t click on a hazard too late, nor too early. Each hazard has an unseen window in which you score from 5 to 0 points, with quicker response in principle giving you higher scores; however, some hazards have weirdly late scoring windows and I was often caught out when practising having clicked too early on something I knew to be a hazard, meaning I got 0 points. Ridiculous! I therefore changed my strategy to click multiple times on each hazard, in case the window had not yet started by the time of my first click. This is a risky strategy, because the software monitors your clicks and fails you if you are perceived to be gaming the system by clicking on everything that moves or in a pattern. I failed a few of the practice tests by clicking too much, which is frustrating because I was not trying to game the system but just click within the scoring window.

It turned out the app only contained 10 example hazard perception scenarios, which was woefully little. To give myself extra training on hazard perception, I paid for access to the DVSA’s online hazard perception course. It reports that it provides 100 examples, but some of these (around 40) are not actual hazard perception tests, but multiple choice questions. You are shown a similar scene to a hazard perception test, but some time in the video the scene freezes and you are asked something about what you should have observed (such as “Which lane should you be in” when an approaching motorway lane merges from the left). These are still useful, as it trains you to observe signs, but it’s not exactly what you will be tested on in the real thing.

The test

I easily passed the theory part of the test with 47/50 correct. You are not told exactly which questions you answered incorrectly, but you are given a list of their categories. I expected to get at least one wrong answer, as a question I had never seen before about an aspect I had never heard of came up – it was about “electronic stability control (ESC)”. It’s not even listed in the highway code’s index, so I’m a little miffed that it was even asked. Note that this is not ABS, which is in the highway code. One of the others I got wrong may have been about how to respond to an accident – it asked a question about what to do next after stopping and putting hazard lights on, and I think I selected “check for breathing” instead of “ensure an ambulance is called”. (To be fair, my way might have been better for the victim’s immediate health!)

I got 64/75 for my hazard perception test, but it should have been 69/75. Again, remember that you must play the DVSA’s silly game here. On one of my scenes, I clicked only 7 times in total, 5 of which were on the hazard (a car stopping abruptly to pick up a passenger in your lane), and afterwards I was told that I got 0 for that scene due to unacceptable clicking behaviour. I was totally miffed by that. In all of my practice, the only times I was given this message were when I clicked excessively on everything that moved, and at least 10 times in total. Nonetheless, 64/75 is well above the pass mark (44), and about the same as what I was scoring in my practice sessions.

One thing to note about the hazard perception test is that the videos appear to run about half as fast as the practice scenes. The car moves quite slowly during the test. I guess this is deliberate, so that you practice with the “hard” material and then ace the actual test. I managed to get 5/5 for 8 of the 14 clips, and 4/5 for 3 more because there was plenty of time to see potential hazards.


To do well, you need to study. It’s possible to pass without studying, with a bit of common sense, but some questions can stump you without practice, such as the stopping distances and the exact order in which to handle accidents. I recommend the app, and the online videos. If you’re studying for your own test, good luck!

Cryptocurrency quotes from the terminal

I made a small tool to retrieve prices of cryptocurrencies from the command line. It uses by default Kraken‘s API, first retrieving the available asset pairs (e.g. bitcoin to US dollars), caching them locally, then allowing for quotes to be retrieved with these assets.

For example, you can get the price of Bitcoin in British pounds with:

cq quote BTC GBP

This outputs something like this:

BTC price on Kraken as of 16/10/17 11:14:10:
 Ask: £3938.80
 Bid: £3713.50
 Last: £3501.00
 Today low: £3501.00 (last 24h: £3501.00)
 Today high: £3969.30 (last 24h: £3502.00)


Additional assets (such as Etherium) are supported; additional exchanges can be made available using what I hope is a straightforward set of code additions.

Visit the project’s GitHub page for installation instructions.