Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
If you could only have one programming book on bookshelf what would it be? (softwareengineering.stackexchange.com)
61 points by whereistimbo on Nov 11, 2023 | hide | past | favorite | 94 comments


Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman


Fun observation: SICP is a kind of book that after finishing, you rarely/never go back to it.


This is the proper answer. This book offers a lifetime of gems to revisit and think about. Truly shows the art form of computer science.


without a doubt, "Designing Data-Intensive Applications" by Martin Kleppmann.

it's such a complete book, i always recommend to any backend developers.


this is next on my bookshelf, can't wait to read it :)


The Art of Computer Programming

I’d never read it, but it would impress some people whilst I beat ChatGPT into submission.


Why wouldn't you read it?


Many people might find its content quite detached from what they are doing every day.


That's five books (so far)... does it really count, though? Hm.


Peopleware: productive projects and teams.

Even the best programming book in the universe won’t help if the environment, leadership and team don’t support your efforts.


"The C programming language" by Brian W. Kernighan

Only answer I would choose if only one book. I don't care if it's slightly dated, programming fundamentals are the same.


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.


and also by Dennis Ritchie (dmr), designer of C. but i think kernighan wrote most of it


Dude just lops the R off of K&R!


"The Design of Everyday Things" by Don Norman.


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.


Say more!


"Alice's Adventures in Wonderland" by Lewis Carroll.

I am not even joking.


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's on my bookshelf. But the prompt said only one book. :)


You're cool :D


Not even a quarter as cool as Martin Gardner.


Ok, I'll bite. It's a good book, but how does it relate to programming?


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.


"The name of the song is called 'Haddocks' Eyes'."

"Oh, that's the name of the song, is it?" Alice said, trying to feel interested.

"No, you don't understand," the Knight said, looking a little vexed.

"That's what the name is called. The name really is 'The Aged Aged Man'."

"Then I ought to have said 'That's what the song is called'?" Alice corrected herself.

"No, you oughtn't: that's quite another thing! The song is called 'Ways And Means': but that's only what it's called, you know!"

"Well, what is the song, then?" said Alice, who was by this time completely bewildered.

"I was coming to that," the Knight said. "The song really is 'A-sitting On A Gate': and the tune's my own invention."

Get a clear understanding of what's going on in that passage, and pointers will never cause you any difficulties.


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


Alan Perlis is cool. :D


Not sure if anyone needs to hear this but it’s fine to have zero on your shelf. I have zero. These books just turn out to not be the way I learn.

I should have known this earlier, when I stopped buying textbooks in undergrad.


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].

[1]: https://www.goodreads.com/book/show/539154.Assembly_Language...

[2]: https://news.ycombinator.com/item?id=38110448

[3]: https://pbr-book.org/4ed/Introduction/Literate_Programming


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.


What you mean is you're experienced now and most crap (javascript library of the week) is same-ish so you don't need a whole book.

Fundamental topics when you don't know anything are a different problem. But you've outgrown those.


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?


Probably why it was posted here


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.


I would choose "Pragmatic Programmer" and Design patterns


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.


Isn’t that two books?


or a rare double feature


i've used a lot of programming languages in my life, and i can't say that i have a favourite in that regard.

but if i had to pick a wise book about software development, i would go with "Rapid Development" by Steve McConnell: https://www.amazon.co.uk/Rapid-Development-Taming-Software-S...


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.

https://en.m.wikipedia.org/wiki/The_War_of_Art_(book)


This is as meaningless a question as “if you could only eat one thing what would it be?”. You may have a favorite food but you need a balanced diet!


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.


The question was asked of multiple people, not a single person. The answer is not any single book but many.


The Linux Programming Interface by Michael Kerrisk. It’s the only programming book besides K&R that I routinely reference when doing my job.


Design Patterns by Gang of Four. I know this will be criticized but I like how it approaches programming on a higher level than language level.


I have the book and don’t think it’s particularly well written. I’d say it’s a boring read. I guess it’s ok for reference purposes.

Another design patterns book that is much more enjoyable is Game Programming Patterns [0]. Though of course focus is games.

Would be nice to have a more “entertaining” version of the GoF book, discussing same patterns.

———

[0]: https://gameprogrammingpatterns.com/


Mostly considered a cover for limitations of C++ and Java. See: https://norvig.com/design-patterns/

and

https://softwareengineering.stackexchange.com/questions/1487...


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.


A philosophy of software design - John Ousterhout. Opened my eyes on many things.


I don’t think that book has aged very well. Maybe half of it is still good advice, the other half is very outdated or plain wrong.


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.


Hasn't aged well since the 2nd edition in 2021?

So basically it doesn't cover AI tools well enough?


What parts are wrong? Be interested to know.


+1 I also really liked that book. It's also something you could read many times and still find value in it.


Related Ask HN: today -

Ask HN: Top 10 Timeless Software Books That Changed Life as Software Engineer?

https://news.ycombinator.com/item?id=38228850


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.


Numerical recipes in C. I still find myself looking stuff up there after all these years...


I had most fun with "Lego Mindstorms NXT Power Programming" by John C. Hansen.


I didn’t see “Practice of Programming” anywhere on the list, which is unfortunate.


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.


That's a tough one because, strictly speaking, I don't need a physical programming book. There's all the reference material I need on the Internet.

But, I would probably choose the Camel Book or Perl Cookbook.


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


Programming Pearls, Bentley (1986)


Eloquent Ruby


needs a 2010 in the title


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".


They're not joking, the thread that is linked is literally from 2010.


Well, based on how these sites work, this question is now resolved and needs no further discussion ever.


K&R


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.


Why is that progress? The content didn't age more than other books?

Or did you just use this to push politics?


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.


What does this have to do with politics?


He's had some hot takes on the twitters.


Definitely looking forward to The Winds of Winter ... XD


That’s the wrong Martin.


I was just joking hehe


Aaand that lasted a whole 3 minutes


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.


Even Bob probably would advise against it


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.


Maybe, but unless you yourself are a beginner, that has little relevance to answering the question.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: