PeepCode – Refactoring (Play by Play)
Just completed the recent episode of peepcode – play-by-play. Nice one again. Many of the topics covered might be what I previously saw somewhere. But, revisiting them with actual examples along with experts thoughts, is very helpful to get better understanding of them.
For example, spending minimum time in “red” testing status is often preached as good practice. In the screencast, test execution is actually repeated in every small code changes. Also, sometimes this step discovers the simple mistakes which itself can be easily fixed at the moment. This kind of actual process provides more confidence in that practice and it leads to the motivation for having more test coverage with fast executing tests.
It also covers some of the concept of programming techniques like the followings.
The basic idea is that at the core of your system use value objects, immutable data, and simple functions that return data then wrap an imperative shell around it.
You should be particularly shy with your data. The strength of OO comes from when you use an object to package up data with its operations. You want to expose as little of that data directly as possible.
I also watched a destroyallsoftware episode – functional-core-imperative-shell. It was a nice one too. It would be a very good advantage to learn from examples rather than just a theory.
Lastly, I didn’t know the following quote mentioned in the screencast (it’s slightly differently mentioned, but it may be this?). It’s a nice one too, again.
As Kent Beck says: “I’m not an excellent programmer, I’m just a good one with excellent habits.”