A key concept for developers to know, “technical debt” is the name given to a series of bad decisions resulting in bad projects and wasted resources.
Like a credit card payment, if the project’s debt—the work left to do before a project is finished—is not repaid in a timely fashion, it will continue accumulating interest. This added debt can make it difficult for projects to move forward.
The concept easily translates into database development issues, which are not vastly different from the challenges faced by other software developers.
Although there are many technological and business factors potentially contributing to technical debt, each and every developer is responsible for his or her share, notedNina Zakharenko in her PyCon 2015 presentation, “Technical Debt: The Code Monster in Your Closet.”
“I cause it. And you.…if you’ve ever written a line of code, you’ve probably created some technical debt,” she stated.
What lessons can database developers apply to prevent accumulating technical debt and creating bad database projects?
Zakharenko advocates starting by fixing rookie mistakes. Clean up existing code, create standards for your team, and apply best practices including refactoring and testing. Another huge mistake is not being able to say “no” to features. Any possible additions need to be carefully deliberated before they are integrated into the code base.
Clean Your Code, Don’t Cut Corners
Even seasoned developers have a hand in the accumulation of technical debt, especially in the face of overly optimistic project delivery estimates. When feeling pressured to deliver, developers can be tempted to cut corners. Zakharenko asked her audience, “How many of you have said, ‘I’ll put it in now and clean it up tomorrow?’” The show of hands included most in the room, based on her response. “Who actually goes in and does that clean up? It’s like five percent of the people in the room.”
Simplicity is good. It enables you and others to understand the project. Unneeded complexity leads to problems.
Technical Debt Leads to Bigger Problems
There’s a canon of problems known as code smells: they are not bugs, but they indicate deeper problems in the project. These problems can include unneeded complexity, a lack of testing, or no documentation. Each one of these issues is bad enough in and of itself, but when considered in aggregate over time, the accumulated technical debt becomes a larger problem pervading the workplace.
At its worst, technical debt is a drag on morale. “Technical debt causes a culture of despair,” said Zakharenko. “’This code base is already a heaping pile of trash. Who’s going to notice if I just place this broken bottle on top and walk away?’ Nobody.”
How do you resolve these types of problems? “First, we don’t point fingers,” she noted. “Technical debt is a team-wide problem. Everybody needs to be a part of the solution. We can work together.…We should have code standards. Write it down and stick with it.”
Resolving technical debt also requires buy-in from management, who will need to understand some time—which varies, depending on the size of the organizations—must be allocated to tackling debt. This investment in time will result in better code and productivity.
As Tori Wieldt, a developer advocate with the firm New Relic, observed:
All of this takes time, so how do you get management to buy into spending the hours needed to reduce Technical Debt? You can try explaining that better code is less error prone, easier to maintain, and easier to add features to. Remind execs that Technical Debt causes frustrated developers, and frustrated developers are more likely to leave the organization. Replacing them is difficult and expensive.
To “pay down” debt, Zakharenko suggests prioritizing projects. Start by working on the greatest pain points. One such approach might be to introduce refactoring with frequent, mandatory testing. A schedule devoting time to debt reduction can help in this process. It will also take individuals committed to checking in code that is in better shape than when they checked it out.
Yes, it can be frustrating to fight Technical Debt. After all, you are trying to clean up months and years of bad practices. But don’t give up.
EPM applications help measure the business performance. This post will help you choose the best EPM solutions for your organization’s needs and objectives.
It’s 2015 and you can now establish totally respectable MS SQL DBA credibility just by mentioning you have been in the game since SQL Server version 9. You may even get the same gasps of shock from some colleagues that used to be reserved for the version 6 veterans.