Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Expert C Programming: Deep C Secrets

Rate this book
This book is for the knowledgeable C programmer, this is a second book that gives the C programmers advanced tips and tricks. This book will help the C programmer reach new heights as a professional. Organized to make it easy for the reader to scan to sections that are relevant to their immediate needs.

353 pages, Paperback

First published June 24, 1994

119 people are currently reading
1,561 people want to read

About the author

Peter van der Linden

21Ìýbooks5Ìýfollowers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
464 (54%)
4 stars
251 (29%)
3 stars
87 (10%)
2 stars
35 (4%)
1 star
10 (1%)
Displaying 1 - 30 of 49 reviews
Profile Image for Barry.
19 reviews9 followers
August 14, 2008
When you've read K&R and start to ask /why/ C is written the way it is, it's time to graduate to _Expert C Programming: Deep C Secrets_. As much as K&R is the touchstone for all things C, there comes a point fairly soon in your career where you won't need to refer to it any longer. C in indeed a small language, and it's possible to keep all of it in your head.

Van Der Linden has created a collection of things that you won't necessarily need to know until /after/ you've learned C. What's an activation record? How do you go about debugging linker errors? Why aren't arrays and pointers identical? While you're still trying to get "Hello, world!\n" to run, these questions won't occur to you. Trust me, eventually, they will, and this book answers them completely without once being tedious.
Profile Image for Archit Taneja.
AuthorÌý5 books18 followers
January 28, 2015
The funniest tech book I've read until now. I was all aaargc aaarghv when it got over.
Profile Image for Vasil Kolev.
1,115 reviews199 followers
March 6, 2017
Fun and nice book, with some interesting puzzles, but some parts are very outdated. It could definitely use an update, especially the comparison with C++, the integration of lint in all compilers, etc.
Profile Image for Josh Davis.
80 reviews28 followers
January 16, 2015
This was a great little refresher on C. I first learned C by going through the classic K&R book back in high school. As Expert C Programming is quick to point out, C has changed quite a bit from then.

As far as information goes, it covered some really great topics and explained things really well. I definitely feel that I have a better understanding not only of the C language, but of how the C code actually translates into assembly/machine code, which is ultimately what inspires some of how C works.

The book has tons of little tidbits scattered through out on things that aren't necessarily relevant anymore. However, I loved reading them because it gave me insight into what computing used to be like before I was born/old enough to talk.

I'd definitely recommend it to anyone that wants to learn more about C or even if one wants to learn more about the history of programming.
Profile Image for Elias Daler.
31 reviews6 followers
December 24, 2018
What a wonderful book!

What I liked the most about it is not that it shows tricky things in C, but it's also full of interesting stories, fun jokes and explanations about why some things in C the way they are.

I'd recommend to read it to everyone, even those who don't plan to write in C, it's just interesting on its own. :)
Profile Image for David.
AuthorÌý1 book114 followers
April 14, 2021
Absolutely fantastic book! My copy is from 1994 (27 years ago as I write this). It's fascinating what has changed and what hasn't changed in that time. Memory capacity, for example, has changed a lot (as the author predicted!).

You don't have to have a serious interest in C to get a lot out of this book. It is chock full of humor, UNIX lore, and information that is applicable to any system that has C at its core.

It's also quite opinionated. The author isn't shy with his feelings on the static-vs-dynamic linking issue. I don't think the result has been quite as cut-and-dried as he hoped. Dynamic linking is not without faults.

Probably the biggest time-capsule in the book was the last one: a review of C++ for the C programmer. C++ had been around for about 8 years or so when this book was published, so it was still a relatively new language. I think the author gave a fair assessment of C++ and I was about to start skimming material when I ran into this gem:


Some people claim that C++ classes will revolutionize software reuse. Reuse is a nebulous goal in software. Inheritance is not necessarily the panacea that it seems. Those with long memories are reminded of inflated claims made for Ada a decade ago. Let's make an analogy by saying that a computer program is like a book. Then you have libraries of both. And you want to reuse some routines in one of your programs. This corresponds to some paragraphs in the book.

The problem is that you can't create any kind of new worthwhile text by cutting and pasting entire paragraphs from other books. The level of abstraction is wrong. You can share text on the level of individual words or letters (this corresponds to individual lines of code or characters), but the effort involved in laboriously cutting them out is higher than the effort involved in deriving them afresh for the new work. And in just the same way, software reuse at the library level has empirically turned out to be less than originally envisioned.


