Posts Tagged ‘refactoring

refactoring by replacing a temp variable with a query

The ‘Extract Method’ is one of the most common refactorings you will ever do. It is also one you will frequently see implemented on the Refactor tool menu on various IDE’s. What this method basically does is to take a group of related code and convert it to a function with a appropriate name that [...]

As said in the previous post, I’m kick-starting the refactoring series with the ‘Consolidate Conditional Expression’ pattern. Bear in mind that the examples that will be given are deliberately made simple to keep the refactoring ideas in focus. So lets start with our first pattern. Consolidate Conditional Expressions Many times you see a group of [...]

In the coming year I’ll be starting a series on Refactoring. Refactoring is one of those programming ideas besides Design Patterns and Unit Testing which has made an order of magnitude improvement in my productivity. Although refactoring may not be a ‘Silver Bullet’ for your programming woes, it is a good tool to add to [...]