# Your bookshelf with C books



## _al (Aug 31, 2022)

Hi, everyone!

Here is mine bookshelf (books are sorted by frequency of use):

*general purpose :*
"C A Reference Manual", Fifth Edition, Samuel P. Harbison III, Guy L. Steel Jr., 2002
"C in a Nutshell", Second Edition, Peter Prinz and Tony Crawford, 2016
"SEI CERT C Coding Standard, Rules for Developing Safe, Reliable, and Secure Systems", 2016 Edition

"ThreadTime, The Multithreaded Programming Guide", Scott J. Norton, Mark D. DiPasquale, 1997
"Window via C/C++", Jeffrey Richter, Christophe Nasarre, 2007
"Advanced Programming in the UNIX Environment", Third Edition, W. Richard Stevens, Stephen A. Rago, 2013
"The Linux Programming Interface", Michael Kerrisk, 2010

"Effective C, An Introduction to Professional C Programming", Robert C. Seacord, 2020
"Modern C", Jens Gustedt, 2020
"Secure Coding in C and C++", Second Edition, Robert C. Seacord, 2013

"UNIX Network Programming, Volume 2", W. Richard Stevens, 1999
"Solaris Systems Programming", Rich Teer, 2005

"Expert C Programming: Deep C Secrets", Peter van der Linden, 1994
"21st Century C", Second Edition, Ben Klemens, 2015
"Understanding and Using C Pointers", Richard Reese, 2013

"The Standard C Library", P.J. Plauger, 1992
"Pointers on C",  Kenneth Reek, 1997
"C Traps and Pitfalls", Andrew Koenig, 1989

*algorithms :*
"Algorithms in C Parts 1-4, Fundamentals, Data Structures, Sorting, Searching", Third Edition, Robert Sedgewick, 2001
"Algorithms in C, Part 5 Graphs", Third Edition, Robert Sedgewick, 2001
"Programming in C", Second Edition, Pradip Dey, Manas Ghosh, 2011
"Mastering Algorithms with C", Kyle Loudon, 1999

*Some excellent books related to specific area (with the C code inside) :*
"UNIX Network Programming, Volume 1", W. Richard Stevens, 1998
"UNIX Network Programming, Volume 1", Second Edition, W. Richard Stevens, Bill Fenner, Andrew M. Rudoff, 2004
"TCP/IP Illustrated Volume 2", Gary R. Wright, W. Richard Stevens, 1995
"Solaris Internals", Second Edition, Richard McDougall, Jim Mauro, 2007
"Programming The Microsoft Windows Driver Model", Second Edition, Walter Oney, 2002

*my first C book :*
"Encyclopedia jezyka С dla IBM РС", Jan Bielecki, 1989 (translated from Polish into Russian)


----------



## SirDice (Aug 31, 2022)

Any specific ones you could recommend for 'new' users and which ones for more 'advanced' users?


----------



## mer (Aug 31, 2022)

Too many to actually list my favorites but my top ones:

"The C Programming Language" by Kernighan and Ritchie (2 copies, both from Bell Labs, one heavily taped back together).  To me the gold standard of the language.
C Programming Guide by Jack Purdum (a goto reference, I think good for beginners)


----------



## zirias@ (Aug 31, 2022)

Sorry if this is slightly off-topic for this thread, but as C is my favorite programming language, I just have to answer this:

None.
Well, maybe due to the fact that by the time I started seriously using C, I didn't buy books any more as you could already find lots of info online


----------



## _al (Aug 31, 2022)

SirDice said:


> Any specific ones you could recommend for 'new' users and which ones for more 'advanced' users?


*For 'new' users:*
"C in a Nutshell", Second Edition, Peter Prinz and Tony Crawford, 2016
"Effective C, An Introduction to Professional C Programming", Robert C. Seacord, 2020
"Understanding and Using C Pointers", Richard Reese, 2013
"21st Century C", Second Edition, Ben Klemens, 2015
"Programming in C", Second Edition, Pradip Dey, Manas Ghosh, 2011
*For more 'advanced' users:*
"Advanced Programming in the UNIX Environment", Third Edition, W. Richard Stevens, Stephen A. Rago, 2013
"The Linux Programming Interface", Michael Kerrisk, 2010
"UNIX Network Programming, Volume 2", W. Richard Stevens, 1999 (a little outdated, but the style of presentation is very good)
*and then:*
"ThreadTime, The Multithreaded Programming Guide", Scott J. Norton, Mark D. DiPasquale, 1997 (the best in its field)
"Window via C/C++", Jeffrey Richter, Christophe Nasarre, 2007
*for specialists of a higher level of knowledge С :*
"Mastering Algorithms with C", Kyle Loudon, 1999
*then* *(on demand - very specific)*:
"Algorithms in C Parts 1-4, Fundamentals, Data Structures, Sorting, Searching", Third Edition, Robert Sedgewick, 2001
"Algorithms in C, Part 5 Graphs", Third Edition, Robert Sedgewick, 2001

