Hacker News new | comments | show | ask | jobs | submit login
The most mentioned books on Stack Overflow (dev-books.com)
644 points by vladwetzel on Feb 8, 2017 | hide | past | web | favorite | 246 comments



Although not directly development related. The most impressive book I've had the pleasure of reading is "Gödel Escher Bach: An eternal golden braid" (also known as GEB) from Douglas Hofstadter.

It's hard to explain what it is about exactly, but it contains ideas and concepts from mathematics, computer science, philosophy and conscience. All of it is explained in very clear and interesting way. I can recommend it to anyone interested in these topics.

The book won a Pulitzer and to take a quote from the Scientific American about it: "Every few decades, an unknown author brings out a book of such depth, clarity, range, wit, beauty and originality that it is recognized at once as a major literary event."


I heard a story from an AI professor a few years ago, who had an interesting heuristic for picking grad student applications to trash: if it mentions GEB, off it goes into the circular file.

Fun book. Hofstadter actually doesn't like computers, apparently: this is in the record, and I've heard him mention that fact multiple times. He just likes playing with ideas.


He likes computers, he even likes AI. He doesn't buy into Ray Kurzweil's ideas about singularity [0,1]. He also (as I understand) is in Chomsky school of statistical learning as opposed to Peter Norvig (or Google) school [1,2]. Those two are highly unpopular stances to have these days, so I can see how that can be confused with not liking computers/AI.

If you read GEB, you can see in different chapters that he is a big fan of computers, simulations, attempts at AI, and the such.

[0] https://www.youtube.com/watch?v=Nhj6fDDnckE

[1] http://www.americanscientist.org/bookshelf/pub/douglas-r-hof...

[2] http://norvig.com/chomsky.html


I mean, the source is, I had dinner with the guy for a school dealio and he said he didn't really like computers and had grad students to do all the programming. GEB is full of mathematical content, but it isn't hung up on computers as machines and concrete things.


I'm not seeing him expressing a position on language that goes as far as Chomsky's (as described by Norvig) in that interview. Has he written more about this somewhere that you know of?


Most neuroscientists that I know love GEB, and many came into the field in part because of it.

maybe mentioning GEB is a high risk / high reward situation?!


> if it mentions GEB, off it goes into the circular file

Why?


Professors are sometimes worried that students are more interested in a subject on a 'spiritual level' than they are interested in the practical, nitty gritty, hard work and math.

Perhaps this one had bad experience with people who talked too much about GEB.


Because GEB is, in many regards, pop-science (or pop-math). It's a fun introductory read, but it won't really (and by really I mean rigorously) explain (and by explain I mean prove) much of anything.

Any reference to it in the context of academia is a bit on the nose. It's like trying to study piano and saying you love Mozart. Like, yeah, okay.


What's wrong with Mozart? He is popular for a reason: he is freaking great. I hate that some people smugly dismiss things that are popular as beneath them, or conversely, that you have to like hyper-obscure artist or else you're not into real art. Bullshit, Mozart is great.


Sure, but if the only math you're into is pop math then you're not a mathematician.


It might be that, in GP's experience, people who straightaway reply "I love Mozart" are less likely to actually have heard a substantial amount of his work, perhaps to have sat with them for some time, and (for lack of a better word) pondered over them, than someone who says they like something else but replies in a manner that sounds more sophisticated, e.g. "I enjoy the structure inherent in Bach's music" or what-have-you. (I might just be putting words in their mouth, though. Apologies if that's the case.) Answers of the latter kind can indicate that one has actually spent some time thinking about whatever it is one has learned, however elementary it might be. And that's always great!

It's probably the equivalent of someone saying "omg fractals" or "the incompleteness theorems, man, math is broken, I find that so beautiful" in response to "So you like math/CS?" After a while, that becomes a red flag that you learn to small-talk your way out of, albeit with some shame: while I agree with GP, to some extent, I do understand how this can be exclusionary, though. Almost by construction, someone who isn't in really deep is far more likely to have met the parts of a field that have been popularized than other things, and putting them down for this can be counterproductive if you're looking to attract more people or, well, just evangelize. I don't know of a good way out of this.

I do seem to have noticed that this isn't the case if you replace "fractals" by, say, "differential equations" or even "trisection". Maybe what one really needs to avoid in introductory literature is powerful ideas that are easy to lossily summarize for a lay audience in the form of really general, unexpected-sounding incorrect-when-unqualified statements that seem to say profound things about life, the universe, and everything. Leaving off the last condition shouldn't make an appreciable difference in hype/excitement-generating power: you could very well do, say, some topological/geometric staple like the hairy ball theorem, or some knot theory, and so on. That way, you retain the visual appeal that $REALLY_BIG_NUMBER-x zooms of Mandelbrot give you, while significantly decreasing the tendency for the target to go into (partial or full) "woah, dude, everything is connected and I am pure energy" mode in the way that Gödel often does.[0]

As an aside, GEB can be a good (rigorous, even) introduction to a few very powerful ideas. For me, what I call "interpreter-y thinking" was a good example, as was a healthy respect for how complex emergent behavior can arise from simple rules. This is something that's unfortunately hampered by the "bag of really cool ideas" nature that the book seemed to have when I read it four or five years ago.

[0]: I've actually heard the "everything is connected" bit from a good friend who loves watching videos like in TFV, so it isn't entirely a strawman. :)


Really what it comes down to is that if the only person you can bring up is Mozart, then you clearly don't know shit.

It takes a simple man to like a popular idea. It takes a mediocre man to like popularly unpopular ideas (ie cult classics, big only within certain circles). It takes a good man to knowingly like unpopularly popular ideas (ie liking spielberg and bay, popular directors everyone [in the know] loves to trash).

A great man will tell you why.

And only the greatest of men actually like whatever the hell they're talking about.


Okay, fair enough. I agree 100%.


> it won't really (and by really I mean rigorously) explain (and by explain I mean prove) much of anything

Sentence would be a lot shorter if you had just said "it won't rigorously prove much of anything."


Yeah, who needs nuance anyway? Just communicate using pure logic next time.


Generally I'd agree with you, but the parenthetical statements only make the sentence harder to read and do not change or add to the meaning at all, at least to me.


It's one of my many bad habits learned as a philosophy undergraduate :)


It's fun, though!


Because it's a Strange Loop.


Hmm, yes, I can see a product idea here: Klein bottle waste baskets.

When your waste basket is nonorientable, life becomes much simpler. Everything is both inside and outside the trash.


He he, good one. That reminds me of a joke I once made, in some relevant context, referencing Heisenberg and Pauli, but I'm uncertain what it was now, so I'll exclude it from here.

https://en.wikipedia.org/wiki/Wolfgang_Pauli

https://en.wikipedia.org/wiki/Werner_Heisenberg


For anyone missing the joke, his follow-up book attempting to better convey some of the same ideas is called "I Am a Strange Loop".


Nope. Strange loops are not by definition not intentionally circular (while a circular graph in a file system is in this case). He makes that clear I think in the final chapter of GEB.


For someone who doesn't like computers, he spends a lot of time writing about Lisp.


I didn't get a lot out of GEB, but I pored over Metamagical Themas [0]. It was perfect for a teenager just learning programming. The bite-sized nature of it makes it extremely approachable - perhaps a case of constraints (periodic column of N words) leading to more creative output.

[0] https://www.amazon.com/Metamagical-Themas-Questing-Essence-P...


How is Metamagical Schemas bit-sized? It is 850 pages long!


It's a collection of articles, not a single text.


