On my most recent project I have learned a very humbling, yet very useful lesson. Never fall in love with your code, or it will be too hard to let go.
In the Agile world, your code needs to adapt to changing requirements and the introduction of new features. When this happens, it just might be time to send that code you are so in love with off packing. If you cling to your code, or your design, you will not be so ready to do away with it…even when you should.
I learned this lesson the hard way. I had a design I was proud of. It was quite a masterpiece of abstractions an cleanly separated, reusable code. I had worked on the design and massaged it for over a year before we brought a new team of coders in to add some new features. At this point, I was the only one who understood the code…and rightly so since I had designed it. The problem was, it was so complex that others had a hard time grasping it. During a design meeting, we were discussing flattening out the system and removing a lot of the abstraction. I was strongly opposed to this since it would do away with some of the reusability I had designed in. I was outnumbered 3 to 1 in this debate, so I paused and sat staring blankly at the wall.
Let me pause here and back up to get some external context on my mindset at the time. My small bible study group had been studying the book of James, and I had been praying for humility. I had felt pride welling up in me and didn’t want to let it get the best of me so I asked to be humbled. This was only a day or so prior to this story…
So as I stared at the wall, I realized what was happening, and decided to be “easily entreated” and submitted to the requests of the group. I really didn’t want to, at the time, but I did. We removed the unnecessary abstractions and complexity.
Now it is over a month later, and I must say that it was the best decision for the project. I was humbled, and let go of my code. Now the system is much easier to work with. I understand it better than I had before, what’s more…so does everyone else! Our project is making better progress than it ever has, and it is still reusable.
I was hanging on to code that added no value to the customer, but only added to my pride. Now we are all much happier, and the code is much simpler.
Next time you are faced with a situation and find yourself clinging to your design, ask yourself why. Then allow yourself to be humbled…just let go…change happens.
-=CE=-