Quantcast
Channel: silk and spinach » kata
Viewing all articles
Browse latest Browse all 12

extreme refactoring

$
0
0

Lasse points to Peter who points to Brian’s article, in which he turns the dial up to 12 in an extreme refactoring exercise. One of his main objectives was to try to get every method down to one line, while simultaneously removing all types of duplication. He appears to have succeeded, and the resulting code is also arguably more adaptable. I’m not sure that it meets all of my own refactoring metrics though. And as Brian himself points out, a nicer language (such as Ruby) would have made both the process and the resulting code much slicker.

I really enjoy that kind of exercise – must do one here one of these days. In particular I plan to refactor a bunch of code towards a hexagonal architecture, just for fun…



Viewing all articles
Browse latest Browse all 12

Trending Articles