I’ve been thinking about policies and incentives. A lot of motivation comes down to ceilings and floors.
- Floors: the worst case. We want to raise the floor, limiting the pain in the worst case. Minimum wage is a floor on labor.
- Ceilings: the best case. We also want to raise the ceiling, improving the pleasure of the best case. A company that expands into new countries raises the ceiling on how many customers they can reach.
Once I start thinking in these terms, they appear everywhere.
Performance Tradeoffs in UTF-8 encoding
In Okio we implemented our own UTF-8 encoder to save the overhead of allocating byte arrays. The encoder was faster for most strings, but not very long ones.
By switching to our own UTF-8 encoder, we made the fastest case faster (raising the ceiling) but made the slowest case slower (lowering the floor).
Security tradeoffs in web session duration
Sign into any website and measure how long it takes for your session to expire. At my bank, the sessions are painfully short, like 60 minutes or less. On Pocket my web session seems to last forever.
Here the short session raises the floor on my security, making session takeovers very difficult. But it lowers the ceiling on my convenience, particularly when I’m using a private computer with its own lock screen protection.
Unit tests & code coverage
Code coverage tools measure how much production code is exercised by unit tests. Increasing coverage has asymmetric costs & benefits. Very high code coverage raises the floor on correctness, but lowers the ceiling on the code’s maleability. Ever refactor code with 95% line coverage? That can be difficult.
Roulette
The casino is a pure way to explore this concept. Suppose you’re at the roulette table with $100. Here’s a few options:
- Walk out with your $100 in your pocket. The floor and ceiling are both $100.
- Bet $1 on red. The floor is $99 and the ceiling is $101.
- Bet $100 on 7. The floor is $0 and the ceiling is $3600.
Limits, limits, everywhere
I’m entertained by the US 2016 election shitshow. Traditionally the progressives are focused on raising floors and the conservatives want to raise the ceilings.
And in business. Established companies want predictability and prefer guaranteed income (high floor) over riskier ventures (high ceiling). Scrappy upstarts are the opposite and raise funds on the prospects of their high ceilings.
On that note, I gotta buy insurance. Then I’m off to the casino!