Introduction

Hi there. I'm Justin Abrahms. I'm a self taught programmer, as you likely are. I'm writing this book because of a tweet-sized statement that really hit me at the end of 2012.

"Remember the version of you from like 5 years ago? There are people like that right now. Do what you can to help them out."

5 years is a long time. In 2007, I was struggling with the practical ramifications of not understanding computer science concepts. I had just written a backend CMS for someone which had some awful scaling issues. I went with the requirements that were laid out by the architect without questioning. Three months into this endeavor, the system was at a point where we could put data in and play around. Crushingly, it was dog slow. Turns out, I found myself doing O(N^2) queries on one of the main pages. Don't know what that means? Don't worry, neither did I.

To ensure it wouldn't happen again, I learned a bit more about the fundamentals of computer science. One of the nice things is it doesn't take much learning before you see strong gains in your daily work. I went on to work for Google for a few years, where I got a much broader understanding of computer science. Its amazing how much you learn when you work with incredibly talented and smart people!

I don't want you to have to go through the painful process of needing to know something, but not having it in mental storage. That's where I was 5 years ago. By finishing this book, you should have enough of an understanding of what's going on under the hood of your code that you'll be able to talk about why something might be slow at a conceptual level. You'll know of some ways to speed up your code by using the correct tool (data structure) for the job.

This book is broken up into two sections. In the first section, we talk about Big-O. Big-O is how we talk about the speed of an "algorithm". That's as scary as it might sound. We'll cover it all nice and slow.

In the other section, we'll talk about data structures and algorithms. Data structures are basically containers that hold data. If you've written more than 5 lines of code, you've certainly used one. Algorithms can be thought of as things we do to data structures. We'll go through a few of the most common data structures, what their relative merits are and go over how they work (at a high level). At the end of this section, you'll have written a little bit of code. The language you choose doesn't matter much. They're all about the same for this. That's one of the great things about working with theory!

© 2012 - 2020 · HomeTheme