Category Archives: Refactoring

Refactoring Could’ve Saved the Day

November 2nd, 2007
Posted in Refactoring | No Comments

I have ran into a few snags while trying to update parts of my code that depended on other peoples’ code. Other people updated the interface of their modules, and I needed to update the way my module interacted with theirs. Being slightly optimistic and feeling a bit of schedule pressure, a simple identifier substitution […]

Explicitly Redundant

October 12th, 2007
Posted in Refactoring | No Comments

Today, I caught myself doing this: bool f() { bool r; if( x == y ) { r = true; } else { r = false; } return r; } When I really should have written: bool f() { return x == y; } In the actual code I that I was writing, x and […]

Code Refinement

October 11th, 2007
Posted in Refactoring | No Comments

Everyday is an opportunity to learn something new. Today, I learned how to set the tab width for vi (set tabstop=2) while trying to format the picture for this blog entry, for example. Daily learning is a form of personal refinement. Accumulated knowledge allows people to do things better. If the lesson relates to development, […]