YouTube home Comedy Week on YouTube
Upload

Design Tech Talk Series Presents: OO Design for Testability

GoogleTechTalks GoogleTechTalks·1,782 videos
148,013
36,600
Like     Dislike 1

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like GoogleTechTalks's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike GoogleTechTalks's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add GoogleTechTalks's video to your playlist.

Uploaded on Oct 7, 2009

Google Tech Talk
October 6, 2009

ABSTRACT

Presented by Miško Hevery.

We design our code for performance, maintenance, simplicity, extensibility and other goals, but most of us do not think about testability as a design goal, yet verifying the correctness of our code is of great importance. What does it mean to have testable code, and what kind of trade offs does one have to think about when designing for testability. Turns out that testable code is well designed code, and it has many of the characteristics we search for such as low cohesion, separation of concerns, proper encapsulation and many others.

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Top Comments

  • neohubris

    Misko thank you very much for doing these talks. Your clean code talks has helped my work tremendously.

    · 19

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate neohubris's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate neohubris's comment.
  • Pablo Pera

    Great talk!

    · 12

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Pablo Pera's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Pablo Pera's comment.

All Comments (27)

Sign in now to post a comment!
  • Roberto Guerra

    That is not the Law of Demeter. It is about types not dots.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Roberto Guerra's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Roberto Guerra's comment.
  • Sumit Vyas

    Awesome... For the 20 arguments problem the solution suggested is following SRP. Single Responsibility Principle takes care of simplifying the Object graph and code simplification.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Sumit Vyas's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Sumit Vyas's comment.
  • ericcartmansh

    at 23:04 wouldn't it make more sense to have the unit test create the Engine instance fakeEngine with getEngine() and pass in the engine factory and the model? Or is the call to getEngine assumed to be happening in the constructor of the Engine class?

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ericcartmansh's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ericcartmansh's comment.
  • Christian B

    I've seen some videos from Miško Hevery. This helped me alot moving to the right direction.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Christian B's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Christian B's comment.
  • vaulttech

    I've searched for the other 3 talks (since this is the fourh) but I couldn't find them. Can someone please give me the link?

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate vaulttech's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate vaulttech's comment.
  • Grim Leaper

    I meant LoginPage, sorry.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Grim Leaper's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Grim Leaper's comment.
    in reply to Grim Leaper (Show the comment)
  • Grim Leaper

    Well I think he refered to the latter case as "the class with singleton lifetime" and not a singleton (I noticed this ambiguity only when he talked about the Login_class). And he did not say it was problematic to test because it had singleton lifetime, he said it was problematic owing to it's dependencies, and therefore that particular class might have been better as short-lived class with different dependencies, that wouldn't force it to break the law of Demeter.Am I getting it right?

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Grim Leaper's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Grim Leaper's comment.
    in reply to Erick Dovale (Show the comment)
  • Erick Dovale

    Very nice talk. A bit ambiguous with the term singleton. There is the singleton pattern as described in the Gof4 book which is the one that is problematic to test and there is the single instance of a class throughout the life of the application. There is nothing wrong with the latter IMO.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Erick Dovale's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Erick Dovale's comment.
  • Sai Gudigundla

    Thanks for the great presentation. 

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Sai Gudigundla's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Sai Gudigundla's comment.
  • pereznels

    Awesome presentation!

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate pereznels's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate pereznels's comment.
  • Loading comment...
Loading...
Loading...
Working...
Sign in to add this to Watch Later