8 ms·
Ask HN: What programming design pattern book has had the biggest impact on you?
I own multiple well known design pattern books because I went on a buying-spree a while back (Gang of 4, Patterns of Enterprise Application Architecture, Clean Architecture, Head First Design Patterns). But as I look for advice on which are still worth reading, and which is likely to be the most impactful if I only read one, I find a lot of lists that are short on opinions.
I'm curious which of these or others have had the biggest impact on folks here, and which popular ones are worth skipping.
- braisdom 6y agoSpring of Java ORM is here, ObjectiveSQL is an ORM framework in Java based on ActiveRecord pattern, which encourages rapid development and clean, codes with the least, and convention over configuration. Features 1) With one annotation your Class has fully featured capabilities of SQL programming 2) Easy to relational(has_one, has_many, beglongs_to) querying and paged querying 3 Java expressions(arithmetic, comparison and logical) can be converted into SQL expression directly
- braisdom 6y agohttps://github.com/braisdom/ObjectiveSql https://github.com/braisdom/ObjectiveSql
- db48x 6y agoSICP
- braisdom 6y agoYes, ObjectiveSQL compiles Java into SQL
- thecupisblue 6y agoSICP is probably one of the only ones worth reading. Others are just implementations of abstract ideas about how things belong and communicate.
- aryehof 6y agoPatterns of Enterprise Application Architecture
- pankajdoharey 6y agoShort Answer : How to Design Programs (By: Sriram Krishnamurthi) http://htdp.org/2003-09-26/ http://htdp.org/2003-09-26/ Long Answer : Design Patterns are useful only in an OO Setting, its utility is gone if you look at Functional Languages. In FP you would have to consider more fundamental things than trying to cosmetically map a classical model to a domain, and then write bunch of code to retrofit that model.
- amw-zero 6y agoI’ve always found it odd when people say there are no design patterns in FP. The same patterns do not translate, but different patterns exist, no?
- hcho 6y agoExactly. What's a monad, if not a design pattern.
- pankajdoharey 6y agoNew patterns emerge but not to solve the class of problems that Patterns solve. Many of the problems in OO, emerge due to OO's poor fit as a strategy to write software.
- amw-zero 6y agoI’m very pro FP in general, but saying that its inherently more fit for writing software is a baseless claim. People are also unnecessarily harsh about OO, as if somehow the entire industry is operating orders of magnitude less efficiently then they would be if they just magically changed paradigm. FP has its own tradeoffs. Nothing is less trustworthy than a zealot who claims their religion is the one true answer. Logic and software are fundamentally complex. Djikstra said that software is “radical novelty.” It exists at a scale beyond anything the human race has ever built before, that’s fairly inarguable. He was also very fond of imperative programming, and was able to formally verify his imperative programs. Check out his book, A Discipline of Programming, where he goes over the mathematical theory of a simple imperative language. There’s nothing more “mathematically correct” about the lambda calculus vs. Turing machines. Both are equivalent models. Whether or not state is implicit or explicit, state and time are a part of computation.
- Poefke 6y agoPatterns of Software: Tales from the Software Community, by Richard Gabriel
- Jugurtha 6y agoDavid Mamet's Masterclass on "Screenwriting". It is about screenwriting, but I transposed so much to programming and writing it's ridiculous. The way to create characters, plot, or get ideas. The plot is one problem and characters solve it. One thing and one thing only. The job to be done [of a movie] is to entertain an audience, don't get gradiose or too tied to it. As a programmer, I watched the videos and with every video, there was a clear application to programming and design. Advice on writing, in general, and observing good products evolutions lead me to increase my effectiveness: not building the wrong thing, better scoping, solving the right problem. This leads to a lot of code not written, and reduces unnecessary complexity. I have of course read some of the books you mention, but I find that simplifying things delays the need to resort to some patterns. You often find code that does practically nothing but filled with observers and borgs and factories and whatnot. It's useless and doesn't solve a problem. If it were a display of patterns skills, maybe, but that's why I did Judo and not Aikido. I like things that work in real life against actual problems, not imaginary or compliant adversaries.
- ArtWomb 6y agoNever been a huge Mamet fan, but so many people swear by his lectures that I think I might indulge over xmas break ;) Screenwriting classics like "Save the Cat" and "The War of Art" contain very simple truths: there are rules to storytelling, honed over centuries of human experience and cultural evolution. Knowing when to follow the rules, and having the confidence to break them, is part of that journey, and can be applied to virtually any creative endeavor ;)
- andrei_says_ 6y agoThank you for this. For the longest time I’ve been seeing the objects in my code as characters I. Stories, with messaging defining their relationships. Will definitely check out the masterclass.
- muzani 6y agoI saw some ads on screenwriting and thought that it would apply well to writing code, but I didn't go into them. Thanks for confirming that it does. Which videos or Masterclass did you mean specifically?
- matt_s 6y agoHead First did it for me, visuals and the format of that book helped with such abstract and dry concepts. I have found over recent years not having to dip into those concepts much, there are a lot of these patterns built into libraries and frameworks these days.
- sloaken 6y agoThey have a 2nd edition coming out this month https://www.oreilly.com/library/view/head-first-design/0596007124/ https://www.oreilly.com/library/view/head-first-design/05960... I would recommend picking up a free chapter of the old one to see if you like the style of presentation. Personally I just love the way they present information.
- mimixco 6y agoRefactoring by Martin Fowler
- ArtWomb 6y agoNot a book. But if you are .NET / Azure centric I have found the team at MS Paterns and Practices to be very accessible ;) http://aka.ms/mspnp http://aka.ms/mspnp Game Programming Patterns is another resource that is quite clear https://gameprogrammingpatterns.com/ https://gameprogrammingpatterns.com/
- bendee983 6y agoFor me, nothing will replace the original GoF book: "Design Patterns: Elements of Reusable Object-Oriented Software" It's still worth reading. But I also recommend "Object-Oriented Analysis and Design with Applications" by Grady Booch. It's not strictly design patterns, but it's a classic that explores a lot of the fundamental concepts you'll need for DP.