
Hill Climbing
Greedy Takes whichever step goes up most, and stops when none does.
2 steps, 41% avg elevation, peaked at 41%, 0 finds
1 in 10 The same, but one step in ten goes to a random neighbor.
203 steps, 78% avg elevation, peaked at 79%, 0 finds
Cooling off Takes downhill steps too, often at first and less and less.
722 steps, 63% avg elevation, peaked at 81%, 3 finds
Fresh starts Climbs like Greedy; stuck, it starts over somewhere new, and heads back to the best top it found before its steps run out.
999 steps, 50% avg elevation, reached the tallest peak, 9 finds
Curious Ignores height and goes wherever it has been least.
1,000 steps, 48% avg elevation, peaked at 99%, 5 finds
Arrow keys move the start, Enter drops the climbers.
Against Optimization
Always picking the optimal route gets you stuck, in software and in life. Here's why, from someone who enjoys optimization.
Our time on earth is limited. From this, all optimization stems.
If we had forever, nobody would care how long anything took. Conversely, if no one cared how long anything took, it’s likely that nothing would ever get done, and humanity would stagnate. Viewed with an optimistic lens, the finite nature of our being in this world is a blessing.
Despite what the title implies, I consider myself an efficient person. Heck, I actively enjoy the process of optimizing things for optimization’s sake, beyond the point of diminishing returns, so this critique is coming from a place of love; I’m the kind of person this xkcd was drawn for.

xkcd #1205, “Is It Worth the Time?” by Randall Munroe (CC BY-NC 2.5). Its hover text: “Remember, every second counts toward your life total, including these right now.”
If you’re an engineer, I bet you have similar inclinations. You’ve aggressively optimized your routines. You’ve created scrapers and scripts to automate a chore that takes ten minutes a month, and called it a win. You have opinions about other people’s keyboard shortcuts, and you’ve shared them.
And now that LLMs are promising to optimize everything within your workflows and beyond (and soon, robots in the physical world), you’re probably beside yourself with excitement, ready to take it to the next level.
But not everything that glitters is gold, and on the precipice of this new era of automation, it’s worth taking a moment to pause and reflect. Always picking the optimal route can get you stuck, in software and in life.
The urge to squeeze more out of everything goes well beyond engineering, as anyone living under capitalism in the last century will profess; it rewards a certain short-sighted ruthlessness - more output per hour, more revenue per customer, less money left on the table. Whatever doesn’t produce an immediate return is not worth doing. Spend enough of your day thinking that way and it’s easy to start asking the same of your own life.
“Time is now currency: it is not passed but spent.” Back in the days, the factory had someone standing over you with a stopwatch, making sure none of it went to waste. Now we willingly strap the stopwatch to our own wrists, and there’s no end to the shift. Every spare hour is another hour we could be getting something out of.
And there’s no shortage of things to improve once you start looking at yourself that way. Looksmaxxing makes your appearance an optimization project, while mogging turns the person standing next to you into a yardstick to measure against. You can look good, eat well, be healthy, and still feel behind. The same dissatisfaction seeps into every other facet of your life: your hobby could be making money, your walk could be burning more calories, and your sleep could be getting a better score. Even rest has to earn its keep by making you more productive tomorrow.

You may not like it, but this is what peak performance looks like. Photo: “Laptop on the London Underground” by Annie Mole (CC BY 2.0), labels added.
What bothers me is how easily “How do I do this better?” takes over from “Is this worth doing?” - you can get very good at a game you never chose to play. To me, being mindful means being present in what you’re doing, and deliberate about why you’re doing it.
What are you optimizing for?
Before you find the fastest route, you need somewhere worth going.
Say your agent handles a chore you used to do by hand. Congrats, you’ve freed up some time. What happens to it? If it disappears into your social media feed, the company optimizing that feed has found a use for it, even if you haven’t. You optimized your workflow, and somebody else optimized you.
Having more time gives you space to make a choice, but it doesn’t make the choice for you. The same goes for most of the things we chase: money buys options, good health lets you do more for longer, and a successful business might give you security or a legacy. None are an end in and of themselves; ask “wait, but why?” enough times and eventually you’re asking what you worship. And you will worship something; people seem to come predisposed to it, and as David Foster Wallace put it, “the only choice we get is what to worship.”
Your answer shows up in the tradeoffs you’re willing to make: you can say your family matters most and keep giving the best of yourself to whatever earns you another promotion, or say you just want enough money to be secure while quietly moving “enough” every time you get close, and so on and so forth.
From my experience, a big source of restlessness is the gap between the two. Your days don’t line up with what you say matters, or you’re chasing milestones you never actually chose, or you’re just getting faster at something without ever asking where it’s headed, and some part of you knows it. You can be doing great by every number you track and still feel like something’s off. Usually, something is.
So, what makes a life worth living?
I’ve spent an excessive amount of time thinking about that question, and every treatise and theory on what it means to live either falls short, contradicts itself, is too vague to be useful, or, taken to its conclusion, ends up at hedonism, nihilism, or some other form of despair. The only answer I’ve found that holds together under closer inspection is in the Quran.
Not what you were expecting from a blog about software engineering? Fair, but it’s my blog and I’ll write about whatever I want, and my commitment and responsibility towards your time, dear reader, is to convey what I’ve learned as truthfully and fully as I can, and nothing else I could say in this article would hold up without this piece. Plus, and I mean no disrespect when I say this, a couple of conversations with the denizens of Silicon Valley will show you that a little spiritual guidance is sorely needed. An ayahuasca retreat in Bali isn’t going to cut it.
The funny part is that a lot of those same people already think life is one big simulation, to the point that two billionaires were reportedly paying scientists to break us out of it. To a certain degree, the Quran agrees that it’s a game: “the life of this world is but play and amusement, pomp and mutual boasting and multiplying, (in rivalry) among yourselves, riches and children.” Where we differ is that the game has an end goal, and someone’s keeping score.
Islam starts with a purpose for human life: to worship God. That purpose gives our work, relationships and responsibilities a direction, and a standard to judge what we pursue. Some things are worth doing even when we’d rather do something else, and some we should refuse even when they’d make us richer or more comfortable.
Part of that purpose is stewardship. In the Quran, God tells the angels, “I will create a vicegerent on earth”: a steward. Our time and abilities are a trust, and we’re answerable for how we use them. Living well means making good use of what’s in our care, within the capacity we’ve been given.
That can mean building something useful, looking after your family, doing your work honestly, or showing up for someone who needs you. What it looks like depends on your abilities, your means, and what else is demanding your time. Someone caring for an ill parent may have very little to put on a list of personal achievements while doing something enormously worthwhile. The point is not to get caught up in comparison games, but to do what you can with what you’ve been given.

