Found in 6 comments on Hacker News
chrism238 · 2023-08-31 · Original thread
Copied: Please check "The C Interfaces and Implementations" book by David Hanson [1]. Someone has implemented the concept using his library that you can check and use [2]. Another excellent reference is the "The Linux Programming Interface" book by Michael Kerrisk that documents most of the API available under Linux [3]. [1]https://www.amazon.com/dp/0201498413 [2]https://github.com/gon1332/gonlibs [3]https://www.amazon.com/Linux-Programming-Interface-System-Ha...
sn9 · 2017-01-17 · Original thread
Hanson's C Interfaces and Implementations [0] is one of the best books on the subject.

Strongly complemented by Sedgewick's Algorithms in C.

[0] https://www.amazon.com/Interfaces-Implementations-Techniques...

TimJYoung · 2016-08-21 · Original thread
This book (C Interfaces and Implementations: Techniques for Creating Reusable Software) has a whole section on it:

https://www.amazon.com/Interfaces-Implementations-Techniques...

eu90h · 2016-07-28 · Original thread
I'd recommend Ben Klemens' excellent book "21st Century C - Tips from the New School" [0]. This book teaches you modern C techniques and, most importantly, the tooling that modern C programmers use (git, autotools, valgrind, etc.) It also covers commonly used libraries to help you from reinventing the wheel (GLib, POSIX standard, SQLite, libxml, & cURL.)

As mentioned in another post, David Hanson's "C Interfaces and Implementations - Techniques for Creating Reusable Software" [1] is a great book, stressing the design of good APIs. This book in particular might help you in your goal to become a better engineer.

On the free side, there's an excellent PDF by Jens Gustedt, "Modern C" [2]. I've not read the whole thing but it seems like an in-depth look at C11.

John Regehr's blog "Embedded in Academia" [3] is a good resource for C programming. You'll learn a lot about weird edge cases and undefined behavior. He also has a recent post about teaching C, with suggestions for resources [4].

[0] https://www.amazon.com/21st-Century-Tips-New-School/dp/14919...

[1] https://www.amazon.com/Interfaces-Implementations-Techniques...

[2] http://icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf

[3] http://blog.regehr.org/

[4] http://blog.regehr.org/archives/1393

sn9 · 2016-05-12 · Original thread
Much of the code in the fantastic C Interfaces and Implementations [0] is inspired by Modula-3. It's a fantastic book to work through after finishing K&R for anyone wanting to learn how to write safe and reusable C code.

(Regular HN readers will recognize the author of the top review on Amazon.)

[0] http://www.amazon.com/Interfaces-Implementations-Techniques-...

tumba · 2016-04-24 · Original thread
I suggest C Interfaces and Implementations: Techniques for Creating Reusable Software by David Hanson.[1] It focuses on helpful engineering practices for reliably and efficiently implementing algorithms in C.

I also second the recommendation for Peter van der Linden's Expert C Programming for its masterful treatment of how C really functions, including the surprisingly frequent areas in which real-world constructs produce "undefined behavior" from the perspective of the C standard.

[1] http://www.amazon.com/Interfaces-Implementations-Techniques-...