Does your code keep you drowning in technical debt?

« »

All of us would prefer to work on code that we love. And all of us are faced with code code that we feel…well, not so warm and fuzzy about. Its the nature of our business.

Legacy code is everywhere. From code that’s just been around a long time to code that was rushed to completion years and years ago and never fixed, we all have to deal with things that are imperfect and challenging to deal with.

It cal feel overwhelming. It can make us want to scrap things altogether and start over. But starting over is almost always a death knell for a project. There are simpler, easier, and more straightforward ways that we can fix large, complex, difficult projects.

Things you can do today.

The tortoise and the hare

Remember that story from childhood? The one about the tortoise and the hare?

The race was set, and the tortoise and the hare begin their respective race to the finish line. The hare, feeling confident, decides to take a nap in the middle of the course. But when he awakens, he discovers that the tortoise has crossed the finish line first.

But what does this have to do with software development?

Small wins make the difference

Sometimes we feel like working on code is impossible. We want a quick solution (like the hare). We want to just throw it away and start over.

But it’s not big wins that makes success. It’s the small ones. It’s the function we rewrite today. It’s the algorithm we simplify tomorrow. Pretty soon, with enough small wins, things begin to change.

The expression, “slow and steady wins the race” applies in software development as much as in life.

So what can you do?

Start today with something overly complex and make it simpler.

Take a function, an algorithm, a complex bit of code and make it simpler, better, more modular. Apply today’s best practices to the code, even if you don’t think it will make much of a difference.

And do the same thing the next day. And the day after that.

Pretty soon, you’ll begin to realize major rewards from minor efforts. And, you’ll also reach a point where major structural changes will both be possible and reasonable – and, if you’ve done your job right, not all that hard.

Slow and steady wins the software race.

Like these kinds of articles? This is a small sample of what I send to my newsletter list each and every week. Sign up below to get weekly tips like this, delivered straight to your inbox!

Sign up now for weekly tips!

* indicates required

Brandon Savage is the author of Mastering Object Oriented PHP and Practical Design Patterns in PHP

Posted on 4/23/2013 at 7:00 am
Categories: Clean Code, Refactoring, Best Practices, PHP

There are currently no comments.

« »

Copyright © 2023 by Brandon Savage. All rights reserved.