Tag Archives: refactoring

Top-Down Test-Driven Development

In Test-Driven Development (TDD), I have a tendency to dive right in at the level of some class that I am sure I’m gonna need for this cool new feature that I’m working on. This has bitten me a few … Continue reading

Posted in Code, Design, process, test | Tagged , , , , , , | Leave a comment

Bowling Again

It’s been a while since I’ve done the bowling game scoring exercise. For those of you who don’t know it, the bowling game (ten-pin) is almost the Hello, world! of TDD. I want to learn Groovy, but I’m going to … Continue reading

Posted in Code, test | Tagged , , , , | Leave a comment

“Refactoring is a law of nature”

Ron Jeffries, one of the three founders of eXtreme Programming, and one of original signatories of the Agile Manifesto states: We must evolve the infrastructure. It’s not a rule, it’s worse. It’s essentially a law of nature. Please read his … Continue reading

Posted in Code, Design | Tagged | Leave a comment

Big Refactoring: Separate Domain from Presentation

In his landmark book Refactoring: Improving the Design of Existing Code, Marting Fowler not only presents a catalog of “regular” refactorings, he also mentions some “big” refactorings. These big refactorings are not described as a series of atomic steps to … Continue reading

Posted in Code, Design | Tagged , , , , , , | Leave a comment

The Law of Demeter

In my previous post I used the Law of Demeter as a motivation for the Hide Delegate refactoring: The Law of Demeter for functions requires that a method M of an object O may only invoke the methods of the … Continue reading

Posted in Code, Design | Tagged | Leave a comment

Automating refactorings

I’m a big fan of both refactoring and automation. It’s no wonder, then, that the support for automated refactoring in Eclipse makes me very happy. I find that it makes me a lot more productive, and I produce better code. … Continue reading

Posted in Code, Design | Tagged , | Leave a comment