Posts Tagged ‘extract method’
I once knew a programmer who had us all fooled into thinking he was the most organized programmer on the planet. When he left at night, his desk looked like he had never even been to work. When we did code reviews, his code was nicely formatted, there wasn’t a duplicate line of code anywhere.
Aside from the look of his code, he knew his stuff too. And this is back in the day when code editors were only slightly better than notepad… at least compared to today’s tools.
When he left and we started maintaining code he had written we found that only the code he had to show us was pretty. The rest of his code looked like all of our code.
But today, the amount of time it takes to keep your code looking nice is trivial thanks to some macros that Microsoft has built into Visual Studio. One of those macros is the refactoring macro called, “Extract Method.”
What’s it do?