Hacker News new | ask | show | jobs
by crossroadsguy 1727 days ago
K&R. It was the best programming book I read. I have not read many other programming books to be honest. I couldn't finish most rather.

It's been years since I even touched C and at this point I am not going back, I know; but as an Android dev I wish I could find a non-lengthy book like K&R that would expose me to Kotlin like I was exposed to C, while helping unlearn a lot of Java.

4 comments

I read that book, more than once.

I didn't enjoy that much as a teaching device, but I had the chance to greatly appreciate its timeless writing style.

It's as good today as a book about the C language as it was when it was first published.

I was also my first book and I read it carefully and multiple times when I was young. The thing is that this is quite possible with this book and it gives you a feeling of achievement. Most programming books nowadays are 2000 page monstrosities which are never meant to be read as whole.
It's kind of a shame that C has fallen out of favor as a language for new programmers these days. I still haven't found another programming book as good as K&R and its hard to convince people to read a book for a laungage they probably won't use.
> It's kind of a shame that C has fallen out of favor as a language for new programmers these days.

I really like C, but I also disagree with that sentiment. C/C++ should be used as minimally as possible. New projects should use something secure by default in 2021 unless they have a specific articulable need (i.e. not "I like C more" or "I don't know [alternative]").

C/C++ usage should fall into three categories:

- New OS and System Utilities (in particular for hardware with no other language support).

- Existing projects written in C/C++.

- Areas where all the resources and support are only currently in C/C++ (e.g. game development).

I'm glad fewer new developers are getting into C/C++. That will increase the costs and make companies less likely to pick it unless they absolutely must.

I agree.

About 20 years ago C# was the second language that I'd learnt after C/C++ and remember just picking the C# language spec and learning from it rather than any of the books at that time since all the books were so wordy/verbose that it just didn't make sense. Especially having learnt C from K&R.

I haven't looked lately at other language specs, and don't remember others, but at that time the C# language spec was very well written.