I would like to become a good C programmer, where to start or not really, where/how to begin getting better? I should probably note that I've been programming on and off since I was 7, for the last 30 years or so. I've read K&R and could program all the examples that are there. I've also read a share of C code and can understand it. It however takes me sometimes to gasp as the design gets more complex and for most part of it is not trivial to me especially compared to Python code. Is there any book to develop the upper level C skills I might use especially the design side?. Is there any reference to the best C libraries or even programs out there? Some half complex, documented C code that could lead me to an eureka or so. Where should I start or more precisely where should I begin the odyssey?

I would like to become a good C programmer, where to start or not really, where/how to begin getting better?

Following K&R, my personal choice is Andrew Koenig's C Traps & Pitfalls for general material. After that, studying more specific & applied topics is in order (such as any networking book by W. Richard Stevens...).

I would also recommend studying assembly language, & how to splice assembly language modules into C code. Do the same with C++ too.

Likewise, understanding programming conventions which will make the lives of maintainers easier is useful. Learning to write portable code will help develop perspective. Understanding how to write POSIX compliant code & knowing why this is important is also good to weave into your own personal style.

Lastly, study how to test code. Testing is highly underrated, & proving that implemented code does what it is supposed to do is a art most overlook.

Programming requires long periods of thoughtful study & practice. One has to understand the fundamental problem being solved, & one has to bend the language to solve that particular problem.

Quote:

Is there any reference to the best C libraries or even programs out there?

Choose one of the better Open Source projects, & study their code base. As examples, both the PostgreSQL & SQLite projects are frequently referred to having clean code which is well tested.

Choose one of the better Open Source projects, & study their code base. As examples, both the PostgreSQL & SQLite projects are frequently referred to having clean code which is well tested.

I'm thinking the Plan 9 code would be another good exemplar. I haven't read much of it, but once saw an excerpt of driver code that looked hardly any different from the application code I'm used to dealing with. That is, I usually look at driver code and throw up my hands thinking, "no way I'll understand this anytime soon," but not with their code so much.

If you're interested in kernel programming, maybe you'd want to read the Minix source code or Lions' Commentary on UNIX 6th Edition. The latter more for the system design than the style of C used.