Pi Day

It’s Pi Day. March 14. 14th day of the third month. And if – for some reason – you insist on writing the date as “3/14”, it kind of looks like Ο€, except that 3/14 = 0.2142857….

We might all be better off celebrating Pi Approximation Day – July 22, which some would write as 22/7, which is 3.142857… That is much closer to the true value, which is, of course


I typed that from memory. Trust me.

So anyway, math lovers will temporarily put aside their advocacy for the one true ISO8601 style of writing the date, which is


for one day, in the interests of the greater good of society. We will write the date wrong, just this once.

Sidebar: The 2000 version of the ISO8601 standard allowed for writing dates with “reduced accuracy”, and allowed you to use the notation “–MM-DD” for a date without a year, so you COULD write “–03-14” and be within the standard. But for reasons I don’t know, mainly because it costs money to download a copy of the standard, the 2004 version of ISO8601 apparently disallows writing the month without also writing the year.

Every –03-14 I always wind up thinking about Pi. I can’t help it. Everybody at work is sending me pi jokes and links to pi T-shirts and this is what happens when you make the mistake of standing up in a large team meeting 20 years ago and reciting Pi to 100 decimal places in order to make some point about Applescript programming; you are now “the pi guy” and every year, it never stops.

do you know a lot of random facts about pi?


are they interesting to lots of other people?


are you going to write a blog post about them anyway?


ok just for now, why do you know Ο€ to 100 places?

well I memorized it to 200 places in grade 10, but I’m getting older.

why did you memorize it to 200 places in grade 10?

Because I thought it would impress girls

did it?

It took a while. Cathy married me several decades later. It was worth it.

New shirts for the Moon Shot 1969 50th Anniversary

fifty years ago

July 16, 1969. Mom and Dad took my brother and me to Florida to see the Apollo XI launch. I will be grateful to them forever for taking us to see the greatest scientific thing ever.

I took this picture with my Kodak Instamatic 100. It’s still my favourite picture I’ve ever taken. See that white dot above the two puffs of smoke? That’s Neil Armstrong, Buzz Aldrin and Michael Collins heading to the moon.

Blurry photo of Apollo XI launch

We watched this from what is now Parrish Park in Titusville, on the SR 402 causeway heading to the Kennedy Space Center. Dad rented a camper van and we patiently waited it out, along with a million other people…

Waiting for launch

and we checked out the same spot in 2015 (this time with a slightly better camera).


Oh, and we got souvenir shirts. Here we are, having just returned from Florida in this spacious camper van – me, Mom (who, sadly, didn’t get a shirt), Dad and my brother. Our family in our MOON SHOT 1969 shirts

Check out the cool shirts with a beautiful late 1960s aesthetic. “MOON SHOT 1969 – I was there.” They weren’t quite bold enough to put the actual launch date on the shirt. Just in case.

Steve in his shirt

My sister was a baby at the time and didn’t come along, and I’m sure she has been very tired of hearing for almost 50 years of what an amazing thing this was. And she didn’t get a shirt either.

I don’t know where my original shirt is. Of course it most likely wouldn’t fit, seeing as how it was probably a boy’s medium, and I’m now an adult extra-medium. Dad still has his – and my brother even wore it to the final Space Shuttle launch.

christmas 2018

But with the 50th Anniversary coming up, I thought of a fun Christmas present. How about getting those shirts re-made in the correct sizes? Michael sent me a snapshot of his carefully preserved shirt, and I touched it up (in Pixelmator) and submitted it to Entripy, a great local producer of T-shirts who seem willing to do really small orders when they’re not cranking out 25,000 at once for the Raptors or Leafs.

I ordered 4 reproductions for me, my parents, and my brother. And then thinking of everyone else we’d see at Christmas, who have all kindly listened to our stories of the Apollo XI launch without complaining, I ordered a few more of a slightly different design. See if you can spot the difference.

Many thanks to Entripy for doing a great job on these. I hope everyone in my family wears the right one next July 16.

the designs

I Was There

Moon Shot 1969 – I Was There

I Wasn't There

Moon Shot 1969 – I Wasn’t There, But I Know Somebody Who Was

the end result

The family in our new shirts

(I’m holding a reproduction of the July 21, 1969 New York Times, headline “MEN WALK ON MOON.” Thanks for that, Michael!)

a Twitter CFL experiment

So this is kind of interesting, isn’t it?

