Michael Feathers - the deep synergy between testability and good design

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 18

  • @stkupr
    @stkupr 3 года назад +6

    00:00 Intro
    02:47 Example: Testing private methods
    12:34 --- Testing Pains ---
    12:46 State Hidden in methods
    14:22 Difficult setup
    17:04 Incomplete Shutdown
    19:43 State-Leaks Across Tests
    21:57 Framework Frustration
    24:32 Difficult Mocking
    26:52 Difficult Mocking - 2
    28:05 Hidden Effects
    29:24 Hidden Inputs
    30:24 Unwieldy Parameter Lists
    32:00 Insufficient Access
    33:04 Test Thrash
    ---
    35:13 Relationship between testability and good design
    38:59 The Golden Hammer - Dependency Injection (its pains)
    42:20 Grouping Test Tools
    45:12 Conclusion
    45:26 Questions

  • @rationalrevoltable
    @rationalrevoltable 10 лет назад +13

    Great video indeed. I specially liked the emphasis on "feeling the pain" of bad design through unit testing your classes.

    • @cristianotroy3675
      @cristianotroy3675 3 года назад

      sorry to be offtopic but does anyone know of a way to log back into an instagram account??
      I somehow forgot the password. I love any tricks you can give me.

    • @nicotristan6119
      @nicotristan6119 3 года назад

      @Cristiano Troy instablaster =)

    • @cristianotroy3675
      @cristianotroy3675 3 года назад

      @Nico Tristan i really appreciate your reply. I got to the site on google and Im trying it out atm.
      Seems to take quite some time so I will reply here later with my results.

    • @cristianotroy3675
      @cristianotroy3675 3 года назад

      @Nico Tristan It did the trick and I actually got access to my account again. Im so happy:D
      Thanks so much you saved my account :D

    • @nicotristan6119
      @nicotristan6119 3 года назад

      @Cristiano Troy No problem xD

  • @WizardOfTheHills
    @WizardOfTheHills 7 лет назад +3

    Excellent talk. I use dependency injection a lot, and I do mean a lot. I know the feeling of working with a bag of parts. My experience is that if you get that feeling, you should treat it as a yellow warning light. Usually it is caused by bad naming, violation of the Liskov substitution principle or violation of the open closed principle.

  • @skykanin
    @skykanin 2 года назад +1

    A lot of these problems are solved by using functional programming. It's telling when Michael says "object orientation done right tends to look a bit like functional programming". In OO you're constantly fighting the paradigm to write testable code by self-imposing a functional style of coding (avoiding the use of state, managing side-effects, avoiding encapsulation, using composition over inheritance). Functional programming makes your code much easier to read, write, refactor and test (concurrency and parallelism is also much helped by FP).

    • @detaaditya6237
      @detaaditya6237 Год назад

      Can you help give me some example where FP is more effective than OOP? I'm really interested about this

  • @AugustoRz
    @AugustoRz 9 лет назад +1

    Thanks for sharing this presentation!

  • @jmore_letters_8773
    @jmore_letters_8773 11 лет назад

    Great video.

  • @edgeeffect
    @edgeeffect 4 месяца назад +1

    In many cases (not all... but many... maybe even most) the need to use a mock in a test AT ALL, is another sign of bad design.

  • @jhbonarius
    @jhbonarius 4 года назад +2

    His example is very trivial. It's a class that has clear components. I'm working with high performance mathematical algorithms. No way my methods are only 20 lines. And chopping them up would create overhead that would greatly impact performance.

    • @purplefishies
      @purplefishies 3 года назад +4

      You are using the wrong tools or methodology then. C++ allows CRTP (and other techniques ) to allow you to break apart complex interactions and code them in incredibly optimal ways all the way down to custom assembly code per Architecture if you so desire.

  • @aschwinwesselius
    @aschwinwesselius 9 лет назад +1

    Flexibility vs Explicit code:
    I hate to see magic methods that obfuscate the logic or sometimes even disrupt the call stack. Very annoying while debugging.
    Currently the closures in PHP are not supported in editors while debugging. So when entering a closure during a step you lose the complete context of the flow/state of the code. Like entering a tunnel without lights.

  • @deviation42
    @deviation42 8 лет назад +13

    Category: Comedy?