It's #DevDiscuss!
Tonight's topic is DESIGN PATTERNS.
Let's kick off the chat with a few jump off questions:
- What is the value of using design patterns?
- Do design patterns typically have long-lasting value?
- Are there bad patterns that are popular?
Let's get chatting.
@DevDiscussHQ
Been seeing and implementing the composite and decorator patterns everywhere using role interfaces.
Composition > Inheritance
#DevDiscuss
Regardless of whether we choose the right patterns (and we never know what's right at the time), choosing and enforcing patterns works quite well. 🙂
As long as we're always willing to go back to the drawing board. #DevDiscuss
It's #DevDiscuss!
Tonight's topic is DESIGN PATTERNS.
Let's kick off the chat with a few jump off questions:
- What is the value of using design patterns?
- Do design patterns typically have long-lasting value?
- Are there bad patterns that are popular?
Let's get chatting.
I think one value of design patterns is having the same state of mind among developers when developing together. Generally understanding where different things go, how routines are done & what parts there are helps keep everyone aligned.
#DevDiscuss
God classes are a maintenance nightmare!!! Too many responsibilities, hard to test, debug and document. Makes me cringe every time I see one in a project #DevDiscuss
Design patterns are great for adding a touch of future proofing to your code. They are NOT the most important thing and should not sacrifice delivery, but incrementally adding them can make a huge difference down the road. #DevDiscuss
Wow, I was literally just thinking about this because of a project in making. I really can't say much since I don't have any professional experience, but I learned about them in school. I guess the value is that they provide an easy way to approach a problem. #DevDiscuss
Although, I will say that OOP is my first love and everyone should read Practical Object Oriented Design by @sandimetz -- it's one of my all time favorite books even outside of programming! #DevDiscuss
Strategy pattern is by far my favorite design pattern. Get rid of all those nasty if/else or switch statements and use this. https://t.co/fITLzw4ZAC#DevDiscuss
Design patterns are immensely valuable. They offer solutions to problems that have already been solved. Being able to evaluate a problem and apply an appropriate pattern is a fundamental skill. #DevDiscuss
It's #DevDiscuss!
Tonight's topic is DESIGN PATTERNS.
Let's kick off the chat with a few jump off questions:
- What is the value of using design patterns?
- Do design patterns typically have long-lasting value?
- Are there bad patterns that are popular?
Let's get chatting.
#DevDiscuss
It's overwhelming reading about design patterns, until you implemented one, which sometimes takes less time than reading on it (i'm looking at you factory pattern)
Proxy, Observer, Memento, were extremely useful
Visitor just game me headaches
e.g. I'm working on a digital board game in which the board game has unique rules based on how it's set up. I could find a hacky way to account for every permutation of the set up or I could use a couple of design patterns to know what to go for. #DevDiscuss
Design patterns are basically required for maintainable code on large teams. I often internalize them to the point of using them without remembering the name of the pattern, which can make for funny conversations with fellow devs trying to get on the same page #DevDiscuss
Last #DevDiscuss Tweet on #DesignPatterns
Don’t design with patterns, build your solution and allow the patterns to emerge.
Don’t commit to a heavy design pattern of it doesn’t save you more work than it creates.
It's #DevDiscuss!
Tonight's topic is DESIGN PATTERNS.
Let's kick off the chat with a few jump off questions:
- What is the value of using design patterns?
- Do design patterns typically have long-lasting value?
- Are there bad patterns that are popular?
Let's get chatting.
Design patterns can help with the maintenance of the code. As it can make logical sense where a specific function of the code is stored in source control. 💻 I find that I spend at least 10x more reading code then writing ✍️ code. #DevDiscuss
Yes, on 'allow patterns to emerge'
Being able to refactor your code later should be a standard practice
If someone in the team is uncomfortable with refactoring (don't say 'afraid', it's inaccurate & offensive) that could be a big red flag for the product
#DevDiscuss
#DevDiscuss hot take: design patterns are largely a symptom of mediocre libraries/languages
everyone talks about not reinventing the wheel yet instead of building good wheels we just get mad at people for not memorizing the right wheel blueprints
#DevDiscuss They're very valuable. They allows a developer to solve common well known problems. They have very long lasting value. I thing there are not bad patterns. The bad thing is how you use them in a specific problem.
I have yet to read this book 📖 but it has been recommended to me to learn about more design patters. Design Patterns: Elements of Reusable Object-Oriented Software https://t.co/sT7GsMMxsq#DevDiscuss
In reply to
@ASpittel, @sam_ferree, @DevDiscussHQ, @ThePracticalDev, @sandimetz
If product management refuses to listen to arguments for refactoring a particular piece of code, alarm bells should start going off. We build quickly because we expect to iterate, when the iteration step is skipped...well... #DevDiscuss
@ThePracticalDev The best advice I can give: Don't look at a problem and say "I'm using pattern X to solve this." Start solving it, and realize that you're implementing X. Design patterns aren't a tool box, they're a shared vocabulary describing common solutions #DevDiscuss
The other thing I can say: Pay attention to the "when NOT to use this" part of a pattern. Programming is the art of balancing tradeoffs, and every pattern has one. Forcing a pattern that doesn't quite fit can easily be more complex than not using one #DevDiscuss
Some people, when confronted with a problem, think "I know, I'll use a design pattern." Now they have two problems.
#DevDiscuss (with apologies to @jwz)
In reply to
@IgnoreIntuition, @ThePracticalDev, @jwz
Yes yes yes! I finally wrote an article on my sudoku solver -- it's part critique of computer science education part technical article! https://t.co/O7RiEUkp0r#DevDiscuss
(this comes from a long time working in a ridiculously complex system that used the visitor pattern all over the place. If the underlying data structure had been tweaked, we could have gotten the same result with much less complexity) #DevDiscuss
I find some definitions of adapter pattern to be confusing. To me it is a pattern that allows me to abstract away how a certain piece of code behaves so that other pieces of code can rely on a consistent interface. #DevDiscuss
Volume 8 of my learn by doing newsletter is officially released, check it out here and sign up to get it in your inbox every week. https://t.co/GvZszvUiZL#DevDiscuss