The world is changing.
As you are reading this, people all over the world are learning to program, mostly poorly. There is a flood of programmers heading for the market, and there is nothing you can do to stop them. As with all things, you will soon see that as the supply of programmers increases, the cost of hiring programmers will decrease. Simply being able to write a few lines of code or change something in a piece of software will (like the role of spreadsheet or word-processing guru) become a basic skill.
If you plan on making a living as a programmer, this problem is made worse by the Internet. You have to worry not only about programmers in your own area, but also those from all over the world.
Do you know who does not worry about the millions of programmers produced by the hundreds of code boot camps that seem to spring up like mushrooms?
The Masters
While everyone can write, there are still the Hemingways of the world. While everyone can work Excel, there are still the financial modelers. And when everyone can code, there will still be the Peter Norvigs of the world.
Programming is a tool. For a time, simply knowing how to use this tool made you valuable. That time has come to an end. There is a new reality, the same one that a lot of industries have had to face over the years. When a tool is new, no one wants to use it. Then, some see the value, and it makes them twice as good as the ones who cant use the tool. Then, it becomes popular. Before you know it, everyone can use the Internet. Suddenly, being able create a website becomes a lot less valuable. All the businesses that were consulting, charging big bucks for the service, get marginalized. However, the people who spent time mastering the tools are able to thrive no matter what happens in the market. They can do this because they are able to outproduce the average person on every levelquality of work, speed of development, and the beauty of the final result.
Right now, we see the popular uptake of that which is easy. The next step will be automating what is easy. Easy tasks, in every area of life, are easy because they do not require creativity and deep understanding, and as a result of these characteristics they are the exact tasks that will be handed over to computers first.
The reason you picked up this book is because you want to become a better programmer. You want to progress beyond the thousands of introductions to this and that. You are ready to take the next step, to master the craft.
In the new world of programming, you want to be able to solve big, complex problems. To do that, you need to be able to think on a higher level. Just like the chess grand-masters, who can digest the game in larger chunks than mere masters, you too need to develop the skill to solve problems in larger chunks. When you are able to look at a brand-new problem and rapidly deconstruct it into high-level parts, parts you have solved before, you become an exponential programmer.
When I began programming, I could not read the manual yet. There was a picture of Space Invaders on the cover, and it promised to teach you how to program a game yourself. It was a bit of a racket because the game ended up being a for loop and a single if statement, not Space Invaders . But I was in love. Passion drove me to learn everything I could about programming, which was not a lot. After mastering the basics, I stagnated, even while attaining a BS in computer science (cum laud). I felt like what I was learning was a simple rehashing of the basics. I did learn, but it felt slow and frustrating, like everybody was waiting for something.
In the real world, it did not look a lot different. I came to realize that if I wanted to become an exponential programmer, I had to do something different. At first, I thought about getting a masters degree or Ph.D., but in the end I decided to dig deeper on my own.
I reread the old theory of computing books, and they gained new meaning and new life. I started regularly taking part in coding challenges and studied more idiomatic ways of writing code. Then, I began exploring programming languages and paradigms foreign to my own. Before I knew it, I was completely transformed in my thinking about programming. Problems that used to be hard became trivial, and some that seemed impossible became merely challenging.
I am still learning, still digging.
You can do it too. Start with this very book you are reading right now. In it you will find a number of tools and mental models to help you think and code better. After you have mastered this set of patterns, actively seek out and master different tools and techniques. Play with different frameworks and languages and figure out what makes them great. Once you can understand what makes someone love a different language than the one you use regularly, you may find a couple of ideas in it that you can integrate into your way of thinking. Study recipes and patterns wherever you find them and translate them into an abstract solution that you can use over and over. Sometimes, you can simply analyze a solution you already use: can you find a more elegant way to implement the idea, or is the idea flawed in some way? Constantly ask yourself how you can improve your tools, your skills, or yourself.
If you are ready to dig deep and master the art, you will find ideas in this book that will guide you along the road to mastery. We are going to explore a set of fundamental design patterns in a real-world context. While you are doing this, you will begin to realize how these design patterns can be seen as building blocks you can use when you encounter a specific type of problem in the future.
My hope is that you will use the design patterns in this book as a blueprint; that it will help you kick-start your own collection of problemsolution chunks. After you have read this book, you should be well on your way to reaching the next level in your journey as a programmer. You should also see how this set of abstract tools can be translated into any programming language you may encounter, and how you can use ideas and solutions from other languages and incorporate them into your mental toolbox.