An interview is not the best place to discover what you don't know about Computer Science
In the first volume, or "season" of The Imposter's Handbook I dug into topics that I felt I should just know as a programmer. There was so much I wanted to cover! And then I started interviewing again... oh joy...
"Just pre-ordered "The Imposter's Handbook, Season 2" by @robconery and @shanselman. I have a PolySci degree and I was headed to law school when the Internet happened, so the first edition of this was fantastic. It filled two-decade-old gaps for me."
Buy Both Volumes and Save $10
We just released the second volume of The Imposter's Handbook, and this time Scott Hanselman joins as co-author. A fun exploration of binary, encoding, encryption and more!
How would you add two numbers without using arithmetic operators?
I was asked this question in an interview once and I had no idea at all. I figured it had something to do with binary, but that's about it. I froze, looked out the window, wondered if I really wanted the job anyway and then flatly said I had no idea. It was humiliating.
Turns out the answer wasn't all that difficult, you just needed to understand a little base 2 math and some simple (yes, really!) boolean algebra.
I got to work (after I didn't get the job) digging into the concepts and, doing what I normally do, I wrote down what I learned so I could share it with you!
We covered the things that fascinated us
From binary to crypto, Information Theory to prefix-free codes, Scott and I dug into the topics that we've been asked (and have asked) in interviews and that have come up in routine conversation.
- 1Logic, Binary and Logical Circuits
We start simply, looking at Aristotle's "Laws of Thought" and then George Boole's translation of those laws into mathematics (Boolean Algebra). We then meet Claude Shannon, who took things a step further by implementing boolean logic with electrical circuits.
- 2Compression and Encoding
We'll get to know Claude Shannon, who kicked off the Information Age with his masterpiece: A Mathematical Theory of Communication. We'll see how this paper laid the foundation for data compression, error correction, and digital networks as we know them.
- 3Encryption and Cryptanalysis
Now that we can transmit information, we need to protect it. We dive into simple enciphering schemes, from Bacon's biliteral encryption all the way through to SHA-1, MD5 and beyond. We also deviate for a bit and look at how cracking software works, such as THC-Hydra and Brutus.
- 4Cryptocurrency and Blockchain
A controversial topic, but one that you should understand. I didn't know anything about Bitcoin, Blockchain etc. except for the constant snark coming from the hype-averse. Is it worth understanding? Does Blockchain have something to offer? Let's learn the details and decide for ourselves.
What's the mathematical problem that makes cracking RSA keys so difficult?
I was sitting at a conference in Denver, Colorado, listening to a talk about assymetric key encryption and the RSA algorithm. I was lost within 10 seconds.
The speaker was brilliant and I took notes furiously - I wanted to know just what I didn't know! Turns out, that amounted to everything when it came to encryption.
So I went home and started with my SSH key, figuring out just what it was and how it works. From there I dove into encryption and hashing, writing everything down as I went.
All of my sleuthing went into the book.
How is it possible to turn bits into bucks? How can I actually buy pizza with bitcoin?
Scott and I would Skype every other week or so as we wrote this book, sometimes late into the night. On one such occassion Scott was giving me a hard time because I goofed up the math for Huffman encoding and I said "keep it up I'll make you write the chapter on blockchain".
It was meant as a joke as I wasn't intending on going down that path - it's kind of controversial. Next thing I know, Scott is going off on how he made $25 one weekend by farming out his video card but ended up losing money due to the increased electrical bill.
I found all of that fascinating, but I stopped him and said "wait - I don't get why I can use bitcoin to buy anything".
"Great idea for a chapter" he replied and in a week's time our blockchain chapters were off the ground.
Written by humans for humans
I love to learn and I love to draw - I find that it helps me understand the concepts if I can put them in the simplest terms. This sometimes requires stick figures... like when I discovered you can perform simple base 2 arithmetic with a 3-way light switch...
Why Should I Care About These Topics?
Programming is much, much more than simply typing some code into an editor and hoping for the best. The applications we write produce information, which your business uses to make money to then pay you. Understanding the nature and flow of information within your application gives you a particular focus. An appreciation for how that information is created, where it goes, how it's stored, and how it will be analyzed later on. Information and data are the true value of your business, and your attention to it will make your boss/clients/colleagues very, very happy. This means you win.