Live data from Hacker News

Ask HN: What is the best programming book you've read?

news.ycombinator.com

21–30 of 56 posts

Re: Ask HN: What is the best programming book you've read?

#22

I’m currently enjoying “From Mathematics to Generic Programming” by Alexander Stepanov and Daniel E. Rose. One thing about the book is that it’s a lot more interesting than what a cursory scan of the table of contents would suggest. An O(log n) algorithm for multiplication doesn’t seem interesting at first. But the authors do an amazing job of starting from familiar ideas and building up to surprisingly beautiful and…

What do you mean by an O(log(n)) algorithm for multiplication ? The naive approach takes O(n^2) and O(nlog(n)) is extremely state of the art and is unlikely to be in a programming book

See page 17 of [0]. Here the big-O is about the value of one of the parameters to multiply(n,m) (say the first), not the number of bits in the values. In the naive multiplication algorithm you have repeated addition which gives you a O(n) algorithm, but you can also do the half & double approach (similar to fast exponentiation) which gives you a O(log n) algorithm.

[0] https://www.fm2gp.com/slides/FM2GP_Course_Slides_Pt1.pdf

Re: Ask HN: What is the best programming book you've read?

#23
Bjarne Stroustrup's Programming - Principles and Practice Using C++. Unparalleled combination of real-world pragmatism and rigor. Plus, since you learn C++, this book prepares you better than most for more advanced books/courses on compilers, operating systems, computer architecture

Hon. mentions: HtDP and accompanying Simple Data and Complex Data courses on edX; Part I of Sedgewick & Wayne's Computer Science book and accompanying booksite and free Coursera course

Re: Ask HN: What is the best programming book you've read?

#24
Refactoring: Improving the Design of Existing Code

For helping realize that in all the books telling me how to write good code, explaining language constructs, and working as a software developer, none of them ever made it clear to me that programmers spend less than half their time writing new code from scratch. For showing me that programming involves revising and improving far more than opening up an editor to a new file in an empty repo.

Re: Ask HN: What is the best programming book you've read?

#25
post #4

If anyone has a good book about writing as simple programs as possible instead of as flexible as possible, I would appriciate it. Because the problem today is complexity and abstractions. It prevents us from changing code easily, deleting code easily, and understanding the full program flow easily.

Sounds like "Understanding Software" by Max Kanat-Alexander.

https://www.amazon.com/Understanding-Software-Kanat-Alexande...

Re: Ask HN: What is the best programming book you've read?

#26

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.

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.

Re: Ask HN: What is the best programming book you've read?

#29
There are many great ones listed here, but I wouldn't give any single book more credit than how they combine in practice, as the question sort of implies.

The best lessons I've learned is how to balance all these good ideas for each problem, idea, implementation. How do do OO without lots of racy mutable state, using immutability efficiently, composing pure functions, identifying what to abstract explicitly vs allowing something to permeate, intention and priority when separating factors/aspects, good naming patterns and when to use which. I don't know of a book that tells you how to find balance.

Re: Ask HN: What is the best programming book you've read?

#30
Domain driven design made functional. It takes the weird world of functional programming and shows how it can be applied to building run of the mill business apps. Instead of being an app that only functional programmers can understand these apps, at least some of the domain modeling can be understood by stakeholders.
Post reply on HN