While I have not read the book, when I've spoken about it to reputable Bach musicologists and logicians, one group says Hofstadter misinterprets Bach's work and tries to create something that actually isn't there while the other says he oversimplifies Gödel's work to the point that it is uninteresting and misleading. I haven't found a visual artist who's read it to discuss the Escher parts. These opinions steered me away from it, so I'm curious about you having a more rewarding experience.


I'm neither a Bach musicologist or a logician (although I've had multiple logic courses). But that might be the reason why I enjoy the book very much. Hofstadter explains complex stuff in a style that makes it very accessible without needing almost any preexisting knowledge in the discussed fields.


I really enjoyed the book, but suspect (with no authority other than a gut feeling based on experience) that it's in the same genre as Guns, Germs & Steel - an attractively complete system that would not hold up to an expert in the field.


I can't comment on the Bach or Escher parts, but he does a very creditable job summarizing Gödel's work for a lay audience. Of course if you want to take up this stuff professionally, more in-depth study will be required, that goes without saying - GEB doesn't claim to be a textbook - but it is one of the best popular science books around.


My experience with the book was similar to my experiences listening to Bach's WTC, understanding Godel theorems, or looking at Escher's Relativity. Just start reading it.


It seems there is a MIT OCW course on it : https://ocw.mit.edu/high-school/humanities-and-social-scienc....


Has anybody seen the lectures? how does it compare to reading the book? Are the lectures sufficient?


I bought this book a few months ago, it's been sitting on my shelf because of its intimidating size (plus the fact that I have a few other books I want to work through) but this review has definitely bumped it up my reading list.


Mine's been there for 23 years.


I had never read this book. But I can sense how well the book would have been written by reading its summary from here[1].

[1]:https://www.quora.com/Book-Summaries-What-are-the-main-ideas...


A friend calls it "the most popular book that nobody has read," but maybe that was more accurate in the 90s.


I thought the most popular book no-one ever read was Knuth's "The Art of Programming".


And SICP.


SICP? SICP is actually readable and quite interesting. I did it. And it is not nearly as widely known as TAP in the outer world.


I actually have a modified version of SICP being used as a textbook for one of my classes -- it's called Composing Programs.


I read it, it was a boring read really.


My experience is that non-mathematicians like to have GED on their coffee tables as a conversation piece. The related book that mathematicians like is https://www.amazon.com/Mathematical-Experience-Phillip-J-Dav.... (High school math is enough to enjoy it, but the more math you have, the more you'll get out it. All of the way up to the PhD level.)


Screw the haters in this thread. GEB is wonderful.


Hofstadter gave the keynote at Strange Loop a few years ago (the conference was named after his ideas, so Alex Miller was thrilled when he accepted). Quite an interesting talk.

https://www.infoq.com/presentations/strange-loop-keynote


There is also an incredible keynote from PyCon 2016 by K lars Lohn about the book (and more )

https://www.youtube.com/watch?v=bSfe5M_zG2s


wow, this book has the soaring rating on Amazon. I added to my "to read" list, 10x for suggestion


I wouldn't bother, it is an incomprehensible mess, impossible to get through, pretentious, non rigurous sloppy thinking, and ultimately a disservice to Godels incompleteness theorem.


I got about 200 pages in, and just could not continue with it. 'incomprehensible mess' would perfectly describe my sentiments.

As having taken undergrad/grad courses in logic and set theory, any interesting nuggets about recursion/completeness/incompleteness/etc that one could glean from GEB can much more coherently and succinctly be obtained from a proper book on logic/computability.

The counterargument would be that this book is meant as entertainment: from my experience with the first ~200 pages, it was a complete chore to read, as ideas were presented enigmatically and slowly, to the point of frustration. Granted, my attempt at reading it was almost a decade ago.


I had trouble getting through GEB because I felt like I couldn't quite grasp logic/set theory/whatever beyond the first section or so. It's good to hear that perhaps they're not as well-explained as I thought and that perhaps other avenues make it more accessible to me.

Do you have any suggestions where to start? Are there perhaps online 'starter kits' that would guide me through what courses/books/whatever to work through? I find that one of the most difficult parts of self-learning: there's often no clear syllabus available.


That's a harsh critique, can you elaborate?


Recursion, self reference, emergent properties are important topics and there are many good resources for studying them, GEB just isn't one of them. Most people that embark on the journey of reading the book fail and are unable to complete it. I believe the author tried to make the book itself some kind of self referential repeating work of art, which might be appealing to some but doesn't end up giving a rigorous treatment of the topic.


GEB is not a study book. It's written as a multi-layered musing on various inter-connected subjects. It's also not hard to read and entertaining. I get the feeling from the anecdote about the AI professor rejecting students based on having read it and your own reaction that people in the field resent it for not being course material? I also sense a sub-text of resentment about the positions and criticisms of the author about various approach to AI. It's clearly an exposition of his philosophical basis for his position. You might disagree with him but that's no reason to be insulting.


It's not so much resentment inasmuch all symbolic AI is evaporating in the shadow of the new new connectionist wave (the "new" connectionist wave being the PDP stuff).

Why not, for example, see it from Hinton's philosophical point of view (besides that the papers are very boring and dry, of course)? He made a very good defense against Pylyshin and Fodor and a few critiques of Hofstadter _and_ the algorithms are shipping on Google Search and things like that.


Link to the Hinton's view?


There's a lotta good citations in SEP entry: https://plato.stanford.edu/entries/connectionism/


I read it when it first came out; I was 18, and it was formative in my early career in CS. For someone in their teens it was a wonderful introduction to things that my high school education never really touched.

I don't know if I'd have the patience to read it today.


This is like Hacker News Book [1].

But, it scraps user comments that contain Amazon book link from HN and orders them by theirs point. If you wonder how much money Hacker News Book has been made, I would suggest to read this post [2]. The different part with this is that Hacker News Book shows not only the most mentioned books all the time but also per week. Hacker News Book has more diversity of book topics since HN is not limited for programming discussions.

Anyway, I just want to say congratz to the OP for launching this. I think you miss "Show HN" on your post title.

[1]: http://hackernewsbooks.com/

[2]: http://hackernewsbooks.com/blog/making-1000-dollars-in-5-day...


Good one, will be interesting to compare amazon statistics for 5 days. I didn't think to invest in this project much time like this guys did and didn't expect so much feedback :)


I started playing with Google's BigQuery today, and it has StackOverflow and HN and GitHub datasets that make pulling data like this relatively trivial. I've been super impressed with it. Examples here: https://cloud.google.com/blog/big-data/2016/12/google-bigque... and some more at https://cloud.google.com/bigquery/public-data/stackoverflow

I just quickly hacked together this query which pulls out all amazon URLs in post answers:

    SELECT REGEXP_EXTRACT(body, r'[^a-z](http[a-z\:\-\_0-9\/\.]+amazon[a-z\:\-\_0-9\/\.]*)[^a-z]') AS link, COUNT(1)
    FROM [bigquery-public-data:stackoverflow.posts_answers] 
    GROUP BY 1 ORDER BY 2 DESC LIMIT 20
It takes 5 seconds to run - over ALL stackoverflow answers!


Nice Amazon affiliate hack.

Would be great if the OP would tell us how many sales he made through this post (once he got the stats from the Amazon affiliate dashboard).


I'm not sure I see what's wrong with this. The author obviously invested work in this and provided a resource others may find useful. You're free not to buy books through their affiliate links.


Did I say with one word that I find OP's work wrong? Where did you read this? Why are you so negative?

It's great what the OP did and I am really interested in his sales (and he already gave some insights, he's a great guy)