This changes what counts as a good outcome. A business that gets more profitable by dressing up sports betting as “event contracts”, hooking kids on loot boxes, or cheating people is just getting more efficient at doing something wrong. And time spent honoring a commitment can be well spent even when it’s inconvenient, unpaid, and invisible to everyone else. The fact that society overwhelmingly rewards the former is a societal organization problem, not a moral one.
The Prophet ﷺ described health and free time as “two blessings that many people are deceived into losing.” Whatever time you free up can go to your responsibilities, to something worthwhile, to actual rest, or it can quietly disappear into distractions.
Knowing what matters to you is what lets you optimize well. There’s nothing wrong with paying for help with chores if it can make life smoother, and people who buy time-saving services report greater life satisfaction. If getting the groceries delivered buys you an evening with your family, that’s a pretty good use of the service. But for many, the trip to Costco was itself a time for bonding, and if you love cooking for them, getting every meal delivered cuts out the thing you wanted the evening for.
Same with code. Plenty of us got into software because we liked writing it. Sometimes you just need the feature shipped, and sometimes working through the problem carries significant value beyond the result. An agent gets you to the result faster either way, but in the second case it skips the part you were looking forward to, which is usually also the part where you learn something (sometimes by being wrong first).
Take the optimization far enough and you risk automating yourself out of your own life. An AI writes your mom’s birthday message and summarizes every book you meant to read, and every box gets ticked. But you wanted to tell your mom something, or spend some time with an idea, and nobody can do that on your behalf.
That’s why you need to be cognizant of the tradeoffs you’re making, and why intention matters. As we’ve discussed before, intention is the exclusive domain of beings with a soul; an AI can tick the box, but it can’t mean anything by it. The first hadith in Sahih al-Bukhari says that “the reward of deeds depends upon the intentions.” Two people can do the exact same thing for very different reasons. You might build a business to serve people, provide for your family, get rich, or see your name on something impressive. Those motives can coexist; just be honest with yourself about which one wins when they conflict.
And Islam strongly encourages trying; an honest attempt still counts when things don’t work out. In the hadith about judges, one who rules to the best of his knowledge and gets it right receives a double reward, and one who gets it wrong still receives a reward. You owe the work care and sincere effort; nobody expects you to get everything right, and you shouldn’t expect it of yourself either. In Twitter-speak, “an idiot in motion will beat a genius at rest.”
The sad part is that most of us never actually pick what we’re playing for, or never get the luxury to. We inherit some milestones, see how quickly other people are reaching them, and start trying to catch up. Get the title, buy the house, raise the round, keep moving. You can get remarkably efficient at this without ever asking whether any of it serves anything worthwhile.
So, to whatever extent you can, be deliberate. Begin with what makes a life good, reverse engineer from there, and let that guide what you make more efficient, what you keep doing yourself, and what you give up altogether. Expect to make mistakes along the way and expect the answer to change; the work that deserves most of you now may not be what deserved it ten years ago. You’ll also find that a lot of what you chased doesn’t bring the joy you expected once you actually have it.
Of course, it’s hard to reverse engineer a good life when you’ve only seen a sliver of what’s out there. You have to expand your horizons first.
Explore before you exploit
There’s a whole branch of math about the explore-exploit tradeoff, and the classic setup is a casino (ironic after spending the last section talking about religion, but I digress). You’re in front of a row of slot machines, each paying out at some rate you don’t know, and every pull you either play the machine that’s paid best so far (exploit) or try one you know less about (explore). Exploit too soon and you might end up spending the night on a machine that’s merely okay, never finding out the one two seats over that pays double.
200pulls left
0won
no pulls yet
no pulls yet
no pulls yet
no pulls yet
no pulls yet
Click a machine to pull it, or hold it down. Keys 1–5 work too.
Everyone played the same machines with the same luck.
Life works the same way. If you don’t explore enough, you don’t know what you like, or what you’re going to be good at, which is usually what you end up enjoying. One study followed almost 1,500 Canadian kids from grades 1 to 4, and the ones who were good at math went on to like it more, while liking it did nothing for their grades. You usually have to stick with something long enough to get decent at it before you can tell whether you enjoy it. That’s why it’s always good to have some breadth of experience, in work and in life.
New experiences pay off in other ways, too. When researchers tracked 122 people by GPS for up to four months, they felt better on the days when they experienced more variety: more places, and more time spent in them. New experiences can also make your life feel longer, since time spent in a routine is remembered as being shorter.
Exploring is also how you find out what comes naturally to you, which matters more than we like to admit. We tend to credit optimization and hard work for what’s often just people being built different. Some of us will never have a V-taper however we train, and most of us don’t need to bodybuild for a stage we’re never going to stand on. Nothing is more humbling than a kid on their first day at the gym smashing the bench press PR you spent decades slowly increasing. Minds differ too, in capacity and in intelligence. Hard work and optimization will get you very, very far, farther than they reasonably should, and yet as the old line goes “hard work beats talent when talent doesn’t work hard”. Talent that tries, at something that comes naturally to it, is very hard to beat. At the highest levels, where everyone works hard, one meta-analysis found that deliberate practice explained only 1% of the difference in performance between elite athletes. When the work and the talent are both a given, bet on the one who’s enjoying it.

