Logo
Logo
366 results for
  • A few months back I was debugging a test failure that only happened on our Linux CI server, never on my Mac. Turns out someone had written platform-specific file path handling without proper cfg guards — the code compiled fine on both platforms but silently did the wrong thing on Linux. That’s when I really internalized why conditional compilation needs to be treated as a first-class skill, not something you google when you need it.

    Rust tutorial rust cargo build-system Created Tue, 05 Aug 2025 11:45:00 +0000
  • The first time I watched a virtual machine boot — not using VirtualBox, but running inside a hypervisor I’d written — I had the same feeling as when my bootloader printed its first character. Except this time, I wasn’t just running code on bare metal. I was creating a fake machine that thought it was running on bare metal.

    Virtualization is where systems programming hits its ceiling of complexity. You’re manipulating the CPU’s hardware virtualization extensions to create isolated execution environments. It’s also where Rust’s safety guarantees become most valuable — because a bug in a hypervisor doesn’t just crash your program, it potentially compromises every virtual machine running on the host.

    Rust tutorial rust systems low-level Created Mon, 04 Aug 2025 15:42:18 +0000
  • The first time I needed build.rs, I was wrapping a C library that had about 200 constants defined in a header file. I could’ve copied them all by hand into Rust const declarations. Instead, I wrote a build script that parsed the header and generated the constants automatically. Took 30 minutes to write the build script, and it saved me from maintaining a manual mapping that would’ve drifted out of sync within a month.

    Rust tutorial rust cargo build-system Created Sun, 03 Aug 2025 14:30:00 +0000
  • Most Go services handle startup carefully and shutdown carelessly. The startup code has retries, health checks, dependency validation. The shutdown code is os.Exit(0) or — if the developer was feeling generous — nothing at all, just letting the process get killed. That’s how you get dropped HTTP connections, half-written database records, uncommitted Kafka offsets, and on-call alerts at 3am.

    Graceful shutdown has one principle: stop accepting new work, finish what you already started. That’s it. But implementing it correctly requires knowing the shutdown order, wiring up OS signals properly, and draining workers before pulling the plug.

    Go tutorial golang concurrency Created Sun, 03 Aug 2025 00:00:00 +0000
  • There’s something almost spiritual about writing a bootloader. Your code is the first thing that runs on a machine. Before the OS. Before any drivers. Before the memory manager. Before anything. The CPU comes out of reset, fetches an instruction from a known address, and that instruction is yours.

    I spent a weekend writing one. By Sunday night, I had four characters on screen — BOOT — rendered by writing directly to VGA memory. And it felt like I’d conquered the world.

    Rust tutorial rust systems low-level Created Fri, 01 Aug 2025 22:10:44 +0000
  • I’d been writing Rust for about a year before I realized I was only using maybe 20% of what Cargo actually offers. cargo build, cargo run, cargo test — that was my entire workflow. Then I joined a team managing a Rust monorepo with 30+ crates, custom build profiles, and feature flags controlling everything from database backends to telemetry. Suddenly my surface-level Cargo knowledge wasn’t cutting it.

    Cargo Is Not Just a Build Tool

    Most people coming from other languages think of Cargo as “npm for Rust” or “Maven for Rust.” That undersells it massively. Cargo is a build system, package manager, test runner, benchmark runner, documentation generator, and project convention enforcer — all rolled into one binary. And unlike most build tools, it’s actually pleasant to use.

    Rust tutorial rust cargo build-system Created Fri, 01 Aug 2025 09:15:00 +0000
  • I once spent three days debugging a motor controller that would randomly twitch. The code was correct. The hardware was fine. The interrupt handler was well-written. But every few thousand cycles, a timer interrupt would preempt the motor control interrupt at exactly the wrong moment, corrupting a shared variable. The fix was two lines of code — disable interrupts around the critical section — but finding it cost me a weekend.

    Rust tutorial rust systems low-level Created Wed, 30 Jul 2025 06:55:22 +0000
  • In most languages, errors are events — they get thrown, they propagate up the call stack, and you catch them somewhere above. Go rejects this model entirely. In Go, an error is a value, just like an integer or a string. You pass it around, inspect it, wrap it with context, and check it right where it happens. Ignore it and your code doesn’t crash loudly; it quietly does the wrong thing, and you’ll find out at the worst possible moment.

    Go tutorial golang Created Mon, 28 Jul 2025 00:00:00 +0000
  • Here’s a dirty secret of systems programming: malloc is not magic. It’s just code. Code that somebody wrote, code that makes tradeoffs, and code you can replace when those tradeoffs don’t match your workload.

    I spent two years writing performance-sensitive Rust before I realized that the global allocator was my bottleneck. Not CPU. Not I/O. Memory allocation — thousands of tiny allocations per request, each one hitting a lock, each one fragmenting the heap a little more. Switching to a bump allocator for request-scoped data cut latency by 40%.

    Rust tutorial rust systems low-level Created Sun, 27 Jul 2025 13:19:56 +0000
  • I thought I understood TCP until I tried to implement it. Turns out, “client connects to server, data flows” is about 5% of the story. The other 95% is state machines, retransmission timers, congestion windows, and edge cases that would make your head spin.

    But here’s the good news: implementing even a simplified TCP teaches you more about networking than any textbook. And Rust’s type system is actually perfect for modeling protocol state machines — states become types, invalid transitions become compile errors.

    Rust tutorial rust systems low-level Created Thu, 24 Jul 2025 10:31:48 +0000