Live data from Hacker News

To become a good C programmer (2011)

fabiensanglard.net

1–10 of 135 posts

Re: To become a good C programmer (2011)

#2
This is a great list of books - at least, I found the same ones were the most excellent. Also I really learnt a lot from 21st Century C (The author here said they wanted to stick to C89, which is fair enough.)

>To read great C code will help tremendously.

But then he just gives examples of games I don't know and am not really interested in. Anyone know some non-game C that is, I suppose, well-known and wonderfully-written?

Also, am learning about writing APIs, any good books or talks about that people could recommend, or examples of particularly good ones in C? (I'm particularly interested in maths/graphics-type stuff.) Thanks!

Re: To become a good C programmer (2011)

#5

This is a great list of books - at least, I found the same ones were the most excellent. Also I really learnt a lot from 21st Century C (The author here said they wanted to stick to C89, which is fair enough.) >To read great C code will help tremendously. But then he just gives examples of games I don't know and am not really interested in. Anyone know some non-game C that is, I suppose, well-known and wonderfully-wr…

I find the source code of the Netsurf browser really beautiful:

- https://netsurf-browser.org/

- https://source.netsurf-browser.org/netsurf.git/tree/

Including the sub projects, for instance:

- https://source.netsurf-browser.org/libcss.git/tree/

- https://source.netsurf-browser.org/libdom.git/tree/

It feels immediately obvious and understandable, which is quite impressive for a browser. Everything is well documented, well separated, the code is clean and seems simple, functions are small, etc. I am really impressed. I'd want to work on such code. I have never worked on it though, and I am not connected in any way to this project.

Re: To become a good C programmer (2011)

#6
Why does everyone always suggest K&R? I really don't see the big deal. It's short, contains only trivial toy examples with no real world application, and touches almost nothing on actual project architecture or best practices. I bought it expecting to learn to write programs in C but it's really just a reference manual on syntax.

Re: To become a good C programmer (2011)

#7

Why does everyone always suggest K&R? I really don't see the big deal. It's short, contains only trivial toy examples with no real world application, and touches almost nothing on actual project architecture or best practices. I bought it expecting to learn to write programs in C but it's really just a reference manual on syntax.

> It is all you need to know about C…for the first few weeks.

It seems the author was aware of this. Isn't syntax a good place to start for a new language?

Re: To become a good C programmer (2011)

#10

This is a great list of books - at least, I found the same ones were the most excellent. Also I really learnt a lot from 21st Century C (The author here said they wanted to stick to C89, which is fair enough.) >To read great C code will help tremendously. But then he just gives examples of games I don't know and am not really interested in. Anyone know some non-game C that is, I suppose, well-known and wonderfully-wr…

recently I started working on a module for nginx and have developed a full-blown crush on the module loader and its relationship with core functionality. haven't seen anything else quite like it, in C, that is. major newb talkin'

also plan9, its nice to read some kernel code that hasn't been tortured by practical requirements for decades.

Post reply on HN