Collection: Real-World Refactoring

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.

Written by Jonathan "JD" Danylko • Last Updated: • Develop •

Man staring at a whiteboard with flowchart diagrams.

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.

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.


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

Did you like this content? Show your support by buying me a coffee.

Buy me a coffee  Buy me a coffee
Picture of Jonathan "JD" Danylko

Jonathan Danylko is a web architect and entrepreneur who's been programming for over 25 years. He's developed websites for small, medium, and Fortune 500 companies since 1996.

He currently works at Insight Enterprises as an Principal Software Engineer Architect.

When asked what he likes to do in his spare time, he replies, "I like to write and I like to code. I also like to write about code."

comments powered by Disqus