Live data from Hacker News

What are must read books for entry level C programmer?

news.ycombinator.com

21–27 of 27 posts

Re: What are must read books for entry level C programmer?

#21

Seriously? No one has mentioned K&R. It's arguably the best programming book ever written.

>It's arguably the best programming book ever written

Well that is debatable and many people might not agree with you (though I tend agree and put it near, if not at the top of my own list).

As they say, De gustibus non est disputandum:

https://en.wikipedia.org/wiki/De_gustibus_non_est_disputandu...

Along with K&P, makes for two of the best, and where Kernighan was a co-author, IMHO.

Of course, caveats apply and should be mentioned (a few others have said it), such as it not being up to date with latest versions of the C standard. But that does not diminish the achievements or quality of K&R.

Edits for grammar / wording.

Re: What are must read books for entry level C programmer?

#22
post #21

Seriously? No one has mentioned K&R. It's arguably the best programming book ever written.

>It's arguably the best programming book ever written Well that is debatable and many people might not agree with you (though I tend agree and put it near, if not at the top of my own list). As they say, De gustibus non est disputandum: https://en.wikipedia.org/wiki/De_gustibus_non_est_disputandu... Along with K&P, makes for two of the best, and where Kernighan was a co-author, IMHO. Of course, caveats apply and shou…

However I don't think it is necessarily the best first book on C for everyone, but it can be for some. Depends on the amount of systems-level and close-to-the metal knowledge they have; at least a minimal understanding of how computers work under the hood (RAM, hard disk, CPU, files, etc. [1]), or at least a mental model of that, helps and those who have that will do better with K&R as first book. Others may be better served by an easier book and then should move on to K&R.

[1] And some people, even on here, may be surprised at how much some people are lacking in that sort of knowledge, more so in these days of Android and Apple tablets and smartphones, where a lot of the underlying details of computers (both on hardware and software) are abstracted away. Very different from the age of hobbyist home computers, where you had to know a good amount about the internals to use the things, as some many comments in recent threads here about them have mentioned.

Re: What are must read books for entry level C programmer?

#23
CS:App you can find it used/cheap on Abe books. You probably want the 3rd version that covers x86-64.

Look at the TOC it covers floating point, TMin/Tmax overflow and casting to unsigned problems, gcc use, assembly (enough to understand how exactly pointers work) and many other things including VM/CPUs/Cache memory ect http://csapp.cs.cmu.edu/

The book Hacker's Delight 2 picks up from here and shows you all kinds of bitshifting tricks and other C specific optimizations, The Art of Software Security Assessment to show you safer C and Robert Seacord's book on The CERT C Secure Coding Standard.

Re: What are must read books for entry level C programmer?

#25
post #14

Zed Shaw's "Learn C the Hard Way" is a rather good intro to C for systems programming.

http://www.iso-9899.info/wiki/Main_Page#Stuff_that_should_be...

I understand this criticism from experienced C programmers, and yes Zed doesn't always give a strict-standard accurate account. But for a total novice, the approach of broken thing, figure out why it's broken, fix it, is very powerful. After all, this is the bulk of dev work.

Additionally, Zed pays special attention to defensive programming, an often forgotten art and good practice.

Re: What are must read books for entry level C programmer?

#26

# Deep C programming http://www.amazon.com/dp/0131774298/?tag=akhn-20 Talks about all the weird historical C design decisions. # 21st century C programming http://www.amazon.com/dp/0131774298/?tag=akhn-20 Discusses the language and some of the best practices.

21st century C programming, as I recall, will get you set up a dev environment with tooling, which can be hard for an entry level C programmer. It also covers useful tools and libraries.

It's also a fairly good C book in general, though I don't know that I'd want to try to learn a computer language from it.

Post reply on HN