Garbage Can Model in SE

Garbage Can Model in SE

Published on
Authors

In the fast-paced world of software engineering, we often strive for perfection in our system designs. But here’s a truth that might surprise you: most system designs are, in fact, “garbage.” Now, before you raise your eyebrows, let me explain.

The Illusion of Perfect Systems

I’ve been designing systems for years, including those handling billions of dollars in transactions. Yet, I can’t confidently claim that any system I’ve worked on is perfect. In fact, no one can – not even your CTO. They just might not admit it openly.

Let’s consider a scenario to illustrate this point.

A Tale of Rapid Growth and Slow Performance

Meet Nebula Ed, a cutting-edge startup that’s revolutionizing the world of augmented reality (AR) education. Their app, “StarScape,” allows students to visualize complex concepts in 3D, right in their living rooms. Nebula Ed has seen exponential growth in the past year. Venture capital has propelled them to unicorn status, and their marketing team is on fire, onboarding schools and universities at an unprecedented rate.

However, there’s a recurring issue plaguing their users: the StarScape app is excruciatingly slow. What was once a smooth, immersive experience has become a laggy nightmare. Students are complaining, teachers are frustrated, and negative reviews are piling up in app stores.

Priya, Nebula Ed’s brilliant but overworked CTO, is facing mounting pressure. The company’s big annual EdTech Conference is just three days away, where they’re slated to announce a major partnership with a leading university. Meanwhile, Arjun, the CEO, is breathing down Priya’s neck, demanding a quick fix to appease their paid subscribers and salvage their reputation.

The War Room

Priya calls an emergency meeting with her tech leads:

  1. Aanya (Network)
  2. Rohan (Database)
  3. Zoya (Infrastructure)
  4. Vikram (Application Development)
  5. Dr. Meera (Data Science and AR Algorithms)

The conference room is tense as Priya poses a simple question: “Why is StarScape crawling, and what do we need to fix it?”

Each lead, eager to solve the crisis, proposes a solution:

  • Aanya (Network): “Our network stack is buckling under the load. We need a dedicated, optimized stack to handle the increased traffic.”
  • Rohan (Database): “The database queries are bottlenecking. We should optimize our queries and upgrade to more powerful database servers.”
  • Zoya (Infrastructure): “Our server capacity is maxed out. We need to scale up our cloud infrastructure and implement a robust caching layer.”
  • Vikram (Application): “There’s technical debt in our codebase. We should prioritize a code optimization sprint to improve overall performance.”
  • Dr. Meera (Data Science): “Our AR algorithms need fine-tuning for efficiency. Give my team time to research and implement optimizations.”

The Dilemma of Choice

Priya’s mind races as she considers each proposal. All the solutions seem valid, but implementing everything would take weeks. The EdTech Conference looms large, and Arjun’s words echo in her ears: “We need a win, Priya. Make it happen.”

What does Priya do? In a moment of what feels like desperate inspiration, she opts for the fastest approach: credit card scaling. “Zoya,” she says, “scale up our cloud infrastructure. Max out our capacity. Rohan, get those beefier database servers. We’ll optimize later, but right now, we need raw power.”

Priya knows this isn’t a long-term solution. With increasing users, exponentially scaling the hardware won’t be sustainable, and their burn rate will skyrocket. But for the immediate future? It might just save their big announcement.

The Garbage Can Model in Action

Was this the right approach? In the grand scheme of things, probably not. It doesn’t address the underlying problems, and it’s financially unsustainable. But for the immediate crisis? It might be exactly what Nebula Ed needs to survive the week.

This scenario perfectly illustrates the Garbage Can Model of Decision Making, coined in 1972 by Michael D. Cohen, James G. March, and Johan P. Olsen, professors of management at Cornell University. This model explains that most organizations make decisions randomly, as part of what they term “organized anarchy.”

Understanding the Garbage Can Model

The Garbage Can Model posits that decisions are often non-linear, which is what makes us human. High-stakes decisions are typically made with:

  1. Random Mix: Various departments propose their best solutions, tossing them into the metaphorical “garbage can” of ideas.
  2. Choice Opportunity: The solution that addresses the issue fastest or aligns best with immediate pressures is often chosen, fished out of the can of possibilities.

Embracing Chaos in Software Engineering

So, what can we learn from Priya’s predicament and the Garbage Can Model?

  1. Be open to making decisions in chaotic situations. Perfect information is a luxury rarely afforded in real-world tech crises.
  2. Accept that decisions that don’t seem optimal might be okay given the circumstances. Sometimes, you need to buy time to fight another day.
  3. Document your decisions (consider using Architecture Decision Records). This helps in understanding the context of choices made under pressure.
  4. Prioritize fixing technical debt once the immediate crisis is over. Today’s quick fix should be tomorrow’s refactoring project.

As a software engineer, you should cultivate this culture within your team. Help save the organization first, and be flexible in your approach.

The Myth of Perfect System Design

Remember, there’s no such thing as a perfect system design. If there were, further research would be unnecessary, and many of us might be out of jobs!

Conclusion

The next time you find yourself in a chaotic decision-making situation like Priya at Nebula Ed, remember the Garbage Can Model. Embrace the chaos, make the best decision you can with the information available, and be prepared to iterate and improve. After all, that’s what makes software engineering such an exciting and dynamic field.

In the weeks following the EdTech Conference, Priya and her team at Nebula Ed did indeed embark on a comprehensive optimization project, addressing each of the issues raised in that crucial meeting. The experience taught them valuable lessons about scalability, technical debt, and the importance of balancing short-term fixes with long-term solutions.

Cheers,

Sim