pressing the confetti button @tuple previously senior software engineer @autodesk
It's easy for technical debt and temporary hacks to grow in our codebase, and it's hard to make time to clean up! We all have horror stories about 6,000+ line files, or totally out of date READMEs, and we make plans to deal with these issues but somehow they never get prioritized. As time goes on, cruft grows, and tasks become so overwhelming that we never want to tackle them.
Use tiny wins
We have internal reward systems that can make us feel happy when we accomplish a goal. These positive feelings motivate us to take on more tasks. However, when a task is too large or frustrating, we can feel discouraged and lose motivation.
The key to avoiding getting discouraged is to start with smaller, more easily accomplishable tasks. Once we complete these wins, we are rewarded with that happy feeling and are more willing to take on new challenges. Using this tiny wins strategy, we can more easily develop a habit. And so, by fixing a smaller issue a day, we will never have to face overwhelming debt again!
Use the power of community
Invite a friend or co-worker to build their own code quality habit alongside you. We are much more likely to commit to a new habit if we have the support and encouragement of our peers. Their energy can give you that boost you might need to perform your task on a day you otherwise might slack off.
Commit to the habit publicly. Tweet about your intentions, or let co-workers know about your wins at stand-ups. A daily check-in or update will help you stick with it. We are much more likely to perform actions if we declare them out loud.
Use a timebox
It can be overwhelming to start a new habit because it's scary to commit to doing something forever. Instead of taking on infinity, set an initial short term period to commit to. Accomplishing a goal a day for a few weeks will help you get into the habit. Make sure to celebrate when you complete the time period!
30 days is a good amount of time to get a habit started. Invite a co-participant to join you, and let your community know your intentions.
I recommend creating a recurring calendar entry right now. Set it for 20 minutes, M-F, right when you usually begin work. Blocking your schedule in this way makes it less likely that you'll get interrupted, and more likely that you will stay committed.
Start with the easiest win you can think of. If a task would take more than 20 minutes, don't do it. Use the time to accomplish the task of breaking out a few 20-minute sub-tasks for future days.
A few examples to get you going:
Need extra motivation or more examples?
Join the free 30-Day code quality challenge to get one daily challenge for you to tackle and a forum of other participants to encourage you. It is programming language agnostic and open to anyone.
I signed up for a previous cohort and found it very useful. (Full disclosure I am running the next cohort that starts February 1st)
Create your free account to unlock your custom reading experience.