Spy Codes: a code booklet to help your little spies

A handy cheatsheet for helping your kids crack codes.

Download PDF (6 pages)

I love this! I built this and extensively field-tested it with my own crack team of super spies (my kids).

It's 6 pages of my favorite Spy Codes, for use with your own budding spy team (i.e. your kids).

It's a FREE PDF, a dense little book, guaranteed to bring you hours of fun. (And give your kids a lot of practice at performing lookups.)

spy codes preview

This 6 page booklet is simply a series of tables containing alphabets that help you translate:

  • Morse code
  • Braille
  • Pigpen cipher
  • Knights Templar Code
  • A Mayan Numbering System
  • Caesar Cipher (complete table)
  • Complete ASCII (in decimal, hex, and binary)
  • And more

It is vital that your child does not let this book fall into enemy hands.

Using these sheets to encrypt and decrypt messages is a practical introduction to substitution ciphers.

If your kids (or students) enjoy these, there are many, many more advanced concepts that pick up where these exercises end.

Last year I blogged about: Dadding 101: Give Your Kids A Trail of Codes To Break.... and of course coding trails are not limited to use by dads. Mums, grandparents, foster parents, step parents, guardians, siblings, cousins, friends... everyone should be giving trails of codes to break to all of their loved ones at all times. It's one of the most joyful things in life. I know my brother and I set these up for each other when we were not the grizzled old men we have transformed into today.

Simon Singh's delightful volume "The Code Book" is a great read on the topic of codes throughout history. It's a pleasurable read and goes qute in-depth. Fun for all ages.

Znl nyy lbhe pbqrf or nf rnfl nf guvf bar!


The Book Is Ready

Choose Your First Product cover 200

Here's the thing. I wrote a book. It's out now. And you can get it here:

Get "Choose Your First Product"

This charming little tome, "Choose Your First Product," is for any first-time product creator who wants to find a product idea that they can sell with confidence.

There's a tragic pattern that I've seen too many times:

I've watched people around me as they make their first product. They find an idea they love, or a problem that intrigues them. They pour everything into it. They code in isolation. They delay shipping, again and again as they add features, or polish existing features. If they ever ship, which they almost never do, the product is full of beautiful code. Yet it can't find a single customer. Or very few.

And they're supposed to "pivot" at this point. But that's impossible. They're demoralized, for starters, and second, they have no meaningful feedback on which to pivot. They've failed completely. Defeated, they declare "I was just no good at marketing." And give up.

They think the problem happened after launch. They didn't hustle hard enough. They didn't choose the right font on their landing page. (Maybe they can A/B their way to success?) They don't realize they were on the wrong track before they even fired up the IDE.

This book is a practical remedy to that problem. How do you start with something people will pay for? How do you start with something that will be easy to sell?

I've boiled it down to a four-step plan, the T.O.A.D. It's a framework. Of course it is. I walk you through the TOAD, this four-step framework, showing how easy it can be to find an idea that will help real customers.

Because I like to overdo things, I made it available in four formats:

If you want to make a humble product that will help real customers, then it's possible this book will be useful. No pressure though.

Read more here.

bird1 row 230


Death to the Passive Voice

When I was a funny little school kid, my English teachers would moan:

Stop using passive voice in your writing!

I did not know what they meant and found no enlightment in their answer:

Passive voice is when a verb is used without a clear subject.

Now that I'm a big kid and I live in the modern futuristic utopia of 2018, I finally understand what passive voice is all about!

If you go to an application like "Hemingwayapp" and paste in the sentence:

Passive voice is when a verb is used without a clear subject.

...you will see the app highlight the words "is used" as a blatant example of passive voice...

We've employed a "doing-word", the verb 'used', but we haven't said who or what did the doing. There's no one to blame for this action.

With a little thought we can re-write the sentence in an active way:

"Passive voice is when writers use a verb without a clear subject."

Now we know who is doing the thing... writers did the thing!

As an editor it's hard to turn someone else's passive writing into active writing. Because when we turn passive writing into active writing we must decide "Who did this verb?" Only the original writer can be sure where to stick the blame.

Passive voice is completely reliant on weak verbs. Things are "done". But they're not done in an interesting and engaging way. Once you've made a subject responsible for the action, you can also enliven the verb:

"Passive voice is when writers dribble out their verbs with no clear subject."

"Passive voice is when tepid writers lay down their verbs with no clear subject."

