The C Programming Language – By Brian W. Kernighan

The elephant in the room

When we were in the University, our Data Structures professor explained the vastness of C with an interesting anecdote.

Several people are confined in a dark room, in which an elephant is standing. Each of them has never seen an elephant in real life. They all get close to the elephant and touch the part of its body that happens to be the closest to them. One holds on to a leg and says, An elephant is like a pillar.’ Another holds on to the tail and says that a typical elephant is thin and hairy. The person hanging from the trunk opines that an elephant has an elongated pipe-like, flexible, and strong body.

Everybody was basing their opinion on the part they knew, whereas in reality, the elephant was a combination of all their inferences – each right when describing a single part of its body and totally wrong if applied to the whole.

The C language is like this proverbial elephant, and even the intermediate coders cannot profess to know all of its concepts.

How I picked up the book?

When the creator of the C language (Dennis Ritchie) and its first ever tutorial writer (Brian Kernighan) write a book, that will take you through all the superficial and deep aspects of C, you should waste no time in picking it up.

The C Programming Language – By Brian W. Kernighan

The second edition (1988 version) of The C Programming Language is available as an eBook on Amazon. I bought it a month ago, when I was just back from an informal college reunion and the elephant anecdote came up in the discussion.

Could my Professor have been more right? 7 years of knowing C and using its concepts to learn and implement derivative languages like JAVA, .Net, Python and what not, I can still not say that I know C! That is the beauty of this raw, near primitive language that was one of the first bridges between machine language and sophisticated programming.

You have to know however, that this book ain’t for dummies, to put it plainly. If you are just starting out, you might want to read up on the basics, practice some code, get a year or two of experience in developing applications that are based on data structures, and then embark on the journey that this book is.

The Book Cover: The C Programming Language – By Brian W. Kernighan

We seldom look at covers on Kindle, but I noticed this one, because I had been used to seeing the book from a distance in the Library. It is a clean cover that puts the title in limelight, with ANSI C stamped over it – as this is the main differentiator from the first edition (which had the basic version of C). I still get goose bumps when I try to imagine how K & R as the authors are fondly called, sat about writing this.
Time to read

At about 272 pages, you’d think you’d breeze through this book in one sitting over a lazy Sunday. Doesn’t happen! It took me about 3 hours to finish the first chapter, as I tried to apply its learning in the end-of-chapter exercise. As I write this review, I have finished about 7 chapters in all and skimmed through the remaining pages of the book time and again.

Writing style

It should not surprise you that this book has been used as a benchmark in technical writing to explain how to fit in as much information as possible in a concise and self-explanatory manner, while having due respect for the reader’s intelligence to grasp the contents. When two legends get together, what else can you expect?
Contents

There are 8 chapters in all, with subheadings. Each chapter focuses on one aspect of C with concepts like pointers and arrays explained after tending to the other basic concepts like variables and constants. The flow is steady, and slow enough to allow the reader to ruminate on what has been said in the previous chapter.

Exercises

Each chapter has an exercise at the end. Never in my 7 years of work experience have I felt this kind of challenge and mental stimulation while writing an algorithm. The last I was this happy coding was perhaps in my early college days. I did try out a few programs on the computer and my joy knew no bounds when they compiled and gave outputs. The old style interface is kinda nostalgic, after playing around with all the new IDEs. You can also find several online communities and forums, which help you compare your algorithms for the exercises with fellow code geeks.

Why you should buy the book?

Let me tell you what happened to me. The C Programming Language is a great leveler. To think, that the book was published in 1988, and you are still struggling to get the concepts right after knowing the latest languages that have indubitably developed from the basics of C! If you take it the right way, it helps you stay grounded, and always hungry to know more, to revisit the basics regularly and not shy away from sitting down and studying (which we, computer engineers, have almost forgotten what with starting coding right away as soon as we get the requirements).

You should buy the book, because it desists from spoon-feeding – something that we have come to expect in this age of instant gratification. One Internet search and you have everything at your fingertips – it severely cripples our logical faculties. The C programming language will revive your ability to create unique solutions, as you will be pressed to find an alternative through which the exercises haven’t been solved before (in the forums).

Go back to the basics (when you think you know the basics), and come back as an expert with this book. Keep on revisiting whenever you are in a fix.

It ain’t called the Bible of C for nothing!

Download The C Programming Language – By Brian W. Kernighan

The C Programming Language – By Brian W. Kernighan

LEAVE A REPLY

Please enter your comment!
Please enter your name here