Sunk Cost

09/11/2025 << back to Debugging Myself

Why do they keep trying? We have all witnessed evidently irrational situations: from feeding coins into a slot machine, to staying in a toxic relationship, or falling for a pyramid scheme. This stubbornness is justified by the time, effort, or money already invested, fueled by the minimal hope that the situation will improve. Although it appears otherwise, there is always some remote chance that luck will change. Faced with this dilemma, the choice is never simple; what is clear to the spectator is not so to the protagonist. It is then that we fall into the gambler’s syndrome, also known as the sunk cost fallacy.

The Irredeemable Code

As a programmer, I have experienced this countless times. Whether due to a development that spiraled out of control or an intentionally ambitious initial refactoring, the critical question always arrives: do we continue, or do we discard the changes completely? But stopping is not quitting; it is recognizing an error and pivoting the strategy. Returning to the starting point, armed with the experience of the failed attempt, is never a loss, but a competitive advantage.

Modern methodologies like LEAN and the "fail fast" motto seek to mitigate the very pain of the sunk cost. If we assume upfront the possibility that things may go wrong and that we will have to return to the beginning, the emotional and temporal cost is minimal. Establishing checkpoints (like the climber anchoring the rope to shorten a potential fall) and proceeding with controlled steps as "experiments" are essential in programming, where complexity can quickly become unmanageable.

The benefit is twofold: it eliminates the fear of "doing" that blocks both novices and veterans. If you know the return is safe, you can risk failing. Therefore, the key decision should never be based on the effort and lines of code invested (the sunk cost), but on an objective evaluation of the remaining work and the future risk: complexity, technical debt, and the potential introduction of bugs. Deciding to discard development is not a weakness; it is maturity and professionalism. Presenting it honestly to the team and the manager will always be welcomed.

The Antiquity Trap

Having worked in several companies, we have all known colleagues, direct reports, or friends who continuously complain about their job situation. The key question is: If things are so bad, why don't they look for another path? The answer is simple: fear of starting from scratch and a hope that borders on the irrational. They cling to the possibility that the boss, who never recognized their effort, will suddenly wake up in a good mood and hand out promotions.

It is true that the situation is complex and decisions are subject to inescapable personal factors (family stability, debts, etc.). But, just as we apply strategies of flexibility and short cycles to our work, we must apply that same strategic vision to our career.

It is essential to define clear objectives and milestones for making rational decisions. If on a road trip from Barcelona to Málaga you know you must pass through Valencia and Granada, you will not drive in circles around Cuenca. The professional equivalent is knowing your personal KPIs of progress: learning, recognition, and impact. Ask yourself: Does my manager trust me more? Do I receive positive feedback? Have raises or promotions been discussed or proposed?

While constantly jumping from company to company is not the best strategy, long-term stagnation without prospects for improvement is the greater risk. The final evaluation is simple: the time and effort invested (the sunk cost) must be irrelevant. What matters is the balance between the future risks and benefits of making a change.

The Zombie Product

Organizations suffer the sunk cost syndrome on a much larger scale. It is natural for companies to invest in new products, seeking to diversify risk. However, when these lines fail, the inertia of the past overrides rationality. The result is the "zombie product": a project that exists like the living dead, consuming resources in plain sight.

This resistance is fed by the myth of perseverance: the inspiring story of those few entrepreneurs who rose against all odds. But this is the survivorship bias: we only hear the (pretty) story of those who succeeded. Thus, unwary leaders keep teams dedicated to sustaining unviable services, parasitizing the profits and talent of other functional business lines.

The blindness of the sunk cost prevents them from asking the key question: Even if the product manages to gain a foothold, will the potential benefit compensate for the future investment? Being the first to market is not the same as being one of hundreds. For example, who would invest their savings today to launch a new cola soft drink? Its potential benefit is zero: it cannot dethrone Coca-Cola or compete on price with private-label brands.

For leadership, the decision is not whether to continue, but whether the future bet has the correct asymmetry. This is where probability meets risk and reward.

Asymmetry: Risk and Reward

If you have €1 left over every week, what is the smartest thing you can do with it? A saver might think of putting it into a piggy bank (€52 annually) or into a fixed-term account to accumulate over €1,000 in 20 years. The result is safe, but the benefit is marginal. If we increase the risk exposure on this small investment, the loss will still be minimal, but the potential benefit skyrockets: we have the option to play the lottery.

Anyone with elemental knowledge of probability knows that winning is almost impossible. Most people who play confirm this. However, the benefit for the winner is immensely greater than the harm of having played and lost. We are sacrificing one coffee a week for the possibility of a million euros, which is a much smaller risk than the one we assume by getting behind the wheel to drive to work and earning infinitely less.

This is the essence of positive asymmetry championed by Nassim Nicholas Taleb in his work. He explains it in greater depth, but the central idea is this: the key is not the probability of success, but the balance between benefit and harm. This concept has changed my perception of risk: without ceasing to be sensible, I have begun to take calculated risks with an intentional asymmetry toward the side of the benefit.

Asymmetry in Software Engineering

When I speak of my work, I do so from the perspective of software engineering. More than a pretentious label, this is a declaration of intent: the pursuit of quality and predictability through a series of guardrails that turn programming into a measurable activity with limited risks. As software engineers, we must always keep risk evaluation and management present in our decision-making.

Since zero risk does not exist, our goal must be to maximize the potential for marginal gain while minimizing the maximum loss. Trying to avoid any risk can be paralyzing; we can face the trolley dilemma where non-action seems the safest choice (at least the one most people choose), preferring to avoid introducing an error into the system. Given this, the approach is to ensure that the cost of an error (the loss) is minimal, while the benefit of a success (the gain) is potentially exponential.

Guardrails: Minimizing Maximum Loss

The practices we use to limit our risk exposure (the "negative tail") function as guardrails that limit the known maximum loss:

  • Automated tests: In exchange for a small investment of time or effort in writing them, we gain the guarantee that a future change will not break key functionalities. This allows us to move fast and experiment without fear of an unpredictable catastrophe.     

  • Feature flags and Canary Deployment: In exchange for a small overhead to manage the flags or the deployment environment, we manage to limit the impact of a failure. This allows testing changes with great positive impact safely.     

Positive Asymmetry: Opportunities in the Day-to-Day

In the day-to-day, the decision to start or continue with a change must be evaluated through asymmetric benefit. Is the risk worth it? Here are some examples:

  • Changing an old and outdated library: While it may not have caused problems yet, we are sitting on a time bomb. The controlled loss (migration hours and possible initial bugs) is an investment that reduces future technical debt, improves security, and grants access to new features exponentially.     

  • Automating a DevOps script or repetitive task: The small overhead of writing the script (controlled loss) can free up hours of tedious work, make our application more scalable, and eliminate the risk of human error in the future.     

  • Experimenting with a bleeding-edge technology: Dedicating a day of work to create a disposable prototype in exchange for the possibility of discovering a solution that multiplies efficiency or unlocks a capability that the competition lacks (exponential gain).     

The Final Contrast: Sunk Cost vs. Asymmetry

