Clear comparisons
Posted by Andres on March 23rd, 2006One of my absolute favourite communicative refactoring is extracting a comparison to a method. Let me give you an example: [csharp]if (activity.GetChanges() != null)[/csharp] Instead, you could write: [csharp]if (HasChanged(activity))[/csharp] This gives me a couple of benefits. First, I don’t have to remember that activity has a GetChanges method that returns null when nothing has [...]