
Programming books you might want to consider reading - deafcalculus
http://danluu.com/programming-books/
======
jcoffland
The best Calculus book I've ever found is free from MIT.

[https://ocw.mit.edu/resources/res-18-001-calculus-online-
tex...](https://ocw.mit.edu/resources/res-18-001-calculus-online-textbook-
spring-2005/textbook/)

~~~
Bluestrike2
Adrian Banner's _The Calculus Lifesaver_ is an excellent companion text as
well. It's not really a textbook, but it's a great reference to help you
alongside it that's written in a way meant to be accessible to introductory
students.

[http://press.princeton.edu/titles/8351.html](http://press.princeton.edu/titles/8351.html)

~~~
geoffreyiy1
Made account to reply:

I got this book at a used bookstore for $10 as my first calculus book, I read
the entire thing over a week long vacation.

It was sweeter than candy, I have not read a better non-fiction book in my
entire (18 year old) life.

~~~
retro64
Welcome to HN! I feel hopeful when I see passionate comments like this from
newly minted adults :)

------
questionr
I often here comments about finishing a mathematical/technical book over the
course of a "few" weekends.

But I don't see how thats possible if it includes completing all (or even most
of) the given exercises. Especially when you have a full-time job.

~~~
andrew_wc_brown
I think such books are pointless if you aren't going to use them in your day-
to-day work.

~~~
fao_
You don't believe in knowledge for the sake of enjoying the perspective that
more knowledge gives you?

~~~
sbov
I do, but with a kid my time is now limited. Unused knowledge has this habit
of being forgotten. It turns out to be a terrible waste, at least from my POV.

~~~
dancek
I'm currently a stay-at-home twin dad, and I absolutely crave to learn
something new in my spare time (which varies from none to even two hours a day
if I'm lucky). I don't care if I forget, but for me life just becomes too
stressful without constant learning.

Of course, if I was working, I'd probably have enough to learn at work.

~~~
prefect42
Here here, constant learning is the only thing to save our sanity.

Regarding work, I do have a fulltime job, yet one has to fight hard to ensure
any amount of learning, constant or otherwise.

~~~
jungletek
[https://www.google.com/search?q=hear+hear&ie=utf-8&oe=utf-8](https://www.google.com/search?q=hear+hear&ie=utf-8&oe=utf-8)

:)

~~~
prefect42
Whoops, thanks, how did that slip past my brain filter ;-)

------
ambulancechaser
Dan Luu's style is so impressive for his ability to be super objective about
pros and cons of things. There's a post he wrote where he traces his career
and lists out possible missteps and successes. His ability to dispassionately
look at situations and evaluate them on their merits rather than allow their
connotations into his judgement is quite enjoyable to read.

Also his talk at strange loop was spectacular.

~~~
bosie
Any chance you can link it? For some reason i cannot seem to find it.

