Logo
Logo
153 results for
  • Our compile times hit 8 minutes. Not from scratch — incremental. Change one line in the domain model and wait 8 minutes to see if it worked. Three engineers were actively avoiding making changes to shared code because the feedback loop was unbearable.

    The problem was obvious: everything lived in one crate. The domain model, the HTTP handlers, the database layer, the gRPC server, the background workers — all sharing one Cargo.toml with 47 dependencies. Touch anything and the whole thing recompiles.

    Rust tutorial rust architecture production Created Thu, 23 Oct 2025 16:42:00 +0000
  • A few years ago I needed to let non-technical users define filtering rules for a data pipeline. The options were: embed Lua, use a YAML config with increasingly awkward syntax, or write a small domain-specific language. I picked the DSL. It took two days in Rust, and the result was a type-safe, sandboxed expression evaluator that couldn’t crash the host program no matter what users typed. Try getting that guarantee with dynamic code execution in Python.

    Rust tutorial rust design-patterns architecture Created Wed, 22 Oct 2025 12:00:00 +0000
  • We had this inventory service that was doing fine until it wasn’t. Reads were simple — “how many units of product X are available?” Writes were complex — reservations, adjustments, transfers between warehouses, reconciliation with physical counts. Both read and write operations hit the same database table, the same data model, and the same set of queries that were getting increasingly gnarly.

    Then we hit Black Friday. Read traffic spiked 40x. The complex write queries were locking rows that the read queries needed. We couldn’t scale reads without scaling writes. We couldn’t optimize the read path without breaking the write path’s invariants.

    Rust tutorial rust architecture production Created Tue, 21 Oct 2025 08:27:00 +0000
  • After you absorb the Go concurrency philosophy — share memory by communicating — there’s a temptation to reach for channels every time two goroutines need to share data. Resist that. Channels are for coordination and ownership transfer. For shared mutable state that multiple goroutines read and write, a mutex is usually clearer, simpler, and faster. Using a channel where a mutex belongs is one of those things that looks idiomatic but isn’t.

    Go tutorial golang Created Mon, 20 Oct 2025 00:00:00 +0000
  • I spent years thinking about game objects the OOP way. A Player extends Character extends Entity. A Goblin extends Enemy extends Character extends Entity. Then someone asks “what if a goblin can be mind-controlled and act like a player?” and your inheritance hierarchy collapses.

    ECS — Entity Component System — is the answer that the game development world converged on, and it’s fundamentally a Rust-shaped idea. Data and behavior are separated. Composition replaces inheritance. Cache-friendly memory layouts replace pointer-chasing object graphs. Rust’s ownership model maps onto ECS so naturally that Bevy — the most popular Rust game engine — is built entirely around it.

    Rust tutorial rust design-patterns architecture Created Sun, 19 Oct 2025 15:30:00 +0000
  • About a year ago, I had to swap out our payment provider. In Go, that would’ve been a two-week project — chasing down every place we called Stripe’s SDK, updating structs, fixing test mocks. In our Rust service, it took a day and a half. The reason wasn’t Rust itself. It was how we’d structured the code.

    Hexagonal architecture (sometimes called “ports and adapters”) is one of those patterns that sounds academic until you actually need to replace a database, swap a message broker, or test your business logic without spinning up Docker containers. In Rust, traits make it feel natural rather than ceremonial.

    Rust tutorial rust architecture production Created Sun, 19 Oct 2025 11:05:00 +0000
  • Every system has a throughput ceiling. The question isn’t whether your service can be overwhelmed — it can. The question is what happens when it is. Does it slow down gracefully, maintaining correctness and giving the caller a clear signal? Or does it blow up — OOM-killed, goroutines piling up, latency spiking to infinity while requests pile up in an unbounded queue?

    Backpressure is the mechanism that answers that question. It’s how a component communicates to its upstream: “I’m full — slow down.” Without it, fast producers eat slow consumers alive. In Go, backpressure is naturally expressed through blocking channel sends — and understanding when to block versus when to drop is one of the more interesting design decisions in concurrent systems.

    Go tutorial golang concurrency Created Sun, 19 Oct 2025 00:00:00 +0000
  • We shipped a bug to production that cost us about three hours of incident response and a very uncomfortable Slack thread. The root cause? Someone passed a user_id where an order_id was expected. Both were String. Both were UUIDs. The compiler had no way to tell them apart. The function signature said fn cancel_order(order_id: String, user_id: String), and someone called it with the arguments flipped.

    This is the kind of bug that makes you rethink everything. Not because it’s complex — because it’s stupid. And stupid bugs that slip through a strong type system mean the type system wasn’t being used right.

    Rust tutorial rust architecture production Created Fri, 17 Oct 2025 14:38:00 +0000
  • Every DP pattern we’ve covered has kept the state manageable: an index, a remaining budget, a mode. Bitmask DP enters the picture when the state is a subset of elements — specifically, which elements from a small set have been included or visited so far.

    The representation is elegant: a bitmask of n bits, where bit i is 1 if element i is in the current subset and 0 otherwise. With n = 20, there are 2²⁰ ≈ 1 million possible subsets. That’s the practical ceiling for bitmask DP — you’ll see n ≤ 20 in problem constraints, and that’s the signal.

    fundamentals interviews Created Fri, 17 Oct 2025 00:00:00 +0000
  • If you’ve built anything with Express, Koa, or ASP.NET, you know middleware. A request comes in, passes through a chain of handlers — logging, auth, rate limiting, CORS — and eventually reaches your application logic. Each handler can modify the request, short-circuit the chain, or pass it along.

    The Chain of Responsibility pattern from the GoF book is basically the same thing. The difference is branding.

    What makes this pattern interesting in Rust is tower — the crate that defines how middleware works across the entire Rust async ecosystem. Axum, Tonic, Hyper — they all use Tower’s Service trait. Understanding it unlocks the middleware patterns in all of these frameworks.

    Rust tutorial rust design-patterns architecture Created Thu, 16 Oct 2025 07:15:00 +0000