Search This Blog


Wednesday, April 30, 2008

Programming Books? What Books?

Jeff Atwood discussed about why programmer should read books, even though a major proportion of them don't. Who should be blamed for this? Jeff believed that it's the publishing industry, of course. It is all because the book publishing industry keeps churning out books after books that are worthless and heavy that causes the programmer to turn away from books and to Internet for information. How true.

I, for one, tried to read programming books in the course of learning new language. Except the first book, I didn't go very far in this before I resorted to Internet or friends for information. I can still remember the very first programming book I read was C How to Program, written by Deitel & Deitel. That was in 2001, when I was still a college student and when the search engine was still in its primitive form. One thing good about Deitel books, as far as the novice programmer is concerned, is that they always provide full code samples that run without modification. You just have to type in all the code, verbatim and compile it to see the program running. This is ideal for beginners because beginners usually have to learn by examples and anything that requires modification may introduce bugs , crashing the applications all together.

But Deitel's books are just for novice. Once you reach certain stage of maturity, you have to leave them for good. Or when you are coming up against wall in your programming task, you have to search the Internet or documentation for help. When I started work, I no longer refer to books. To me programming books seemed inadequate in solving my problems. And all of the programming books seemed so alike in the sense that they are repeating the same information, using the similar examples and can't increase my knowledge. When I look for help, there was no help in them.

For a long time I lived my life as a programmer without programming books.

But I still read programming-related books, the kind of books that are not tied with a particular technology or that are not "cookbook". Some of the books I read are Design Patterns, The Best Software Writing 1 (where's the 2?) and The Mythical Man Month. These books are good because they can be consumed like novels. I enjoy reading these books as compared to other how-to books that fill with dry examples and code snippet. Of course, the Design Patterns book does consist of code snippet, but I still read it anyway because it answers my questions on how software design should be carried out.

I gradually came to the belief that how-to programming books are useless.

Recently I decided to teach myself some new languages and technologies. I learnt Python from the Internet resources alone, without depending on books. At the same time I also tried to learnt about WPF, but for this purpose I purchased two WPF books.

Reading how-to programming books, again, proved to be a problem for me. I flipped from page to page, scanning the words but my mind was on somewhere else. Eventually I gave up and just went back to the Internet to look for complete samples. Of course, you don't become a grandmaster by studying chess books, you have to practice it. So I gave myself an assignment (Monty Hall Problem) and created an application using WPF. Guess what, all of my help came exclusively from the Internet. My two WPF books slept on my desk. Occasionally I felt guilty of them and pulled them out, but after a few pages I started to get impatient and switched to do other things.

I don't realize that there is a learning curve to reading programming books.

So, programmers. If you want to read programming books, make sure you go for the "soft" books that don't have a lot of code snippet and don't require you to type in the samples on your IDE. Surf the Internet, or just try out the code samples by modifying them and see how they break so that you can gain a deeper insight on how the language or the technology works.

The "hard" programming books are useless beyond the beginner's level.


Anonymous said...

wow, im preety sure you just restated Jeff's complete post without adding anything new. Well Done!

Soon Hui said...

No, Anonymous, it's not.

I am sharing my own experience here, not Jeff's. Although we reach the same conclusion

Andrew said...

I like to read the basics first without touching any code.

But I don't think you learn much just by typing in someone else's code.

Books on various topics such as artificial intelligence, robotics and board games, etc. are also interesting but harder to find.

We have How To Program C# by Deitel & Deitel at home, which is pretty good.

I'm also going to have to Google Joey Wang sometime.

Soon Hui said...

Hi Andrew,
I agree with you that books on AI or board games are hard to find. However to master AI fields or robotics field require a solid grasp of the basic, which can hardly be achieved via code snippet, and hence this makes pages of coding irrelevant as far as understanding of AI or robotics are concerned.