To be clear, most of the optimizations in the middle do help push you to the right of the graph, maybe as far as that 14% band, and the ones on the right are probably doing them too. They won’t get you over a wall of innate talent, though.
Machines that never explore don’t find much either. When an AI learned to play dozens of Atari games from the score alone, Montezuma’s Revenge was the only one where it got 0% of the average human score. Before that game gives you a single point, you have to climb down ladders, jump a rolling skull and grab a key, and an agent that only chases points never stumbles onto the key.
What finally cracked it were agents that went looking for the unfamiliar. One rewarded itself for reaching states it couldn’t predict yet, and became the first to beat the average human without being shown how. Another kept a list of every promising spot it had reached, kept going back to explore from them, and scored almost four times the previous best.
Score only Learns from the game’s points, and nothing else.
0 pointsbest 70 · died 300
Curious Rewards itself for going where it’s rarely been: a simple version of rewarding what it can’t predict yet.
0 pointsbest 490 · died 163
Go back Saves every spot it reaches, returns to one, explores from there.
0 pointsbest 490 · died 224
The math also pretty clearly favors early exploration. A better machine is worth more the more pulls you have left to play it, or as Algorithms to Live By puts it, “explore when you will have time to use the resulting knowledge.” A constrained but illustrative formulation from that same book is the secretary problem: you’re hiring, the candidates come in one at a time, and you have to decide on each one on the spot. The best strategy is to spend the first 37% of interviews just looking, then hire the first person who beats everyone you’ve seen, which gets you the single best candidate about 37% of the time. Humans seem to be built this way. We have an unusually long childhood, and one explanation is that it’s a protected stretch for exploring before the demands of exploiting set in. The kids get to mess around while the adults keep everyone fed, and civilization inches forward.
One interview at a time, and no calling anyone back: whoever is passed on is gone.
Press Interview to watch P walk the line.
Hires the very best 39% of the time
Which is why I’d tweak the usual early-career advice. Pick a lane, sure, but don’t rush into it.
And don’t feel like you’ve missed the chance to explore either. Both of these are toy versions of real life. The 37% rule still misses the best candidate 63% of the time, and it only holds if you can’t call anyone back and have a way to objectively measure the best (you don’t). If you’d be happy with someone great, the math already says to start hiring sooner, and in real life you can usually go back to someone, ask around, or keep looking. The casino math assumes the machines never change and that a pull costs the same at any age, and neither of those is true.
I’ve seen plenty of people do it the other way around too, exploiting first and exploring later, and it’s not obvious which works better. Some exploring takes money, skills, or credibility you have to build first, which might be why the founders of the fastest-growing new companies in the US are 45 on average. The machines also change under you, and so do you. In one study of more than 19,000 people, young, middle-aged and older people all believed they’d changed a lot in the past but wouldn’t change much from here on, and at every age they underestimated how much they still would. Even once you’ve worked out what you like, you’re optimizing for someone who won’t be around in ten years, so exploring again at 40 is the rational move, even if it looks like a midlife crisis from the outside. Either order can work, as long as you never stop exploring completely.
And sometimes exploring turns up something you couldn’t have wanted yet, because you had no idea it was possible.
The best stuff wasn’t anyone’s objective
A lot of the biggest scientific discoveries came from people just, you know, fucking around and finding out. In 1966, a microbiologist who was curious how anything could survive in extreme conditions pulled a bacterium out of a Yellowstone hot spring. About twenty years later, its heat-proof enzyme made PCR practical.
The first drug in the class Ozempic belongs to came from a compound in Gila monster venom, found by a doctor who then spent three years failing to get a drug company interested.
None of them set out to do what they’re now famous for, and two AI researchers wrote a whole book, Why Greatness Cannot Be Planned, arguing that’s how it usually goes. The stepping stones to anything great rarely look like the great thing. On Picbreeder, a site their lab built where people evolve images by breeding them from each other’s, most images were reached through ancestors that looked nothing like them. The people working on vacuum tubes weren’t thinking about building a computer, and the graphics cards built so people could play games at higher frame rates ended up training the network that kicked off the deep learning boom, two of them, in a bedroom.
The most famous example in the software world is Unix, born on a computer Ken Thompson dug up to keep playing a video game. A round of Space Travel cost about $75 of time on the big machine, so Thompson found a little-used PDP-7, ported the game to it, and soon started building a file system on it too. Twenty-odd years later, a student in Finland announced a free operating system that was “just a hobby, won’t be big and professional like gnu.” You know how that went.

