Vigilant Software Blog

Obstacles are a productivity killer

Sometimes the simplest obstacles can stop you from doing something right (or doing it at all). The battery in the TV remote is dead — do you get up and change the channel, or do you suddenly develop a fascination with Snuggie infomercials? You would go to the gym, but by the time you get home from work you're too tired to go back out.

Often, these trivial inconveniences are sufficient to stop you in your tracks. Or, even if they don't stop you, they require you to summon some mental energy to overcome them. (As sad as that sounds, it's how our minds work, for the most part. We have a finite amount of willpower to use each day, so consider it a precious resource.)

Rather than force yourself to overcome these obstacles, sometimes you can make a systemic change that eliminates the obstacle altogether. For example, bring your gym clothes to work, and go straight to the gym from work. This way, you've simplified the effort involved in getting to the gym (packing for it in the morning, when you have plenty of energy), and you've changed the system so that success is more likely.

Obstacles in software development

This concept has numerous applications to the area of software development. In fact, I can give you a heuristic to recognize the situation any time it occurs: "ugh!"

If you're in the zone, the development process flows naturally, your work gets done, and you barely notice the passage of time. However, occasionally you hit a step where the flow stops, and you say (mentally or aloud), "ugh!"

This is your red flag; it's where human nature will occasionally cause us to cut corners. Instead of writing proper tests for the new feature, you may just try a few examples by hand and consider that good enough. It's also where you're more likely to make mistakes due to inattention, trying to get through the painful part quickly. Or maybe you'll decide it's a good time to take a break and read reddit.

What can be done? When you have the "ugh" reaction, take a step back and ask why this step is so painful, and how it could be improved (or eliminated if a systemic change can be put in place).

For example, maybe writing tests is harder than it should be. Sometimes it takes 100 lines of setup code before you can get to the point where you can even test your new feature. It may be that you simply have to force yourself to get over that obstacle and write the test anyway.

However, it may also be that you can rearrange your code to be more testable. Why is all that setup code necessary? Can you spend 15 minutes refactoring and make the application significantly easier to test? If you can, you will remove the obstacle not just now, but each time someone needs to work on this chunk of code.

Conclusion

Sometimes trivial obstacles can sap your energy, slow you down, or stop you from doing the right thing. The solution isn't always to bite the bullet and slog your way through. Instead, try to occasionally listen to that little voice that says "ugh" and ask how you can change things and remove the obstruction from your path.

What are the obstacles in your development process?

posted by mike at 8:45AM