Keeping it Small and Simple

2008.02.21

K&R – The C Programming Language

Filed under: c programming — Tags: , , — Lorenzo E. Danielsson @ 23:31

It’s been over 15 years since I last went through K&R’s The C Programming Language. The other day I decided to plow through it yet one more time.

This is still a book I think every programmer should read. It really is that good. The first time I read it I skipped through the text sections and mostly just looked at the code, only reading when there was something I didn’t understand. Now things are of course different. I have many years of C experience behind me and can focus on the text instead.

Kernighan and Ritchie tell you already from the very beginning (1.1 Getting Started): The only way to learn a new programming language is by writing programs in it. This is exactly what I always try to tell my students (and sadly many of them don’t seem to listen). I wonder if all the “Teach Yourself X in 24 hours” books actually tell you this basic truth? (How you will be an accomplished programmer in 24 hours is beyond me).

The authors also at an early stage make you write several versions of a program that prints a Fahrenheit-Celsius table. That way you get the idea from the beginning that there are different ways of solving a problem, and the part of your task a programmer is to figure out which solution is the most appropriate.

If you haven’t read The C Programming Language by Brian Kernighan and Dennis Ritchie before, then you should rush to your nearest bookstore and grab a copy immediately. If you have read it before, why not read through it again?

Blog at WordPress.com.