Back to Basics: Design Patterns - Mike Shah - CppCon 2020

preview_player
Показать описание
---
Design Patterns are reusable elements of design that may help aid in making software more maintainable, flexible, and extensible. The term 'design patterns' can be traced back to at least the 1970s, although the term has been largely popularized by the 'Gang of Four' book Design Patterns, in which common software design patterns were defined and categorized. In this talk, you will learn the fundamentals of the creational, structural, and behavior design patterns. This talk is aimed at beginners who have some C++ knowledge working on a software project, but are starting to think about larger software problems. This talk will also be useful for folks who have been working in C++ for a while, but have never had a chance to study design patterns and need some resources to help orient them.

Learning about design patterns and where to apply them can at the least give you a way to think about how you solve unknown problems, or otherwise organize your software--think about design patterns as another tool to add to your developer toolbox. We will start this talk by introducing the taxonomy of design patterns at a high level, how to read a UML diagram (as a quick refresher), a refresher on inheritance vs composition, and then spend the rest of the time on walking through the implementation of several design patterns. Attendees will leave this talk ready to implement and use design patterns in C++.

---
Michael D. Shah completed his Ph.D. at Tufts University in the Redline Research Group in 2017. His Ph.D. thesis advisor was Samuel Z. Guyer. Michael finished his Masters degree in Computer Science in 2013 at Tufts University and Bachelors in Computers Science Engineering at The Ohio State University in 2011. Currently Michael is a lecturer at Northeastern University.
Michael discovered computer science at the age of 13 when googling ”how do I make games”. From that google search, Mike has worked as a freelance game developer, worked in industry for Intel, Sony Playstation, Oblong Industries, and researched at The Ohio Supercomputer Center to name a few. Mike cares about building tools to help programmers monitor and improve the performance of realtime applications– especially games.
In Michael’s spare time he is a long distance runner, weight lifter, and amateur pizza maker.

---

*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

It's a very good talk! Very clean and the presentation is very well organized for this amount of time. People who criticize should read the title: it's back to basic, that's why it's not covering all the things they wanted to talk about.

helenangel
Автор

Singleton: The window size values were constexpr... he just casually removes it, preventing compile time substitution. Why not put the global values into a separate namespace if you're worried about symbol collision?
Adapter: he's just modifying the data of some object. That's not the adapter pattern.
Iterator: why is he getting the window size over and over in the inner loop?

jhbonarius
Автор

I feel the wrong patterns were picked. singleton is borderline an anti-pattern. adapter is simple, and iterator is built-in

lefteriseleftheriades
Автор

Maybe this wasn't perfect (as the Youtube comment experts below let you know), but I found this helpful

jamessilva
Автор

Didn't watch but listened to it while driving from Ottawa to Toronto lol. Didn't see any of those cool screen saver circles you mentioned.

antonfernando
Автор

Planning to show three design patterns and choosing singleton as one of them seems like a very surprising choice. Especially when you don't even mention that it's widely considered to be an anti-pattern.

lukaszmmaciejewski
Автор

Since this is a 2020 talk, I believe C++17 should already be published at that time, doesn't C++11 and later guarantee that only one thread can access the object initiallsation? So singleton is thread-safe.

pengsenmao
Автор

In the adapter pattern: I whould put the code from text) in a free function and and add some parameters like color and size to it.

koronisneilos
Автор

In the singleton class m_WindowWidth and m_WindowHeight are not initialized

koronisneilos
Автор

I don't suggest this tutorial if you already have a minimal knowledge about programming. It doesn't give any good insight either on C++ or Design Pattern.

gm_
Автор

I just wonder why do you promote Singleton? Erich was once mentioned in favor of dropping Singleton because it is a design smell. I think, we should stay away from Singleton because it is difficult to test. Furthermore, there are many ways to solve issues without using Singleton.

minhbt
Автор

this is a mostly a tutorial introducing design patterns. look at all the big egos in the comments. if you are an expert already, go watch something else that fit your level.

pengdu