Category Archives: LegacyCode

PTOM: Black-box analysis of legacy applications

It seems like such a great situation, you’ve been tasked with replacing an old legacy system with a shiny new Web 3.0 AJAX-ified replacement.  It’s your chance for the limelight as the knight in shining armor to come charging in … Continue reading 


Speaking at ADNUG tonight

I’m speaking at ADNUG tonight about legacy code: The development landscape is strewn with existing legacy systems.  As these systems continue to generate revenue and provide value, eventually some force will act upon the development team to change those systems.  … Continue reading 

| Leave a comment

PabloTV: Eliminating static dependencies screencast

Nature abhors a vacuum.  It turns out she also abhors static dependencies (I have my sources).  Static dependencies are the modern-day globals, often exposed through classes named “Helper”.  I’ve certainly been guilty of overusing static dependencies in the past, with … Continue reading 

Also posted in BDD, PabloTV, Refactoring, TDD | 13 Comments

Profiling a legacy app

Approaching a legacy application can be a daunting task.  You may or may not have access to the original developers (if they even still work for the company), and the domain experts might not be able to commit to teaching … Continue reading 


Advanced mocking: auto-interaction testing

When dealing with legacy systems or those not designed with specific testability scenarios in mind, you have to test your changes in non-traditional means.  In normal mocking (or test double) scenarios, you have some kind of external dependency that you … Continue reading 

Also posted in TDD, Testing | 3 Comments

Hall of shame

We keep a “Hall of Shame” of WTF-level code snippets to remind us that however bad we might think things get, it could always be worse.  It also serves as a reminder to us that we can’t be complacent with ignorance, … Continue reading 

Also posted in C#, People | 3 Comments

Stop the madness

I’ve been extending a legacy codebase lately to make it a bit more testable, and a few small, bad decisions have slowed my progress immensely.  One decision isn’t bad in and of itself, but a small bad decision multiplied a hundred … Continue reading 

Also posted in Agile, Testing | 3 Comments

A downcasting tragedy

And now, for another tale of legacy code woe, here’s a gut-wrenching tragedy of OCP and downcasting, in five acts. Exposition We have a feature we’re implementing that when the store’s configuration settings allow for a survey link to be shown, … Continue reading 

Also posted in Testing | 2 Comments

Dependency Breaking Techniques: Inline Static Class

Often times I run into a class that has a dependency not on a Singleton, but a static class.  When refactoring away from a Singleton, a common approach is to use Inline Singleton.  With static classes, a slightly different approach … Continue reading 

| Leave a comment

The Legacy Code Dilemma and compiler warnings

This post was originally published here. I hit the Legacy Code Dilemma today while trying to reduce compiler warnings in our solution.  For those that don’t know it, the Legacy Code Dilemma is: I need to fix some legacy code, … Continue reading 

| Leave a comment