Life, The Universe, and Everything

Clean Code, Episode 42 part 2

By Robert C. Martin

47 minJul 2016

42!

Don't Panic.

This is part 2 of 2.

Grab your towel and settle in; because this episode is a two parter.

You knew it had to be this way, didn't you. I mean: 42!

Life, The Universe, and Everything.

That's the question we are answering in this two part episode. I've given this a lot of Deep Thought and this episode is the answer. Really. I mean it.

And I'm not going to fall back on the question of the question. No mice. No dolphins. No sperm whales and flower pots. No cat lullabies.

Nope. This time it is right. This time it will work; and no one will have to get nailed to anything. And no Vogons will wreck it all.

The answer: The answer will be given in the first few moments of the video. I promise. And it is the answer. Once you hear it, you'll know it.

The rest of the two part episode will be about how to apply that answer to software. And to do that we're going to look at a lot of code; and a lot of coding and testing techniques.

The focus of all that code will be Ward Cunningham's FIT framework.


Part 1

  1. Segment 1. The Answer.

    Short, sweet, but right.

  2. Segment 2. The phases of matter.

    Our obligatory science lecture discussing why matter (water in particular) exists in three different phases: Solid, Liquid, and Gas.

  3. Segment 3. Code Coverage.

    Do you now how much of your project is covered by tests? Do you know how much should be covered by tests?

  4. Segment 4. Covering Action Fixture.

    A deep dive in which we cover some untested parts of Ward Cunningham's FIT framework with tests.

Part 2

  1. Segment 5. Mutation Testing

    How do you know that the covering tests actually test anything? Here we use the PiTest tool to find parts of the code that are "covered" but aren't actually tested.

  2. Segment 6. Cleaning.

    Now that it's covered, and we know the coverage means something, let's clean it up.

  3. Segment 7. Semantic Stability.

    For software, this is the answer: Tests that truly stabilize the semantic behavior of the system.

  4. Segment 8. Conclusion.

    Tying things up in a pretty bow.