Photos: a Gila monster by Alan Schmierer (public domain) and a box of Ozempic by Chemist4U (CC BY-SA 2.0).
There’s examples of this phenomenon in simulated worlds too. Super Mario 64 has a challenge whose whole point is to be impractical: finish the game pressing the A button as little as possible. It’s pointless on purpose, and chasing it took players so deep into the game’s physics that they found parallel universes, faraway places where the game thinks Mario is standing in the level when he isn’t, and pannenkoek2012 made one of the most famous videos in gaming about it.
The trouble is that individuals and institutions optimize for the path most likely to work. Katalin Karikó kept working on mRNA while much of the field doubted it, got turned down for grant after grant, and was demoted by the University of Pennsylvania in 1995. In 2023, Karikó shared the Nobel Prize for the work behind the COVID vaccines.
So resist the relentless pressure to conform, and leave yourself room to fuck around. Richard Hamming noticed that the scientists who kept their office doors closed got more work done today and tomorrow, but ten years later somehow didn’t quite know which problems were worth working on. The ones who worked with the door open got interrupted all the time, and also picked up clues about what might be important. Hamming couldn’t prove which way the causation ran, only that the open-door crowd were more likely to end up doing important things. Keep your door open, keep a side project that doesn’t have to make sense, and protect some time that isn’t accountable to anything.
Taking the long way around (and of course, being persistent) tends to increase your luck surface area, the odds that something good finds you along the way: little treasures, experiences, a friend you’d never have met on the direct route, a direction you didn’t know was there. Jason Roberts, who coined the term, even wrote it as an equation:
And for those in the know, Barakah = the B in B(Energy) × B(Focus) × B(Time).
The more you do, and the more people you tell about it, the luckier you get.
The startup world runs on this. Stewart Butterfield set out to build an online game, twice, and neither worked out. Flickr grew out of tools built for the first one, and Slack started as the chat tool Butterfield’s team used while building the second.
A lot of that stumbling happens at startups, and plenty of people get a shot at one early in their career, usually sitting right next to a corporate offer. When you’re comparing salary, benefits and a name your parents recognize, the big corporate job can look like the obvious winner. But alas, I know many an engineer who missed out on generational wealth because they picked corporate over that little startup nobody had heard of (yours truly is, regrettably, no exception). Whether that was the wrong choice depends on what they wanted and what they could afford to lose.
To be fair to corporate, picking the little startup and walking away with nothing is by far the more common ending. About three-quarters of venture-backed startups never return their investors’ money, and when the investors don’t get paid, the employees’ options usually aren’t worth anything either. You only hear about the early employees who got rich because the rest don’t throw parties.

Delusion is a founder’s superpower
But “optimal” here is judged on the typical outcome, and startup outcomes are anything but typical. In one big dataset of venture deals, 6% of them produced 60% of the returns, and the best funds actually lost money on more of their deals than the rest. Almost all the value sits in a handful of huge wins way out in the tail, and taking the safe route every single time guarantees you never land one. The comparison also leaves out what you’d learn. At a ten-person company you do five jobs at once, which is about the only exploration you’ll ever get paid for, and you keep everything you learned even if the company doesn’t make it.

And don’t count on anyone to tell you which little startup is the one. VCs are great at spotting early trends, but they rarely catch the true zero to one, which doesn’t look like a trend yet. Bessemer keeps a public anti-portfolio of the great companies it passed on - the names in it will shock you.
So VCs spray and pray, often into theses that completely contradict each other. Lightspeed led Mistral’s seed round, backing a European open source project, and later led a round in Anthropic, which keeps its models closed. It’s a smart strategy when the wins are that rare, and it’s also an implicit admission that nobody, not even the people paid to do this full time, can predict where success comes from. It’s good to stay humble.
Beware: sophisticated investor at work
What you can do is let the market do some of the filtering for you. One analysis of US startups that raised money in 2014 or 2015 found that only 7% of the seed-stage ones went on to exit for more than they’d raised, against 28% of the ones at Series C, whose valuations still grew about fivefold on the way there. Weighing the odds against the upside, Series C came out on top for employees, with A and B close behind. Join much later than that and the odds keep improving, but there’s a lot less growth left for your equity to ride. And of course, in a land of asymmetric outcomes, two startups at the same stage, chasing the same opportunity with similar talent, can still end up with one crashing and burning while the other takes the whole market. Color and Instagram were both photo-sharing apps that launched within six months of each other. Color had Sequoia and $41 million, Instagram had $7 million. In April 2012, Facebook bought Instagram for about $1 billion, and by the end of that year Color had stopped selling its app.
None of this means you should quit your job tomorrow. It means that when you weigh the startup offer against the corporate one, you count the tail and what you’d learn along with the salary, and you take the swing while it’s cheap, before the mortgage and the kids and the lifestyle that needs the paycheque. It’s the casino math again. Explore while you’ve still got plenty of pulls left.
You have to earn the right to optimize
Everyone has that one friend (possibly you?) who drops thousands of dollars on gear before taking their first step. It’s premature optimization with a credit card. Until you’ve done the thing the slow way for a while, you don’t know what’s actually slowing you down, so you don’t know what’s worth optimizing.