Wow, isn’t that wild. A twitter account called @CFLPredictor that posted exactly one tweet, on June 13, before the season started, correctly calling the outcome of the 106th Grey Cup, played in November! What are the chances of that?

Well … I gotta come clean; as it happens, I have a pretty good idea what the chances of that are, because I …

  • created the CFLPredictor account on June 10, as a private account not visible to anybody.
  • wrote a script (using a nifty command line twitter tool) that posted hundreds of variations of the above tweet – essentially, every possible combination of Team A over Team B
    • in a close one
    • in overtime
    • by a touchdown
    • by more than a touchdown
    • in a blowout

    Essentially it did this ..

    for t1 in BC Edmonton Calgary Saskatchewan Winnipeg Toronto Hamilton Ottawa Montreal; do
        for t2 in BC Edmonton Calgary Saskatchewan Winnipeg Toronto Hamilton Ottawa Montreal; do
            if [[ $t1 != $t2 ]]; then
                    tweet "My Grey Cup 2018 Prediction: $t1 over $t2 in overtime."
                    tweet "My Grey Cup 2018 Prediction: $t1 over $t2 in a close one."
                    tweet "My Grey Cup 2018 Prediction: $t1 over $t2 by a touchdown"
                    tweet "My Grey Cup 2018 Prediction: $t1 over $t2 by more than a touchdown."
                    tweet "My Grey Cup 2018 Prediction: $t1 over $t2 in a blowout."

    To be safe, my script had to include various extremely unlikely options like “Toronto over Hamilton”, because with the CFL’s crossover playoff format, any team can potentially beat any other team.

    (It didn’t post “Toronto over Toronto”. I have my integrity here.)

  • admired the 9 * 8 * 5 = 360 different tweets, none of which were visible to anybody other than me.
  • waited until November 25, Grey Cup day
  • PANICKED because in looking over my script, it had encountered an error months earlier and had neglected to tweet two possible Ottawa-over-Calgary outcomes.
  • on November 25th, watched the game carefully, hoping desperately for anything BUT “Ottawa over Calgary in overtime” and “Ottawa over Calgary in a blowout”.
  • watched with relief as when Calgary beat Ottawa 27-16
  • deleted all but one of the tweets
  • made the account public so anybody could see it
  • retweeted the now-visible one remaining tweet

  • sat back and waited for the flood of people to comment WOW, that CFLPredictor account must be either a football genius or some sort of amazing artificial intelligence to have correctly called the outcome of the Grey Cup months before it happened.

I’m not sure what my plan was going to be if anybody else actually picked up on this but naturally I was hoping it’d get mentioned in the media somewhere.

To my slight disappointment but ultimate relief, everybody on the Internet must be smarter than me because nobody fell for this fake news ruse.

So anyway, next time you see an amazing Internet prediction, consider the possible source.

My name’s on your iPhone

Really. Go find it. I’ll wait.

Couldn’t find it? Settings > General > About > Legal > Legal Notices. Scroll waaaaaaaay down. Eventually you’ll hit this –

Legal Notices

That’s right, Steve Hayman of the Indiana University Computer Science Department.

What’s all that about?

In 1989 or so I was working at Indiana University as a network manager in the computer science department.
We had a fleet of Apollo and Sun workstations, and one or two of these weird NeXT cube things, which I wound up getting to know pretty well but that’s another story.

University of California, Berkeley had a popular variant of the UNIX system, which we used at IU on our Suns, including the Sun 3/60 on my desk, that happened to be based extensively on AT&T’s System V.

Berkeley wanted to get rid of the AT&T parts so that they could make it truly open-source and unencumbered by the AT&T license restrictions, so they put out a call for volunteers to rewrite certain AT&T programs from scratch.
(The rules were: you were allowed to study and run the original, and look at the man page, but you couldn’t look at the original AT&T source code.)

Along with many other people who were much better programmers than me, I volunteered, and they asked me to take a stab at rewriting /usr/games/bcd, which was a silly little program that took text and drew a fake punch card around it.

BCD output sample

BCD stands for Binary Coded Decimal, which was the text encoding standard that evolved into EBCDIC (Extended Binary Coded Decimal Interchange Code), as used on punch cards, which I actually used in my first year Waterloo computing course on Fortran, and you would perhaps have liked the conference talk I gave at MacSysAdmin on the history of text encodings from Morse Code to Emoji – but more importantly – this bcd program qualified as high concept computer geek humor back in the day.
Also it was in /usr/games! What exciting computer games we had in those days!

