Nothing Shared, Everything Gained: The Thesis

First published at Wednesday, 29 April 2026

Nothing Shared, Everything Gained: The Thesis

Here's a controversial opinion: writing testable code is essential. Writing tests is not — at least not immediately.

Early-stage products face massive uncertainty. The feature you perfected today might be cut tomorrow. Spending weeks on comprehensive test suites for code that might be thrown away next sprint isn't discipline — it's waste. Worse, it creates psychological attachment to code that should feel cheap to discard.

But writing testable code? That's non-negotiable. Always.

When your services are stateless and your dependencies are injected, adding tests later is straightforward. You're not gambling. You're deferring an investment until you know it's worth making.

This is the core of "Nothing Shared, Everything Gained": side effects are the enemy, but not because of functional programming purity. Because code with hidden dependencies cannot be tested in isolation, cannot be understood locally, and cannot be changed without fear.

The solution isn't to eliminate side effects entirely. That leads to monads and a level of abstraction that slows down practical web development. The solution is to push side effects to the edges — gateways that talk to databases, controllers that talk to HTTP — and keep everything in between pure.

Simple code stays simple. Clever code becomes legacy.

The book is available at codethatships.com — pay what you want.

Subscribe to updates

There are multiple ways to stay updated with new posts on my blog: