Lean methodology values employing minimal effort to get to the next milestone. Lean principles have a short-term focus to test hypotheses, which is quite rational considering that once a hypothesis is disproven you haven’t wasted any time in further wasted effort. Customer development methodologies also encourage similar principles, ensuring a deep understanding of the customer and the market before embarking on the development of an expensive product that nobody wants to buy. These lean principles and culture will work great in optimizing the path to get initial traction, but could wreak havoc on further development of the product causing avoidable risks down the line.
Creating technical debt through minimizing waste
Specifically in software development, lean product development can result in significant technical debt. To be sure, technical debt refers to the costs associated with hasty software development resulting in neglecting architecture, incomplete testing, and incomplete documentation. Subsequently, once a product has accumulated technical debt, further development work contains interest payments on this debt in the form of building on code that still needs further work to truly be complete. In the future, this debt can be paid off through rewriting the code in the right architecture as intended, completing all the testing necessary, and completing documentation. Acquiring technical debt, in fact, is often a direct result from applying lean principles, since activities that do not add immediate value to achieving the next milestone in a product release should be considered waste.
Vicious cycles of technical debt
The issue of technical debt accumulation is further compounded by the fact that once technical debt has been accumulated, cost-benefit analysis will often show that paying off the debt creates value in the long term, but destroys value in the short term – thus a bad decision if you are choosing the most efficient lean path to the next milestone. This vicious cycle of technical debt accumulation can result in large amounts of increasing debt overhang, causing significant amounts of interest payments that significantly hinder and potentially stall further development. The vicious technical debt cycle is analogous to taking out increasingly higher rate credit cards to pay off previous debt accumulated; you keep buying yourself a short term lifeline at an increasingly higher long term penalty.
Symptoms of technical debt are hard to identify
While a great developer with intricate knowledge of the code can provide a decent estimate of technical debt, this debt is often hidden and unknown to higher management. The symptoms of technical debt are very hard to identify. A development cycle with large technical debt interest payments results in development delays that often can’t be attributed to anything in specific, typically unfairly blamed on the miscalculation of estimated development timelines. Subsequent decisions made based on a misunderstanding of technical debt situations can lead a startup astray – resulting in anything from slight misallocation of resources to cutting off potentially profitable product lines. In situations where technical debt is the root cause of development delays, misinterpretation by management can result in severely misguided decisions.
How to really stay lean
Using lean methodology as a guide, product development timelines and decisions should be made balancing the optimal short term solutions with an awareness of the long term consequences. There is nothing wrong with accumulating technical debt, in fact similar to financial situations, acquiring some debt to attain certain milestones more quickly can certainly result in value creation. But be mindful of the longer term risks involved and addicting qualities of debt, a vicious cycle of technical debt can create a house of cards that will sooner or later come crashing down. Early investments in good software architecture, testing, and documentation create higher cost and minimal benefit in the short term, but can pay huge dividends in the long term.
Some tips on how to avoid acquiring mountains of technical debt in a lean startup:
- Ensure management has a clear understanding of the level of technical debt
- Balance the short term needs for technical debt creation, with the longer term benefits of paying it off
- Understand the large shadow cast on software development by architecture, testing, and documentation
Response to comment below by Tristan
Tristan,
Thanks for the feedback – let me further explain and clarify how I’m thinking about the topic, hopefully the following addresses your concerns.
Also, while I am an MBA student, in full disclosure – I have two engineering degrees and worked in technical product development in entrepreneurial environments for over four years.
You correctly assert that there are many unknowns in the early stages of a startup. At the extreme, when everything is unknown, you are right in stating that the best architecture cannot be known. Lean startups are however all about focus on turning these unknowns into known facts as quickly as possible as you iterate from customer feedback. Thus, I would argue that the unknowns should be quickly diminishing over time, especially in the early stages of a very lean hypothesis driven startup. Secondly, many of the unknowns in startups are in fact “known unknowns” vs. “unknown unknowns”. Known unknowns are ones that can be prepared for (unlike unknown unknowns) and taken into account in the architecture to ensure flexibility as necessary. Lastly, even in the case where you have many unknowns there is still a big difference between “quick and dirty” coding to get the job done and code that has been well architected upon which it is easy to build and iterate further. Regardless of a complete understanding of where the product is going, there are still significant architectural features that can be made within the code to allow for faster feature creation and iterative improvement.
With respect to testing and documentation, in both cases the threshold for what is required to do a good job is significantly beyond that required to develop code that works. If there is significant pressure to release early and often, which there should be in a lean startup, the necessity of doing a decent job on testing and documentation the first time around is low while the pressure to release is very high. As hypotheses become validated and the code base becomes more mature, the technical debt created in obsolete code is naturally eliminated, but the technical debt in the code base needs to be evaluated to be paid off to increase developer efficiency going forward.
My perception is that complete code rewrites are much more uncommon than you assert, and the decision to completely rewrite 2.0 could spell complete disaster for startups. The list of things that can go wrong is extensive: Chad Fowler states rewrites take longer, are harder, and more failure-prone than expected. Jamie Zawinski’s experience should give you pause before rewriting. David Hansson says its experience rarely a good idea and often ends in failure. Joel Spolsky says its the single worst strategic mistake that any software company can make. Steve Blank says its startup suicide. I rest my case.
I am not proposing development of a “perfect architecture” like you mention, rather a more reasonable balanced approach to consider both the short term and long term impact of decisions to pay off the technical debt or carry it forward. The more conversations management has with the engineering team, the better these issues can be surfaced and resolved. Technical people certainly should have the best insight on measuring the quantity of debt, but I disagree with the notion that the decision on what to do should lie purely in the hands of the technical team. The amount of technical debt carried forward at key decision points concerns all areas of the organization and the final decision to pay it off or carry it forward should be made taking all stakeholders into account at the higher management level, in the case of early stage startups, probably the CEO.
Best,
Joris
Excellent information - this is something that all companies, but especially start-ups need to keep in mind. Companies need to decide up front what development methodologies and approaches they will follow. As you mentioned, there are times that these have to be compromised for the sake of a milestone but it has to be done with the understanding it is an exception and will not become the rule. There are so many studies on the cost of fixing problems as opposed to preventing them (the former of course far exceeding the latter). These exceptional cases of breaking the rules have to be weighed against the long term cost associated with the problems it might cause.
ReplyDeleteJoris,
ReplyDeleteI appreciate the sentiment and when I was also an MBA student I also held this belief. I even held it through a few years as a product manager. But I think the way you are phrasing things is leading to a fundamental error in your logic.
"Early investments in good software architecture, testing, and documentation create higher cost and minimal benefit in the short term, but can pay huge dividends in the long term."
This is certainly true IF the requirements are known and your argument would be 100% valid. But the whole point of lean startup is that the requirements are UNKNOWN.
Therefore, the best architecture for the solutions is also UNKNOWN.
I'll grant you that investment in testing is worth investing in, but you're talking as if testing wasn't a fundamental part of Agile software development and Lean Tech Startup Methodology. Um... it is. You write the test before you write a line of code. So you're incorrectly assuming that lean startups avoid testing.
I'd also grant you documentation is worth investing in as well, but I'm uncertain if you're talking about a long tech spec or just well commented code.
So you're still correct that a lean startup is going incur technical debt, but you're not comparing it to the level of technical debt you're going to incur regardless of how much effort the engineering team spends trying in vain to predict the perfect architecture for unpredictable changes in requirements which will almost certainly necessitate a major overhaul of the code base.
Please go survey some engineers who have driven products from 0 to 1.0 and see how many had to completely rewrite 2.0 regardless of what methodology they used. If you find a high correlation between lean startup / agile development and relatively increased levels of technical debt, I will gladly admit that I'm way off base, apologize, fly over to Boston and hand you $500 in front of your class.
Overall, it seems very much like you're talking from a big company perspective where the "management" doesn't know what the technical guys are doing but yet the management is making decisions on how much time to invest in reducing the debt. That's just a bad manager.
If in an early stage tech startup the management isn't talking to the engineers on a daily basis and have a very good understanding of the technical debt, then the management has no business making decisions about how much time should be allocated to reducing the technical debt. That decision needs to be left to people with insight into the problem....in this case, the technical guys.
Cheers,
Tristan
For Joris's response to Tristan's comment, please see addendum to the main post above.
ReplyDeleteHi Joris,
ReplyDeleteYour updated comments are certainly clearer and I'm much more in agreement with. I suspect we agree on most issues.
I think my big problem with your post is that I feel you are (perhaps unintentionally?) misrepresenting lean startup to strongly imply that it almost invariably results in high levels of technical debt or that lean always favors short term at the detriment of long term.
As you state, once the route to the long term vision becomes clearer, a lot more work can be done in terms of reducing tech debt and preparing for the future. That's very much the shift from being a lean startup to becoming a scalable enterprise (although hopefully still lean.)
There's nothing that I read into the principles of cusdev or lean that implies shooting yourself in the foot over scrambling for the next dollar. Rather I understand it as a way to better refine a grand vision into a executable action plan while reducing both waste and risks.
If there is such a doctrine, then I will certainly object to it as strongly as I did your original post and would appreciate any links to it.
re: 2.0 rewrites
Agreed, it's a terrible idea in most cases. But uncommon? I think suicide by rewrite is actually quite common, but perhaps it's only a perception from my vantage point. Would be happy to see some real data there.
My point in that case is not that rewriting is a good idea, just that agile / lean doesn't necessarily result in more technical debt than a well thought-out but unvalidated plan.
re: biz guys making decisions
I suspect we agree here. I am not suggesting such decisions should always be done by the tech team, but that if the CEO is ignorant of the issues (as you state "debt is often hidden and unknown to higher management") then the CEO is not in a position to make such a decision. I strongly support the CEO having an understanding of what's going on, particularly in a startup.
Cheers,
Tristan
Joris,
ReplyDeleteI found this issue of technical debt very interesting… Just a few thoughts:
•I believe that a startup should be more worried about technical debt whenever they decide to scale aggressively (ie. after having achieved product market fit and validated the scalability of the sales model). It’s at that point when they should think of documentation, architecture, and processes, and balance the trade-offs of their decisions. In the very early stages of product development, as Tristan was suggesting, there are too many “unknowns” for the startup to consider, and a quick and dirty approach, although not ideal, could be fine. It’s on the pre-launch version when you really need to think whether to rewrite everything from scratch and reshape your product in light of the evidence gathered in the product-market fit phase.
•A different case could be made for products with strong viral effects (either spurred by network effects, company reward/incentives, or word of mouth). It could be argued that as these products have unpredictable exponential growth it would make sense to start thinking of technical debt from the very beginning. Well, this could be true, although a) ideally a startup should have control of when to scale aggressively (and unleash the viral effect) no matter how viral the product is, and b) everyone aspires to achieve virality but very few products materialize it, so why should we worry about something that hasn’t happened yet? Besides, having viral acceptance would be the best of all possible problems a startup can have.
•In your tips on how to avoid acquiring technical debt I would add 2 more:
I)Modularity – The smaller you building blocks are, the more flexibility you would have to adapt for new architectural changes. Modularity of the product would give you a bigger range of possibilities to remove/add features without having to change the whole (think of Ikea products)
II)Configuration – This is something very enlightening that came up in class when discussing about OPOWER. If we think of standardization and customization as the 2 extremes of a “product continuum”, the more we customize our product, the more we would incur in technical debt. However, an alternative way to provide the benefits of customization is through configuration – ie. An API would allow customers to build on the top of your product for their own needs. Hence, keep the “configurability” of your product in mind when thinking of ways to avoid acquiring technical debt.
Joris: Your exchange with Tristan convinces me this is the issue of rewrites by lean startups warrants more study. It’d be interesting to compare the approaches to managing technical debt used in startups where senior engineers have experience in big companies with the performance consequences of debt (as well as tactics for avoiding it or ‘paying it down’). Hypothesis: once burned, twice shy.
ReplyDelete