Orthogonal to its usefulness for learning C, K&R (especially K&R 1) deserves to be kept around to serve as an aspirational model for clear and concise technical writing.
There's more real material in that slim book than in many a thousand page doorstop out there, yet at the same time it's easy to follow.
I'll add The Unix Programming Environment, by Kernighan and Pike. Like K&R, the examples it picks "happen" to teach so much more than you came to learn :), e.g. anatomy of version control, some language design, basics of interpreters & compilers.
It depends on what it implies it being the only one on the bookshelf.
Is it the one you consult often because it has so much timeless or deep knowledge?
The one you loved the most so far and has a sentimental value?
The one that is most impressive as a background in online meetings? :)
The one you most want to read but haven't gotten around to yet?
I guess we'd get different and less conflicting answers here if everyone interpreted the question in the same manner.
"Code Complete". Producing code that is consistent, readable and relatively free of defects is more important than design patterns, language-specific features, etc. Give me boring, predictable code any day.
I don't think I'd want any these days. I loved my programming books, especially in the 90s and early 2000s. Now? I can't say I'd even recommend books to anyone new to software development.
I seriously nominate Lauren Ipsum by Carlos Bueno as a _better_ Alice story. It's exlipictly about CS, but is also chock full of math, philosophy and some life advice. It's almost a GEB for kids.
Check The Universe in a Handkerchief: Lewis Carroll Mathematical Recreations, Games, Puzzles, and Wordplays by Martin Gardner. I think you might like it.
It teaches you to think, and specifically to question conventional wisdom.
I don't need to "learn" programming anymore (and if I did, I would use something interactive, not a book), and thus not falling into rote monkey-coding, but questioning "what am I doing here?" and "how can this be done different ways?" are much more important.
Alice gives you that. I recommend Martin Gardner's "the annotated Alice", which explains a lot of things that us non-Victorians might have missed otherwise.
To elaborate, if you understand the difference between "the song", "the name of the song", "what the song is called", and "what the name of the song is called", you're probably going to be able to grok pointers without much trouble.
48. The best book on programming for the layman is
"Alice in Wonderland"; but that's because
it's the best book on anything for the layman.
-- Alan Perlis
I agree: programming is easier for me to learn via tutorials and reading examples and existing code.
The textbooks I still keep on my shelf are deeper than programming and are books I still didn’t reach the end of during university (abstract algebra, algorithms, compilers, statistical methods).
I find that when I make them available within eyesight, I will occasionally take them down and look in them for answers; I would not have asked myself those questions with the books not being present.
I've typically not been a "book learner" when it comes to programming, but Master Class Assembly Language[1] really helped me understand assembly programming when I picked it up at age 17 or so. For me that's been the only programming language book that's been really helpful. Not sure how it holds up today though.
The other programming book that I really learned something from was Physically Based Rendering, the fourth edition recently featured here[2]. It had, for me, a really good mix of math and how to actually implement the math, and I found the literate programming style made it very easy to follow[3].
I spent many, many years struggling with this, buying and not getting anywhere with books. I could eat up articles and blog posts like nothing, but not books. Then I found audio books and now go through one every few weeks. Everyone has their own way that works for them and not being into books is completely fine.
Is there much utility to be derived from a locked thread from over a decade ago, aside from as a historical snapshot? What might a modern answer to this question look like?
I absolutely loved the Pragmatic Programmer (the audiobook is incredibly well done), but I wouldn't consider it a "programming" book. It's a great book to outline what good developer culture is like, but it is (purposefully) very light on actual software development knowledge.
For me, it'd probably be the K&R book. C will never die.
Not so much programming than Sysadmin, but "Unix and Linux System Administration Handbook" by Evi Nemeth, Garth Snyder, Trent R. Hein, Ben Whaley and Dan Mackin.
It's a huge book covering a lot of ground, while on the same time being very approachable for anyone with some experience of linux trying to go further, and last but not least it's extremely enjoyable to read.
This book makes you feels like you're in same room as very fun and knowledgeable people showing you the ropes. It's colorful, and not afraid to be opinionated sometime.
Non programmer and I found Pragmatic Programming excellent. Help me problem solve better in general, communication better with our development team, and understand more about their processes.
From NAND to Tetris.
If you follow the exercises all the way from logic gates to application level you will have a much better idea of how computers work.
If you believe that engineering is ultimately creativity channeled through some (programming) language and other constructs (e.g., design patterns) then...
"The War of Art" by Pressfield
On days where you question your IQ it'll help keep you sane and grounded.
Yes and no. You should have more than this one book, but the framing is useful as it force the answerers to make a choice, and avoid dumping a huge list of favorite book.
Isn’t it full of quite obvious things? I’ve read it 15+ years ago, when I only had half a year of experience, all of that with an OSS project in Java (really badly written). And I’ve came up with half of the patterns independently.
And then I switched into Python, where you just don’t need majority of those patterns anyway.
So I wouldn’t recommend this book 15 years ago, let alone today. And as the only book? Never :)
Perhaps. When I read it, I thought it was enlightning, but I was quite green and not so exposed to OOP by then. I know it has got a bad reputation later, but that it established a language to talk about certain concepts has been impactful. That people took it too far is another thing.
I'm not the kind that takes advice from books at face value or with a dogmatic "this is what the expert do" attitude; I think the biggest lesson of that book is a great explanation of "what complexity is", which is something I've seen lacking in many colleagues
I read the book quite recently and thought most of it was still relevant. But wouldn't regard it is one of the best programming books from my pov. It was a good read though.
Sometimes I imagine a world were everyone in my corp, no matter dev or not, would have read "Understanding the Digital World" by Brian W. Kernighan. Communication and understanding would sky rocket.
Doesn't stackoverflow frown on posting references that go outside the site? Posting just a book title will be downmodded like posts that link to official documentation are.
To be accepted, you need to post the whole text of the book.
I've never read a programming book that was worth it. In the time and the energy it takes to read, I could have always learned more by reading a tldr and trying things myself
You are joking, but it is true. I'm old and grew up on books - bookstores were my paradise, but I still feel the book format is kind of outdated. I much prefer smaller sized and self-contained pieces of information. When it comes to e-books, I think the ones that are less like traditional books and more embrace the possibilities of the medium are best. Klabnik/Nichols "The Rust Programming Language" is a great example, even more so Google's "Comprehensive Rust".
It’s huge progress that no one so far in this thread has mentioned any of Robert Martin’s books. Compared to 10 years ago in the linked thread, that is definitely progress.
Not OP, but I agree with the sentiment. To me, it seemed like for a long time, people accepted whatever Martin said as “the right way” without much thought. He has had many good ideas, but also some bad ones. “Clean Code” hasn’t aged well, for example. There are a bunch of good ideas in it that happily have become commonplace (and so don’t require a the book anymore), but many bad ones too. Usually the book was recommended without qualification.
And personally, I always chafed at the “Uncle Bob” moniker. I’m a grown-ass man, and I’m not calling some random guy “Uncle Bob” unless he’s related to me. Calling yourself “Uncle Bob” seems creepy, and it makes me feel like I’m supposed to look up to him by default. No. I’d rather look to people like Rich Hickey or John Ousterhout, who have no similar pretensions. They’re just experienced practitioners sharing what they’ve learned.
Is unit test driven development fundamentalism politics?
His attitude towards development has always been way too dogmatic with not nearly enough focus on trade offs. It's probably not a coincidence that his politics trend that way too but it doesn't affect how good or bad his advice is.
i will go along with that - what an arsehole he is.
edit: and oops, someone has recommended clean code.
and again: i remember when he tried to set himself up on stackoverflow (a while back, when i was a front page contributor)- he got pissed on from a great height.
Clean Architecture by Bob Martin.
It lays it out how to think abstractly in a systematic way and when to worry about what when designing a codebase. It applies at the micro and the macro level.
However, I'd only recommend it after a few years of experience.
I'd recommend against any and all bob martin advice. 5-10% is very bad (e.g. unit test driven development dogmatism) and it's often hard for beginners to parse which parts of his advice is bad and what part is good.