~~~
andars
[https://youtube.com/watch?v=80LKF2qph6I](https://youtube.com/watch?v=80LKF2qph6I)

~~~
bosie
ok sorry, I mean't the career analysis.

~~~
andars
Whoops. In that case, I think they are referring to
[http://danluu.com/learning-to-program/](http://danluu.com/learning-to-
program/)

~~~
kristianp
Interesting read.

"I managed to get a B.S. degree without ever using or seeing anyone use
version control."

This agrees with my own experience. Do tech courses teach VCS's these days?

~~~
DashRattlesnake
> Do tech courses teach VCS's these days?

I would kinda hope not. They're one of those things you'll quickly get lots of
experience with on-the-job, and there are so many useful things you can learn
at university that no employer will let you learn on the job.

------
lisper
One of my favorites not on the list: Code: The Hidden Language of Computer
Hardware and Software, by Charles Petzold

[https://www.amazon.com/dp/B00JDMPOK2/](https://www.amazon.com/dp/B00JDMPOK2/)

Takes you from simple mechanical switches all the way to a CPU.

~~~
unethical_ban
You're dead, marincounty. I've never seen it before, where someone's comments
can be dead sometimes and available others.

~~~
jacquesm
The mechanism is called 'vouch'.

------
cscheid
The best introduction to optimization methods book I've ever read is
"Optimization by Vector Space Methods" by Luenberger. This is the book that
opened my eyes to the generality of least-squares methods, the actual geometry
of the problem, and how to apply it extremely generally. I read this before
Boyd and Vanderberghe's "Convex Optimization", and I'm glad I did - it goes
much more deeply into the intuition and exposition. It's not as well known as
it should be, but it's a complete gem.

------
adrianratnapala
Luu says regarding the _Little Book of Semaphores_ :

 _" If I’m writing grungy low-level threading code today, I’m overwhelmingly
like to be using c++11 threading primitives, so I’d like something that uses
those instead of semaphores,"_

But as someone whose lowest-level experience of concurrency is with APIs
similar to the C++ primitives (which are not that different from pthreads), I
disagree. I found it a real eye-opener to see how all this can be broken down
to semaphores.

I am starting to think that a semaphore-only set of primtives would be easier
to reason about. I've seen better coders than me make over-complicated mutex
based solutions when sempahores gave a simple answer. And I bet I've done it
too.

~~~
david-given
I totally agree. I've spent way too much time in the depths of terrible
embedded operating systems trying to do basic synchronisation out of whatever
terrible primitive they'd decided to implement instead of semaphores, when
semaphores would be so much easier.

(Frequently I ended up just implementing semaphores, and then doing everything
else in terms of those, frequently using a standard library I had precisely
for that purpose...)

(Embedded device flashback moment: a mobile phone OS where the only
concurrency primitive was a mutex, each of which contained a fixed-size buffer
of waiting tasks. The size of the buffer was smaller than the number of tasks
on the system, and if a task blocked on the mutex while the buffer was fill,
another task would randomly wake up.)

------
jldugger
> This book agrees with my biases and I’d love for this book to be right, but
> the meta evidence makes me want to re-read this with a critical eye and look
> up primary sources.

Too true. Peopleware did not live up to my expectations. It's very light on
evidence, has the chapter flow of a monthly-newsletter-turned-book, and
contradicts itself in a few places without blinking an eye.

------
gmfawcett
I think it's on-topic to offer a shout-out to the csbooks subreddit [1], where
we share links to freely (legally) available CS books.

[1] [https://www.reddit.com/r/csbooks/](https://www.reddit.com/r/csbooks/)

------
CalChris
Shen & Lipasti, an under appreciated book.

I like Hennessy and Patterson Computer Organization more than their Computer
Architecture, especially the last edition. I'm looking forward to reading the
ARM version of COAD:

[https://www.elsevier.com/about/press-releases/research-
and-j...](https://www.elsevier.com/about/press-releases/research-and-
journals/arm-edition-of-elseviers-popular-book-computer-organization-and-
design-the-hardwaresoftware-interface-now-available)

~~~
optymizer
I own the ARM version. I have enjoyed reading it, but if I recall correctly,
most of the chapters are the same, and the few that do mention ARM kind of
mention that ARM is similar to MIPS and then proceed with the old MIPS
content. It never goes deeply into ARM architecture.

I would like to see a true rewritten version for ARM.

------
ptero
The idea is good: a list of general topics, a "why should you care" section
for each (the part I really liked) and a few specific titles.

I would love an expanded list of topics (the current one is short) e.g.,
compilers, comms, security, Arduinos/ raspberry Pi / IoT. I personally did not
like long lists of specific books -- I'd rather know about the topic and
browse bookshelves at a Barnes and Noble to pick a couple that I like, but
that's just my preferences.

~~~
abecedarius
This is vaguely similar in style and much broader:
[http://lesswrong.com/lw/3gu/the_best_textbooks_on_every_subj...](http://lesswrong.com/lw/3gu/the_best_textbooks_on_every_subject/)

------
suprfnk
Off-topic, but

    
    
      body {
        font-family: sans-serif;
        line-height: 1.4;
        margin: 0 auto;
        width: 50em;
      }
    

Please? I get that these websites aim to be simple, but it's really hard to
read like this.

~~~
masteruvpuppetz
I use printfriendly.com for such cases

------
webmaven
Interesting comment on DeMarco's Peopleware:

 _> This book seemed convincing when I read it in college. It even had all
sorts of studies backing up what they said. No deadlines is better than having
deadlines. Offices are better than cubicles. Basically all devs I talk to
agree with this stuff._

 _> But virtually every successful company is run the opposite way. Even
Microsoft is remodeling buildings from individual offices to open plan
layouts. Could it be that all of this stuff just doesn’t matter that much? If
it really is that important, how come companies that have drank the koolaid,
like Fog Creek, aren’t running roughshod over their competitors?_

The answer is in another recent post ([http://danluu.com/sounds-
easy/#fn:S](http://danluu.com/sounds-easy/#fn:S)):

 _> For a lot of products, the sales team is more important than the
engineering team._

Put another way, every measure of engineer / software quality and project
success (including the qualitative ones that are harder to measure) like
delivering on time / under budget, correctness of implementation, system
performance, uptime / reliability, number of bugs, ease of maintenance,
minimal technical debt, etc. etc., are very often only _nice-to-haves_. Not
necessarily all of them at all times, but often enough _most_ of them except
one or two (not the same one or two, though).

Which is a good thing, or startups would never be able to trade off covering
edge and corner-cases, or scale, or 'standard' feature-completeness, etc. in
favor of new and game-changing capabilities (or business models) & incumbents
could never be disrupted.

But as it happens, we know that _' worse is better'_ in lots of ways and in
lots of circumstances. So companies that 'drink the kool-aide' and focus on
developer productivity and happiness may produce 'better' software by any and
all measures you care to use as a developer, instead of focusing on only the
most important ones that directly relate to optimizing the customer
acquisition funnel and subsequently reducing customer churn.

At the level of the corporation, programming is a competitive sport, but
companies are _not_ scored on software quality, or developer productivity, or
developer happiness. Companies are only scored on _' getting and keeping
customers'_ and _' making a profit'_ (which may require paying attention to
_some_ quality measures, just not all of them all the time).

Put yet another way: If you're doing Lean Startup / Customer Development
right, the _customer_ decides what 'quality' means, _not you_.

~~~
prodigal_erik
Anyone counting Microsoft as "successful" is scoring companies on their
ability to threaten price discrimination to exclude competitors' products from
the marketplace.

~~~
webmaven
Anyone who thinks that was the only (or even the primary) driver of
Microsoft's success doesn't understand the dynamics of the market (and isn't
it interesting that you thought of Microsoft specifically?).

Certainly plenty of people thought so at the time (including myself, as well
as Microsoft's execs, or they wouldn't have done it), but although without the
underhanded tactics they would have had a somewhat smaller market share and
correspondingly smaller profit margins, in hindsight they would still have
been the dominant platform vendor for desktops, office suites, and back office
servers.

It turns out that Microsoft's strategy of sucking customers in with _' Better
Together'_ all-MS integrated offerings, never _making_ a customer have to
consider another vendor because some custom in house software they rely on
won't run anymore due to an upgrade (no matter how poorly), and as a distant
second, introducing breaking changes for competing vendors' offerings wherever
they could (eg. _' Windows isn't done until Lotus won't run'_, and even that
tactic was eventually abandoned due to the overhead it introduced), was all
they needed in order to maintain and grow their early lead.

------
adamnemecek
I also put together a list
[http://astore.amazon.com/adamnemecek-20](http://astore.amazon.com/adamnemecek-20)
I'm not actually making money from the links because amazon closed my
affiliate account.

------
kodiera
We had "Structure and Interpretation of Computer Programs" by Abelson/Sussman
when I was at university, which I found a good introductory book.

For a more thorough understanding I would recommend Donald Knuth's "The Art of
Computer Programming".

~~~
rubiquity
Both of those books were recently (as in two days ago on here) in a list of
"Books people claimed they read but really don't."

~~~
Millennium
I've tried a couple of times. Gearing up for another attempt soon.

But there's one thing I've found interesting. I'm still stuck in Chapter 1.2:
the infamous Mathematical Preliminaries section. I am not proud of this. From
what I can tell, the various aborted liveblogging attempts I've seen also all
get stuck here. Knuth himself recommends skipping it if you get stuck.

But even though I haven't yet managed to finish that single part of the book
-this part which comes before any actual computer stuff- I STILL come out of
it a much better programmer. Every. Single. Time. I haven't yet written a line
of MIX or MMIX, and I have STILL been able to use this book to level-grind,
just by getting further in 1.2 than I was able to get before. It's awesome.
Even when I fail, I come out stronger.

I do eventually plan to blog my own attempt. My plan, though, is to not
actually blog 1.1 and 1.2 live: I will do these chapters, write the articles
on them to give myself a buffer, and only put up the blog once I'm already
through The Big Filter. I figure this will give me a much better chance of
actually succeeding once I start.

~~~
clifanatic
> I'm still stuck in Chapter 1.2: the infamous Mathematical Preliminaries
> section

You might want to try starting with "Concrete Mathematics" (also by Knuth):
it's a longer intro to the same material, but covering a lot more of the
background that TAOCP just kind of assumes that you already know.

------
uola
These type of lists have nothing to do with efficient learning. In the
information age we have more available information than time. Knowing how to
learn is the multiplication factor. If you do your due diligence these lists
quickly becomes anecdotal.

~~~
bbarn
I kind of disagree. Knowing what to learn is hard. You have two choices,
listen to the advice of others, or learn everything. The latter isn't
practical, so I appreciate seeing lists like this. If I see a book on 2 or 3
of these lists, it makes me at least curious to read it if I haven't.

~~~
swiley
I prefer learning what I find interesting, since I'll learn the most that way.
I suppose that gets informed by the advice of others to some extent though.

------
hal9000xp
Upvoted for recommendation of "Dasgupta, Papadimitriou, and Vazirani;
Algorithms".

Unlike TAOCP and CLRS it's actually readable in realistic amount of time.

This book is also very good at explaining theoretical computer science. In
particular - NP completeness.

Official copy is available at home page of Umesh Vazirani at berkeley.edu:

0: Prologue -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap0....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap0.pdf)

1: Algorithms with numbers -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap1....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap1.pdf)

2: Divide-and-conquer algorithms -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap2....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap2.pdf)

3: Decompositions of graphs -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap3....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap3.pdf)

4: Paths in graphs -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap4....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap4.pdf)

5: Greedy algorithms -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap5....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap5.pdf)