Death to the Adverb

On this topic of choosing verbs we find another big suggestion from hemingway app: use fewer adverbs.

If you write:

The girl ran quickly across the lawn.

Hemingway app will ding you for "quickly" -- as it's an adverb, and Hemingway himself punched out as few of them as possible. You may have observed that he wrote the books "For Whom the Bell Tolls" and "A farewell to arms". He did not write "For Whom the Bell Merrily Tolls" and "A Cheery Farewell to Arms."

A writing coach won't just tell you to ditch the adverb: they'll get you to improve the verb.

So this is worst:

The girl ran quickly across the lawn.

This is better

The girl ran across the lawn.

But this is betterest!

The girl dashed across the lawn.

A single word, a verb, that contains within it more meaning than the verb plus adverb combo.

And again, only the writer, not the editor or the coach, can choose the correct verb.

The girl sprinted across the lawn.

The girl dashed across the lawn.

The girl flew across the lawn.

The girl tore across the lawn.

The girl fled across the lawn.

And so on. Each with different connotations.

(I'm hooked on these topics lately, as I've been writing the book Choose Your First Product (launching any day now!) and editing the book Evergreen Skills for Software Developers... I can't read anything without mentally taking out the red pen.)


I'm .ok you're .ok: introducing folder profiles for bash and powershell


Summary: a .ok file holds a bunch of handy one-liners, specific to the folder it is in. It can be viewed or executed with a simple command. It makes you smarter and more efficient.

I work on lots of little projects and each one has its own nuances and tricks. Context switching from one project to the next is hard on the brain. Some projects are brand new, some are ten years old. Some are in Windows, some are in Linux.

Every time I go to resume work on a project there is that moment of confusion as the brain tries to reload a dusty tape of facts from cold storage.

To make it easier to recall all pertinent facts, I've started putting a little file called ".ok" in each project. This file holds any relevant shell commands I use with that project. (I have a powershell version and a bash version)

For example here's the .ok file from my "Today I Learned" project:

.\quick.ps1; .\deploy.ps1; # quick-build, prepare to deploy
.\build.ps1 # complete build, after which you can see preview
_book\index.html # see preview
.\wordcount.ps1 # custom word count script

If I type the command "ok" then I will see a listing of this file with a number against each line:

> ok
1. .\quick.ps1; .\deploy.ps1; # quick-build, prepare to deploy
2. .\build.ps1 # complete build, after which you can see preview
3. _book\index.html # see preview
4. .\wordcount.ps1 # custom word count script

And if I type "ok 3" then it will run line number 3, like this:

> ok 3
> _book\index.html # view preview

(And in this case I'll see a HTML preview of the current state of the book)

To make "ok" extra useful, I've setup my system so that every time I navigate into any folder (via cd), the command "ok" is run immediately. So if there is a ".ok" file I'll immediately see the available commands. (I did this by removing the "cd" alias, and making a custom "cd" function that does a set-location followed by a call to "ok")

If I want to add a command to the file, it is the work of a moment. I can do it immediately by editing the ".ok" file with "ed" or any standard editor.

Source code is here:

"ok" folder profiles for bash

And here:

"ok" folder profiles for powershell

Sometimes I write a thing and slowly stop using it. Other times I use it more and more, day after day, year after year, as happened with NimbleText. So far, "ok" seems to be one of those "use it more and more" solutions. So I think you would do well to give it a try.

Any issues, lemme know.


2017 by the Numbers

Being productive in 2017 was particularly challenging. The most powerful nation on earth elected a madman, and no-one could really think about anything else. If you produced nothing, but managed to survive, then good for you.

Here's a summary of things I shipped. Numbers in parens, e.g. "(3)", are last year's figures.

Things I didn't publish:

  • A massive pile of genealogical research.
  • Research into Python in Minecraft
  • "Epic Loot Quest of the Dungeon Raider" (threejs fps)
  • "Androids versus Electric Sheep" (Artificial Life program)
  • Linqpad scripts for generating Guitar chord/key/scale cheatsheets and progressions.
  • 65 stub articles at the wiki.

Your photos are a mess! Maybe this PowerShell script can help

As a family, you have a huge photo problem. Well, at least my family does.

After a holiday we have thousands of photos on two smartphones, two regular cameras, and a few on an iPads as well. From this horrible mess, my wife wants to select the best of the best and print them in a photobook.

Before she can start putting the photobook together, we need to collate the photos from all the devices in such a way that photos are in precise chronological order, regardless of which camera they came from. And to make matters worse, the smartphones have automatically adjusted for timezones, while the others have not.

Enter the "Rename-Photo" commandlet I put together in Powershell. This thing has improved my life far more than the average PowerShell script.


First: if you're going to use this, there is no warranty, and I advise testing on one or two pictures first, before blasting all of your photos.
Second: I'm not a great PowerSheller and haven't turned this into a reusable "module". If you want to help me turn it into a module please do!

With those caveats out of the way, I'll show you why I love this script and why it brings bliss to my whole family.

First, you bring all the photos together, from all the devices, onto one hard drive, in separate folders. This might itself involves lots of rummaging for cables and some cursing and various levels of frustration. But eventually you might have a structure like this, with one folder for each device:

photo folders

Once you've got those folders in place, you will need to run a script in each folder (more details below).

First, you can grab the script from here:


or by running:

git clone https://github.com/secretGeek/rename-photo.git

And to make sure the Rename-Photo function is available, "dot source" the PowerShell file, by running:

. .\RenamePhoto.ps1

(from Powershell!)

Done that? Now go into one of your photo folders (in PowerShell) and run the rename-photo function against all the files. You'll need to know what values to provide for a few snazzy parameters.

For example

dir *.jpg | % { Rename-Photo $_.FullName "iPhoneSally" "Martinique" }

This will rename all of the jpg files in the current folder, to have a filename like this:



  • 2017-11-10-14-12-10 — is a sortable representation of the date the photo was taken (from the Date taken EXIF data). It's not formatted in strict ISO 8601 format. If the file doesn't have the relevant EXIF data (for example if it's a png file) then the LastWriteTime is used instead.
  • iPhoneSally — is the device name you've supplied as a parameter. This can be helpful later if you need to work out who took a particular photo
  • Martinique — is from the 'location' parameter
  • 53959339 — is the number of bytes of the file, and acts as a useful tiebreaker in-case two photos were taken on the same device in the same second. (This was effective for me, over tens of thousands of photos, so I wasn't forced to use something like a checksum for tie-breaking.)

There's one more parameter, and you can use it for fixing the infamous timezone issue. Once you've worked out that the camera's internal clock was reporting times that were 10 hours earlier than the real local time, then add a final parameter of "10", e.g.

dir *.jpg | % { Rename-Photo $_.FullName "iPhoneSally" "Martinique" 10}

If you've made a small mistake, the script can be re-run. There's no limit on how many times you can re-name the same file. And you can alter the script to improve the format.

The real filename formatting work is done in the line that looks like this:

$newName = ("{0:yyyy-MM-dd-HH-mm-ss}_{1}_{2}_{3}{4}" -f $exactDate, $device, $location, $length, $extensionWithDot)

And if you change the script, just dot it again. There's no limit on the number of times you can do this either.

Once you're happy with the filenames, copy all of the files, from all of the devices, together into a single folder.

I tend to break them down into one folder for each year, so you don't totally overwhelm the file system.

Then all the files are together, and the joyous hurdy gurdy of a family trip has been sorted into a single stream of captured moments.

Any improvements, please submit a pull request or raise an issue on GitHub.

Any questions, the comments are open.

kind regards


How to Discuss the Important Things With Your Kids

With my youngest about to turn 7, I found it an important time to discuss with her the most important question of all:

How do 7-segment LCD displays work?


7-segment LCD displays are the sort you see on old-fashioned digital watches, microwave ovens, time-traveling deloreans and other common household appliances.

First I drew 10 sets of the 7 cells, all inactivated. I described to her how the 7 cells are switched on or off to make the numbers. Together we colored in the right cells to make up each digit.

7 segment display

We talked about how the digits from 0 to 9 can be described by 7 switches. I drew up a blank truth table and filled out the first row, to show which switches were on or off for the '0' digit.

She got it immediately and set about filling out a lot more of it. She soon optimized filling out the truth table by doing a single segment at a time across all numbers (rather than getting a single digit done at a time). i.e. she would fill in one column at a time instead of one row at a time. I found that a surprising optimization, and it was definitely a faster way to do it.

I described a bit about how you could make a circuit that does this. (She's made simple analog circuits with roominate and snap circuits). I talked about the use of a decoder and an oscillator; I doubt she absorbed much of that... digital circuit design can wait, this was more of a way to spark her own thinking.

Later that day I asked the kids what their favorite part of the day was. My youngest replied that her favorite was the bit where we drew the 7 segment displays. I was happily surprised so set about writing this "bragpost". I think it means this is an activity that kids might enjoy more than you'd initially expect.


Navigating at the command line

stupid ideas slackathon logo

People say "real life" is the thing, but I prefer the command line. I live there all day.

One thing I recommend for your powershell profile, is this little piece of ascii art:

function ..() { cd ..}
function ...() { cd ..\..}
function ....() { cd ..\..\..}
function .....() { cd ..\..\..\..}
function ......() { cd ..\..\..\..\..}
function .......() { cd ..\..\..\..\..\..}
function ........() { cd ..\..\..\..\..\..\..}
function .........() { cd ..\..\..\..\..\..\..\..}
function ..........() { cd ..\..\..\..\..\..\..\..\..}
function ...........() { cd ..\..\..\..\..\..\..\..\..\..}
function ............() { cd ..\..\..\..\..\..\..\..\..\..\..}

It's super helpful when you're navigating around.

If you want to move "up" by 3 folders, you just type "...."

In bash you can put an equivalent thing in your profile.

alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias .......='cd ../../../../../..'
alias ........='cd ../../../../../../..'
alias .........='cd ../../../../../../../..'

For bonus points, don't use cd -- use pushd instead (it works in bash, powershell, even DOS) -- and it means you can return to a previous location with popd.


The value of realistic goals (with data)

(I guess I'm one of those productivity gurus now.... sorry)

I accidentally created some data that seems to have broad implications:


If you set your goals even a little bit too high, then your performance will be considerably worse.


I've started using my iPhone to track how many steps I do each day.

When I first started tracking my steps, I set the goal at 10,000 steps per day (10K) because that's what I'd heard was good. I'd make it most days but fail on other days. Sometimes I'd smash way past 10k, then crash really low for a day or two. In 3 weeks, I missed my goal on about a quarter of days. It felt quite frustrating.

I took a step back (pun intended) and decided to lower my goal to just 8,000 steps per day (8K). This was still a big increase from the low activity levels I'd exhibited before tracking my steps. (Working from home: hard to keep active!)

steps streak

With this lower goal of 8K per day, I've now managed to achieve my goal every day for 42 days, also maintained a much higher weekly average than I had during the 10k days, and I feel a lot better about it. I might increase the goal soon but would only increase it to 8,500. If I manage that consistently I'll bump it up again: but the increases will be slow and steady and always achievable.


How to get in the zone

Be very careful with this knowledge. Use it sparingly.

Yesterday I had a mountain of work in front of me. It was 3 pm and I knew I would be working until at least 7 pm.

I took a deep breath and reached for a Spotify playlist called 'Deep Focus'.

I took one large slug from my coffee cup, pressed play on Spotify, and turned toward my work.

It was as if someone had pressed the turbo button on my mind.


Within moments the hyperdrive was fully engaged.


I sped through the galaxy at beyond light speed.

2001 odyssey zing

All knowledge and facts and wisdom of the ages were immediately available for use by my expanded neural membranes.

leon thinking

A bubbling fractal panorama of tasks roiled up in front of me and was completed and delivered as quickly as it emerged.

trippy landscape

I was a digital demigod surveying the writhing landscape of technical problems, assisting the lightning arcs of insight to cut down from the bubbling clouds of possibility and materialize into the dazzling particles of fully realized innovation.

There was no yak whose hirsuit locks could challenge the sharpened razor of my wizened scalpel.

Less than an hour later I pressed commit on the last of these tasks.

I looked down to find my coffee was cold, completely untouched.

There was no more work to be done. I basked for a moment in the featureless landscape of a world with no remaining tasks. It was warm and dark and devoid of form. I felt at peace and at one with the flowing energy of the universe.

What I'm saying is that the Spotify 'Deep Focus' playlist is OK.

This morning I listened to the playlist once more. It sounded trite and useless. The magic was gone. I'd become immune to the effects, I'd grown tolerant to the active ingredient. I'd need to up the dose if I wanted the same high.

Now I'm on the prowl for playlists that bring a deeper and deeper sense of focus. Will I ever get back into that zone? Send playlists.