Coupling: The factory method

One of the challenges we face with coding is dealing with coupling. Coupling is an important aspect of programming, it tells us how much our code is tangled. When coupling is too high, we can’t easily re-use code. When the coupling is too low it does little. You can measure coupling, there are several metrics […]

Refactoring

In one of my previous posts I blogged about refactoring I did for my hobby project. Robert C Martin has a nice video showing refactoring, using IntelliJ. Watch it here. You can also see why unit testing is so important, as with each change the unit tests are being ran in order to check if […]

Tiny refactorings? Compose Method!

I blogged about tiny refactorings not too long ago. I’ve even added an example showing such a refactoring in my game. I’m reading Refactoring to Patterns, and figured that the refactorings I’ve mentioned have a name; it’s called the Compose Method. In the book it even has its own chapter (Chapter 7 “Simplification”), where it […]