Added: 3 years ago
From: GoogleTechTalks
Views: 64,220
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (26)

Sign In or Sign Up now to post a comment!
  • I absolutely loved this talk.. Keeping seems in mind from now on!

  • Excellent talk. Very concise and intuitive examples.

  • Monkey patching is also bad because in order to do it you must know some of a units implementation in order to patch the correct things. With dependency injection it becomes part of the interface. This way tests wont break when you change implementation.

  • Jesus... Is it from Google?

  • Building a car, you need a facade, users doesnt have to know how car works. So we implement the facade yes?

    Likewise while testing, you can plug the tests to a facade and you can test it, you ll find out where it fails.

  • code quickly becomes hard to test if it is written .... _before_ the unit tests ;)

  • brilliant talk...just loved the fact that the talk was very precise and also appreciate the speaker's attitude in accepting the opinions from viewers...

  • Is he a googler. ? I doubt tat ...Yes he has some valid points ..But for a googler his presentation is all over the place.. For example, Static methods are hard to Test ?. As we know we write helper class with static methods.. Is it hard to test the class ? no not really.... It shoud be static methods are hard to mock.. The class which consumes static methods has no way to mock that particular method.. ? Should we write helper classes with static methods then?Thats a huge topic for discussion.

  • Comment removed

  • He makes some excellent points, but at the same time he makes it sound like there is nothing to say about writing unit tests. That isn't true. Tests should be short, clear and focused. They should mock out dependencies and test one thing at a time. Otherwise you don't know where to look when they fail. Writing good tests doesn't happen automatically by writing testable code and writing the tests first. It takes practice and thought.

  • Some great information. I like that you talk about things that aren't emphasized in school.

  • that was great!

  • when he mentioned about the evil of global state, i almost instatly thought of NWO.. :))

    I think that's an analogy for the human anthropological level, and it's definitely untestable :P

  • Great video!

  • Great talk as for me. Just don't understand why there is no people in the end. Is this staff so obvious for Google guys?

  • Comment removed

  • great talk!

  • Keep the good Talks !

  • This should be part of some kind of "Google academy for software developers"

    A kind of virtual course for student with, and without, CS (or related) degrees.

  • Excellent, very insightful. I've been enjoying Misko's essays for a while now.

    However, in dynamic languages, I don't think it is true that static method calls cannot form a seam for testing. In Python, for example, a static method can be patched out temporarily on either the current module, or another module, for the duration of the test. We use this technique at my work all the time for testing.

  • I love these Clean Code Talks with Misko too, he's resolved a lot of issues for me.

    View the latest one for examples of why static methods, global state and singletons make bad seams and make code harder to test. Even when you can mock the state, its an indication that something else depends on it, that tests have to be run in a specific order, and lots of other issues. It's enlightening.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more