When you say something like "nice affiliate hack" it comes with an implication that it's wrong, because a lot of people on the Internet try to trick others into clicking their affiliate links.


Its OK to use the word "hack" on "hackernews"... negative connotation is not automatic here !


The English language does not change because this is HN and everything thinks their IQ is 3 standard deviations above the mean.

"Nice _______ hack" has an obvious and blatant negative connotation, particularly when it's on its own like that. The implication is that this is just a way to make a few bucks. That's not what the commenter meant, thankfully, but that's only known after further explanation.


Your entire comment came off as negative, the use of 'hack' is only part of it.


I think you're reading too much into it. Taking the word choice at face value it's a pretty neutral, if not positive, statement.


What about this is useful? There is no breakdown of whether the mentions were upvoted or downvoted, no mention of whether they solved the problem (or were even relevant to the question), no review of the books so that readers can make an informed decision, etc. This list is not much different than making a list of the top selling programming books on amazon.


I like lists like this for discovering books I haven't heard of. I don't make an immediate buy decision based on appearance in a list, and will do more research. But it's a nice way to run into something you didn't run into before for some reason.

To each their own; shaming the OP on HN for adding affiliate links on their own website, on the product of their own effort, is what I'm trying to point out.


> What about this is useful?

> This list is not much different than making a list of the top selling programming books on amazon.

Something which Amazon does, because likewise 'others may find [it] useful'.


>You're free not to buy books through their affiliate links.

You're only free to do this if you know that it's an issue. Unless you know about the affiliate program, you may be supporting this person against your own will. Even if you do know about the affiliate program, you may not know that after you click an affiliate link, the owner of the code gets a chunk of ANY Amazon purchase you make in the next 24 hours, whether or not it is related to the original link.


I find this mindset baffling. I mean that earnestly. Can you try to explain why other people making money bothers you?

It seems pretty clear that amazon thinks affiliates provide a useful service. And if you go to amazon because someone shared something that interested you enough to buy it, they've provided you with a service. What exactly is the problem?


Because it is a undisclosed conflict of interest.Imagine you go with a friend to a bookstore , and he recommends to you several books. Since you seem to trust your friend and you have the money, you buy the books. Unbenknownst to you, your friend receives a 5% commission, and he never disclosed it to you. Same principle. It is a whole different game if he mentions this to you in advance, since now you consider your friend a as an interested part and you will consider his recommendations more carefully.


I would see a conflict if it was selective as to which book. But this gives no preference to one book over another.

So I'm still not getting it. I see no conflict.


So? He can overhype all the books without giving preference to one. He can pontificate about how important is to read books, how all the geniuses at HN read these very important books and so on.He only needs to maximize the money spent on the books, not the selling of a particular one. He is advertising beers (and get money from all of them) not just Budweiser.


Except this page discloses it...


Except it didnt when the post was submitted, it was fixed later by author and good for him since he was in violation of Amazon TOS


Agreed, disclosure seems called for.


The UK regulator and the US regulator are pretty clear that affiliate links need to be clearly marked as such.


I posted yesterday on reddit, 5 books sold


Thanks for the info, highly appreciated!

Do you think it will get decent traffic through SEO in future?


As to be honest, I have no clue about SEO at all :) I'm happy some other developers checked it out...Didn't even think to support this project, data is quite static. But according to some feedback, some things to be changed for better filtering. Will get on it at night :) Not really interested in sales, will be happy if amazon would send me a pack of beer :)


Now I just need to write a book called 'closed as duplicate' and I'll be set for life!


Will be happy to see your book in the top :)