Turkey’s Yusuf Dikeç took silver at Paris 2024 in what looked like an ordinary T-shirt and his regular glasses, with one hand in his pocket. He’d been shooting since 2001.
Y Combinator tells founders to do things that don’t scale for the same reason. Early on, you recruit users one at a time, set them up yourself and talk to every one of them, because that’s how you find out what the product should actually be. You can only do that while you’re still small enough to talk to individual customers, and if you automate it away from day one, you never hear what they would’ve told you.
Same thing for writing. Typing is way faster than writing by hand, and an LLM will happily give you thousands of words a minute, which technically makes it the most efficient way to get words on a page. But the words were never really the point. Writing is how you work out what you think, or as Leslie Lamport put it, “if you’re thinking without writing, you only think you’re thinking.” In one study, 15 of the 18 people who wrote an essay with ChatGPT couldn’t correctly quote a sentence from it right afterwards, against 2 of 18 who wrote theirs unaided.
The slow way is also where the friction is, and removing all sources of friction from your life removes all sources of growth. Rarely, if ever, does growth come solely from acquiring more knowledge. It comes from taking risks, making a fool of yourself, and having uncomfortable conversations with yourself and others. Learning researchers see the same thing on a smaller scale: practice that makes you improve quickly often doesn’t stick, while conditions that create challenges and slow the rate of apparent learning are what make it last. They call those desirable difficulties. And the uncomfortable conversations usually go better than you’d think. Across 12 experiments with more than 1,800 people, mostly strangers, people expected deep conversations to be more awkward and less enjoyable than they actually were, and underestimated how interested the other person was.
Once you’ve earned the right to optimize, you’ll want some way to keep score, and the numbers come with problems of their own.
The number isn’t the point
Some things simply can’t be measured, or there’s no good equation for them. There’s no number for how close you are with your kids, or whether your work will eventually matter to anyone. A sociologist named William Bruce Cameron put it best back in 1963: “not everything that can be counted counts, and not everything that counts can be counted.” What tends to come next is the McNamara fallacy, named after the US defense secretary who judged the Vietnam War by numbers like the enemy body count. You measure what’s easy to measure, then slowly start acting like whatever you can’t measure doesn’t matter. It’s an easy trap for people like us, since you can only optimize what you can count.
Even when you know what you want, you usually can’t optimize it directly. You optimize a number that’s supposed to track it instead. Walking 10,000 steps isn’t the goal, and neither is a deadlift number, a commit streak, or raising the next round. The intermediate goals are staying healthy, building muscle, making something people love and having a successful business, and the numbers are just mile markers that help make sure you’re going the right way. Fixate on them and you get tunnel vision and miss other paths that might have gotten you to the real goal sooner. Round numbers sell. The 10,000 steps came from the name of a Japanese pedometer from 1965, and the 8 hours of sleep everyone’s chasing is stricter than what sleep doctors actually recommend, which is 7 or more, a number 15 of them settled on by voting while noting that how much sleep you need varies from person to person. GitHub, meanwhile, dropped streaks from its contribution graph to keep the focus on the work instead of how many days in a row you did it.
And the harder you push the number, the worse it tracks. That’s Goodhart’s law, best known as “when a measure becomes a target, it ceases to be a good measure.” In 1902, the French colonial government in Hanoi paid a bounty for every rat tail, and before long people were farming rats, cutting off their tails and letting them go to breed more rats. Software has its own rat tails: lines of code, story points, test coverage, all perfectly good numbers until somebody’s paid to hit them.
AI researchers keep a whole catalogue of systems that found a dumb - often funny - way to hit the number. An agent trained on points in a boat racing game found a lagoon where three targets kept respawning, and spent the race circling it, catching fire, crashing into other boats and going the wrong way, while scoring 20% higher than human players. It never finished the race. Another program, taught to play NES games by making the numbers in memory go up, worked out that the best way not to lose at Tetris is to pause the game right before the last piece lands and leave it paused (“Truly, the only winning move is not to play.”).
The boat-racing agent in CoastRunners 7, from OpenAI’s post on faulty reward functions.
Unfortunately, plenty of metrics are bullshit before anyone even games them. Vanity metrics, numbers like total page views and likes, make you feel good and don’t tell you anything about what to do next. Meanwhile, some of the most successful companies have objectively poor metrics. Amazon didn’t turn its first profit until the end of 2001, more than seven years in, and its shareholders complained that it wasn’t getting there fast enough. It was measuring itself on something else, and said so in its first letter to shareholders: customer and revenue growth, how often customers came back, and the strength of its brand.
Sports are also full of these. Tom Brady ran the 40-yard dash in 5.28 seconds at the 2000 combine, slow even for a quarterback, and went 199th in the draft; he retired with seven Super Bowl rings. Shane Battier’s box scores were forgettable enough that Michael Lewis called him the no-stats all-star, but when he was on the court, his teammates got better and his opponents got worse.
Tracking yourself can also mess with your head, creating something of a reverse-placebo effect. When people with insomnia were shown fake sleep data on a watch, the ones told they’d slept badly felt more tired and less sharp that day than the ones told they’d slept well. Sleep doctors now have a name, orthosomnia, for patients so preoccupied with perfecting their sleep tracker’s data that it feeds their anxiety about sleep. Ironically, obsessive Whoop tracking and sleep scores are just optimizing for misery.