The sunk cost makes us cling to the known; for example, having spent so much time on our system makes us dismiss the idea of rewriting a service to optimize performance. However, if we evaluate the possible gain (a few months of work in exchange for a 70% reduction in our endpoints' response times), we will appreciate a clear asymmetry in favor of the benefit.

Conversely, if we start a refactoring (just to change names) and our guardrails (the tests) show that the change poses a massive risk, there is an asymmetry toward the loss that advises discarding the work, even if we have already invested hours in it.

True professional maturity is not avoiding risk, but investing in risks whose maximum loss is always less than their potential marginal gain.

Asymmetric Career Trajectory

There is no need to have a "shark mentality" to care for and plan our professional career. It is a healthy practice both for us as individuals and for our teams and employers. It is normal to reach a point of complacency after years of effort, where we dismiss any alteration that poses a risk of losing what we have achieved. We settle, ignoring the asymmetry of the benefit we could obtain.

First, applying our engineering mindset, we can establish guardrails that allow us to navigate future decisions safely, minimizing the maximum loss:

  • Active and constant networking: Investing time in meetings, events, or maintaining your professional profile on networks in exchange for a safety net should you lose your job. The loss is minimal (time), the gain is a containment network.     

  • Strategic savings (Emergency Fund): Maintaining a healthy economy, without large debts and with sufficient savings to sustain us for 6 months. This sacrifice allows us to pivot without financial pressure in the face of toxic jobs or layoffs.     

  • Skills development: Investing time and effort in improving our main skills, and perhaps some secondary ones, guarantees that we remain valuable and transferable assets in the face of possible changes.

Once the anchoring points are secured, it is time to evaluate the asymmetry in decision-making (low risk, high reward):

  • Negotiating salary: It's an uncomfortable conversation; we run the risk of rejection and exposure (laying our cards on the table) and showing some vulnerability. However, the loss is minimal compared to the potential benefit, which will be capitalized annually for the rest of our career.     

  • Requesting a promotion: The risk of taking on new responsibilities, when we are comfortable in a role whose functions we perform easily, is low. The small possibility of a catastrophic failure is amply compensated by the immediate improvements (salary) and future ones (new opportunities for progress).     

The most delicate decision may be changing jobs. It is not always obvious, but the personal KPIs we discussed earlier help us detect it:

  • Financial stagnation: Without raises for several years, not even compensating for inflation, the risk of continuing is the ongoing loss of earning a salary far below the market. Conversely, the gain from a change is an immediate leap to a new position anchoring a higher starting salary.     

  • Professional stagnation: Without skill improvement, without challenges or new responsibilities. The risk of remaining is becoming outdated over the years and losing professional value. Conversely, the gain from a new position is the opportunity to continue learning or acquiring additional responsibilities.     

  • Toxic environment: If the daily routine becomes unsustainable, this is perhaps one of the easiest decisions to make. The benefit of protecting your health and well-being undoubtedly outweighs any short-term financial loss.     

Given that nothing guarantees your continuity in a job (zero risk does not exist), it makes no sense to cling to the time and effort invested in a company if the asymmetry promises us an extreme gain and we have mitigated the risk with good guardrails.

The key to moving forward is not clinging to what you already have, but strategically investing in actions that limit the risk of total failure and maximize the opportunity for massive success.

The Asymmetric Product

The greatest loss of a zombie product is not the resources already invested in it (the sunk cost), but those that are not invested in other possibilities that could provide a greater asymmetric advantage. Being entrenched in making a product viable that will only be "just another one" if it manages to gain a foothold presents very low asymmetry. Instead, we must seek to invest in an innovative solution that, if successful, guarantees exponential benefits or advantages over the competition.

Guardrails to Limit Maximum Loss

The guardrails that ensure good decision-making at the company or product level focus on limiting the capital that can be lost in a single bet (minimizing the negative tail):

  • Objective Exit Milestones: Establishing a burn rate and clear criteria to decide whether to liquidate the project after a defined period. This reverses inertia and enforces rationality.     

  • Limited Funding (Small Bets): Investing just enough for the Minimum Viable Product (MVP) and evaluating the profit margin before a massive scale-up. This allows us to cut losses early if profitability is doubtful.     

  • Constrained Teams: Avoiding the involvement of the entire company in the product. Limiting it to a small multidisciplinary team mitigates the impact on the morale and resources of the core products (those sustaining the organization).     

Positive Asymmetry in Innovation

We have already introduced how to detect positive asymmetry in a product, but in summary, there are two important approaches for investment that promise an exponential return:

  • Finding a New Niche (First Mover Advantage): Opening up the possibility of an entire business line with exponential growth, being the first to capitalize on the market.     

  • Non-Linear Research and Development: Often, an MVP or an R&D project does not only seek a direct economic benefit but the potential for improvement in the company's capabilities (discovering a technology that makes you 10 times more efficient in the future).     

In summary, abandoning a project should not be seen as "losing" what has been invested, but as reversing the negative asymmetry (a product that will always cost more than it generates) and reallocating that capital and talent to new, positive asymmetric bets.

The discipline to kill a failed product is the best financial guardrail a company can have.


Bibliography, Suggested Readings

  • Taleb, Nassim Nicholas. The Black Swan: The Impact of the Highly Improbable (2007).
  • Taleb, Nassim Nicholas. Antifragile: Things That Gain from Disorder (2012).
  • Kahneman, Daniel. Thinking, Fast and Slow (2011).
  • Ries, Eric. The Lean Startup: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses (2011).

Glossary of Key Terms

  • Gambler's Syndrome (Sunk Cost Fallacy): A cognitive bias where one continues to invest time, money, or effort in a failing project or situation because so much has already been invested (the sunk cost), ignoring future viability. The past investment is irrelevant to the rational decision.
  • LEAN: A management and production methodology that seeks maximum efficiency by eliminating everything that does not add value to the final customer. It is based on short cycles and continuous improvement.
  • Fail Fast: A development and management principle that promotes testing ideas early and on a small scale to quickly identify and learn from failures. The goal is to minimize the cost and time lost on unviable projects.
  • KPI (Key Performance Indicator): A metric used to measure success in a specific area. In the article, it refers to Personal KPIs (learning, feedback, raises) and business metrics (LTV, CAC).
  • Survivorship Bias: A logical error that occurs when focusing only on the people or companies that succeeded (the "survivors"), ignoring the vast majority who failed. This distorts the evaluation of the actual risk.
  • Marginal Gain: The additional benefit or value obtained by making one more unit of effort or investment. In asymmetry, the goal is to achieve an exponential marginal gain.
  • Maximum Loss: The maximum amount of money, time, or resources one is willing to lose in a single bet or project. The Guardrail concept seeks to ensure this loss is known and limited.
  • Negative Tail: A statistical term used to refer to extreme negative events (disaster risks, catastrophic failures, Black Swans). Asymmetry seeks to avoid exposure to an unpredictable negative tail.
  • Automated Tests: Code written by developers to verify that other parts of the code or functionalities work correctly and continue to do so after future changes. They act as the primary technical Guardrail.
  • Feature Flags: A mechanism that allows a new software feature to be activated or deactivated without the need to deploy new code. It is a guardrail to limit risk by allowing an immediate deactivation of a failure in production.
  • Canary Deployment: A software release strategy where the new version is only deployed to a small percentage of users (the "tail") before reaching the general public. It acts as a guardrail by limiting the impact of an error.
  • DevOps: Practices that combine software development (Dev) and IT operations (Ops) to shorten the system development lifecycle, promoting automation and collaboration.
  • Bleeding Edge Technology: Very innovative and experimental technology or product that has not yet been proven at scale and, therefore, carries a high risk (but also the potential for high reward).
  • Shark Mentality: A colloquial term to describe an aggressive, ambitious business or professional attitude focused solely on self-benefit.
  • Networking: A network of professional and personal contacts. It consists of building relationships to exchange information and support. It serves as a Guardrail for one's professional career.
  • Guardrail: In the context of the article, it is any measure, process, or investment made to limit the known maximum loss in a decision (e.g., automated tests, emergency fund).
  • Burn Rate: The Rate of Capital Consumption (or Burning). It measures the speed at which a company (usually a startup or new product) spends its capital before starting to generate profit. It serves as an Exit Milestone or time limit.
  • Small Bets: A business and investment strategy that involves making many low-cost investments in high-risk/high-reward ideas, with the expectation that the success of just one will compensate for the losses of all the others.
  • MVP (Minimum Viable Product): The version of a new product that contains only the features sufficient to satisfy early customers and validate the idea, allowing for rapid iteration and a limited cost for testing.
  • First Mover Advantage: The competitive edge gained by the first company to introduce a product or service into a new market or niche. It is sought as a source of exponential gain.
  • Technical Debt: The implied cost of additional engineering work caused by choosing an easy, fast solution now, instead of one that would take longer but would be better in the future (e.g., poorly organized code, outdated libraries).
  • Positive Asymmetry: A situation where the potential for gain is massive (unlimited) and the potential for loss is small and known (limited). It is the central goal of N.N. Taleb's philosophy of risk.
  • Pivot: A structured change in the strategy of a product or business without changing the original vision. It is done when the MVP or the guardrails reveal that the initial approach is unviable.

exit(0);

<< back to Debugging Myself