I understand the "just get it delivered" pressure on startups, and that they have to beat the competitors (both known and unknown) to market. But I don't buy into the notion that excessive technical debt must be accrued in the first delivery. It's not necessary, because test-driven development (TDD), pair programming, continuous integration (CI) and other "Agile Engineering Practices" (a.k.a. "Scrum Developer Practices" a.k.a. "Extreme Programming (XP) Practices") all provide actual, tangible benefits; and much more quickly than most people expect.
In my developer courses, I often quote the Nagappan Paper:
The results of the case studies indicate that the pre-release defect density of the four products decreased between 40% and 90% relative to similar projects that did not use the TDD practice. Subjectively, the teams experienced a 15–35% increase in initial development time after adopting TDD.
-- research.microsoft.com/en-us/groups/ese/nagappan_tdd.pdf, Nagappan et al, © Springer Science + Business Media, LLC 2008If I were seeing my fellow investors get that kind of return on investment, I'd want to get in too. And early!
Of course, the choice of whether to take on technical debt or to "pay as you go" by adopting these practices from the start would depend on how long it takes for the practices to pay for themselves. (And, yes, of course each has a cost.)
My friend and colleague, Arlo Belshee, and I were having a conversation about Agile transitions. Arlo, like myself, is an old XP aficionado (at least, as far as I can tell...sometimes Arlo is hard to read), and we've both had amazing successes and wonderful experiences on full-blown XP teams. I must have asked him which practices he would suggest the team implement first, assuming they needed to pick up these practices gradually. He chose continuous integration and pair-programming.
I was a little surprised he didn't include TDD, because TDD resolves so many root causes of trouble on Agile teams. But his explanation won me over: These two practices immediately provide very fast feedback loops and high-bandwidth communication for the team.
By emphasizing "immediately" I'm suggesting that these practices pay for themselves right away, so avoiding them because they appear costly is a poor bet.
In my own experience, TDD also starts to pay dividends almost immediately. Even within my 3-day TDD course, many developers report that a single microtest caught something they could not have foreseen. Software development has become too complex an endeavor to ignore the benefits of a comprehensive safety-net of unit-tests: It has eroded the Amazing Predictive Powers of most programmers.
One client who put all developers through the TDD course reported, after only about 4-6 months, that their latest release was the least defective release they had delivered in many years. One developer said that a single trivial unit test had saved him from including a defect that would have crippled one high-end (i.e., $$$$) client, and he felt that disciplined TDD had likely saved him his job.
And by reflecting upon merely two of my own longer-term product development efforts that utilized XP, I can think of three cases where TDD+pairing+CI saved or made the organization a significant amount of money (at least $ 1/2 mil/year). Due to the malleability and maintainability of the software, our teams were able to accept a surprising, radical "mini Black Swan" user-story which:
- Opened up an entirely new market in a non-English-speaking country.
- Allowed doctors to more efficiently use our emergency-oriented software in their routine, day-to-day operations.
- Allowed a handful of highly-paid specialists to regain over 60% of their work-week that was previously spent manually transforming and re-entering patient data.
If these disciplines reap benefits after such short periods of time, then the accrual of technical debt is only appropriate where the product can be written "in a garage" in a matter of days, and an upgrade will never be necessary. Such products may exist, and they may even be quite useful and profitable (e.g., perhaps a smart-phone app). I've never been involved in such a product's development, obviously because there would be no need for my kind of training and coaching. But if I were called in to help develop one of these from scratch, would I still begin with good Agile engineering practices? Yes! Because I do not know what the future holds for that product, and I'd want to build in quality and maintainability, just in case we had built The Next Big Thing.