Even when the number does track the goal, it gets more expensive the higher you push it. The first few hours you put into something make a huge difference, and after a while you’re grinding for scraps. That’s diminishing returns, and like I said up top, I’m guilty of blowing right past them. Ask anyone who runs servers for a living. According to Google’s SRE book, each extra bit of reliability can cost 100 times more than the last one, and most of the time nobody even notices, since someone on a 99% reliable phone can’t tell the difference between 99.99% and 99.999% uptime.
It seems that past a certain point, making one thing better necessarily makes something else worse, or pushes the cost onto someone else. Optimization math calls that limit the Pareto front. Programmers know the two-goal version from every coding interview as the “space-time tradeoff”, which sounds like it involves black holes, but alas, it’s mostly about whether to cache something. You can make code faster by throwing memory at it, or leaner by making it slower, but eventually you can’t have both.
Rarely, a new tool pushes the whole front out and gets you more of both, but there’s no such thing as a free lunch. An agent that writes your code ten times faster can still shift work onto whoever has to maintain all that extra code, review it, or catch your slop grenades.
Suppose you’ve picked something worth pursuing, and your numbers actually measure it. You can climb all the way to the peak you sought and still be stuck, because it was only ever the nearest one.
Getting stuck on a local maximum
Picture a hike in thick fog. You want to reach the highest point around, but you can only see a few feet ahead, so you do the obvious thing: take whichever step goes up, again and again, until none does.
Congrats, you’re on top of a hill. Is it the tallest one? No idea. In the fog, every summit feels the same.
That’s hill climbing, and it’s what you’re doing every time you take the best available next step. It works great until it strands you on a local maximum, the top of the nearest hill, and you miss out on the global maximum, the top of the tallest one. Getting from one to the other means going downhill first, and that’s the one move an optimizer never makes, it goes completely against their grain.

