I wasn’t going to do this, but I’ve decided to release all of the examples/templates that I wrote for The CMake Tutorial in a source-code pack.I had good reason not to release it, because having access to the source-code can get in the way of learning.
Let me give you my reasoning, what changed my mind, and then tell you how to get The CMake Tutorial Source-Code Pack.
Actually, if you’re in a hurry then click here to go directly to the source-code pack.
Source-Code Access Can Undermine Learning…
I didn’t release this code earlier, because here’s what typically happens when someone receives both tutorial and ready-written source-code… And, I’m guilty of this myself. You read through the tutorial, compile the pre-written source-code, see that it works, nod your head, and move on.
At this point, you’ve learnt almost nothing. Why? Because you haven’t done anything yourself. You haven’t written any code, or studied how it works. You haven’t done your own push ups. And you’ll never get strong if you don’t do your own push ups.
It’s not until later, when you try to write your own code, that you realize that you don’t know what you’re doing.
This is why I normally don’t release the code for any of the tutorials that I’ve written. Because it forces you to do write out the code by hand, or at least copy and paste it. You’re more likely to learn if you actually do something.
But, It’s Gold If You Use It Right…
However, there are legitimate uses for the code. Those who follow the tutorial diligently sometimes get stuck. In this case it’s useful to compare your source-code to a working example, to see where you went wrong. You can learn valuable lessons this way in a fraction of the time it takes via the bang-your-head-against-the-wall-until-it-works method.
Plus, the examples make great starter templates. And I’ve been using those examples as starter templates for my own code.
So, I’ve decided to make The CMake Tutorial’s source-code available. It’s a separate purchase, which I hope will discourage the lazy-tutorial problem I told you about. Basically, it’s there as an extra for those who want or need it.
Click the link below to get it. Please use it wisely. Do NOT make me regret releasing it.