Our Flash book is nearly four years old. I recently found a copy at Borders, oddly separated by shelf dividers, as if an employee couldn’t figure out exactly where it belonged.
It got me thinking. I haven’t purchased a single book on a programming language in almost six years. As proof, here’s my bookshelf (at least the tech book portion of it). Most of these books were purchased between 1998-2004, with a few more books from 2006 that I got for free.
Why haven’t I purchased a programming book in six years? Probably because too much changes too quickly. Once a new version of a language is released (typically once every few years), books on that particular language instantly lose value. Languages change too fast for most pure-programming-language books to have long-lasting viability.
Perhaps reading about a language is still a good way to learn. But, it’s hard to learn how to program without spending most of your time actually programming. Language books don’t focus on the errors you’ll make over and over again, nor can they predict which errors you will make. They can’t mimic the feeling of code-hinting or missing a closing parentheses. Code written in a book is (hopefully) complete and correct, which I’d argue, doesn’t teach you how to program as quickly as you’d think. It’s a bit like learning how to fly just by reading an owner’s manual. Cookbooks work because you follow 10 steps. It tells you exactly what to do to get to an end product. Programming (and programming books) don’t quite work that way.
Perhaps language books are still useful as a reference guide. But, whenever I need to figure out how to do something specific, a quick look-up of a particular function or construct that lives somewhere in the index of my Professional C# 2nd Edition from 2002 is not my first choice. There’s likely not an index entry labeled “Subtracing two dates in C#”. But, Googling “subtracting two dates in C#” will likely give me something useful, fast. Plus, I can copy, paste, modify, and compile much faster this way.
Maybe the real remaining value of programming language books is for beginners. Getting intimate with the basics and fundamentals of a language are things that take time and might be better purposed sitting down with a cup of coffee and a 400-page manual. I say, sort of. I’ve always felt the best way to learn how to program isn’t by first looking at the nuances of a language, its syntax, or its particular constructs. Instead, it’s by learning the concepts and goals of programming. To this, I’d recommend staying away from a language book and trying something a bit more abstract, like The Object-Oriented Thought Process (you can read the first chapter here.)
Do books on programming languages, that offer nothing more than simply a primer on how to use a language, have any upside compared to the resources and code snippets we can read and copy/paste online now?