-
Recent Posts
Recent Comments
- gunasekaran sambandhan on PTOM: The Decorator Pattern
- NK Sharma on Refactoring Day 3 : Pull Up Method
- Efim Zabarsky on 31 Days of Refactoring
- Slawek Ludwiczak on Refactoring Day 8 : Replace Inheritance with Delegation
- Maxi on Refactoring Day 13 : Extract Method Object
Archives
Categories
Meta
Author Archives: Sean Chambers
Refactoring Day 28 : Rename boolean method
Today’s refactoring doesn’t necessarily come from Fowlers refactoring catalog. If anyone knows where this “refactoring” actually comes from, please let me know. Granted, this could be viewed as not being a refactoring as the methods are actually changing, but this … Continue reading
Posted in Uncategorized
3 Comments
Refactoring Day 27 : Remove God Classes
Often with legacy code bases I will often come across classes that are clear SRP violations. Often these classes will be suffixed with either “Utils” or “Manager”. Sometimes they don’t have this indication and are just classes with multiple grouped … Continue reading
Posted in Uncategorized
4 Comments
Refactoring Day 26 : Remove Double Negative
Today’s refactoring comes from Fowler’s refactoring catalog and can be found here. This refactoring is pretty simple to implement although I find it in many codebases that severely hurts readability and almost always conveys incorrect intent. This type of code … Continue reading
Posted in Uncategorized
13 Comments
Refactoring Day 25 : Introduce Design By Contract checks
Design By Contract or DBC defines that methods should have defined input and output verifications. Therefore, you can be sure you are always working with a usable set of data in all methods and everything is behaving as expected. If … Continue reading
Posted in Uncategorized
5 Comments
Refactoring Day 24 : Remove Arrowhead Antipattern
Today’s refactoring is based on the c2 wiki entry and can be found here. Los Techies own Chris Missal also did a very informative post on the antipattern that you can find here. Simply put, the arrowhead antipattern is when … Continue reading
Posted in Uncategorized
7 Comments
Refactoring Day 23 : Introduce Parameter Object
This refactoring comes from Fowler’s refactoring catalog and can be found here Sometimes when working with a method that needs several parameters it becomes difficult to read the method signature because of five or more parameters being passed to the … Continue reading
Posted in Uncategorized
3 Comments
Refactoring Day 22 : Break Method
Today’s refactoring didn’t really come from any one source. It just named it although someone else may have something similar that’s named differently. If you know of anyone that has a name for this other than Break Method, please let … Continue reading
Posted in Uncategorized
2 Comments
Refactoring Day 21 : Collapse Hierarchy
Todays refactoring comes from Martin Fowlers catalog of patterns. You can find this refactoring in his catalog here Yesterday we looked at extracting a subclass for moving responsibilities down if they are not needed across the board. A Collapse Hierarchy … Continue reading
Posted in Uncategorized
Leave a comment
Refactoring Day 20 : Extract Subclass
Todays refactoring comes from Martin Fowlers catalog of patterns. You can find this refactoring in his catalog here This refactoring is useful when you have methods on a base class that are not shared amongst all classes and needs to … Continue reading
Posted in Uncategorized
Leave a comment
Refactoring Day 19 : Extract Factory Class
Todays refactoring was first coined by the GangOfFour and has many resources on the web that have different usages of this pattern. Two different aims of the factory pattern can be found on the GoF website here and here. Often … Continue reading
Posted in Uncategorized
1 Comment