W. Richard Stevens' books UNP and TCP/IP - you can try to start reading at "more advanced" level.


----------



## mer (Aug 31, 2022)

zirias@ as time goes by, one does need fewer and fewer books.   There is a chance that I graduated university before you were born ( I would have had 36 yr college anniversary recently ) so getting started, books were the only way to learn anything.  O'Reilly was the publisher of choice for a long time.
Now, any questions I just start at Stack Overflow.


----------



## _al (Aug 31, 2022)

zirias@ said:


> Sorry if this is slightly off-topic for this thread, but as C is my favorite programming language, I just have to answer this:
> 
> None.
> Well, maybe due to the fact that by the time I started seriously using C, I didn't buy books any more as you could already find lots of info online


yes, I have also been using online resources lately (for ex - https://en.cppreference.com/w/ , https://www.drdobbs.com/ , ...  ), but a book ... -  you can read it without sitting at a computer and / or without breaking your eyes on a smartphone.

*Edit:* sorry - https://www.drdobbs.com/architecture-and-design/farewell-dr-dobbs/240169421


----------



## SirDice (Aug 31, 2022)

I'm a bit stuck in a vicious cycle. I learned C a long time ago and I think I have a fairly decent grasp of the language. But I rarely, if ever, code in C so I'm severely lacking experience. Because I lack the experience I don't code in C, thus never get that needed experience either.


----------



## jbo (Aug 31, 2022)

One of the nice things of the C language is that it doesn't provide a lot. It's a simple language. You can literally teach someone how to write C code in one day. There isn't as much to learn about the C language itself compared to other languages.

And this is where the important difference between "writing code" and "programming" comes in: The real "challenge" is to write good code using what C provides. But this has little to do with "learning C" compared to "learning programming".


----------



## _al (Aug 31, 2022)

SirDice said:


> I'm a bit stuck in a vicious cycle. I learned C a long time ago and I think I have a fairly decent grasp of the language. But I rarely, if ever, code in C so I'm severely lacking experience. Because I lack the experience I don't code in C, thus never get that needed experience either.


we (our company) write in C at the request of the customer - our software (libraries) are built into the customer's code. For other customers, we write in C++. And for my own pleasure and to automate my work, I write in Perl.


jbodenmann said:


> The real "challenge" is to write good code using what C provides.


Exactly!


----------



## mer (Aug 31, 2022)

jbodenmann said:


> The real "challenge" is to write good code using what C provides.


I would say that is true of any language.  That's why after a while, a good developer can use any language after learning the syntax.  Maybe takes more time to truly master it, but that's true of anything (even getting out of bed and walking).

As for SirDice dilemma, a lot of current languages are syntactically similar to C, heck even JavaScript is not that much different, so using languages that are close translates to C, so the working memory of C comes back quickly with use.


----------



## Criosphinx (Aug 31, 2022)

Just yesterday I was reading this article about learning to program.


----------



## SirDice (Aug 31, 2022)

mer said:


> As for @SirDice  dilemma, a lot of current languages are syntactically similar to C, heck even JavaScript is not that much different, so using languages that are close translates to C, so the working memory of C comes back quickly with use.


It's not like I don't code at all. Especially nowadays with "Infrastructure as Code" being pushed everywhere I go. There's often no _need_ to code in C for me.


----------



## zirias@ (Aug 31, 2022)

I have my own little contribution to the "teaching C" stuff, just because following stack-overflow for some time, it was obvious lots of courses teach noobs to use `scanf()`, which is a horrible source of frustration (and potentially dangerous bugs) 


			A beginners' guide away from scanf()


----------



## Paul Floyd (Aug 31, 2022)

Andrey Lanin said:


> "C A Reference Manual", Fifth Edition, Samuel P. Harbison III, Guy L. Steel Jr., 2002
> "Advanced Programming in the UNIX Environment", Third Edition, W. Richard Stevens, Stephen A. Rago, 2013
> "The Linux Programming Interface", Michael Kerrisk, 2010
> "UNIX Network Programming, Volume 2", W. Richard Stevens, 1999



I agree with those. Also K&R is a must though outdated if you use C99 or later.



Andrey Lanin said:


> "Solaris Systems Programming", Rich Teer, 2005



This one doesn't add much to APUE from which it is heavily inspired.



Andrey Lanin said:


> "Expert C Programming: Deep C Secrets", Peter van der Linden, 1994
> "The Standard C Library", P.J. Plauger, 1992
> "C Traps and Pitfalls", Andrew Koenig, 1989



These 3 are OK. Plauger print quality as abysmal.

Also agree with (almost) anything by the late W Richard Stevens.

*algorithms*
Knuth
Also the 2 books by Alex Stepanov are fantastic
Hacker's Delight, 2e Warren. Every developer should have this on their desk.

*FreeBSD*
D&I, McKusick Neville-Neil and Watson

I have (almost literally) a ton of *C++* books which I'm going to mention despite the topic, but just a few
The C++ Programming Language, Stroustrup
Effective Modern C++, Meyers
Anything by Sutter, Josuttis, Vandevoorde and Alexandrescu is worth reading.

*performance*
All of Brendan Gregg's publications.

*scientific programming*
It's almost a universal truth that scientifiic programmers write shit code but even still Numerical Analysis 3e is worth a pop

*testing*
Working Effectively with Legacy Code, Feathers

*low level* (wish there were more on this subject)
Inside the C++ Object Model, Lippman
Linkers and Loders, Levine


----------



## _al (Aug 31, 2022)

Paul Floyd said:


> _"Solaris Systems Programming", Rich Teer, 2005_
> This one doesn't add much to APUE from which it is heavily inspired.


Agree. There was even an article somewhere that the author copied not only the style but also the text from Stevens' book. But nevertheless, when I worked on  Solaris, this book helped me a lot.



Paul Floyd said:


> I have (almost literally) a ton of *C++* books which I'm going to mention despite the topic, but just a few
> The C++ Programming Language, Stroustrup
> Effective Modern C++, Meyers
> Anything by Sutter, Josuttis, Vandevoorde and Alexandrescu is worth reading.


As for C++, I also have a lot of books:
"The C++ Programming Language", Fourth Edition, Bjarne Stroustrup, 2013
"C++ Primer", Fifth Edition, Stanley B. Lippman, Josée Lajoie, Barbara E. Moo, 2013
"The C++ Standard Library", Second Edition, Nicolai M. Josuttis, 2012
"C++ Templates, The Complete Guide", Second Edition, David Vandevoorde, Nicolai M. Josuttis, Douglas Gregor, 2018
"Effective Modern C++", Scott Meyers, 2015
"C++ Concurrency in Action", Second Edition, Anthony Williams, 2019
"C++17 - The Complete Guide", Nicolai M. Josuttis, 2017-2022
"C++ Move Semantics, The Complete Guide", Nicolai M. Josuttis, 2020-2022
"C++20, The Complete Guide", Nicolai M. Josuttis, 2022- (in progress)
"C++17 in Detail", Bartłomiej Filipek, 2018
"C++ Lambda Story", Bartłomiej Filipek, 2021
"Functional Programming in C++", IVAN ČUKIĆ, 2019
"C++20", Rainer Grimm, 2020-2022
"Concurrency with Modern C++", Rainer Grimm, 2017-2022
"The C++ Standard Library", Rainer Grimm, 2016-2022
"Thinking in C++ vol 1", Second Edition, Bruce Eckel, 2000
"Thinking in C++ vol 2", Bruce Eckel, Chuck Allison, 2004
"More Effective C++" (3 books), Scott Meyers, 1996-2005
"Effective STL",  Scott Meyers, 2001
"C++ Common Knoweledge", Stephen C. Dewhurst, 2005
"C++ Gotchas", Stephen C. Dewhurst, 2003
"Exceptional C++" (2 books), Herb Sutter, 2002, 2005

But the interest was precisely in C books, because there are far fewer good C books than there are good C++ books


----------



## Paul Floyd (Aug 31, 2022)

Also see





						Reviews Overview
					

ACCU - professionalism in programming




					accu.org
				



(some reviews by myself)


----------



## covacat (Aug 31, 2022)

i have the same books as Zirias...


----------



## drhowarddrfine (Aug 31, 2022)

mer said:


> a lot of current languages are syntactically similar to C



That's where I have problems learning a new language. I always find myself saying, "Well I can do this in C so why am I learning this?!"


----------



## drhowarddrfine (Aug 31, 2022)

A problem with all these books is that most of us don't read them very thoroughly or at all. We become book collectors and not readers. 

Once one learns some C, picking up any new book will assume you don't know anything about C. Then you have to trudge through all the beginnings again and you get bored. Then it sits on the shelf until the next ambition you get.

I started life as an electronic engineer. I would get every magazine and newspaper I could get my hands on. There were 20 to 30 I would get every week or month. I soon found out they were all covering the same topics at the same time and started filling up with too much advertising. I wittled that list down to four.

The same can be done with books on C. One for the basics. The Stevens books should be on everyone's shelf. 

When I did electronic design, the only languages I knew were bit slicing (micro-coding) and assembly. Our boss, with his all so fancy MIT Master's degree hanging on the wall, decided to drag us, kicking and screaming, to learn C. Bought us all the white book and told us to read it. It's the only C book I've read cover-to-cover (this was 1985). I still have that book on my shelf next to the Stevens books.

Anything I learned later in life was from looking at other people's code. One guy looking over my shoulder once exclaimed, "I didn't know you could do that!". There are cool things in the FreeBSD source we could all learn from. 

Most learning nowadays is how to glue other people's code into yours. That's not how you learn programming.


----------



## _al (Aug 31, 2022)

drhowarddrfine said:


> We become book collectors and not readers.


There is a danger. Especially that people tend to collect things. I try not to buy books I know I won't read. In many of them, 2/3 of what I myself can tell someone ...


----------



## Alain De Vos (Aug 31, 2022)

I mostly program in a language with a default garbage collector. So C is not included.
I own:
- K&R The C Programming language.
- Herbert Schildt , C The Complete Reference
The latter is a really good book.


----------



## drhowarddrfine (Aug 31, 2022)

Alain De Vos said:


> Herbert Schildt , C The Complete Reference
> The latter is a really good book.


I've always read it's a horrible book.


----------



## _martin (Aug 31, 2022)

drhowarddrfine said:


> We become book collectors and not readers.


This is sadly so true for me lately. I bought few very nice books and read pretty much nothing since I bought them. I can give you handful of excuses why it is but in the end it doesn't matter. :|

K&R C book is my most favorite, I own the 2nd edition. Also back in the 90s, inspired by this book Czech author wrote a book, roughly translated to "textbook of C language" (Učebnice jazyka C, Pavel Herout). This was my first book about C and I remember reading it through and through several times. Also remember that feeling when I first opened a page on pointers. Rite of passage for a newbie.

Computer Press published several books that got translated to Czech (original publisher Pearson Education) about C++. I own two: C++ primer plus and Programming Microsoft Visual C++. The later I didn't read all the way. I didn't like the OOP (and still don't), I stirred my focus to assembly. Back then to x86 one.
Most of my books now are the original titles (O'Reilly, NoStarch Press), something that was very hard to get in the early 90s.


----------



## ralphbsz (Sep 1, 2022)

I never programmed much in straight C; I went very quickly from C to C++ (around 1992 or so). My C bookshelf: K&R 2nd edition (the ANSI one, I own two copies so I can have one at home and one in the office, plus I own one pre-ANSI version). Then the Plauger "Standard C library". For OS interfaces, I early on decided that the differences between different Unix versions were TOO annoying, so I bought several O'Reilly volumes about POSIX (including Bill Gallmeister's book on POSIX.4), and used those as reference manuals).

On book I particularly like is Brad Cox "Object Oriented Programming: An evolutionary approach", which teaches how to do OO in C (not C++) and Objective-C. Very insightful. Not useful at all today, but it teaches the fundamentals of how OO works.

And then obviously all the W. Richard Stevens books.


----------



## _al (Sep 1, 2022)

ralphbsz said:


> Bill Gallmeister's book on POSIX.4


I have one too, I haven't opened it for 25 years.  And also this one - "UNIX Systems Programming for SVR4", David A. Curry, 1996.


----------



## _al (Sep 1, 2022)

_martin said:


> I bought few very nice books and read pretty much nothing since I bought them.


To be honest, I also have books that I have only opened a couple of times, such as "ACE Programmer's Guide", Stephen D. Huston and others (this is a very good book, but I didn't use it.).
And yet, my bookcase is not a museum, and the books in it are not exhibits.
The books that I often use end up in a terrible condition - the sheets start falling out, and I have to stitch the book...


----------



## _martin (Sep 1, 2022)

I've some nice books I want to go through but RL (real life) is just keeping me busy. I don't like pushing myself to read (with comprehension) late in the evening. Especially if it's something I need to use my brain a lot. But collecting books and not reading them seems to be reoccurring pattern in my case.


----------