I typed that up from the copy of the book sitting in front of me because I think it's so right on the money that it needs to be spread far and wide.

People know you can't just copy and paste pieces of books, or artworks, or cars, or bridges, or buildings and expect the patchwork to be a new, beautiful, functional thing. So I don't understand why everybody expects this to be true of software.

Anyway, enough of that. This is a great book written with tons and tons of real-world experience. Still a great read and still (thanks to C's immortal status as THE systems-level language after all these years) surprisingly relevant.
Profile Image for Daniel Volpato.
18 reviews7 followers
April 20, 2022
Let's say the deep secrets containing in this book are rotten and got corrupted by time. There is too much old, deprecated, anachronistic information, so reading it isn't worth the time you may spend trying to find information that is still relevant.
Profile Image for Varad Deshmukh.
37 reviews12 followers
November 18, 2016
It requires skill to write a book on a programming language that a reader can use as something more than a manual. Yes, manuals are important, and an ardent programmer treats them with reverence. But they are often dull and daunting to a novice in the field, or to a sufficiently experienced programmer who wants to connect with a programming language, but not necessarily by digesting through a prosaic format of instruction.

Peter van der Linden successfully manages to circumvent the problem. A C programmer taking pride in being a "K&R C" fan will yet find that there's a lot more to be learnt about its practical aspects. K&R C lays down the basic foundation, while Deep C Secrets explores around the hacks, pitfalls, optimizations that a programmer is bound to encounter if he delves deep enough. This book puts C into action -- by placing it in the broader context of operating systems, compilers, mail management systems, linkers and loaders. It showcases significant failures that have occurred in each of these situations, and the significant dents they can make.

Linden adroitly develops each topic through a combination of significant technical depth, series of anecdotes, snippets of code, small to-do exercises, popular cultural references and (possibly cringe-inducing) humor. It is as I mentioned, you may open the book to either refresh your memory of forgotten conceptual details or to just enjoy a box full of clever stories, sometimes featuring your computer science heroes. It is quite possible that the book might not provide much insight to a very seasoned programmer, who might even find the extra-technical material cumbersome. But the attraction this book could generate in a passionate amateur or a technical enthusiast or, (may I be bold enough to say) a computer historian offsets the possible disappointment of the master.
Profile Image for Daniel.
146 reviews6 followers
February 13, 2012
Wow, what an amazing book!

Truth to be told, I read the last 100 pages today and maybe I am more excited than what I should be.

Amazing "deep secrets" of the C programming language, with incredible background stories related to the topics explained in each chapter. Very useful exercises that lead you to think and learn what has been explained.

Lot of low-level programming and also technical stuff (related to hardware) that might get you to become an expert C programmer and let you think and investigate more in some areas of the C programmign language.

Definitely, you should place it in the library next to K&R and probably the Practice of Programming. Undoubtedly, this books is at that level too.
Profile Image for David.
91 reviews5 followers
November 21, 2010
Provides a lot of good foundation for writing good systems code, especially in C. As usual, some of the information is dated, and I can't say I agree with all of the suggestions, but it covers a lot of useful ground. I had mostly absorbed much of this information already just from the culture at Sun (and the book is a bit Unix/Sun-centric).
Profile Image for Michael Bond.
156 reviews4 followers
July 28, 2015
Indeed it is a good second book on C. The coverage of pointers and arrays was excellent. I cannot blame the book for being outdated a couple of decades later; I just read quickly through those sections. I would not use the chapter on C++ to actually learn it.
421 reviews83 followers
June 27, 2016
I vote for this book to be renamed Quirky Differences Between Arrays and Pointers, and Other Fun Stuff Only Tangentially Related To C. That's basically all this book is. I was expecting expert-level, clever techniques for writing safer, cleaner C code, and instead I got way more than I needed to know about arrays and pointers, then a bunch of fluff stuff. Though I admit, the fluff stuff was quite fun. My favorite was the very end of the book, How to make Oobleck.
114 reviews
March 26, 2021
First the rating - 4 stars. This would be 5 if it was not so old. Honestly, there are parts of this text that are no longer relevant. But there are many good examples of relevant code here as well. Much of this text has stood the test of time.

Being a nostalgic person, I loved the old stories of things that broke in production and what the causes were. This book was simply well written with brevity and levity in equal portions.
12 reviews1 follower
January 31, 2008
This book fills a serious gap in computer programming books: expert level texts. This is not a book to teach you C. This is a book for experienced C programmers who want to kick it up a few notches. No, I don't think I ever directly used the things I learned from this book in any development project, but I got a deeper understanding and appreciation of the language. Take that, K&R!
Profile Image for Nick Black.
AuthorÌý2 books866 followers
November 28, 2008
Eh, more valuable for the fun sidebars offering insight into Sun development processes than any other content -- the comp.lang.c FAQ covers most of what van der Linden covers here. I borrowed this from a coworker back in my short stint as a systems programmer for CNN, while I was a sophomore, and never owned it.
Profile Image for Cristian.
41 reviews
March 27, 2015
Good book, explains several details about the language, many times introducing the historical background behind them, and keeping it fun with stories and anecdotes related to the chapter's subject.
It has its years though and is outdated in some respects, an example is the blind insistence in dynamically linked code and how you should not statically link.
20 reviews
December 27, 2020
Pretty heavy stuff on C language and its more advanced and lesser known parts about the C language. Highlighted some places for future reference but there were not many as some parts are outdated a bit and were already known.

Also, the theory presented in this book shall be applied immediately or else thy shall forget it at the start of next chapter.
Profile Image for Rohit Goswami.
323 reviews73 followers
October 7, 2021
3.5, and I'm rounding this up for readability, also because I like any mention of linking.. An above average short book on C. Actually there's less on C than expected, which is a good thing in some sense, lets the author's rather fun take on life shine through. That said, large parts of it are a little dated.. Unsurprisingly.
Profile Image for Steve.
79 reviews24 followers
August 5, 2007
Essential reading from one of the authors of the Sun ProC compiler. It also walks you through writing a simple BASIC interpreter. What I mostly remember is gaining a rock-solid knowledge of how to read and write complex C declarations.
1 review
Read
May 30, 2010
You will learn a lot about better programing styles. You would also be able to relate many of the OS related concepts ans how they are used. You would get to learn how memory management is done efficiently.
48 reviews
April 25, 2018
OK book for the time

Read it for the history of C, the 90s approach to understanding C++ (which led directly to Java) and the time capsule of the period just before Sun engineers� hubris started to catch up with them.
Profile Image for Dana Robinson.
232 reviews7 followers
March 23, 2019
A fascinating book. It's very old, but still useful and the historical digressions are interesting if you are of a certain age. Highly recommended to anyone stuck coding in C.
143 reviews4 followers
December 28, 2022
It is worth starting this review off by saying that this book was written in 1994. C99 is the new (current) standard, and this book was written for ANSI C. That being said, most of the topics are still quite relevant today, and provide a deep dive, or more thorough understanding to some of the less intuitive aspects of C programming.

If you'd like to learn more about declarations, arrays, and pointers this resource is quite good. Other chapters such as the memory management chapter do show signs of age, but still work as a good theoretical concept, and there were almost no times where I skipped entire sections because they were no longer relevant.
Profile Image for Alex.
38 reviews2 followers
June 1, 2024
For a long time now I've felt there's something hubristic about C and Unix. And this book is a good case in point. I can't help but think of the author as the prototypical "smug Unix weenie": technically apt, but not necessarily pleasant to interact with.

The technical details are well explained. And when he sticks to the technical aspects the book is indeed a good read. But when it comes to other topics, the tone is often jarring. From looking down on clueless junior developers to casually dismissing technologies and opinions the author doesn't agree with, this book left a bad taste in my mouth.
6 reviews
September 10, 2023
While somewhat dated, this book gives a thorough and enjoyable tour of the classic C programming language. It does a good job bringing humor into a very technical subject and explains things in a fun way. Little snipes like, "What's next, an internet connected refrigerator?" feel oddly prescient given the intervening years of technological development.
Profile Image for Jake Glenn.
18 reviews
Read
November 7, 2024
decl syntax, storage class specifiers, scope, linkage, arr vs pnt, lvalue rvalue.
The pitfalls are right but most of the pithy proposed solutions are wrong. “the programmer is always right� is right because arbitrary limitations are unproductive. min complex of impl is right because port is good. less code less bug
Displaying 1 - 30 of 49 reviews

Can't find what you're looking for?

Get help and learn more about the design.