How to get a driving road test during a pandemic

My middle son is currently eligible to take the road test1 for his driver's license!

The problem is that we're in the middle of a global pandemic so Goverment services are spotty at-best. First the DMV was closed for months, now there's a huge backlog of people trying to get road tests.

The timeline of our attempts went roughly like this:

  • Jul 2020 - Check the scheduling website and see they're booked through the end of Aug 2020
  • Aug 2020 - Find out that Sep 2020 tests become available on Aug 14
  • Aug 13, midnight - Go to scheduling website to find it's crashed.
  • Aug 14 - 16 - Periodically check scheduling website to find it's either down or still only showing Aug
  • Aug 17 - Site is up and showing schedule for Sep 1 - 18 and they're all booked 😡

At this point, I do what any self-respecting programmer would do. I write a script to automate this whole process.

The idea is something like this:

  1. Grab the contents of the scheduling webpage
  2. Check to see if there are any open days
  3. If 2, send me a text message
  4. Repeat every few minutes

There are obviously a million ways to go about this so I decided to go with my old standby, PHP2.

Here are 3 libraries that made this little script a breeze:

And here's the code which took less than 20m to cobble together.

The fun part is, I never even had to run it as a cronjob.

On the third manual test, I got a hit for availability on Sep 15, 2020!


  1. A little background for anyone outside of the US (or Kentucky).

    Here in Jefferson County Kentucky, you take a written test to get your driver's permit at age 16. With the permit, you can drive as long as there's a licensed adult over 21 in the car with you.

    After 6 months of driving with your permit and logging 60h of driving time, you're eligible to take the road test where you have to drive a car with a DMV (Department of Motor Vehicles) employee with you and complete certain tasks (parallel parking, etc). Once you've passed the road test, you get your provisional driver's license which lets you drive without an adult (with some restrictions) 

  2. Yeah, I know PHP isn't cool. Most of the stuff you hate about it hasn't been an issue since PHP 5 and PHP 7.4 (especially using something like Laravel) is downright tasty. Whatever. You do you. 

Link Dump (05/29)

Dump of interesting stuff I read about this week:

My favourite line of CSS

A nice example of a fully responsive grid with no media queries.

tl;dr

grid-template-columns: repeat( auto-fill, minmax(min(calc(180px + 12vmin), 100%), 1fr));

Presspack

Toolchain for developing WordPress sites featuring:

  • Modern JavaScript through Webpack
  • Live reload via BrowserSync
  • SCSS support
  • Easy dev environments with Docker Compose
  • Stateless, immutable plugin management via Composer
  • Helpful HTML5 Router for firing JS based on WordPress page slug.

Timber and Twig

Twig is Symfony's template language for PHP.

Timber is a WordPress plugin that helps connect WordPress and Twig.

The result is MAGIC!

You get a very Laravel-esque MVC approach to WordPress theme development.

GenerateWP

An online tool for generating common WordPress code-snippets.

5 Types of ZSH Aliases

A handy reference of different types of ZSH aliases.

All Posts