The "Trash Can Method" for software development

· Source: How I AI · Field: Technology & Digital — Software Development & Engineering · Depth: Intermediate, quick

Summary

The "Trash Can Method" in software engineering advocates for a development approach where discarding code is an acceptable and even encouraged practice. This method operates under two primary models. The first involves using Pull Requests (PRs) or preview branches to validate a proposed feature; if the feature is deemed undesirable after initial implementation, the PR is simply closed, and the code is discarded. The second model applies to more significant product iterations: after shipping a Version 1 (V1) and gathering customer feedback over a period, such as 10 weeks, developers might gain a clearer understanding of the optimal product shape and architecture. In such cases, it becomes economically viable to "trash all the code" from V1 and rebuild Version 2 (V2) from scratch on a new branch, rather than attempting to refactor or build upon the initial codebase, due to the perceived low cost of code.

Key takeaway

For software engineering teams evaluating architectural decisions or feature development, embrace the "Trash Can Method" to reduce long-term costs. If you are unsure about a feature's value, use PRs or preview branches to build and discard code quickly. For significant V2 iterations, consider rebuilding from scratch after V1 customer feedback, rather than costly refactoring, as the initial code's cost is often low. This approach prioritizes agility and validated learning over preserving early code.

Key insights

The "Trash Can Method" embraces discarding code as a valid, cost-effective software development strategy.

Principles

Method

The method involves either closing a PR for an unvalidated feature or rebuilding a V2 from scratch after V1 customer feedback, discarding all prior code.

In practice

Topics

Best for: Machine Learning Engineer, Entrepreneur, Software Engineer, Product Manager

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by How I AI.