Buy vs. Build
[!NOTE] “Every line of code you write is liability. It’s code you have to test, secure, deploy, and maintain.”
One of the most high-leverage decisions a Staff Engineer makes is Buy vs. Build.
- Build: Developing custom software in-house.
- Buy: Licensing a SaaS product, using Open Source (with support), or acquiring a solution.
1. The Core vs. Context Framework
How do you decide? Ask: Is this our competitive advantage?
- Core: Differentiates your business. Creates unique value. (e.g., Netflix’s recommendation engine). → BUILD
- Context: Necessary for business but doesn’t differentiate. (e.g., Netflix’s payroll system). → BUY
[!TIP] If you are an e-commerce company, building your own database is almost always a mistake. Building your own checkout experience might be genius.
2. Total Cost of Ownership (TCO)
Engineers often underestimate the cost of building by focusing only on implementation.
Formula:
TCO = Acquisition + Operation + Maintenance + Training
- Hidden Costs of Building:
- Maintenance (bugs, patches, upgrades)
- Security compliance (SOC2, GDPR)
- Onboarding new hires
- Opportunity cost (what aren’t you building?)
3. Interactive: Buy vs. Build Calculator
Visualize the 3-year cost of building vs. buying.
Build Scenario
Buy Scenario
3-Year Projection
4. Strategic Situational Awareness: Wardley Mapping
Simon Wardley introduced a mapping technique to determine whether a component is in the “Genesis” phase (novel, undefined) or “Commodity” phase (standard, utility).
- Genesis: Build it. Experiment. (e.g., Your unique AI model)
- Custom: Build/Modify. (e.g., Your specific business logic)
- Product: Buy/Rent. (e.g., CRM, Database)
- Commodity: Buy/Utility. (e.g., Compute, Power)
[!CAUTION] Do not build commodities. You cannot out-compete Amazon on “Compute” or Stripe on “Payments” unless that is your entire business.
5. Decision Matrix
| Factor | Favor Build | Favor Buy |
|---|---|---|
| Strategic Value | High (Core) | Low (Context) |
| Market Maturity | Low (New Tech) | High (Commoditized) |
| Cost | Lower at scale | Lower upfront |
| Control | Full control needed | Standard config ok |
| Time to Market | Slow | Fast |
6. Next Steps
You’ve defined the vision, roadmap, and strategy. Now review the module to solidify your learning.