#DevDiscuss Archive


Tuesday June 26, 2018
9:00 PM EDT

  • ThePracticalDev Jun 26 @ 9:04 PM EDT
    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.
  • dnf Jun 26 @ 9:05 PM EDT
    #DevDiscuss Singleton pattern is hot garbage.
    In reply to @ThePracticalDev
  • sam_ferree Jun 26 @ 9:06 PM EDT
    @DevDiscussHQ Been seeing and implementing the composite and decorator patterns everywhere using role interfaces. Composition > Inheritance #DevDiscuss
  • bendhalpern Jun 26 @ 9:07 PM EDT
    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
    • ThePracticalDev Jun 26 @ 9:04 PM EDT
      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.
  • azriaba Jun 26 @ 9:09 PM EDT
    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
    In reply to @ThePracticalDev
  • ASpittel Jun 26 @ 9:09 PM EDT
    I'm not art all an expert on design patterns. Anyone have an awesome resource they learned about them from? Browsing Coursera right now... #DevDiscuss
    In reply to @ThePracticalDev
  • shannon_crabill Jun 26 @ 9:09 PM EDT
    The VALUE of design patterns is not having to redesign/recode the same elements over and over again #DevDiscuss
  • ThePracticalDev Jun 26 @ 9:10 PM EDT
    In case you don't understand the topic of tonight's #DevDiscuss, thanks to @TiffanyW_412 for asking this question a couple months ago. https://t.co/plL6sXcisJ
    In reply to @TiffanyW_412
  • __namc Jun 26 @ 9:12 PM EDT
    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
    In reply to @ThePracticalDev
  • kylegalbraith Jun 26 @ 9:13 PM EDT
    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
  • kylegalbraith Jun 26 @ 9:14 PM EDT
    These are specific to .NET/C# but they can be used in just about any language... https://t.co/tW17OPTAHq #DevDiscuss
    In reply to @ASpittel, @ThePracticalDev
  • bendhalpern Jun 26 @ 9:14 PM EDT
    I'm biased but I think the https://t.co/lWepprFqmW content on this subject is magnificent. Search link: https://t.co/Aaz4djAH0Z #DevDiscuss
    • ASpittel Jun 26 @ 9:09 PM EDT
      I'm not art all an expert on design patterns. Anyone have an awesome resource they learned about them from? Browsing Coursera right now... #DevDiscuss
      In reply to @ThePracticalDev
  • fgandiya Jun 26 @ 9:14 PM EDT
    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
    In reply to @ThePracticalDev
  • ASpittel Jun 26 @ 9:15 PM EDT
    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
    In reply to @ThePracticalDev, @sandimetz
  • kylegalbraith Jun 26 @ 9:16 PM EDT
    Factory method is probably one of my least favorite design patterns as it is often used with inheritance. I hate inheritance. #DevDiscuss
  • claudiordgz Jun 26 @ 9:16 PM EDT
    that same logic caused the singleton pattern to be used everywhere in the same job #DevDiscuss
    In reply to @ThePracticalDev
  • kylegalbraith Jun 26 @ 9:18 PM EDT
    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
  • IgnoreIntuition Jun 26 @ 9:19 PM EDT
    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
    • ThePracticalDev Jun 26 @ 9:04 PM EDT
      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.
  • claudiordgz Jun 26 @ 9:19 PM EDT
    #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
    In reply to @ThePracticalDev
  • fgandiya Jun 26 @ 9:20 PM EDT
    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
    In reply to @ThePracticalDev
  • gotmonkey Jun 26 @ 9:20 PM EDT
    Factory, abstract factory great for encapsulating construction. Chain of responsibility, keeps decisions isolated and easy to alter. #DevDiscuss
    In reply to @ThePracticalDev
  • IgnoreIntuition Jun 26 @ 9:21 PM EDT
    If you find one let me know. Most of the ones I watched were _meh_ #DevDiscuss
    In reply to @ASpittel, @ThePracticalDev
  • ahansondev Jun 26 @ 9:21 PM EDT
    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
  • kylegalbraith Jun 26 @ 9:23 PM EDT
    I agree, some design patterns take more time to explain then it would take to just implement it. #DevDiscuss
    In reply to @claudiordgz, @ThePracticalDev
  • sam_ferree Jun 26 @ 9:23 PM EDT
    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.
  • kylegalbraith Jun 26 @ 9:25 PM EDT
    This is the biggest takeaway folks should leave with tonight. #DevDiscuss
    In reply to @sam_ferree
  • claudiordgz Jun 26 @ 9:27 PM EDT
    In JS there are wonderful design patterns out of the box Observable - https://t.co/vO4VuXNu4d Proxy - https://t.co/mTnCm9VR6y Promises - https://t.co/2jwvrTxAoP Iterator & Generator - https://t.co/3I6ITuXV7b I love these powerhouses 😍 #DevDiscuss
    In reply to @kylegalbraith, @ThePracticalDev
  • IgnoreIntuition Jun 26 @ 9:29 PM EDT
    The worst patterns are the ones you shoehorn in that don’t apply to the situation. #DevDiscuss
    • ThePracticalDev Jun 26 @ 9:04 PM EDT
      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.
  • kylegalbraith Jun 26 @ 9:30 PM EDT
    Bam. #DevDiscuss
    In reply to @claudiordgz, @ThePracticalDev
  • raveeshbhalla Jun 26 @ 9:32 PM EDT
    A key element of design patterns is getting the entire team (designers & all developers) to use the same language/terminology #DevDiscuss
  • codingwcookie Jun 26 @ 9:32 PM EDT
    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
    In reply to @ThePracticalDev
  • claudiordgz Jun 26 @ 9:33 PM EDT
    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
    In reply to @kylegalbraith, @sam_ferree
  • swizzard Jun 26 @ 9:33 PM EDT
    #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
  • julichala Jun 26 @ 9:35 PM EDT
    #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.
    In reply to @ThePracticalDev
  • codingwcookie Jun 26 @ 9:35 PM EDT
    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
  • kylegalbraith Jun 26 @ 9:38 PM EDT
    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
    In reply to @claudiordgz, @sam_ferree
  • kylegalbraith Jun 26 @ 9:39 PM EDT
    I would add "Code Complete" to the list of favorite books around this topic as well... #DevDiscuss
    In reply to @codingwcookie, @ASpittel, @sam_ferree, @DevDiscussHQ, @ThePracticalDev, @sandimetz
  • gotmonkey Jun 26 @ 9:40 PM EDT
    Repository, keeps data access isolated, makes testing easier. Not a fan of active record, seems a violation of SRP. #DevDiscuss
    In reply to @ThePracticalDev
  • IgnoreIntuition Jun 26 @ 9:41 PM EDT
    Great content in that book but it is a slog. I prefer Head First Design Patterns personally. #DevDiscuss
    In reply to @codingwcookie, @ASpittel, @sam_ferree, @DevDiscussHQ, @ThePracticalDev, @sandimetz
  • ThatJoeMoore Jun 26 @ 9:41 PM EDT
    @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
    In reply to @ThePracticalDev, @ThePracticalDev
  • IgnoreIntuition Jun 26 @ 9:44 PM EDT
    No love for module pattern. #DevDiscuss
    In reply to @claudiordgz, @kylegalbraith, @ThePracticalDev
  • Programazing Jun 26 @ 9:45 PM EDT
    Check out my website/blog at https://t.co/4DAQVTUa1s #DevDiscuss
  • IgnoreIntuition Jun 26 @ 9:46 PM EDT
    Agreed. As long as once those patterns emerge you embrace them. #DevDiscuss
    In reply to @ThatJoeMoore, @ThePracticalDev
  • ThatJoeMoore Jun 26 @ 9:50 PM EDT
    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
    In reply to @ThePracticalDev
  • claudiordgz Jun 26 @ 9:51 PM EDT
    Great point, modules are fantastic Modules - https://t.co/Kkf1Yg8hPv #DevDiscuss
    In reply to @IgnoreIntuition, @kylegalbraith, @ThePracticalDev
  • ThePracticalDev Jun 26 @ 9:52 PM EDT
    In the last few minutes of #DevDiscuss, anybody have any news to share, like a project or a personal win, or any other announcement?
  • gumnos Jun 26 @ 9:53 PM EDT
    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
  • ASpittel Jun 26 @ 9:54 PM EDT
    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
    In reply to @ThePracticalDev
  • ThatJoeMoore Jun 26 @ 9:56 PM EDT
    (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
    In reply to @ThePracticalDev
  • kylegalbraith Jun 26 @ 9:56 PM EDT
    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
  • shannon_crabill Jun 26 @ 9:56 PM EDT
    Not coding related, but I bought a house yesterday! #DevDiscuss
  • kylegalbraith Jun 26 @ 9:57 PM EDT
    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
  • kylegalbraith Jun 26 @ 9:58 PM EDT
    Welcome to the house owning club! We do a lot of yard work. #DevDiscuss
    In reply to @shannon_crabill