2 minutes
Type in the programming examples!
I’ve read a very interesting point of view in [1]. It states that one should type in the programming examples printed in the book in order to better understand the inner workings of the code. First I was somewhat stomped by this blatant suggestion, but in the days of auto-completion and all those nifty editor tricks, typing in some dozen lines of code isn’t really a big deal. With this little cost there comes a huge benefit of learning the IDE (if you are not already familiar with it), the debugger, for almost no-one can type error free and spend more time with quality code (as everyone knows that reading good code makes you a better programmer). Additionally, I would like to stress that complete code examples are a must for any good book about programming. It’s somehow useless if only code snippets are presented and the text refers to “the complete sources can be found on the website accompanying this book”. The reader won’t read the rest of the code thoroughly and perhaps won’t even compile the sources. Therefore the source code will be of no educational use. The fact is that can learn only through labor and learning to write programs means typing them – no matter if it’s your own code or not. -— [1] Simson Garfinkel & Michael Mahoney, “Building Cocoa Applications”. O’Reilly 2002.