“Motion != Progress” – Code moves in 5 different ways…

November 15, 2012

Week #4 of the SEP Blog Battle 2012.

SEP Blog Battle 2012

This week our title was “Motion is not Progress”.  If you are making changes to your source code, then clearly your are making progress.  Right?

Wrong.

Code can move in 5 different ways – you can add functionality, remove functionality, refactor code, delete code, or leave the code alone.

Of these 5 ways, only 2 of them can make progress.  Adding functionality and removing functionality (think – removing defects, or poorly designed features, or making room on a small footprint) both can make progress.

The other 3 ways are simply motion, and not actually progress.  Let’s take a look at these in detail…

Leave the code alone:
Have you ever added tests (unit tests , TDD tests, etc.) that didn’t actually drive any changes to your code?  I mean, you did stuff but you didn’t actually make any progress.

Delete code:
If you find yourself deleting code…you are likely removing code that wasn’t used (dead code, over engineered designs, etc.).  Not only was the original code not helping you make progress, now you’re spending even more time removing that wasted code…which does not help you make progress.

Refactor Code:
There is no denying that refactoring code has benefits.  Those benefits have a diminishing return, though.  If you are continually refactoring the same code over and over, you’re not removing debt nor are you making the code more habitable.  Instead, you’re simply moving laterally (over and over again).  You still aren’t making progress.

Our clients don’t pay us for making motion…they pay us for making progress.  Keep that in mind when you design your next feature, and try to keep it minimal so that you can focus on making progress, because motion != progress!