The Best Part Is No Part: Musk's Algorithm Applied to Software, Security and Your Cloud Bill
The Best Part Is No Part: Musk's Algorithm Applied to Software, Security and Your Cloud Bill
Every line of code is a liability with a maintenance schedule. Every endpoint is attack surface. Every scheduled job is a recurring charge and a recurring failure mode. Every dependency is someone else's bug in your production.
The software industry knows this and does the opposite anyway. We add. We add features, flags, services, cron jobs, wrappers and, increasingly, AI-generated code by the thousands of lines. Then we spend our best engineers optimizing and automating things that should never have existed.
The fix has a well-known name.
The algorithm, in the right order
Walter Isaacson's biography of Elon Musk describes the five-step "algorithm" Musk repeats at Tesla and SpaceX production meetings "to an annoying degree" (excerpt):
- Question every requirement. Each should come with the name of the person who made it, not a department. "Requirements from smart people are the most dangerous, because people are less likely to question them."
- Delete any part or process you can. "If you do not end up adding back at least 10% of them, then you didn't delete enough."
- Simplify and optimize. Only after step two: "A common mistake is to simplify and optimize a part or a process that should not exist."
- Accelerate cycle time. Only after steps one through three.
- Automate. Last. Musk's own admission: "The big mistake in Nevada and at Fremont was that I began by trying to automate every step."
The order is the insight. Most engineering organizations run steps 3 to 5 enthusiastically and skip steps 1 and 2 entirely. The result is very efficient, highly automated processes that shouldn't exist.
AI coding agents make this worse in a precise way: they make step 5 nearly free. When generating code costs nothing, the default becomes "add." The algorithm is the counterweight.
Here's what it looks like applied to three places that cost real money.
Domain 1: Security. Attack surface is a parts count
Security teams usually think in controls. I'd argue the more useful frame is parts count: every route, table, credential, permission, open port and integration is a part that can fail open.
A case study in undeleted parts
In September 2026, UpGuard published the largest study yet of Supabase misconfiguration. It identified 16,326 databases exposing readable tables, and 55.8% of them showed indicators of personal data (UpGuard Research; BleepingComputer). UpGuard notes that Supabase now enables row-level security by default for tables created in its Table Editor, but tables created programmatically, "which is how coding agents interact with Supabase," don't get RLS by default.
Run the algorithm on that failure:
- Question the requirement. Does every table in your public schema need to be reachable from a browser with the public key? Who decided that, by name? In most apps nobody did. It's a default nobody questioned.
- Delete the part. Supabase's own docs are blunt: on projects that still grant the
anonandauthenticatedroles by default, revoke those grants, because "adding policies doesn't remove them" (Supabase RLS docs). The grant is the part, and deleting it is a stronger control than any policy layered on top.
-- Delete first: nothing is reachable until someone names why it should be. revoke all on all tables in schema public from anon, authenticated; -- Then add back, deliberately, the few paths that have a named owner. grant select on public.products to anon; -- owner: storefront (Michael) grant select, insert on public.orders to authenticated; alter table public.orders enable row level security; create policy "own orders" on public.orders for select to authenticated using ((select auth.uid()) = user_id); That's step 2 with the 10% add-back rule built in. Default-deny isn't a security philosophy. It's the algorithm applied to permissions.
The same pattern, one layer up
Here's an infrastructure example from this month. Vercel's classic Cron Jobs invoke your code through an HTTP GET to a public path, which means every scheduled job is also an internet-facing endpoint that you have to protect with a secret. On 5 November 2026 Vercel put Schedules into public beta. Schedules can target a private function that has no public URL, or a queue topic with retries (Vercel Schedules docs).
That's the platform deleting a part for you. A job that has no public URL can't be called by an attacker. The best auth check is the endpoint that doesn't exist.
Domain 2: Cloud spend. Polling is a part you pay for forever
Infrastructure bills are mostly the cost of parts nobody questioned: the poller that checks for changes every few seconds, the always-on worker, the duplicate pipeline, the dashboard query running on a timer for a dashboard nobody opens.
Let's do the math with published prices instead of hand-waving. On Vercel's Fluid compute, Pro pricing starts at $0.128 per Active CPU hour and $0.60 per million invocations (Vercel pricing; Fluid compute pricing).
Take a pattern that AI-generated front ends love: every open browser tab polls an API every 10 seconds to "stay fresh."
- 1,000 concurrent users × 6 polls a minute = 6,000 requests a minute
- Over a 30-day month: 6,000 × 60 × 24 × 30 = 259.2 million invocations
- Invocations alone: 259.2 × $0.60 ≈ $156 a month
- Assume each poll costs 20 ms of active CPU (an illustrative figure, so measure your own): 259.2M × 0.02 s ≈ 1,440 CPU hours × $0.128 ≈ $184 a month
So that's roughly $340 a month before memory, database reads or egress, and the overwhelming majority of those requests return "nothing changed." Scale to 10,000 concurrent users and it's over $3,000 a month for the privilege of asking the same question 2.6 billion times.
Now apply the algorithm in order:
- Question: Does this view need freshness within 10 seconds? Who said so? Usually no one, or a product requirement written for one screen and copied to all of them.
- Delete: Remove polling from every view where stale-by-a-minute is fine. In most apps that's most views.
- Simplify: For the views that truly need it, replace pull with push: database change events, a realtime channel, or a webhook. You pay when something changes, not when someone wonders.
- Accelerate: Cache what's left at the edge with sensible revalidation.
- Automate: Only now add autoscaling and cost alerts, for the system that's left.
Most teams start at step 5: they set a budget alert on a design that's wasteful by construction.
Domain 3: AI-generated code. The cheapest code to maintain is code you didn't generate
Coding agents are extraordinary at step 5. Ask for a feature and you get the feature, plus an abstraction layer, three utility files, a retry wrapper, a new dependency and tests for all of it. Each piece is plausible, and together they're a lot of new parts.
Apply the algorithm to the diff, not just the product:
- Question the requirement before prompting. Write down, in one sentence, who needs this and why. If you can't name the person, don't generate the code.
- Make deletion a review criterion. For every AI-generated pull request, ask: what in this diff could be removed with no change in behavior? New dependencies need a named justification. Abstractions with one caller go.
- Track net lines, not lines written. A week where your codebase shrank and your features grew is a great week.
- Automate only proven paths. Don't let an agent automate a workflow you haven't already run by hand and stripped down. Musk learned this with robots on a battery line. You'll learn it with agents in your CI.
"Test in production" without being reckless
The SpaceX culture people admire is rapid iteration: build, test, learn, repeat. In software, step 4 (accelerate cycle time) only works if failure is cheap and contained. The best tool for that is decades old and still underused: the error budget.
Google's SRE book frames reliability as a budget to spend rather than a target to maximize: "100% is the wrong reliability target for basically everything," and the gap between the target and 100% is a budget that release velocity can use (Google SRE book, Introduction; see also Embracing Risk). Pair that with progressive delivery (feature flags, canaries, automatic rollback) and "move fast" stops being a slogan and becomes arithmetic.
The deletion step matters here too. Fewer parts means a smaller blast radius per change, which means you can afford to ship more changes. Deletion is what makes speed safe.
The quarterly deletion review
Here's the ritual I'd install in any engineering org. Once a quarter, for each category, list every item with a named owner and a one-line reason it exists:
| Category | Question | Default if no owner |
|---|---|---|
| Public endpoints and scheduled jobs | Who calls this, and does it need a public URL? | Make private or delete |
| Database grants and policies | Which role needs this, by name? | Revoke |
| Polling loops and timers | What breaks if this runs 10× less often? | Slow down or delete |
| Dependencies | What would we write in its place, and how big is it? | Remove if small |
| Feature flags | Is this flag still deciding anything? | Delete the flag and the dead branch |
| Agent and service credentials | What's the narrowest scope that still works? | Rotate and narrow |
Then hold yourself to Musk's metric: if you never have to add anything back, you didn't delete enough.
The thesis
The highest-leverage engineering move in 2026 isn't writing code faster. AI already did that. It's having the discipline to delete faster than AI can generate.
Question the requirement. Delete the part. Then, and only then, make what's left fast and automatic. The best part is no part, the best endpoint is the one that doesn't exist, and the cheapest request is the one you never make.
Michael, ArkNet Digital: cloud architecture, security engineering and shipping AI-built software safely. arknet.digital
If your cloud bill or your attack surface grew faster than your product this year, I'm happy to run a deletion review with you. What's the biggest thing you've deleted that nobody missed? Tell me in the comments.