Beware the Pit of Success lined with razor wire

I’ve often said that a well-designed system makes it easy to do the right things and annoying (but not impossible) to do the wrong things.

https://blog.codinghorror.com/falling-into-the-pit-of-success/

Pits of success are great! In the ideal world, it should be trivial for someone to pick up a tool and start using it to do complex things, maybe even without reading the instructions.

Part of this is choosing good defaults. If your defaults are predictable, practical, and unsurprising you're in good shape!

Part of this is good API design. If you have to tell users "You're holding it wrong," that's a surefire sign your API design needs some help.

The problems arise when behavior is unpredictable, if overriding defaults is tedious, and there are easy ways to do wrong things.

Take serverless compute, which exploded in popularity over the last 10 years. For simple use cases, it works great. Infinite scalability! Fewer memory leaks! But if you need

a persistent cache

filesystem access

websockets

long-running processes

you're going to need an extra service to handle that. Complexity balloons.

Meanwhile, a single long-running server can handle all of those with aplomb, and has far more predictable usage patterns.

Cloudflare's developer platform addresses these problems really well, answering each with

Workers KV

R2 object storage

Durable Objects

Containers

More complexity, yes, but all under the same umbrella, so it's easier to recognize and manage.

I wouldn't call this the "Pit of Success" though, because it's still easy to do the wrong thing, and these specific solutions to these problems aren't always obvious, especially to a newcomer. You kinda have to know about the whole Cloudflare platform ecosystem to be able to properly take advantage of it.

Maybe that's a good thing though? If a platform or tool forces its users to be intentional about their choices, which by necessity means understanding the tradeoffs of those choices, perhaps it will result in a better designed, more thoughtful, more successful end product.