Archives For Code

Live from Agile 2013

Great session this morning on technical debt, led by Israel Gat. If you haven’t seen him run through this deck I recommend you look for a video. Excerpts below.

Technical Debt Ratio

Technical debt is a monetary value for non-quality in software. When teams look at this they want to figure out what their debt ratio is, similar to when you purchase a house and look at the debt ratio (equity in your house vs the mortgage).

Israel showed off a neat dashboard gadget that listed a products debt ratio, mortgage value in $, work days to paydown the debt and a breakdown by complexity. I need to chase up with him to see what product provided that gadget.

The time a team spends working on technical debt is a missed opportunity to work on features and deliver value to their customer. And, of course, you pay interest on that debt so long as you have it. Technical debt turns code into a liability, not an asset (TD+C<V).

Israel talks of three types portions of the mortgage – the principal, the recurring interest, and the compound interest. Think of the first two as the regular stuff you have with a mortgage. The third one, compound interest, comes into effect primarily when you copy and paste code leading to a multiplicative expansion in the code that needs to be maintained.

Teams can measure technical debt using:

  • Principal – test coverage, code duplication, cyclomatic complexity
  • Recurring Interest – support cases, product maintenance
  • Compounding Interest – growth in Principal over time

Pay Down Technical Debt

Before you start tackling technical debt you should make sure added / updated code is under control. Address the root cause – train the team so they don’t write code with high technical debt in future.

Technical debt is a vicious cycle, the longer we leave it the more we accrue, the slower the process is. Decreasing team velocity and happiness. One approach is to manage software delivery through WIP limits.

Don’t start by paying off legacy debt. Instead, start by training teams to write better code, allowing then to write better new code and also refactor existing code more effectively.

May get more value from focusing on paying down compounding interest first, due to its exponential effect. Then move on to recurring interest. However, you may want to reverse the approach this if the company’s cash flow doesn’t provide a buffer enabling the team to await for a reduction in duplicate code.


Process is just a thing teams and organisations use to deliver code (output). The real value though is the outcome, the value delivered to the customer. If you build up technical debt, you deliver less value to the customer.

Great visual:

process delivers output which delivers outcome


Is it a methodology, a business, or and operational issue?

Remember, technical debt is not the problem, it is a symptom. Find the root cause, which is most often the teams experience and approach to developing software. Sometimes the root cause may be the company trying to do too much work at once, or not allowing the teams to find and maintain a sustainable pace.

Like this? Follow Israel Gat and react on Twitter:

Just a short note to detail how I moved this site (and to Linode. I was a bit annoyed with the poor performance I’ve been getting from the Dreamhost servers, and also from their support team. I can’t blame them though, they gave me exactly what I asked for at a very reasonable price. I’ll continue to use them for DNS hosting.

UPDATE: Even more stinging than the poor performance was learning that Dreamhost now has an option for high performance WordPress. Super, if only it was part of the standard offering and not $20 per month extra per domain. At any rate, that was not available when I made the decision to move. If this is too much for you then consider switching your existing WordPress One-Click Install on Dreamhost to their Optimized WordPress Hosting.

First, just some background on how I came to know that Dreamhost was not performing. I used a combination of Google PageSpeed Tools and to show that there was a lot of room for improvement. The common problem was the time to load the first byte and I learned that this is largely due to the fact that the shared hosting providers write sites to swap (disk) and pause the processes to get more sites on the same piece of hardware. Of course this means that the site is slow to wake back up after a period of inactivity as it has to load from disk and start that process again, leading to the 30 sec times to first byte.

With that in mind, here is how I moved from Dreamhost to Linode for my WordPress sites:

1) Signup for Linode, and choose the 64-bit Debian 7 image

2) Follow the Getting Started guide

3) Add the dotdeb sources

4) Install exim to send email (this is needed to send password reset emails from WordPress)

5) Install php-fpm, nginx, mysql, etc

sudo apt-get install nginx php5-fpm php5-mysql mysql-server

6) Perform a database backup on Dreamhost

(setup SSH access to your Dreamhost account for this if you haven’t done this already)

mysqldump --opt --user=username --password=password --host=yourMySQLHostname dbname > output.sql

7) Set up a MySQL database on your Linode host

8) Restore the DB on the Linode host

mysql -u username -p dbname < ~/output.sql

9) Copy your existing WordPress directory over

You could use SCP for this. I decided to chuck everything into a Bitbucket repo and version the wordpress install should I ever need to rollback (unlikely). It is not great for binary files – like images, videos, etc. – although most of those are hosted elsewhere and it is just the ones included with the WordPress theme.

The following instructions expect that you have created a directory under /srv/www/ for the WordPress installation.

10) Set up the nginx-conf (server block, virtual host equivalent for those familiar with Apache)

I followed the instructions provided by Evan Solomon. Start by copying his config file and making changes relevant to your server and site. Then run

sudo ln -s /srv/www/ /etc/nginx/sites-enabled/

11) Update the DNS records on Dreamhost to point to your Linode machine OR consider CloudFlare for minifying JS & CSS. If you use Cloudflare you’ll be switching your primary and secondary nameservers to them.

12) You’re good to go!

Enjoy this post? React on Twitter:

This is like a hackers guide to levelling up in the software development world. If you don’t know a lot about Agile, software development practices or customer development read through the following books and you’ll be conversational.

User Story Mapping – Jeff Patton

Brilliant approach to collaborating to gain a shared understanding of what a team is trying to achieve – solving customer problems in the most effective manner. Definitely read this.

Business Model Generation – Alexander Osterwalder

The product management team at Atlassian picked this up back in 2010. It won’t take you long to read through this book – the exercises are the key takeaway and you will need to set aside time for those.

Ash Maurya riffed on this and came up with the Lean Canvas which is aimed at entrepreneurs. You can use Confluence to build lean canvas’ too.

The Lean Startup – Eric Ries

I was fortunate enough to interview Eric at Summit 2012. Fascinating stuff to be found in The Lean Startup.

All of Eric’s writing evolved from Steve Blank’s book The Four Steps to the Epiphany, now superseded by The Startup Owner’s Manual. I am yet to read The Startup Owner’s Manual, but I did catch Steve’s keynote at SF Agile – gold!

Switch – Chip & Dan Heath

Get it, read it. One of the earlier books in my Product Management career that helped me understand how to change behaviour. Looking back, reminds me of work by Nir Eyal and Seth Godin.