AT&T Unix came with this utility, and I volunteered to rewrite it, and submitted the code to Berkeley.
They seemed happy with it and asked me to do another so I also rewrote /usr/bin/join, which is a sort of command line version of the database join function.
(That one was way more useful but way less fun to demo.)

Weirdly, the AT&T version only created 48-column cards instead of the standard 80-column card, but I was intent on copying the AT&T version, so if you ever look at the source you should change this line

int columns = 48;

So anyway I kind of forgot about it, but here we are, decades later.
Berkeley UNIX has continued to evolve, and a lot of the Berkeley code found its way into Linux, and MacOS, and even iOS.
Needless to say, iOS doesn’t actually include either the bcd or join programs, but it does include a lot of other Berkeley Unix code.

Apple lists the license agreement and credits for a ton of open source code in its Legal Notices section, and Berkeley, god bless them, has chosen to include the names of all these contributors from long ago. The Berkeley section says This code is derived from software contributed to Berkeley by …. and lists dozens of people, virtually all of whom did something way more important than I did.

But there it is.
I’m sure hardly anybody reads the Legal Notices but it’s the first thing I check when there’s a new iOS release. Just making sure things are still there.


Berkeley unix mutated into OpenBSD and FreeBSD and NetBSD and Linux and MacOS and iOS and watchOS and tvOS and I can’t keep track of it all – but you can see the OpenBSD version of the BCD source here.

I am really amused that in my efforts to copy the AT&T version exactly, I inadvertently copied a bug from the original! Four years later, Dyane Bruce noticed (and fixed) that Q and R were being punched the same way! ooops.

old experiments