Software teams climb hills all day. An A/B test is hill climbing with a dashboard: ship a small tweak, keep it if the number goes up. It’s how a team at Google, stuck between two blues, ended up testing 41 shades in between, and it’ll find you the best shade of blue for the page you already have. It’ll never tell you to build a different page. Codebases are the same. Every small refactor makes the current architecture a little better, and none of them will ever tell you it’s the wrong one.
Which blue is best?
Arrow keys move between blues; Enter votes.
All 41 results
| Blue | Votes |
|---|---|
#094a9b | 0 |
#0a4b9c | 0 |
#0a4d9d | 0 |
#0b4e9f | 0 |
#0c4fa0 | 0 |
#0d50a1 | 0 |
#0d52a2 | 0 |
#0e53a4 | 0 |
#0f54a5 | 0 |
#0f55a6 | 0 |
#1057a7 | 0 |
#1158a8 | 0 |
#1159aa | 0 |
#125aab | 0 |
#135cac | 0 |
#145dad | 0 |
#145eaf | 0 |
#155fb0 | 0 |
#1661b1 | 0 |
#1662b2 | 0 |
#1763b4 | 0 |
#1864b5 | 0 |
#1866b6 | 0 |
#1967b7 | 0 |
#1a68b8 | 0 |
#1b69ba | 0 |
#1b6bbb | 0 |
#1c6cbc | 0 |
#1d6dbd | 0 |
#1d6ebf | 0 |
#1e70c0 | 0 |
#1f71c1 | 0 |
#1f72c2 | 0 |
#2073c3 | 0 |
#2175c5 | 0 |
#2276c6 | 0 |
#2277c7 | 0 |
#2378c8 | 0 |
#247aca | 0 |
#247bcb | 0 |
#257ccc | 0 |
So how do you get off one? Classic Tetris players lived on one of these hills for most of the game’s life. The NES version speeds up as you clear lines, and at level 29 the pieces fall so fast that the standard technique, holding the d-pad and letting the game slide the piece across, can’t get a piece all the way to the side. Players came to call it the kill screen, and for about thirty years almost nobody got much past it.
But in 2018, 16-year-old Joseph Saelee beat seven-time champion Jonas Neubauer by hypertapping, tensing the arm until the thumb vibrates on the d-pad more than ten times a second. A couple of years later, players borrowed a trick from an arcade player who’d set button-mashing records on Track & Field with a technique called rolling: the fingers of one hand drum against the back of the controller and push the d-pad into the other hand’s thumb, at least 20 times a second.
In December 2023, a 13-year-old playing as Blue Scuti rolled all the way to level 157, where the game itself crashed, something only AI and tool assistance had managed before. Every one of those jumps meant learning a new technique from scratch and being worse at the game for a while.
Level9
Lines0/5
Kill screen
Clear 5 lines at level 9 to warm up, then it's straight to level 29.
Paused
Holding an arrow steps once, waits 16 frames, then steps every 6.
← → move, ↑ turns, ↓ drops faster, 1–3 switch technique, P pauses.
At level 29
Up here a piece falls a row every frame, about a sixtieth of a second. This is how far each technique gets one toward the left wall before it lands.
These run on the NES's actual timing, 60.1 frames a second. The arrows are slowed down 6x so you can see them.
Computer science’s version of that is to take a worse step every now and then. Simulated annealing, one of the classic ways off a local maximum, borrows its name from metalworking. It sometimes accepts a worse move, with a chance that starts high and shrinks as the search “cools”, so it bounces around a lot early and settles down later. The life version is to try the thing that looks worse on paper once in a while (the rewrite, the new technique, the weird job), and to do it more often early on, while the temperature’s still high.
There’s even a proof behind this. Stretch the cooling out long enough and the odds that simulated annealing ends on the tallest peak approach 100%. The catch is that “long enough” usually takes longer than checking every spot on the map one at a time, so nobody actually runs it that way. Still, it’s a nice thing to have proven: the more patient you are with your missteps, the better your odds of ending up somewhere great.
Annealing isn’t the only way off a hill, though, and it isn’t always the best one. The bluntest answer is to start over: climb until you’re stuck, go somewhere new, climb again, and keep the best top you found. It’s called random-restart hill climbing, and in an example from Russell and Norvig’s Artificial Intelligence: A Modern Approach, the standard AI textbook, it solves a puzzle with three million queens in under a minute. Give the climbers on the cover the same number of steps and Fresh starts, which does exactly that, reaches the tallest peak most of the time, while Cooling off gets there about one time in five.
There’s a third way off a hill, which is to find a direction you weren’t looking in. The climbers on the cover can only go back and forth and side to side, and with two dimensions it doesn’t take long to reach a spot where every way is down. Most real problems have far more directions than that. Researchers training neural networks, which can have millions of them, argued that the places where a search seems stuck are mostly saddle points, not true peaks: some direction still goes up, and the feeling of being stuck is an illusion. The more ways you can move around, the less likely it is that every one of them goes down.
2 dimensions stuck after 13 steps: none of 4 ways go up
10 dimensions 4 of 20 ways go up
50 dimensions 38 of 100 ways go up
When you feel like you’ve topped out, it’s worth checking for a direction you haven’t tried yet: a new skill, a different field, a city you’ve never lived in.
You probably went to school with, or were yourself, a Greedy climber: aced high school, got into the right university, took the job everyone said to take, and did every next thing well. That’s a perfectly good hill. But if you’ve met people who climbed something much taller, a lot of them took the long way up. A meta-analysis of over 6,000 athletes found that the world-class ones had played more sports as kids, started their main sport later, and progressed more slowly at first than the ones who topped out at the national level. The best young athletes were the opposite: early starters, one sport, fast progress. The researchers found the same pattern among Nobel laureates, who had moved between more fields and gotten going more slowly than national-level award winners. The climbers on the cover pick things up along the way, and one of the things they can find is a map to the tallest peak. Greedy hardly ever finds anything.
This should be a comforting thought to many, and explains why some of the people considered the most successful in life had many early failures. In one study, junior scientists who narrowly missed out on an NIH grant were more likely to drop out than those who narrowly got one, but the ones who stayed went on to outperform the winners over the next ten years. Until death, all defeat is psychological.
All of that assumes the hill stays put. Sometimes the ground shifts under you, and that’s when you find out what all that optimizing cost.
Optimized systems break
Optimization eats slack. Every idle hour, spare part and unused dollar looks like waste on a spreadsheet, so it’s the first thing to go, right up until something unexpected happens and it turns out the slack was what absorbed it.
The Phoenix Project boils this down to one line: wait time is how busy a resource is divided by how idle it is. At 90% busy, that’s 90 divided by 10, so a task waits nine times longer than it would at 50%, and at 99%, ninety-nine times longer. The engineer who’s booked solid, the one an optimizer loves, is the one whose every request sits in a queue, and a team running at 100% has nothing left for an incident, a bad week or a good idea.
Rule of thumb90 ÷ 10 = 9 hoursbusy ÷ idle, the wait before anyone starts a task
A task added now waits– hoursbehind 0 others, – hours on average since you picked how busy
Tasks turn up at random and take an hour each on average, one at a time, in the order they came.
Busy of the timedrag along the curve
Once you’ve optimized everything, the backups start to look like waste. A second supplier looks like paying twice for the same thing, and the same goes for a backup server or a second engineer who knows how billing works. So the spares get cut, and you end up with a system full of single points of failure, which is pretty much the opposite of how you build reliable machines out of unreliable parts.