6: Dynamic programming -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap6....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap6.pdf)

7: Linear programming and reductions -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap7....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap7.pdf)

8: NP-complete problems -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap8....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap8.pdf)

9: Coping with NP-completeness -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap9....](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap9.pdf)

10: Quantum algorithms -
[https://people.eecs.berkeley.edu/~vazirani/algorithms/chap10...](https://people.eecs.berkeley.edu/~vazirani/algorithms/chap10.pdf)

~~~
gautamnarula
Personally, my favorite algorithms/data structures books is Algorithms 4th ed
by Sedgwick and Wayne. It does a great job explaining the material from a
theoretical standpoint, but also focuses on practical application in
addressing real problems, and every algorithm comes with real, working Java
code that in some cases is even superior to the implementations in the
standard Java libraries.

And it perfectly accompanies Sedgwick's free algorithms course on Coursera.

------
tylerpachal
Can anyone recommend a good book about compilers? I just watched Martin
Odersky's talk from Scala World [1] where he talks about the new Scala
compiler he is working on called Dotty [2], but he talks a bit about other
compilers and now I am interested to learn more.

[1]
[https://www.youtube.com/watch?v=w1ca4KL9UXc](https://www.youtube.com/watch?v=w1ca4KL9UXc)

[2] [http://dotty.epfl.ch](http://dotty.epfl.ch)

~~~
bronxbomber92
My three favorite books on compilers (in no particular order) are:

* _Engineering a Compiler_ : [https://www.amazon.com/Engineering-Compiler-Second-Keith-Coo...](https://www.amazon.com/Engineering-Compiler-Second-Keith-Cooper/dp/012088478X)

* _Modern Compiler Implementation in ML_ : [https://www.cs.princeton.edu/~appel/modern/ml/](https://www.cs.princeton.edu/~appel/modern/ml/)

* _Compiling with Continuations_ : [https://www.amazon.com/Compiling-Continuations-Andrew-W-Appe...](https://www.amazon.com/Compiling-Continuations-Andrew-W-Appel/dp/052103311X)

~~~
Apanatshka
I second Modern compiler implementation in ML. I'd also add Types and
Programming Languages by Pierce, commonly referred to as TAPL for background
on type systems.
[https://www.cis.upenn.edu/~bcpierce/tapl/](https://www.cis.upenn.edu/~bcpierce/tapl/)

------
syncopatience
Could anyone weigh in on his assessment of Martin Fowler's Refactoring book?
I'm considering picking it up - some seem to be of the opinion that its ideas
are old news in 2016 and there's not much to learn from it, others say there's
still lots of useful information.

~~~
blowski
It's still extremely relevant and useful. Once you've read it cover-to-cover,
it remains useful as a reference. I would also recommend Michael Feathers
"Working with Legacy Code".

~~~
CSMastermind
Personally, I found "Working with Legacy Code" much more insightful. Fowler's
stuff is great in theory but hard to use in practice.

------
eachro
I'm surprised the author didn't include Axler's Linear Algebra Done Right
under the math section considering how fundamental linear algebra is to so
many domains of computer science.

------
anthnguyen94
Cool to see lots of comments on real life algorithm applications, if anyone is
interested in diving deeper there's a good book that came out recently called
"Algorithms to Live By" by Brian Christian and Tom Griffiths. It talks about
how we often use CS algorithms in real life without knowing.

If you want a glimpse here's a talk they gave at Google:
[https://www.youtube.com/watch?v=OwKj-
wgXteo](https://www.youtube.com/watch?v=OwKj-wgXteo)

------
apricot
A little-known book, quite dated by now, but one of those books that takes a
tightly-focused problem and shows how to solve it in a beautiful way that
doesn't just solve the problem but also creates meaning that transcends the
initial problem, is "Threaded Interpretive Languages" by Loeliger.

------
nickpsecurity
High-speed Digital Design should probably be on the hardware list. It was
recommended in all kinds of places plus doing high-performance often takes
different style. Id be interested in an ASIC engineer's opinion on it if one
of you are here.

------
jasoncchild
Read through peopleware recently; I was surprised to see it on this list,
mainly because it felt targeted more at low-mid level software engineering
managers than "devs".

Nice list that I'll certainly pick a title or two from to add to my queue.

------
yellowapple
A good list for sure; I'll be adding a few of these to my reading list (and a
couple, like "Higher Order Perl", already are).

"I find algorithms to be useful in the same way I find math to be useful"

I'd hope so :)

~~~
throwaway7645
A pretty cool book I'd like to see translated into other languages.

~~~
perlgeek
There's an unofficial companion that has the examples translated to
Javascript:
[http://interglacial.com/hoj/hoj.html](http://interglacial.com/hoj/hoj.html)

Same for Ruby: [http://graysoftinc.com/higher-order-
ruby](http://graysoftinc.com/higher-order-ruby)

------
cagmz
Regarding OS; how does the Comet book compare to the Dinosaur book?

------
ansgri
Meta question: does author blocks requests from some countries? Somehow
danluu.com is only accessible for me through vpn, else times out.

------
kkirsche
It's language specific but I would recommend eloquent Ruby. One of the most
engaging programming books I've read

~~~
asimuvPR
Still worth reading because ruby is beautiful.

------
astannard
Refreshing post title! It beats the tired old "10 xxxx books you MUST read, or
else" you see all over the place

------
HeavyStorm
Tanenbaum's Operating Systems isn't there. Sorry, this isn't a good list.

/fanboy

------
ronald_raygun
I'm really happy to see the books on game theory and auction theory on there.

~~~
jakub_h
Coincidentally, this very book on auction theory was suggested to me by a
fellow faculty member about three months ago. I guess I really ought to find
some time to read it!

------
luis_espinal
Mythical Man-Month and Software Project Survival Guide

------
gaius
Hacker's Delight by Henry S. Warren

------
mozumder
I could use a good book on combinatorics. The ones I have are way too dry and
doesn't explain well in plain English.

------
rookiemaverick
So pretty much every book from the CS course.