The other day my son informed me that the basement family room light turned on at the exact moment someone rang the doorbell.
Now, we have some HomeKit automation in our house – light switches, thermostat, etc – but I know our [doorbell](http://www.ring.com) is not a homekit-enabled doorbell, so that couldn’t possibly be it.

It must have been just one of those weird coincidences.

Maybe an electrical glitch.

Maybe he’s imagining things….

Today I got thinking about another kind of automation.
Is there something I can do so that I can post something once and then it gets automatically submitted to Twitter, Mastodon, Facebook and this blog?
Hmm. I know a lot of people like [IFTTT](http://www.ifttt.com), a web based tool where you can make actions happen when something else happens ….I remember looking at that once … I should log in there and see if there’s something.

So I log in to ifttt for the first time in a long time. And discover this, which has been quietly running away for the past two years:

IFTTT workflow



Oh THAT. I remember now.

That explains it. That long forgotten experiment has been turning our basement lights on whenever the doorbell rings for almost three years, completely unnoticed by everybody.

Well, unnoticed by me.

Thanks for the tip, Nick.

(I’ve deleted it. Thank you for your service, my little forgotten ifttt workflow.)

You should get a custom domain.

# You really should get a custom domain.

I like having “hayman.net” for my domain name. (I registered that one over twenty years ago – I wish I had been fast enough to get “hayman.com” – but that was for many years a cash register company in the States, that has now mutated into a consulting company. But they are also Haymans (no relation) so that’s cool.)

A domain can be as cheap as $10/year.
What can you do if you’ve registered your own?

* **Have whatever simple, easy to remember, easy to say email address you like, forever**. You can set things up so that email to YourSimpleEmailAddress is magically forwarded to YourActualComplicatedEmailAddress.
i.e. Let’s say you registered the domain name “YourLastName.com”.
Now you can tell everybody that your email address, forever, will be *YourFirstName*@*YourLastName*.com.
Doesn’t that look better and more professional than “steve1964@myCableCompany.com”? And if you ever switch email addresses – maybe you’ve dropped the cable company – you *don’t* need to tell anybody that your new email address is now “shayman3907@gmail.com”. They can keep using *YourFirstName*@*YourLastName*.com as if nothing ever happened. You just change the mail forwarding setup. And …
If you’re looking for a job, which email address do you want to tell them – FootballFanGoArgosGo1983@BigHonkingCableCompany.com, or Steve@MyDomain.com ?

* Set up similar email addresses for friends and family.
My dad has a simple email address now, one based on his name that is easy to remember, and he has been known to brag about this vanity address to his friends. I think he says “my son runs the internet, that’s how he managed to get hayman.net”

* Set up emails for your kids that just forward everything to *your* email address, so you can gently introduce them to email. I have been known to register a domain name and email forwarding for somebody else’s new baby as a thoughtful gift. I think this is a thoughtful gift. Wouldn’t you like to have a permanent, easy to remember email address from the day you were born? (Other people disagree. I’m still trying.)

* Make a single email address that goes to BOTH Mom and Dad.
We did this any time the school or anybody else wanted an email contact.
We told them to use MomAndDad@OurDomain.com – and those emails were a simple address that forwarded to BOTH parents so that we’d each see the important communications.

* Make a *catch-all* address, if you like, so that ANY email at all sent to WhateverYouLike@YourDomain.com will be forwarded to your actual email address.
Then you can invent a new email every time you register for something.
Tell the newspaper that your address is, say, “WashingtonPost@yourdomain.com” and you can instantly recognize emails that come from the paper to you.
Or if you need to register for some throwaway site, don’t give them your real email, give them ABrandNewMadeUpAddress@yourdomain.com . You can always arrange later that any mail sent to that address will be magically deleted.

* Have a blog with an easy to remember domain name, like this one – “blog.hayman.net”, instead of (in my case, at the moment) “shayman.micro.blog”.
I like micro.blog but if I ever get tired of it and want to move to wordpress or tumblr or something else, I can keep using “blog.hayman.net” and just change a few settings so that that address now refers people to wherever my blog actually is.
If you happen to be using micro.blog, there are some good instructions here on setting up a custom domain.

* Have a web site that actually redirects people to your Facebook page or your blog page or anywhere else. We’ve done this for my wife’s travel business, a simple URL – [TakeACruise.ca](takeACruise.ca) – that redirects to her travel agency’s web site.
We can change that redirect later to point to anything else, but she can use this as part of her brand.

The hardest part, of course, is thinking of a good domain name that isn’t already in use.
All the good .com’s are gone. Every-possible-last-name.com has been registered, sometimes by a company that wants to sell you some email forwarding services.
But I bet you can think of something.
Maybe you register *lastnameFamily*.com or *TheLastnames*.com or some other variation?
Maybe .net or .ca or any one of hundreds of new top-level-domains that have been created recently?

## Where to start?

There are plenty of registrars who will register the domain name you’ve dreamed up, and let you set up email forwarding like I described.
Most will let you search for domain names across .com, .net, .ca, .club, .construction, .family and hundreds of other top-level-domains at once.

I happen to like [Namecheap](http://www.namecheap.com) and [EasyDNS](http://www.easydns.com) but there are lots of others.
Let’s say I was doing this today.
I’d go to namecheap.com and there’s a search box on the main page. Type in “hayman” and it’ll start searching … and we see …

* hayman.com (taken)
* hayman.net (taken – wait, I already have this one)
* hayman.ca (that’s me too)
* hayman.co (Available! Premium! $5,532.50/year! No thank you!)
* hayman.live (Only $2.48/year for the first year)

And many more.
Pick one, sign up, pay Namecheap, and you’ll own your domain.

Let’s say you like “hayman.live”. Namecheap then gives you a web site where you can set things up so that email to, for instance, “steve@hayman.live” gets forwarded to “steve_hayman_2314238234@CableCompanyIHate.com” and you never need to tell anybody your ugly cable company email address again. Just tell them “steve@hayman.live”. Any mail anybody sends to steve@hayman.live will get magically forwarded (by Namecheap’s servers) to your real email address.
And if you choose later in life to switch from cableCompanyIHate.com to phoneCompanyJustAsBad.com or me.com or gmail.com or anything else,
you don’t need to tell everybody in the world what your new address is; you just return to namecheap.com and fiddle with the forwarding.

## Caveats
* Don’t forget to renew your domain every year. If you’re serious about this, set up automatic renewal. You don’t want to forget to renew “hayman.live” and then have all your incoming email stop working – or, worse, somebody else registers YOUR domain name and won’t give it back unless you pay them big bucks. Actually happens.

* You’ll have to set up your Mail program so that mail you *create* says “From: steve@hayman.live” instead of “From: steve_hayman_2314238234@CableCompanyIHate.com”
* Pick a reputable domain name registrar.
* A .com domain still seems to have the greatest prestige, for no particularly good reason other than .com has been around the longest. It’s also getting really hard to find a.com domain that hasn’t already been chosen. There’s nothing wrong with using .net or .ca or any of the hundreds of others – but if you *can* find a simple .com that’s still available, use that.
On the other hand, ma