In 2011 I launched a side-project called hackerbooks.com (wayback machine link https://web.archive.org/web/20110305143421/http://www.hacker...).

It got a fair bit of traction.

Out of my memory, Amazon affiliate links only earned me something like $30, total (I had other sources of revenue via targeted ads, which earned a bit more, but not much).



A relatively new book that isn't mentioned (but that I really like) is "The Effective Engineer" by Edmond Lau.

https://www.amazon.com/Effective-Engineer-Engineering-Dispro...

Edit: Here's why I like it: https://henrikwarne.com/2017/01/15/book-review-the-effective...


Currently reading this since I saw your blog post. Thanks!


The Art of Software Testing by Glenford Myers is great.

https://en.wikipedia.org/wiki/Glenford_Myers [1]

The anecdote in the beginning of the book, where he poses a simple question - how many test cases can you write for this simple program? about the geometry of a triangle - is mind-blowing, and sticks in my mind many years after reading it.

He says most people he gave it to, even experienced devs, did somewhat poorly or just average on it. I gave it as a test to a team (of juniors) on a project I was leading, once, and it made them see some light. We subsequently went on to deliver a pretty well-tested project.

[1] Excerpts:

[ Glenford Myers (born December 12, 1946) is an American computer scientist, entrepreneur, and author. He founded two successful high-tech companies (RadiSys and IP Fabrics), authored eight textbooks in the computer sciences, and made important contributions in microprocessor architecture. He holds a number of patents, including the original patent on "register scoreboarding" in microprocessor chips.[1] He has a BS in electrical engineering from Clarkson University, an MS in computer science from Syracuse University, and a PhD in computer science from the Polytechnic Institute of New York University. ]

[ During this period, Myers also authored his first four books, including The Art of Software Testing, a book that became a classic and a best-seller in the computer science field, staying in print for 26 years before it was replaced by a second edition in 2004.[3] Myers also served as a lecturer in computer science at the Polytechnic Institute of New York University, where he taught graduate-level courses in computer science. Years later, he was the 1988 recipient of the J.-D. Warnier Prize for his contributions to the field of software engineering. ]


Is there any way to do this datamining, but not just looking at amazon links? By that I mean that I'm sure people mention "Code Complete" often enough, but don't bother linking to it on Amazon. That'd be interesting to see the results.

Also could be interesting to see this study, but also weighted based on the number of votes the posts referring to them got.


I still have data dump, will take a look on book-name-mentions without links, if it makes any difference in top.


Didn't see SICP (Structure and Interpretation of Computer Programs) on that list. Surprised considering how often I hear it quoted on SO. You would think it was the bible of computer science. A little old in the tooth i'd imagine.


Perhaps you mean "long in the tooth"?


   A little old in the tooth i'd imagine.
In some ways, but not others - that's the advantage of something that teaches computer science fundamentals, as much of what is in there is timeless. In many ways it's never been matched (in that particular domain).

I suppose the programming environment does make it a bit less accessible over time.


It's there, just outside the top 30. Select the Computer Science category and you'll see it near the bottom.


I obviously didn't look very closely. Thanks for the clarification.


It is there, even more than once


I wonder how many people actually read the books they were suggesting.

Like here on HN, Art of Computer Programming gets mentioned a lot. But I've not met anyone who has actually read it. And I own a copy. It's so hard of a read that I am just going to assume anyone who says they did is either lying or Donald Knuth.

I'm suspect of books as a means of information conveyance. They make great mediums for narratives, but narrative is too slow for technical writing. Similarly, I dislike videos, podcasts, and conference talks. Technical writing should be a wiki-like document where terms expand in-place. Start super high-level. Always written in clipped, imperative style. Single line per fact. Like mathematical proofs, but maybe in reverse.


I've finished and very much enjoyed the first volume, which is equivalent to the curriculum in any first year compsci course from what I've seen of university lecture schedules (Data Structures such as Lists/Stacks/Queues/Trees/Arrays,GC,'helper functions' and program design,O-notation analysis,testing and debugging w/trace routines, I/O algorithms) but of course in much more detail with much harder problems.

To understand the first few hundred pages on mathematical preliminaries, the books "The Art and Craft of Problem Solving" by Zeitz and "Concepts of Modern Mathematics" by Stewart, were essential, both of which were recommended here in other book list posts. I also had already read the CS:APP book which covers x86-64 assembly so the MIX introduction was fairly straight forward. http://csapp.cs.cmu.edu/

A book for me that was hard to read, is this book: http://www.cs.cmu.edu/~rwh/pfpl.html Practical Foundations for Programming Languages each page I have to translate with the notation guide, and is a research exercise searching Wikipedia for additional material.


yep.

There's something to be said for reading "a great book" from cover to cover. It is really an investment of time, effort and discipline over many days.

I think people (and I include myself) buy such books often with an aspirational intent, to spend that "perfect" weekend or weekends deeply ensconced in the subject matter and coming out of the reading as a different, better and more skilled person. It never happens that way, of course. We're just trying to re-live some past time as students where the world was an oyster of knowledge. For the most part memories of those days are grossly inaccurate, merely softened into nostalgia by the passage of time.

In reality, many of us behave like monkeys continually zapped by shock-collars just trying to keep up with shit that never works right and always living in a profound deficit of knowledge, while drowning in information.

Still, its good to have books, and worthwhile to take insane measures to get alone-time to read them. The short practical ones are best. Comprehensive reference books are good too because you can read just what you need while ducking from life's flying shit.


I've read the first three volumes. And recently when paring down my collection, it went out. Sorry, Donald, but you've got too much about multi-phase tape sorts and not enough about current programming.

I started volume four but couldn't get my head around the first page, and am very dubious that plowing through it would have any real value.


I'm really happy to see "Java Concurrency in Practice" at #4 on the list.

It's a great intro to concurrent programming with lessons that apply to virtually any high-level programming language. The chapter on the Java memory model is the best practical description of how languages map to multi-processor memory models I have ever read. (Chapter 16 in my edition.)

After reading this book it's easy to understand why concurrency features in other languages are necessary and what they are doing behind the scenes. Golang channels come lightly to mind.


It's one of my all time favourite technical books, and easily my favourite Java book.

If you're dealing with any kind of concurrency -- especially in Java -- then it's pretty much a must-read.

Its explanation of the Java Memory Model is what got me interested in looking at JVM implementations and related shenanigans.


Seems like a flaw in the algorithm if Effective Java is not in there. I filtered by the Java tag and "Effective C++" showed up, but not Effective Java.


People who make these Amazon referral farm sites, is anyone willing to share how much money they make off theirs? Maybe like a $ per 100 pageviews stat or something? I'm curious.


I will publish results on site after a while. Yesterday I've made same post on reddit, 5 books were ordered.


One book(s) that I didn't see come up on the list was "The Art of Computer Programming". It would be interesting to see if that was because it's popularity got spread out because of multiple volumes or if people just don't mention it that much.


SO skews extremely IT as opposed to CS.

There is CS on SO, but SO is really designed to, and flooded with, stuff like "how to verify replication on mysql 5.6?" or "How do I install PIP for python on freebsd" and not so much "Lets have us a nice debate about P=NP" or "can someone clearly explain the entire proof of why 3SAT is NP-Complete at like a TED talk level?"


Can someone recommend a good book on linear algebra for somebody that took it in college but needs a refresher plus some advanced linear algebra concepts for machine learning?


The texts that I hate least (LA and I have a long and rocky relationship):

- Coding the Matrix, Klein https://www.amazon.com/Coding-Matrix-Algebra-Applications-Co... This has a strong emphasis on LA's utility in CS, and includes concepts outside traditional LA that enrich the narrative.

- Intro to Linear Algebra, Strang https://www.amazon.com/Introduction-Linear-Algebra-Gilbert-S... Strang approaches LA from a practical less-theoretical angle, which makes it very sensible if you're an engineer but may not be as suitable if you're a mathematician.

- Linear Algebra, A Modern Intro, Poole https://www.amazon.com/Linear-Algebra-Introduction-Available... This is a solid text that has worked out most of its bugs over the editions.

- Linear Algebra and its Applications, Lay https://www.amazon.com/Linear-Algebra-Applications-Updated-C... Like Poole, this is also a solid and long running text.

The books by Klein and Strang also benefit from free videos of those courses that are available from Coursera/BrownU and MIT OCW. Klein's is also available on the Kindle.


Thanks for taking the time to write that out. I'll check them out.


I highly recommend these youtube videos by 3Blue1Brown https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2x....

Each short lecture had a 'Why didn't they tell me that in college!' kind of insight. Transformations, determinants, dot products, cross products everything made sense in a visual way.


Vector Calculus, Linear Algebra, and Differential Forms: A Unified Approach http://matrixeditions.com/5thUnifiedApproach.html Thick, but after this book you ll be well prepared to ML.


The 2nd edition of the Dragon book is a worthy update to an old classic. It's the only book on the list I like.

I've been sitting in on Monica Lam's Stanford CS 243 lectures and she's covering scheduling and software pipelining right now. Lam definitely knows her material; she wrote the papers before she re-wrote the book. She's an excellent lecturer to all of 15 students and one who asks perhaps more than his fair share of questions.


The results from the "Compiler-Construction" are not good. You'll find better results from a search engine, Q&A site, or bookseller:

Here are the top 10:

    #1 Design Patterns - Ralph Johnson, Erich Gamma, John Vlissides, Richard Helm
    #2 Clean Code - Robert C. Martin
    #3 The C Programming Language - Brian W. Kernighan, Dennis M. Ritchie
    #4 CLR Via C# - Jeffrey Richter 
    #5 Modern C++ Design - Andrei Alexandrescu
    #6 Large-scale C++ Software Design - John Lakos
    #7 Inside the Microsoft Build Engine - Sayed Ibrahim Hashimi, William Bartholomew
    #8 Programming Microsoft ASP.NET 2.0 core reference - Dino Esposito
    #9 Compilers - Alfred V. Aho
    #10 Accelerated C++ - Andrew Koenig, Barbara E. Moo
Ok, #9 is a sensible choice. The rest are not about compiler construction.

Now, the top 20:

    #11 Hacker's Delight - Henry S. Warren
    #12 Nos camarades Français - Elida Maria Szarota (actually The C++ Programming Language by Stroustrup)
    #13 Compilers - Alfred V. Aho, Ravi Sethi
    #14 Inside the C++ Object Model
    #15 Code - Charles Petzold
    #16 Hacking, 2nd Edition - Jon Erickson
    #17 C Plus Plus Primer - Stanley B. Lippman, Josée Lajoie, Barbara E. Moo
    #18 C Interfaces and Implementations - David R. Hanson
    #19 Language Implementation Patterns - Terence Parr
    #20 LISP in Small Pieces - Christian Queinnec
Ok, #13 and #19 look relevant. The rest... not so much, at least by a quick skim.

Here are the top 30:

    #21 Linkers and Loaders - John R. Levine
    #22 Assembly Language Step-by-Step - Jeff Duntemann
    #23 The Garbage Collection Handbook - Richard Jones, Antony Hosking, Eliot Moss
    #24 Game Scripting Mastery - Alex Varanese
    #25 Domain-specific Languages - Martin Fowler, Rebecca Parsons
    #26 Computer Architecture - John L. Hennessy, David A. Patterson
    #27 The Elements of Computing Systems - Noam Nisan, Shimon Schocken
    #28 The ACE Programmer's Guide - Stephen D. Huston, James C. E. Johnson, Umar Syyid
    #29 Modern Compiler Implementation in C - Andrew W. Appel, Maia Ginsburg
    #30 Algorithms + Data Structures - Niklaus Wirth
Caveat: I am not a compiler writer, though I have read many of these books. Still, my point stands, a good search engine gives more convincing results. Let me know if I'm missing something.


A quick search on Amazon gives:

Compilers: Principles, Techniques, and Tools

Engineering a Compiler, Second Edition

Writing Compilers and Interpreters: A Software Engineering Approach

Compiler Construction: Principles and Practice

Compilers: Principles and Practice

Language Implementation Patterns

Crafting a Compiler with C

Compiler Design in C

Principles of Compiler Design

Modern Compiler Implementation in Java


#20 Lisp in Small Pieces

This is absolutely relevant to compiler construction.


Thanks for pointing that out. Here's a snippet about it:

> This is a comprehensive account of the semantics and the implementation of the whole Lisp family of languages, namely Lisp, Scheme and related dialects. It describes 11 interpreters and 2 compilers, including very recent techniques of interpretation and compilation.


For all those people who wonder why is the popular XYZ book not on the list:

The algorithm here is to take the links to amazon and make a count of it. Plain and simple.

For a more popular book like SICP, it just going to mentioned by it's acronym as SICP. The expanded version of the title "Structure and Interpretation of Computer Programs" is rarely mentioned and so is the author name. An amazon link would be almost non-existent. This is because, the book is so popular the reader needs no introduction. Unfortunately, as per the logic used for this site, it will not be accounted. The same goes for books whose multiple versions show up in the result.

This is not to put down the dev-books.com site in anyway. To do a disambiguating parser that can parse any format of title and/or author name would increase the complexity and implementation time by orders of magnitude. It would also be completely against the mantra of "Release early and often".


I wonder how many (0?) users cite the same book over and over again and if that's accounted for.

Furthermore I wonder if peddling one's own book on SO leads to more sales.


All links counted, so basically you can promote your book over SO, but the numbers are way too large.


Really cool here. Speaking of book mentions, I actually did a project a couple months ago that checks for all the Amazon products mentioned on Reddit: http://www.productmentions.com

I don't have it at the moment, but seems useful to do things like check for topics or something so it'd have the ability to check for book topics and things like that too.


How valuable is this without any of the discussion context surrounding these books? It seems unlikely that I'm going to purchase a book based on a metric like "mentions", when much of the discussion could be negative. I mean, I get it from the perspective of scraping/development practice, but it doesn't feel overly useful. And I'm a book hunter.


This is pretty cool. Would also be neat if you could filter by date ... like what were the top JS books mentioned so far in 2017.


Good idea! Will try to make this filter as soon as possible. Thanks!


It seems interesting to me, how often books about C++ are mentioned in there. 5 of 30 listed

I say that, because it seems like people like to talk bad about C++ as if it's terrible language (rather than just another tool in the toolbox).

I don't have an opinion either way. Just making an observation.


This is great. Do you have the code you used to scrape and rank the books posted somewhere?


Stackexchange published their database dump, so there were not engineering at all :)