Farming shows what this looks like in the real world. Seed companies used to pay crews, a lot of them local teenagers on minimum wage, to pull the tassels off by hand so the plants couldn’t pollinate themselves. Then they switched to corn that couldn’t make pollen in the first place, which saved all that labor, and by 1970 more than 85% of the hybrid corn grown in the US shared the same trait. That year, a new strain of fungus that only went after corn with that trait spread from Florida up through the Corn Belt and destroyed about 15% of the crop. The next year, every major seed company went back to the teenagers.
Blight only infects high-yield corn, and spreads to any high-yield plant touching a sick one. It shows up on its own now and then, more often the more high-yield corn there is.
Click a gold plant to start a blight there.
If you harvested right now
A field of regular corn100
The field above
Scored so a field of only regular corn makes 100. A gold plant makes 10% more than a green one; sick plants and bare ground make nothing.
Average harvest over many seasons, accounting for blights: 93
The dashed line is a field of all regular corn, and the crowns mark the best mixes. How often the blight strikes and how fast corn grows back are made up to show the pattern, not to model 1970.
Engineers who study complex systems call this “robust yet fragile”. A highly optimized system handles what it was tuned for and breaks on whatever’s rare or unexpected, like a fungus nobody planned for, and you don’t get one without the other.
Machine learning calls the same failure overfitting. Train a model too hard on yesterday’s data and it fits yesterday perfectly and falls apart on anything new, and the standard fixes all amount to not optimizing all the way: stop training early, penalize complexity, or randomly switch off parts of the network while it learns. Careers overfit too. Fit yourself perfectly to one stack, one company and one way of working, and you’re perfectly suited to a world that might not last, which plenty of engineers are finding out right now.
Optimize the friction out of everything and you end up with people, a society and software that can’t handle adversity. Guidelines in the UK and the US used to tell parents to keep allergenic foods away from babies at high risk for allergy. Then a trial assigned 640 of those babies to either eat peanuts or avoid them until age five, and early peanuts significantly decreased how many developed the allergy. Among the babies who hadn’t shown any sensitivity yet, 13.7% of the ones kept away from peanuts were allergic by five, against 1.9% of the ones who’d eaten them. Good software teams learned the same thing. A service that never sees a failure has no idea how to survive one, so Netflix built Chaos Monkey, which randomly terminates instances in production on purpose, so that engineers have to build services that can take it.
So leave slack, spares and a little friction on purpose. Don’t book yourself or your team solid, keep a buffer for when things go wrong, make sure nothing important has a bus factor of one, and pick up a few skills you don’t strictly need yet. And keep a few things hard on purpose, so the first hard thing you face isn’t the one that matters.
That’s a long case against something I still do every day.
To optimize or not to optimize, that is the question
I’m not about to stop looking for ways to be more efficient, and you shouldn’t either. Knuth’s famous line about premature optimization being the root of all evil comes with a sentence people usually leave off: “Yet we should not pass up our opportunities in that critical 3%.” He’s just as clear that you go after that 3% “only after that code has been identified”, since programmers’ “intuitive guesses fail”.
A computer system can always be made cheaper, faster or better, though any engineer worth their salt will tell you there’s always a tradeoff. Life on the other hand is complex and intractable, even with the best heuristics and most favorable starting points. So before you optimize, learn to be content. Humanity’s bottomless appetite is the source of the restlessness we started with, and “enough” moves every time you get close. Your life may not be easy, but many of us have a living standard today that kings a few hundred years ago would have dreamed of. The Prophet ﷺ said, “Wealth is not in having many possessions, but rather (true) wealth is feeling sufficiency in the soul.”
So the answer to the question of “should you optimize” is the most engineer answer there is: it depends.
- Is it worth doing at all? If “No”, drop it. If “Not sure”, do it the slow way for a while, then ask again.
- Want it done, or to do it? If “Do it”, leave it slow: that’s the part you came for. If “Both”, automate the dull bits, keep the ones you enjoy.
- Would it gain you anything? If “No”, leave it be: it’s already good enough. If “Not sure”, time it first (see the xkcd chart up top).
- Is this the best way to do it? If “No” or “not sure”, explore first: try other ways before you commit.
- Does the number track the goal? If “No” or “roughly”, use it as a mile marker, and steer by the real thing.
- Will it look the same next year? If “No” or “maybe”, optimize lightly, and look out for taller hills.
- If you got this far: optimize it, but stop at the point of diminishing returns.
Is it worth doing at all?
Whichever way you go, the path less travelled will always have a certain appeal, even though the poem it comes from admits the two roads were worn “really about the same”. Contentment is what lets you pick a road and stop looking back, trusting that what’s meant for you will find you.
Look closely at the life of anyone you admire and you’ll notice a pattern: it’s usually the hardships, the detours and the plans that fell through that made them who they are, and almost none of it looked like the optimal move at the time. Life only makes sense looking backwards, but you have to live it forwards. Hindsight is 20/20, but you only get it by moving.
Leave some room to wander, and don’t make the wandering earn its keep. If every break has to make you more productive next week, the stopwatch is still running.
It’s ok every now and then to fuck around a little and find out, or to just do nothing.
That too, is optimal.




