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

Поділитися
Вставка
  • Опубліковано 2 жов 2024

КОМЕНТАРІ • 23

  • @lefteriseleftheriades7381
    @lefteriseleftheriades7381 4 роки тому +29

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

  • @jhbonarius
    @jhbonarius 4 роки тому +34

    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?

    • @njussakka
      @njussakka 3 роки тому +4

      Exactly my thoughts when I was watching this. How this got to CppCon in the first place?

  • @gm_000
    @gm_000 Рік тому +1

    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.

  • @jamessilva8331
    @jamessilva8331 3 роки тому +7

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

  • @pengdu7751
    @pengdu7751 2 роки тому +3

    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.

  • @lukaszmmaciejewski
    @lukaszmmaciejewski 4 роки тому +11

    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.

  • @pengsenmao4643
    @pengsenmao4643 10 місяців тому

    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.

  • @antonfernando8409
    @antonfernando8409 Рік тому

    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.

  • @helen13angel
    @helen13angel 11 місяців тому

    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.

  • @koronisneilos6983
    @koronisneilos6983 4 роки тому +1

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

  • @babgab
    @babgab 4 роки тому +4

    Singletons :(

  • @minhbt2709
    @minhbt2709 4 роки тому +4

    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.

  • @yjc149
    @yjc149 Рік тому

    great presentation.. thanks!

  • @PedrosoJr
    @PedrosoJr 2 роки тому +1

    Awesome! Excellent presentation.

    • @CppCon
      @CppCon  2 роки тому

      Glad you liked it!

  • @koronisneilos6983
    @koronisneilos6983 4 роки тому +2

    In the singleton class m_WindowWidth and m_WindowHeight are not initialized

  • @nourmammeri8129
    @nourmammeri8129 3 роки тому +1

    Thank you !!

    • @CppCon
      @CppCon  3 роки тому

      You're welcome!