Open: An Autobiography
Andre Agassi, Erik Davies, et al.
4.7 on Amazon
139 HN comments
Starting Strength: Basic Barbell Training, 3rd edition
Mark Rippetoe and Jason Kelly
4.8 on Amazon
121 HN comments
Born to Run
Christopher McDougall
4.7 on Amazon
82 HN comments
Moby Dick: or, the White Whale
Herman Melville
4.3 on Amazon
75 HN comments
The Inner Game of Tennis: The Classic Guide to the Mental Side of Peak Performance
W. Timothy Gallwey , Zach Kleiman, et al.
4.7 on Amazon
74 HN comments
The Book of Why: The New Science of Cause and Effect
Judea Pearl and Dana Mackenzie
4.4 on Amazon
56 HN comments
The Anarchist Cookbook
William Powell
4.3 on Amazon
56 HN comments
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight, Norbert Leo Butz, et al.
4.8 on Amazon
55 HN comments
Into Thin Air: A Personal Account of the Mt. Everest Disaster
Jon Krakauer , Randy Rackliff, et al.
4.7 on Amazon
55 HN comments
Deep: Freediving, Renegade Science, and What the Ocean Tells Us About Ourselves
James Nestor
4.7 on Amazon
51 HN comments
The Art of Learning: An Inner Journey to Optimal Performance
Josh Waitzkin and Tim Ferriss
4.4 on Amazon
48 HN comments
K: A History of Baseball in Ten Pitches
Tyler Kepner
4.6 on Amazon
46 HN comments
The Talent Code: Greatness Isn't Born. It's Grown. Here's How.
Daniel Coyle, John Farrell, et al.
4.7 on Amazon
37 HN comments
Moneyball: The Art of Winning an Unfair Game
Michael Lewis
4.7 on Amazon
37 HN comments
The Old Man and the Sea
Ernest Hemingway, Donald Sutherland, et al.
4.6 on Amazon
26 HN comments
saagarjhaonJan 20, 2019
alperakgunonOct 13, 2011
klibertponJuly 31, 2014
Raganwald has a few books and many articles about functional JS and combinatorial logic (in JS), go check these out if you're curious what can it be useful for.
rossjudsononJuly 28, 2013
AnimalMuppetonMay 31, 2020
brgonDec 10, 2013
abecedariusonMay 25, 2014
(I consider ESR's book worthwhile too, and it's less outdated. But K&P is the purest expression I've seen of how to Unix.)
satysinonSep 4, 2020
If you're coming from COBOL and wanting to learn C (like the target audience at the time the book was written) ok perhaps it is a good book for you. But if you're coming from something like Python or Java or JavaScript (or even no language at all) there are better options such as K N King's A Modern Approach.
K&R is a fantastic book in its own right and I certainly think once you feel more comfortable with C it is a superb book to read and more importantly complete as many of the exercises as you can.
It is that I have seen too many people come from higher level languages or with no programming knowledge and find K&R frustrating due to its assumption the reader is already a programmer in some other (1970s) language with a fundamental understanding of some programming concepts.
QriusonJune 13, 2017
Why is it that several resources exist on buffer overflows yet we ask question on which one is better?
Why is it that you started your channel even though resources like Art of exploitation and Shellcode Handbook already exist?
Why is that there are people asking question like "computer science books you wish you had read earlier"?
Are the one who is questioning or answering is asking or telling a short-trick to become the super h4x0r?
Internet forums exist for a reason. It is always wise to take the advice of someone more experienced than you. I don't see any wrong in it.
The people who are on top are there because of a reason. The root of hacking lies in outsmarting a coder by exploiting the mistakes in his code. Now even a field like this has become a corporate profession.
But there's something that differentiates a hacker from rest of the people.
I think learning from somebody else's mistakes is one of the smartest thing you can to do.
pumanoironNov 19, 2017
All the head first books I have read (Java, Design Patterns, Android, C, Ruby) have very high quality content. I have read great books on all these subjects along HFs. i.e. The Design Patterns Smalltalk Companion, K&R, etc. The HF books really help visualize and actually enjoy the subjects, they also have great exercises that help to cement the concepts one has just learned. If any of the HF authors read this, thanks for these books, they have help us a great deal.
lifthrasiironJune 23, 2021
The aforementioned list for example has Jed Shaw's Learn C The Hard Way as having "[t]oo many factual problems and a presentation that gets you to do things wrongly before being shown how to do it correctly, and not even always then". This is an opinion held by the ##c channel, not necessarily every (competent) C programmer. LCTHW itself did a great service by introducing valgrind very early, and most criticisms [1] seem to be presentation issues that might be partly necessary for beginners and partly a matter of taste. (I personally think LCTHW was in particular unfairly attacked because of its merciless treatment of K&R. It's a shame that Jed Shaw gave up then.) To this date I don't have any good beginner-level C book to recommend, including K&R.
[1] as judged by famous Don't Learn C the Wrong Way essay by Tim Hentenaar: http://hentenaar.com/dont-learn-c-the-wrong-way
kabdibonNov 16, 2013
I had a lot of things wrong. It took me a while to understand the difference between control-D and EOF, for instance (how embarrassing). But the 30 days I spent without a compiler made me think about program behavior.
I'm not saying this is a great way to learn a language, but it can be done.
I keep hearing people complain about K and R being "a terrible book." For me it was perfect: pragmatic, succinct, with great examples and good exercises.
whydoyoucareonSep 18, 2019
[1] https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
[2] https://www.eskimo.com/~scs/cclass/notes/top.html
primituronJan 5, 2013
The accurate fact is that K&R C is a book about C. It is not the end-all, but rather an introduction to the language. Sure, it has thorns. Sure, you'd be a fool to adopt the style from it; this speaks more of the culture of its readership than the book itself, however. The authors are very honest that their samples are an attempt to engage the readers attention in the Language; especially the Ingenue, new-comer, non-Professional C programmer.
To that end, the book succeeds; new C programmers get an introduction, a light read, a good set of nomenclature to understand the topic further, and so on. It is not intended, in spite of the cultural proclivity towards these things, to be "A Bible of C".
And if it were, no professional C coder worth their salty words these days would be without the New Testament, right alongside K&R on the neglected end of the bookstack, which book is of course: "Advanced C Programming - Deep C Secrets" which explains rather a lot more about the thorns of Professional C, and more, in an equally comfortable manner as both K&R, the Authors of C as well as books about C, have done.
In my opinion, Peter Van Linden has already done to K&R what Zed doesn't seem to have the humility to do; proven its value to the newcomer in becoming one step closer to a professional.
satysinonMay 1, 2016
The exercises in K&R are superb though and I highly recommend taking the time to do them all while you read K&R which I still feel you should, it is a small book so shouldn't take long to read.
loumfonApr 7, 2015
The gist of it was that K&R ignores the safety problems in C and there is no discussion of the habits/constructs seasoned C programmers have developed to make sure their code is safe. Of course, many of those habits were developed after K&R, but that's why we need revisions and new sources.
In its place, Zed Shaw (the author), updated Learn C the Hard Way to concentrate on using C safely -- it is an awesome way for a newbie to learn C. Even if you don't agree (and want to use K&R), read this alongside it.
http://c.learncodethehardway.org/book/
aabajianonJan 17, 2016
Overview (5 slides)
General Concepts (9 slides)
K nearest Neighbor (6 slides)
Decision trees (6 slides)
K means (4 slides)
Gradient descent (2 slides)
Linear regression (9 slides)
Perceptron (6 slides)
Principal component analysis (6 slides)
Support vector machine (6 slides)
Bias and variance (4 slides)
Neural networks (6 slides)
Deep learning (15 slides)
I especially like the nonlinear SVM example on slides 57 and 58. It provides a visual of projecting data into a higher dimensional space.
dmunozonFeb 9, 2014
This is likely to be horrible advice. I don't doubt that there are good C tutorials on youtube, but there are probably also hundreds of extremely poor tutorials that are seductive and even highly rated because the people rating don't know better.
K&R C is excellent. I don't like overbearing advice, but "Every serious programmer should read K&R C" isn't bad as far as such advice goes.
I don't particularly like the "Learn X The Hard Way" series (maybe it is the right way, but I find it too painful), but there is Learn C The Hard Way [0].
[0] http://c.learncodethehardway.org/book/
parennoobonSep 11, 2016
Firstly, probably yes. If you're selling way below the market price, there's something wrong with your BMW. But leaving that aside...BMW M5s are not nearly not as easy to produce or copy as books. I could probably generate a (horrible) learn to program in C book in a matter of days and put it up for sale for $30. I would appreciate someone telling the world "Don't buy this, it's a bad idea."
Now I maybe you have already read the book and know it's not particularly bad, or you think Zed's reputation as an author is good, or something else like that – and it's fine to offer those as rationales for buying the book. But the argument that "Any book about C is likely to change your career* and you're quibbling over $30?" is a terrible argument IMO. The likely thing that happens with the average C book is that you read the first 10 pages, can't grasp some point that the author is particularly bad at explaining, and wander off to watch a Youtube video or something.
Now if your book is so engaging that it prevents this sort of attention wandering, that is a book where you can reliably present this argument. One example (from my perspective) are the Feynman Lectures on Physics. I can read them for ages and ages without getting bored. If you or anyone else in the thread knows about that kind of C book, let me know. K&R (surprisingly) is the closest I've come.
tdignanonJuly 3, 2011
With that said, when I first saw Learn Python The Hard Way, it immediately reminded me of the time I spent reading K&R2. Its exercise rich style is what programming books are lacking these days. K&R2 taught me how to program.
redis_mlconJune 11, 2020
Flipping through the Smalltalk books was an eye-opener back in the day.
There's an amazing but little-known book in the same printing style as K&R about systems software from the MCC consortium, with tons of C source code.
ctothonFeb 10, 2020
Lin, B. Y., Chen, X., Chen, J., & Ren, X. (2019). KagNet: Knowledge-Aware Graph Networks for Commonsense Reasoning. 2822–2832. https://doi.org/10.18653/v1/d19-1282
Liu, W., Zhou, P., Zhao, Z., Wang, Z., Ju, Q., Deng, H., & Wang, P. (2019). K-BERT: Enabling Language Representation with Knowledge Graph. Retrieved from http://arxiv.org/abs/1909.07606
Trinh, T. H., & Le, Q. V. (2019). Do Language Models Have Common Sense? Iclr, 1–12.
Ostendorff, M., Bourgonje, P., Berger, M., Moreno-Schneider, J., Rehm, G., & Gipp, B. (2019). Enriching BERT with Knowledge Graph Embeddings for Document Classification. Retrieved from http://arxiv.org/abs/1909.08402
tialaramexonMay 15, 2021
Today online you've got full text search, maybe you find two, three hits that are irrelevant, but it's so cheap you barely care. And in a book today the index is probably auto-generated (hiring somebody to write an index is not a thing these days) and so it's almost useless with dozens of irrelevant entries, but hey, like I said, full text search, so who cares?
Because C is such a small language and it was essentially finished when the book was written, they get to do a pretty complete survey while also teaching you, so you read the book once, now you understand C pretty well. The Rust book is much better than C++ books I tried, but because Rust is still immature there are big sections that are being rewritten or have already been rewritten, and of course the whole book can't be reordered and started over each time, so overall it's uneven.
I am reluctant to buy a printed Rust book because of that immaturity. My (second edition) K&R is still a pretty good survey of the language. Are there things it doesn't cover? Yes. But few of them are fundamental, whereas I feel like if I bought a Rust book today, in five years it's a historical curiosity like my Stroustrup, except hopefully better written. I still consult my K&R a few times a year, I don't even know where the books I own on other languages (including the long obsolete Stroustrup) are, I might not have unpacked them after moving years ago.
emmelaichonApr 19, 2017
1. Read the entire UNIX manual (wasn't that big at the time)
2. Read Rochkind "Advanced UNIX Programming"
3. Read K&R "The C Programming Language"
4. Read K&P "The UNIX Programming Environment"
sometime later I also read (parts of) Stevens UNIX Networking.
I'd say these made a very strong base from which to learning everything else.
jorgecastilloonSep 11, 2016
This is my favorite C related documentation online. The first book on C I read was a PDF of K&R, I liked it. I used to think the paperback was way too expensive. Instead I bought C Primer Plus, never read it. Few books capture the gist of a language as well as K&R in as little space. Though Modern Perl and Programming in Lua also come to mind. If they ever make an updated version of K&R I would definitely buy it.
CanadaonJune 6, 2015
K&R is a good reference, but I only found it useful after I knew enough to actually get things done. I didn't find it good to learn with, and I was already proficient in a couple of scripting languages.
I also recommend Richard Stevens books. Advanced Unix Programming and Unix Network Programming are excellent. I'm not sure what you want to work on, so that might not be relevant.
For studying how non-trivial things are implemented I like TCP/IP Illustrated Volume 2, and The Design and Implementation of the Freebsd Operating System.
One of the things you're going to find about C that's different from higher level languages is that it's so minimal that you're going to have to build up a personal library of code to get things done.
For code samples, I like to look at OpenBSD. It's all in one place and there's less cruft than most of the alternatives. This is useful because while the key tasks of a particular program might be described well in one of the books I mentioned, it's not the same as a real modern program. I've found it really helpful to actually look at something that's stood the test of time for inspiration. Also, it's man pages are awesome. I look at them often even when writing code on other operating systems.
And remember, valgrind is your friend.
BanazirGalbasionMar 4, 2020
Luckily, I was able to snag a copy of the K&R book early on and basically used that to teach myself the course materials. Unfortunately for the rest of my classmates, that professor's poor teaching made most of them dislike using C, so they suffered when we used it for Operating Systems later.
It may be outdated (I have no clue yet), but I'll check out the Lions Notes you linked. Thanks for sharing it!
tomcat27onNov 22, 2020
It's different from other programming books I read from APress, O'Reilly publications.
Hard to digest but never before read a book so short and crisp that fully explains the programming language.
To any noob programmer out there, I'd say pick K&R's book, spend a semester on it, do the exercises. You will become better engineer. You'll not regret.
pjmlponSep 13, 2020
Also the amount of UB descriptions just increased and are now well over 200.
Annex K was badly managed, a weak effort as you say, given that pointer and size were still handled separately, and in the end instead of coming up with a better design with struct based handles, like sds, everything was dropped.
ISO C drafts are freely available, I recommend everyone that thinks that they know C out of some book, or have only read K&R book, to actually read them.
samatmanonSep 7, 2013
Also, read actual code. Want to know how diff works? Read diff. Getting better at code forensics is the second-best way for a self-taught programmer to learn real CS.
EDIT: I am a largely self-taught programmer.
ZannionOct 19, 2019
emmelaichonFeb 11, 2018
As a Unix systems engineer, I would choose
As a Unix systems programmer I would choose
pyreonAug 11, 2011
blobfishonJan 29, 2014
1. Learn the C language. Read K&R book, then get my hands dirty with some relatively simple problems. Here I'm actually deciding between practicing with algorithmic problems and doing a simple project or I can probably do both. Anyway I'm leaning towards algorithms because they normally are short enough to be possible to work on with the minimal amount of knowledge on the standard library and are complicated enough to be a good practice, particularly when it comes to performance and memory usage. This approach would also make me learn how different data structures are handled in C and how to deal with memory management.
2. Learn systems programming. At this step after some initial reading I would like to join a relatively small open source project and try to fix some bugs or contribute some small changes to it. I didn't decide yet what particular project it could be so any suggestions are welcome :) At this step I should become comfortable with writing C and gain some basic knowledge on systems programming.
3. Get deeper into systems programming. This is were I'm deciding between taking on Linux/BSD or MINIX. I suppose MINIX should work very well as a learning tool for OS design and implementation. So it could make transition to Linux/BSD easier. At this stage I could probably join some open source OS project.
What comes after that I'm not quite sure. There may be more steps involved or I may be ready to look for a job at this point.
I may also need to decide what exactly I want to work on which leads me to the difficult question I raised to myself when thinking about this. Should I specialize from the very beginning or can I be a generalist with a strong general systems programming knowledge and then get to the details when the need arises based on particular job?
tarkin2onApr 4, 2021
Teaches you how computers, languages and operating systems work from basic principles
* Little Schemer, Seasoned Schemer
Teaches you about the power of functions, recursion, various CS topics and lisp's syntax
* K&R C Programming Language
Teaches you about lower-level programming
shadowmintonJan 15, 2012
K&R is an excellent reference, and LCTHW covers some new topics like valgrind, which is great.
However, it fails to point out that some of the exercises are just that; exercises. For example, creating a custom type system in C. Never do this.
Some other failings include; little attention to testing, no mention of cmake (used in major projects like opencv and clang) or lint(!), criticism of K&R systax (arguably validly so, but industry standard is industry standard).
Look there's a lot of good in Learn C the Hard Way. I completely recommend it as a way to learn some C... but don't make the mistake of assuming a new book is better than an old book just because it's new.
If you're programming C, read K&R. If you're doing it professionally, you probably also want to read Deep Sea Programming by Peter van der Linden.
forbidden404onJan 16, 2016
karamazovonJuly 13, 2015
"Working through" means doing exercises and projects. Reading or watching material without applying it doesn't help.
I aim to spend an hour a day on this. It doesn't always happen, but it's a reasonable enough goal that I can find time for it most days. Occasionally, I'll take a full day to study on the weekend.
Some specific recommendations:
This is just what I've been interested in and is by no means comprehensive. Outside of CS, math is great to learn if you haven't studied it formally.
I've found it's best to pick a topic you know enough about to be motivated to study it, but haven't done serious work in.
angusgronJuly 30, 2010
Speaking for myself, I've found that I make nearly zero use of technical reference books. K&R is about the only counterexample that I can think of. In fact, for me, buying a book about some technology seems like it decreases the chances of me actually learning it.
I read non-technology-specific non-reference books, but sadly a lot slower than I buy.
Working in a second hand bookstore for most of my student years drilled home to me that for most people, self included, buying books is many times easier (and more frequent) than reading them.
reality_czechonJune 1, 2015
Zed also made many completely unjustified attacks on the K & R book, which is a well-written, easy to read book which introducse C concepts in a clear and readable way. Even if this was justified (and it's really, really not), that all belonged as a separate blog article rather than as part of an alleged "tutorial."
Finally Zed published a "rebuttal" to all of this in which he basically says that C sucks, is not worth learning, and he's learning Go. So the author quite reasonably asks, why would you want to learn C from someone who doesn't like the language or think it's worth learning?
I think we can all agree that Go (or some other high level language) probably is the better choice for most projects. But after all, there are still many places where C will continue to be used like the Linux kernel. Those people would be much better off reading K&R, as old as it is, than anything Zed has written. And his attacks on the K&R authors are just sad.
qohenonOct 27, 2014
K&R is a classic, but is it a good way to learn proper C programming technique?
This makes one wonder -- from Zed Shaw's online version of "C The Hard Way" [0]:
I myself believed that until I started writing this book. You see, K&RC is actually riddled with bugs and bad style. Its age is no excuse. These were bugs when they wrote the first printing, and the 42nd printing. I hadn't actually realized just how bad most of the code was in this book and recommended it to many people. After reading through it for just an hour I decided that it needs to be taken down from its pedestal and relegated to history rather than vaunted as state of the art.
He goes into more detail in his critique, e.g.
Where K&RC runs into problems is when the functions or code snippets are taken out of the book and used in other programs. Once you take many of these code snippets and try use them in some other program they fall apart. They then have blatant buffer overflows, bugs, and problems that a beginner will trip over.
There's more -- and he goes through some K&R code too.
[0] http://c.learncodethehardway.org/book/krcritique.html
wilsonnbonMay 9, 2018
Some people are inevitably going to recommend The Art of Computer Programming, which hardly anyone has read and isn't that relevant to the work that 99% of us are doing.
Someone will probably recommend The C Programming Language, also called K&R after the authors, but again it's not very useful unless you're going to be using a lot of C and even then I personally don't think it provides anything you can't get from guides on the internet. (I have actually read this one, but it's been a while)
There are other classic textbooks that will probably be mentioned that are only useful to those in that domain. Many of us can get by without a deep understanding of algorithms and data structures, most people don't need to read a compiler book, etc, etc.
However, there are some generalized books that people often recommend like The Pragmatic Programmer and Code Complete. These are, in my opinion, good recommendations if you're looking for something to read but I wouldn't say that someone starting a career in software engineering should read them. Software engineering isn't really a field with seminal texts that should be read by everyone.
For example, every political scientist should have probably read The Republic by Plato and Politics by Aristotle among many other texts. I don't think software engineering has that equivalent, partially due to the relative newness of the field and partially because the primary output of our field is not written texts.
Another interesting question would be "What codebases should someone starting their career in software engineering look at?". Are there things that the average joe programmer can learn by poking around the Linux kernel or Firefox? Maybe. I don't know. I've never done it. I'd be interested in hearing from those who have, though. Maybe I'll do my own ask HN.
edit: I feel I should clarify that this is written from the perspective of a software engineer, not an academic in computer science. For all I know there could be seminal texts that those on the academic side should all have read.
geoka9onMar 13, 2013
That is, if you want to be a programmer loved by your peers and those who inherit your codebases.
miserable1980onFeb 22, 2016
P.S. I used Go for some projects last year and found the situation to be much better. The Go book that's available on the website reminded me of K&R ... readable in a weekend of two. This should be the criteria for new programming languages IMHO.
cop359onFeb 15, 2012
Everyone learns from the same exact textbooks. My professors were using the same exact edition of Kleppner and Kolenkow (Into Classical Mechanics) textbook I used. It's even a point of pride for them. The canonical set of books are:
K&R -> Intro Mechanics
Taylor -> Advanced Mechanics
Griffiths -> E&M and Quantum
Sakurai -> Quantum
Boas -> Mathematical methods
(I'm prolly missing a few)
Every physics student in the US is familiar with these books.
Part of the reason for the intransigence is that it weeds out the weaklings. They make Physics very difficult and impenetrable in part so that 1/2 the class drops out and goes to do Bio or CS(which are taught sooo much better) and you're left with the most hard working masochistic students of whom the top 10% will become grad students and slave away for minimum pay for 7 years.
I mean.. they're not actively planning this in an evil-planning-room, but that's the end results and the physics establishment is happy and no one is pushing for new methods of teaching.
pbhonJune 13, 2010
For what it is worth, I learned from Database Systems: The Complete Book.
http://www.amazon.com/Database-Systems-Complete-Book-2nd/dp/...
DS:TCB is pretty explicit about which of the SQL it teaches is part of which standard. That said, I suspect that any general database book should do a reasonable job.