Collection: Real-World Refactoring

October 26th, 2015

As you advance through your career, you experience a lot and learn different ways to code. Today, I show you my collection of real-world refactoring posts.

If you've been a programmer for a long time (10+ years), you start to see some interesting code moving from company to company. This "interesting code" becomes refactored and turns into patterns. Finally, the patterns turn into repeatable segments of code to use throughout your career.

Once you've seen a familiar piece of code, your years of experience tell you that this is a type of Observable pattern or it's a Strategy pattern.

After learning multiple design patterns and as years continue, you become adept at creating combinations of designs patterns like integrating a Builder pattern with a Strategy pattern.

Are you one of these developers?

Every time, you get into one of those coding frenzies, you go into a "code-mode." A "zoning out" where you can't hear anything but your mind telling you how the code is supposed to work.

Everything around you becomes irrelevant and the subconscious stream moving from your mind to your hands cannot move fast enough.

Now, while "Swordfish" was not my favorite movie, it definitely portrayed some of the actions a developer experiences while coding.

[Embedded Link] https://www.youtube.com/watch?v=u1Ds9CeG-VY

When you find out how to do something with code, make it efficient, and make it easy to use, you want to shout from the highest mountain top that you did it. Even do a happy dance like Mr. Jackman, there!

These real-world refactoring techniques aren't mind-blowing, but these techniques use design patterns in their approach.

This post, of course, will be an evolving document of additional real-world refactorings as my career continues.

Enjoy!

Most of these techniques I've learned over time and I hope they help you in your development as well.

If you are interested in learning more about refactoring and learning new patterns, I would recommend viewing the Top 10 Books Every .NET Developer Should Own.

If you have any refactoring techniques that you'd like to share with others, post your comments below.

Other Collections