grep ASIN so_dump.csv | sort -u



I have owned many of those books at various times in my life (either because of school or I borrowed it errr accidentally stole it from work).

The only book I have kept and refuse to part with is the Kernighan + Ritchie book (and I'm not a C programmer).


I'm surprised that Peopleware (DeMarco and Lister) isn't in there somewhere.


This. It's not exactly programming, but I think this should be recommended reading. I've only read it about 20 years into my career but it all clicked - I wish I had seen it earlier.


As a Senior programmer, over the years, I've bought eight copies for Juniors to help them cope and learn to deal with other types of programmers (or stop being fucking hero-programmers).

Should be mandatory reading IMHO.


How, in the process of answering a specific programming question on Stackoverflow, would a link to a book on project management be appropriate?

Also, what's up with the phrase "I'm surprised" that always comes up in threads like this: If you believe a book should be higher up, tell us why! Or do you question the author's methodology?

If you misjudge the current significance or influence of a thing, ... so what?


I'm not sure what you could have possibly hoped to gain by writing this condescending "I'm so smart" response.


JS: The Good Parts is obsolete


Really?

It's certainly incomplete, as there are some new good parts.

But most of the language is still there, and I'd rather imagine the same perspective that helped a lot of programmers coming from other languages adapt to it is still helpful.


True, but some of the things Crockford moans at have been fixed in ES6/ES7


Similarly, certain books show up multiple times, once for each version. It would be great if those were consolidated to the latest version of the book.

An example of this is when you search for Hadoop. You'll find all 4 editions of Tom White's book show up in the top 10 listing.


Why? I'm genuinely curious, as I've only ever seen the book recommend.


It predates ES5 and ES2015. I'm not sure that makes it bad though, it's still a good introduction?


Any recommendations for something more up to date?



I like "Understanding ECMAScript 6" from N. Zakas together with his "Principles of Object Oriented JavaScript" book.


Not a lot of algorithms books on this list, I was surprised to see CLRS at #14.


SO doesn't focus on CS, they focus on solving problems like "How to get better replication on postgres?" etc. This is also why books like SICP, TAOCP and CLRS seem to be missing.


CLRS is there at 14... but listed with 1 author :(


Results for R remind me that R is not a search friendly name


too much hard coding books imho. 'the design of everyday thing' and 'don't make me think' should be read more.


the design of everyday thing

I've seen that recommended many times but it's a terrible book, IMHO. (I don't remember the specifics why, but vaguely remember the author waffles around without any real points).


I think it suffers a little from the Seinfeld effect, where it was completely original at the time but created enough of a following that it seems derivative when you go back to it.


I think there's some value in showing how design needs to be defined by usability and not the other way around. I agree the point could have been made in way less words, but there's something extremely useful in learning to thinking about user first and not many books that talk about that.

Like, the kitchen top example, which is best summarized with two pictures:

http://www.homedepot.com/catalog/productImages/1000/20/20f59...

http://www.homedepot.com/catalog/productImages/1000/ba/ba845...

I find topology influencing brain patterns being a fascinating topic.

Also: http://i.imgur.com/ACe2b51.jpg technician clearly didn't read the book XD


Then it's not for you. I've read it, I loved it, it gave me lots of ideas. Something that you must understand is that sometimes, a book is not good or bad, it's just not for you. Sometimes, you must read into it, get inspired and develop your own useful ideas. It's kinda like when I go to conferences, I could sit in an hour long talk, and yet it will be only one minute of it that was insightful to me, and that one minute might be worth the entire talk. First time I went to a conference, I was so bored and disappointed, I expected every word, every slide to be mind blowing. When I changed my way of thinking, I got more out of it. I apply the same philosophy to books, I could read a book and perhaps it's a chapter or a few pages that will make it worth it all. For the design of everyday things, every chapter mattered to me.


I agree. I was fairly interesting, but not as good as it is made out to be.


One of my older, much more experienced co-workers says "The Art of Unit Testing is last... how poetic". Perfect.


the top one, which I happen to be a contributor to, is about how to get existing software under test


Happy to see that Okasaki is on the list.


Nicely done, but what about python, ruby and php? Haven't you found any books on these topics at all?


This is a great reference and, I hope, a great way to make some money being an affiliate. Good job.


When I select HTML tag there is "Design Patterns" gang of four on first place.


The C# button doesn't seen to actually filter the results, perhaps due to the #?


Just to throw my two cents in here: my favorite technical book is the fairly recent Go Programming Language by Donovan & Kernighan (www.gopl.io).

It's very readable and has _excellent_ exercises to do as you work through the book.


i see a regex book at #15. I really need that.

Is mastering regex simply a form of memorization? There doesn't seem to be any logical pattern to the various flags.


Why is no one talking about the #1 book on legacy code?


i'd really like to see this repeated for other top stackexchange sites. math, mathoverflow, software engineering, electrical engineering, etc.


Glad to see Domain Driven Design aka the Blue Book.


This is a great resource. Thanks for sharing!


No Ruby on Rails books? Or Python?


But lots of C++ books. C++ and Python are my primary languages, and I own far more C++ books than Python. For C++ I've got all Scott Meyers stuff, Alexandrescu, Stroustrups C++ language. For Python I've got Beazley, and that's it. My guess is that Python, and probably Ruby too, are so much easier to learn than C++, so fewer books are read and sold.


I don't grant the premise that fewer Ruby and Python books are sold... Regardless, the number sold is greater than 1 so they should really be listed in the app.


The Python on-line documentation is really outstanding. I don't use any Python books at all.


yes again; good for you...but totally irrelevant.

There are python books, they are sold, keeping them off this list is lame.


I'm pretty sure it skews old by not correcting for publication age. That's how "heads up design patterns" from 2004 beats almost everything since, simply by being older. In 2030 something newer will have higher numbers, but an old classic will have even larger numbers, so ...

Eventually old stuff tails off. I learned C from K+R edition one in the 80s, and the ANSI edition two has now displaced it.


Ah, yep...that explains it then.


Is there any reason to expect this distribution to vary much from "top selling" ?


I was genuinely curious. Superficially, it seems like "mentions" would scale with sales (as opposed to, say, recommendations if you could work that out).


Should be a short list since Stack Overflow is not the place for book recommendations.


What does that have to do with anything? The point is to list the most popular books that are talked about in the trenches. Stack Overflow seems like a perfect data set for something like that. Similar to number of citations for scholarly works or Google Trend data for pop culture.


2,3,5,6,8,9,11,12,14,15


beautiful!


Ah, the good old Design Patterns book, responsible for more atrocious over-abstracted, unreadable, hard to maintain Java code than anything else before or since.


>, the good old Design Patterns book, responsible for more atrocious over-abstracted,

This is a misunderstanding of the DP book. It would be similar to saying that the existence of TVTropes.com is responsible for terrible scripts of tv shows and movies. Or, the existence of the Oxford English Dictionary is responsible for bad novels and useless documentation.

The DP book is a catalog (to gain awareness) and not a checklist (that you must do). It's a collection of observations about software structures out in the wild. It's not about prescription.

Even without the phrase "design patterns", it's easy to surmise that programmers out there are independently and unknowingly re-inventing the same higher-level structures (similar to tv tropes) but without giving them formal names. The DP book gives them formal names and hence, an attempt at shared vocabulary.

One can go to the amazon.com page for Design Patterns and click "Look inside" for the "First Pages" and see that the authors wanted to present a catalog: https://www.amazon.com/Design-Patterns-Elements-Reusable-Obj...


> >, the good old Design Patterns book, responsible for more atrocious over-abstracted,

> This is a misunderstanding of the DP book.

It is discussing an effect of the book, not the intent.

> It would be similar to saying that the existence of TVTropes.com is responsible for terrible scripts of tv shows and movies.

Which would be entirely accurate if script writers were widely using TVTropes pages as templates and creating bad scripts from it, regardless of what TVTropes is intended to be.


>It is discussing an effect of the book, not the intent.

Do you truly believe that specific DP book caused that effect?

I don't. The DP book is extremely dry reading and most programmers have not actually read it. ([In terms of readership/ownership ratio] It's a book like Stephen Hawking's "Brief History of Time" ... everybody knows about it and some might have it on the coffee table but very few actually read it.)

I do think the _phrase_ of "design patterns" (not the book) has become a sort of gravitational force such that any discussion about "overcomplicated design" seems to fall toward that particular phrase. Or put differently, "bad designs" is now a synonym of "design patterns" so much so such that you can't even say "design pattern" and have it be interpreted as a neutral term. It's become a trigger word.

>Which would be entirely accurate if script writers were widely using TVTropes pages as templates and creating bad scripts

Yes, I agree that would be equivalent. However, I don't think the existence of tvtropes compels directors like Michael Bay to repeat the "walk away calmly from explosion in the background" scene. The motivation to repeat that "cinematic pattern" comes from somewhere else. Likewise, the majority of bad/overcomplicated abstractions in source code come from somewhere else besides that particular DP book.


I think you are hugely underestimating the influence this book had. This was the first catalog including these patterns and the authors gathered them by looking at source code from many, many projects and compiled common patterns they deemed useful into this book. They named the patterns and this book ultimately popularised them. The book was a huge success when it first came out and I know many people who have indeed read the book. I've even encountered it in university twice. Without this book many of these patterns might not have a name and hardly anybody would know them. They would be patterns in the way that they randomly occur in the wild, but not in the sense that they are templates that developers seek out to solve problems.


> Do you truly believe that specific DP book caused that effect? > > I don't. The DP book is extremely dry reading and most programmers have not actually read it.

This doesn't match my experience but I think that's because you're conflating two related ideas: while few people may have deeply read DP, that's not a requirement for it to have had a strong influence on them, any more than it is necessary for someone to have deeply read and understood their holy book to have strong religious beliefs.

I make that comparison because the worst projects I've seen were heavily based on DP but in a bad way because it was used more as a club than a means for self-improvement. Architects threw it around to bolster their status, a strong push towards ritual cargo culting rather than making sure the problem was well understood enough to know that the code being written matched the actual business case, and any criticism was met with a flak shield of “This is the best practice way according to DP”.

That's not necessarily DPs fault — although there is a discussion to be had about valuing comprehensibility if you want to make meaningful improvements — but it was definitely an effect shaping software development for the worse for over a decade.


Most people have a copy of DP and have not read the whole thing. Most people have read it in that they have read a couple pages, the table of contents, and a couple random patterns. To some extent that is how the book should be read: you have a problem that a DP solves and so you read the section on that pattern to get it right.

The problem is most people have a superficial knowledge of the patterns in the book (a list is easy to put together along with a short summary so most people have read one). They then go looking for how to apply the patterns to their domain so they can check the pattern box, without thinking about the large picture. They never consider that patterns exist to solve a specific problem and if you don't have that problem you shouldn't use the pattern.

The classic example is the singleton: it solves a tricky problem that large systems sometimes have. However few people realize that a singleton is a fancy name for a global variable and have all the downsides of a global variable.

There are several patterns that are a specific way of creating a layer of abstraction. Abstraction layers are often very useful, but as the saying goes: "all problems in programing can be solved by adding a layer of abstraction - except too many layers of abstraction". I've seen cases of layers of abstraction that didn't solve any problems.

As such the original point: DP, by giving patterns names has created more harm than good. This is not the fault of the book though: the names were needed and the patterns are very useful when applied correctly. However before the book people would re-invent the patterns (badly) only when they needed the pattern.


> However few people realize that a singleton is a fancy name for a global variable and have all the downsides of a global variable.

Really? It's been twenty years (maybe a bit more?) since I read the book, but I think this was pretty explicit, was it not?


> Do you truly believe that specific DP book caused that effect

I believe that it, and specific choices made in the selection and presentation of patterns in it, contributed significantly.

> The DP book is extremely dry reading and most programmers have not actually read it.

Perhaps, but the influence of a book (especially one which directly inspires other books) often extends beyond its direct readership.


A very weird comparison, the brief history of time is a popular science book aimed at laymen, it sacrifices precision for a larger audience and is not really a dry book.


Sorry for the confusion. (I've edited my comment for clarity so people don't think I was insulting SH.) I wasn't saying Hawking's prose was dry. That attribute was intended solely for the DP book. With ABHOT, I was comparing the ratio of readers aware of the book vs actually reading it. ABHOT has become sort of a "poster child"[1] among bibliophiles for books owned for vanity and I thought HN readers would get that reference.

[1] example from WSJ that mentions the common meme about ABHOT: https://www.wsj.com/articles/the-summers-most-unread-book-is...


If you own ABHOT and haven't read it, do yourself a favor and give it a shot. It's extremely interesting and a fairly easy read.

Context: My formal physics education ended in high school.


I'll piggyback on you and highly recommend the "crash course astronomy" series on YouTube. It's 50 or so ~10 minute videos that does a broad overview of all of astronomy up to the current moment, starting back when the older civilizations first studied the stars just by looking up with their naked eyes.

It is fast paced and packs a lot of information into each episode, so I do end up rewinding sometimes. And being a passive video, I think retention won't be as high. However, the short videos are very approachable and bite sized. It's very well done and the host is quite entertaining. The past year, my interest in space and physics has increased a bunch. It feels like learning the deeper history and context in which all of humanity is embedded.


I'm actually with the others on this. I've been looking at CompSci papers, engineering methodologies, and real world code going back a long time. I saw a few patterns in use like Parnas' information hiding or state machines. I didn't see GoF patterns until I saw Java people using them while recommending the book. Also, many people in industry forgot about prior methodologies that got results without over-abstraction such as Cleanroom but were all over GoF patterns and latter Agile methodology. It seems their work was pretty influential.


do you know where I could find those other patterns?


You probably have already seen them. It was just things such as structured programming, decomposition into functions, layering with minimal loops between layers, interface checks for invariants, avoiding risky languages/constructs, and usage-based testing.


> Do you truly believe that specific DP book caused that effect?

GoF/Design Patterns was published in 1994. Java, the standard-bearer of overapplying Design Patterns, was first released in 1995, and it only grew into the AbstractAdapterFactoryImpl cliches after that. Based on that timeline Im not really sure how you can argue that GoF had nothing to do with DP madness, at least as exemplified by Java.

Just because GoF was originally meant to be descriptive does not mean that it can't be interpreted as prescriptive, especially by your stock work-a-day software engineer or peter-principle'd software architect. Despite whatever intentions the GoF may have had, by giving these patterns a name, they in a sense codified them, giving people something to point to when justifying otherwise poorly thought out design decisions.

> The DP book is extremely dry reading and most programmers have not actually read it.

The thing about GoF is that you don't really have to read it to apply it--and not actually reading it only increases the odds of mis-applying patterns if youve encountered them elsewhere.


> Do you truly believe that specific DP book caused that effect?

Yes, definitely. People used to cite the GOF book left and right while over-engineering crappy CRUD apps.


Still, the original architecture "Design Patterns" book by Alexander (which this book is supposed to be the software analogy of) discusses "good practices", emphatically recommended for architects, city planners, etc. So it is maybe not that far-fetched to interpret these patterns as recommendations too.


Unfortunately, it tends to be _read_ as a how-to book rather than as a catalog of observations. I have actually heard from a professional software engineer, "We can't write the code this way because it's not using any known design pattern," said with a straight face. This is partially the mentality that gives us things like the classic AbstractSingletonProxyFactoryBean[1] class.

1: https://news.ycombinator.com/item?id=4549544


I've seen this argument before, but I don't really buy it. Why did they subtitle their book "elements of reusable object oriented software" if they didn't intend to present "patterns" as "templates." (After all, "reusable" is a good thing, right? So if you follow these patterns your code will be reusable, hence, good.) Why did they use the word "pattern" at all? Why not name the book "Software Structures: observations about software out in the wild?"

In any event, it doesn't really matter what the original intent of the GoF book is because in practice, people treat design patterns as, well, what the word "pattern" would suggest: "something designed or used as a model for making things <a dressmaker's pattern>".

This is further indicated by the term "anti-pattern," which basically means, "something you should avoid." If you should avoid the "anti" then it stands to reason you should follow the "pattern."

For even more demonstrations of this fact, look at subsequent design patterns book, like one by the Head First. These explicitly treat patterns as improvements to be made over some previous attempt at a coding problem. Or hell, check out this description from https://sourcemaking.com/design_patterns -- "Design patterns can speed up the development process by providing tested, proven development paradigms." " Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for coders and architects familiar with the patterns."

Whether it was the original intent of the GoF or not, design patterns are mostly perceived to be _good things_ that should be adhered to.

Now, as many have suggested, the wisdom of reaching for design patterns has been increasingly viewed with skepticism, and rightly so. It'll be interesting to see over time how much weight they carry and where the equilibrium lies. My guess is that certain patterns will essentially fade from relevance (if your language has first class methods, do you really need Strategy, for example?) While some (adapter, facade) remain useful ways of handling various problems.


The GoF book is responsible for a lot of bad decisions made by inexperienced devs because colleges insist on using it as a textbook. It's the textbook used in most Java-based CS programs for their Design Patterns courses. It was when I was in school and it still is now.

Mainstream developers who attend schools that produce Java developers believe that this is a recipe book. I have seen this book used at conference talks for nearly 20 years. Countless blog posts aimed at beginners reference this book as the way to solve problems.

The book itself is pretty explicit that they are not recipes, but that doesn't mean it isn't used that way.

Don't blame the book - blame the curriculum that's based on it.


A friend used to say that, he likes to share vocabulary, so they can avoid duplication. Which is entirely true, that said this book gave me nightmare, because I found the mindset so ceremonious; borderline off topic.

Giving name like flyweight to a simple "compression" scheme... The whole thing felt like "duh" to me. Sure it give common ground to people; but none of it felt like something to be written down, even less worshiped like it was.

I also strongly feel about the critics saying that it targets poor OOP languages (cpp, java <5), rendering the whole thing moot in other paradigms.


> This is a misunderstanding of the DP book.

That may be, but it's a very common misunderstanding of the book by junior developers who read the book as a list of recipes to use anywhere they might be applicable.

Is it the book's fault that it's understood this way? I don't know. Regardless, the book + this persistent understanding and use of it are, as grabcocque says, "responsible for more atrocious over-abstracted, unreadable, hard to maintain Java code than anything else before or since."


I dunno if it's just _junior_ ones. I've encountered my share of "enterprise architects" that will use this book as though it were a bible when trying to justify their near-insane scribbling of boxes and lines on the white board.


Yes, well, some of the juniors never repent. Plus it's a decent tactic for job security through obscurity...


The facts that the book focuses on exactly the kind of patterns which are not abstractable into libraries in the popular OOP languages of the time (mostly true now, too), and that the implementation of each pattern is central to the presentation -- both of which arguably have quite good reasons based on the books intended role, to be sure -- I think promote this misunderstanding.

Certain other design patterns books in the software field (Patterns of Enterprise Application Architecture and Enterprise Integration Patterns, for examples that happen to be on the shelf next to me at the moment) don't share those features.


I don't think that's fair. The driving point of that book was that developers needed a higher level language to talk about these patterns than simply at the code level, and showed people how to put together a vocabulary. Yes, it came with a library of sample patterns useful for Java developers, but they weren't egregious examples, nor were they the main point of the book. They were just taken to an extreme by people who skipped over the first part of the book and just skimmed the library. It was a "how to think about your craft" book that people misread as a "how to achieve a programming task" book.


This book was written before Java for C++ developers (amazon shows 1994).

Edit: I agree with your opinion. Just wanted to show that this problem is much older and related to other languages too (probably with the similar OOP implementation).


The book has examples in both C++ and Smalltalk.


That's very interesting. I haven't read Design Patterns. I have read A Pattern Language, and the Timeless Way of Building, by Christopher Alexander, and Patterns of Software by Richard Gabriel. It's been my understanding that Design Patterns had only a couple of dozen patterns (which turn up again and again in Java code) and prescribed their use generally, but if they're only examples of patterns, and programmers are encouraged to invent their own (which I do anyway), it might be worth a read.


> which turn up again and again in Java code

This is true, but it's an effect, not a cause of the book. "Design Patterns" is older than Java. They wrote it based on patterns they saw mainly in Smalltalk and C++.

> prescribed their use generally

Like "A Pattern Language", "Design Patterns" reads more descriptively than prescriptively. It's, "Here's a thing we saw people do. Here's what problem they were solving with it. Here's the context of their problem. Here's the positive and negative consequences."


GoF's Design Patterns, for all its flaws, was never intended as a prescription or even as an exhaustive description of every design pattern. It was a recording of commonly used and battle-tested patterns. I think the motivation was good; the bad thing was that it became some sort of bible to be followed blindly. I don't think that was the intention of the authors, though.


I think it's not fair to the authors. As you say they are clear about the patterns being examples. However, there seems to be something about the book or maybe patterns in general that make it seemingly impossible for many developers to not look for use cases of these patterns and start using them in cases that don't quite match. I lead a book club at a post employer where we read the GoF. I constantly emphasized that these are examples of how we might reason about OOP and that they are inappropriate more often than not even though you think they are a fit. Yet, of course some people started suggesting them frequently. I think the problem might be that the first part is a support quick read and then you spend a huge amount of time reading the catalog. Once you understand them, you see how nice the patterns are on their own and you want to use them. They are pretty and you've spent time learning them. So it's only natural. It's a beautiful mental trap.


> However, there seems to be something about the book or maybe patterns in general that make it seemingly impossible for many developers to not look for use cases of these patterns and start using them in cases that don't quite match.

Perhaps. But consider the background. People write code that isn't very well designed all the time. Maybe you just see these patterns misused so often because you can identify and name them. This is entirely the point behind the book – so we can identify these common patterns and talk about them at a higher level.

You've probably seen bad code where you can't describe what's wrong with it succinctly a lot too. But you don't have the option there of saying "oh, they've used a factory there when they shouldn't have" because the bad code doesn't follow a pattern that you know / have named. So all of those cases just get filed away in the fuzzy "bad code" category instead of being an example of a pattern being misapplied.

By definition, almost, something being a pattern is going to be something you see misapplied simply because that's part of the purpose of design patterns – so you can comprehend these problems better.


There already is a vocabulary for programming design patterns (monads et al) but people seem to hate/fear them for some reason.


Careful there - lest you throw the baby with the water.

As with all things - there are some good ideas there and some bad. And as I understand it, the book simply presented patterns - programmers were already using at that time. So the book's existence in itself wouldn't cause bad code IMO.

Now if someone were to write a "modern design patterns" book, people will probably write about:

1. Actor pattern and concurrency using message passing.

2. Immutability and - designing types with no shared mutable state.

3. Dependency injection

4. Pattern matching

5. MVC

6. mocks and stubs and fake objects?

7. ...

And same as before - some of these ideas when applied to certain cases could be bad.


> "if someone were to write a "modern design patterns" book"

Based on my recollection of the original Design Patterns book, all of the patterns you list are included in the original book. Caveat: I haven't opened the book in over 5 years, but I'd be surprised to learn that any of the 6 patterns you list are not in the original DP.


What i listed was just an example but you can verify quickly - https://www.amazon.com/dp/0201633612/?tag=devbookscom20-20 without opening the actual book.

And afaict - none of the patterns I listed are mentioned verbatim.



It talks a little about it, but it's not called out as a specific pattern with a chapter all its own.


Having read Design Patterns in the past, I found http://gameprogrammingpatterns.com to be a really good modern follow-up, though it's targeted at game developers in particular.


> responsible for more atrocious over-abstracted, unreadable, hard to maintain Java code

I have the misfortune to remember what some object-oriented codebases looked like before "Design Patterns".

While people—generally those who haven't read the book or completely glossed over the section on the consequences of each pattern—have certainly over-used design patterns, I'll still take that over under-use of them.

An over-engineered too-many-design-patterns codebase is annoying and tedious. A hundred thousand lines of code filled with half-way-reinvented design patterns with its own made up terminology, hard coupling everywhere, piles of global state, and no real architecture to speak of at all is a nightmare.


It's all in my phone. I read it all.I NEVER GAVE PERMISSION for this to be placed on my Android I decided to look one of the 50or so things like this on my phone.. I never had e permission j believe i can tell you what state and what address this man is doing this from!


You forgot to wrap your comment in a Factory class.


Why stop there? Why not a CommentFactoryFactory?


Head over to github and search for Enterprise FizzBuzz. That'll keep you busy cringing or laughing or both for a while.


After all, software factories give you interchangeable parts, and let you reuse your code wherever you want!


Not only Java...

But I guess the Problem is how OOP is teached.

Before I learned about design patterns I only saw car or animal examples. Design patterns were the first real world OOP stuff I saw at university.


Out of curiosity how long ago were you at university?


Not the OP, but to provide an idea how it used to be.

I learned OOP with Turbo Pascal 5.5, for MS-DOS, around 1990. Started using Turbo Vision with Turbo Pascal 6.0.

Eventually also started coding with Object Windows Library in Turbo Pascal and Turbo C++.

Borland manuals were my introduction to OOP, followed by books like "Designing Object-Oriented C++ Applications using the Booch Method.".

Only later I got to learn about the multiple ways of doing OOP (CLOS, Beta, SELF, ...).


Yes.

I mean, I did OOP in some languages, because, well, they had object like constructs. For example VBA had all these Excel tables modeled as objects you could access and modify via code.

Then there was C++ and Java with their factories and factory factories and whatnot.

And lastly the examples of cars that have wheels and animals that inherited stuff etc. pp.

So I had different concepts in my mind, all being objects.

On the one hand the examples of university.

On the other hand the tangible Excel table of VBA that I understood. "At table is an object with some methods and properties"

And then the "real programmer stuff" like a controller, a presenter, a singleton, a emitter... Things that were really abstract to me, because they didn't map directly to tangible things I saw in the software as a user.

Design patterns somehow made this more easy to grasp.

But I first started to understand the whole thing after building my own API in PHP (started after it got classes haha) that had module- (controllers), protocol- (views) and data-objects (models).


I studied my BSc from 2007 - 2011


I don't think that's fair. The patterns already existed, they just created a taxonomy and added editorial. I think it's one of my favorite programming books.

Everybody independently created singletons and factories and builders, we just all called them different things.


I feel like it probably did more good then bad. Codebases devoid of any design patterns arent likely great quality. But it requires judgement to not over engineer.


Couldn't agree more. Lol


You're violating the terms of Amazon's associate program by including affiliate links without notice.

>"You must clearly state the following on your Site or any other location where Amazon may authorize your display or other use of Content: “We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.”"

https://affiliate-program.amazon.com/help/operating/agreemen...


Oops. Thanks for comment, will fix it asap


On that note, there is a similar clause in the Google Analytics ToS.


Fixed, thanks again


I got a problem with this code. I know, I'll use design patterns.

Great! I now have an AbstractProblemFactory to generate problems on demand.


"Patterns" are to the art of good programming what organized religion is to the art of good living. Everyone loves the ideas, everyone hates the implementations.




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

Search: