The Gift of Pi

Written by therealfitz | Published 2017/03/14
Tech Story Tags: technology | pi | software-development | conspiracy-theories

TLDRvia the TL;DR App

Many years ago, back in the late 90’s, I worked on a large software project with some friends, including Ben Collins-Sussman, Lęfty Wałkowiak, and Karl Fogel. The software was for A Very Big Bank, and part of the project required writing out a custom CD-ROM for each of their big corporate customers every month. The CD was basically a website that included a whole bunch of transactions, along with detailed information about each, and served as a kind of local, static supplement to the fancy webapp that we built for them.

So, if a customer requested (and paid for, of course) a monthly summary of their transactions, we’d build a full static website in a RAM disk, create a disk image from that RAM disk, and then shoot the disk image over to the CD burner.

Now, The Very Big Bank purchased some fancy schmancy CD burners that we could send our disk image to, along with a little file full of metadata. The CD burner would notice the metadata file, pull a blank CD out of the hopper containing a hundred or so blanks, burn the image to it, and then print a lovely label right onto the disk.

Well, that’s what it was supposed to do.

In testing, I found that it just flat out wouldn’t print some of my test disk images. I debugged and debugged and debugged and finally figured out that the CD burner, which could burn CDs with up to 640MB of data, failed on very small images. Any image smaller than 640KB, to be precise. We contacted the manufacturer of the CD burners, and they weren’t much help — I mean, after all, why would you want to burn less than 640KB to a CD?

The software running the station was proprietary, so we couldn’t really debug it, and The Very Big Bank was bearing down on us with a tight deadline. So we thought about how we could fix it as quickly as possible because we were already running a little bit behind. Since the CD burner wasn’t part of our system, and we couldn’t debug it, I gave the bank a choice:

  • I could start charging them hourly to debug it and push back the deadline a week or two or three

or…

  • I could just stuff a 640KB file onto every image before I started writing the files out onto it.

As you might guess, they chose the latter.

So now the big question: what to put in the file? I mean, we could just fill it full of ones and zeroes, or garbage from /dev/random, but that seemed uninteresting. I mean, we had a chance to send something out to basically every corporate customer of The Very Big Bank, so what could we send?

We sent them Pi.

Exactly 640KB of precisely-calculated Pi, which is a lot of Pi. We checked the Pi file into our version control system and it was baked right into our app that we delivered to them, in an innocuous file at the top level called “.pi”. And that’s how 640KB of Pi wound up on tens of thousands of CDs in the hands of who knows how many corporate banking customers.

Or so I thought.

Right after we shipped, I was catching up on code reviews (Yes, yes — we didn’t know better back then) and saw that someone (Who Shall Remain Nameless) had committed a change to the Pi file just hours before we shipped. I found that to be more than a bit odd, so I opened the message to look at the diff, which showed that only one line, near the middle of the file, had changed:

033033492664885329561879526644631906349389649279747796305818237760658035402279669108180932267251426142876850855023403639597056214125151376204672244428979978554541319- 0137205600294567063403824299178075125724484463577152589+ 01372056002 Lee Harvey Oswald Acted Alone 4463577152589347223368452680005049057940765926118340462764699835321989331271173271051129387746272008131726320867124724783103695325057116684669339199938383416530133092477294293584

And that is part of the, ahem, corrupted, version of Pi that shipped on every CD-ROM that our product created.

Hacker Noon is how hackers start their afternoons. We’re a part of the @AMIfamily. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.

To learn more, read our about page, like/message us on Facebook, or simply, tweet/DM @HackerNoon.

If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!


Published by HackerNoon on 2017/03/14