Tuesday, September 16, 2014

Embrace the Joy in Simplifying

Today, I'm dropping about a dozen tables from our database.  The tables are holdovers from a legacy bit of the previous system that were needed as scaffolding to get the new system in place, but are no longer necessary.  They are not used for anything, and the data are not useful in any way or needed for audit.  Then again, they were not really in the way or costing us anything, right?

And yet I feel a great deal of joy getting rid of them.

Thing is, all team members knew that we needed to do this maintenance, and no one disagreed that these appendix-like structures were no longer needed, but getting priority to clean them up was difficult. The general feeling was that the unused code, data structures, etc. weren't really hurting anything.

There's been a good deal of study around clutter and anxiety, and the internet is awash in articles that link the two.  A system that has a lot of old code and data structures is akin to a hoarder's house full of clutter.  It causes anxiety.  And there are very serious parallels between code clutter and home clutter.

So let me be clear: cleaning up your messes is a priority.  You don't generally think about it, but every time you want to go look something up in the database, your eye has to scan over those legacy entities.  There's friction there.  Do a code search for a class?  You find more entries than you need to. There's visual clutter there that takes time to scan.

Yes, you may not use those classes anymore, but they have references to your framework and other classes, right?  If you make a change, there are more changes you have to make to get things to compile, more places you have to make sure you don't make a mistake.

Having all these extra classes and structures lying around creates a death by 1,000 tiny little cuts. Deal with this infinitesimal time waste enough times a day, and it adds up to real time wasted and real productivity impacts.

So clean up your codebase.  Make it a priority to remove outdated structures that are either legacy or the result of overengineering (which I define as ignoring YAGNI).  Minimizing the number of tables, objects, views, whatever in your system makes the system leaner and more easy to deal with.  It minimizes cruft and code clutter and makes future coding easier by reducing friction.

Better still, removing old untested code increases your test coverage metrics for free!

So please take some time and load some of these stories into your backlog today.


No comments:

Post a Comment