π Go
(249)
π Idiomatic Go
(25)
1.
Error Handling
2.
defer for Cleanup
3.
Multiple Return Values
4.
The comma ok Idiom
5.
Implicit Interfaces
6.
Accept Interfaces, Return Structs
7.
Slices Are Views, Not Arrays
8.
Capacity Matters
9.
range Gotchas
10.
Zero Values Are Useful
11.
Nil Slice vs Empty Slice
12.
Value vs Pointer Receivers
13.
iota for Enums
14.
context.Context
15.
Goroutines Are Cheap, Not Free
16.
Channels Are for Coordination
17.
select Is Elegant
18.
sync.Mutex Is Often Simpler
19.
Table-Driven Tests
20.
internal Package Is Underrated
21.
Composition Over Inheritance
22.
Small Packages Win
23.
Error Values, Not Exceptions
24.
Prefer Plain Structs
25.
Simplicity Is a Language Feature
π Go Concurrency Masterclass
(29)
1.
Goroutine Lifecycle Management
2.
Cancellation with context.Context
3.
Channel Ownership Rules
4.
Buffered vs Unbuffered Channels
5.
sync.WaitGroup
6.
Mutexes Done Right
7.
Race Conditions and the Go Memory Model
8.
Fan-Out / Fan-In
9.
Worker Pools
10.
Pipelines and Stage Isolation
11.
Graceful Shutdown
12.
Leak Prevention
13.
Timeouts Everywhere
14.
errgroup for Structured Concurrency
15.
Semaphores for Concurrency Limits
16.
Atomic Operations
17.
Go Scheduler Behavior
18.
Backpressure Design
19.
Ordering vs Throughput
20.
Profiling Contention
21.
Supervisor Patterns
22.
Rate Limiting and Load Shedding
23.
Distributed vs Local Concurrency
24.
Testing Concurrent Code
25.
Observability for Concurrency
26.
Safe Background Jobs in Web Servers
27.
Idempotency in Concurrent Systems
28.
Production Concurrency Architecture
29.
sync.Cond
π Go Database Patterns
(9)
π Go and AI/LLM Integration
(6)
π Go Standard Library Mastery
(8)
π Go Anti-Patterns & Code Smells
(10)
π Go API and Service Design
(10)
π Go Microservices Patterns
(6)
π Go Deployment & Operations
(8)
π Go Error Design at Scale
(8)
π Go Reflection & Metaprogramming
(7)
π Go CLI & Tooling
(8)
π Go Code Quality & Maintainability
(8)
π Go Networking & Distributed Systems
(8)
π Go Interfaces & Abstraction Design
(8)
π Go Security in Production
(9)
π Go Memory Model & Internals
(8)
π Go Performance Engineering
(8)
π Go Testing Masterclass
(10)
π Go Observability in Production
(7)
π Modern Go: 1.21 to 1.26
(5)
π Go Package & Module Architecture
(7)
π Go Plugin Systems
(2)
π Go Generics Masterclass
(8)
π CGo: Calling C from Go
(2)
π Go from Scratch
(25)
1.
Your First Go Program
2.
Variables and Types
3.
Control Flow
4.
Functions
5.
Arrays and Slices
6.
Maps
7.
Strings, Runes, and Bytes
8.
Structs
9.
Methods
10.
Pointers
11.
Interfaces
12.
Error Handling
13.
Goroutines
14.
Channels
15.
Select
16.
Packages and Imports
17.
Go Modules
18.
The sync Package
19.
Context
20.
Testing in Go
21.
JSON and HTTP
22.
File I/O
23.
The Type System
24.
The Go Toolchain
25.
What's Next
π Fundamentals
(153)
π Interview Patterns: Cracking FAANG+ in the AI Era
(40)
1.
Arrays and Hashing
2.
Two Pointers
3.
Sliding Window
4.
Stack
5.
Binary Search
6.
Linked Lists
7.
Recursion
8.
Sorting in Interviews
9.
Bit Manipulation
10.
Math Patterns
11.
Interview Patterns L11: Binary Tree Traversal
12.
Interview Patterns L12: BST Operations
13.
Interview Patterns L13: Tree Construction
14.
Interview Patterns L14: Tree DFS Patterns
15.
Interview Patterns L15: Tree BFS Patterns
16.
Interview Patterns L16: Graph BFS
17.
Interview Patterns L17: Graph DFS
18.
Interview Patterns L18: Topological Sort
19.
Interview Patterns L19: Union Find
20.
Interview Patterns L20: Shortest Path
21.
1D DP Basics
22.
1D DP Advanced
23.
2D DP Basics
24.
2D DP Advanced
25.
DP on Strings
26.
DP on Trees
27.
Knapsack Patterns
28.
Interval DP
29.
State Machine DP
30.
Bitmask DP
31.
Monotonic Stack
32.
Heap Patterns
33.
Trie
34.
Backtracking
35.
Greedy
36.
Intervals
37.
Concurrency Problems
38.
Design Problems
39.
Hard Composites
40.
Mock Interview Strategy
π Kubernetes Patterns
(5)
π Compilers and Interpreters
(4)
π ML System Design
(4)
π GraphQL in Practice
(3)
π Event Sourcing Deep Dive
(3)
π System Design from First Principles
(15)
1.
How the Internet Works
2.
Load Balancing
3.
Caching
4.
Database Scaling
5.
Message Queues
6.
CDNs
7.
Rate Limiting
8.
Design a URL Shortener
9.
Design a Chat System
10.
Design a News Feed
11.
Design a Notification System
12.
Design a Search Engine
13.
Design a Payment System
14.
Designing for Failure
15.
CAP Theorem in Practice
π System Design Deep Dives
(5)
π Behavioral Interviews for Engineers
(3)
π Algorithms That Matter in Production
(14)
1.
Big-O Thinking
2.
Sorting in Practice
3.
Binary Search
4.
Two Pointers and Sliding Window
5.
Hashing and Consistent Hashing
6.
BFS and DFS
7.
Shortest Path
8.
Dynamic Programming Intuition
9.
Greedy Algorithms
10.
Backtracking
11.
String Algorithms
12.
Compression Basics
13.
Cryptographic Primitives
14.
Randomized Algorithms
π WebAssembly for Backend Engineers
(2)
π Distributed Consensus
(3)
π Data Structures for Production Engineers
(12)
π Database Internals for Backend Engineers
(10)
π Software Architecture That Survives
(8)
π Linux for Backend Engineers
(8)
π Engineering Practices That Scale
(7)
π Networking for Backend Engineers
(7)
π Rust
(367)
π Rust in Production β Real-World Architecture
(10)
1.
Structuring a Large Rust Application
2.
Domain Modeling with Rust's Type System
3.
Hexagonal Architecture in Rust
4.
CQRS and Event Sourcing
5.
Multi-Crate Workspace Architecture
6.
API Versioning and Backwards Compatibility
7.
Feature Flags at the Type Level
8.
Migrating Services from Go/Python/Java to Rust
9.
War Stories
10.
When Not to Use Rust
π Rust Design Patterns
(10)
π Rust Async Internals & Runtime Design
(8)
π Rust Type System Wizardry
(10)
π Rust and AI/LLM Integration
(8)
π Rust Compiler Plugins & Build System
(8)
π Rust for Systems Programming
(12)
1.
no_std
2.
Embedded Rust
3.
Memory-Mapped I/O
4.
Writing Linux Kernel Modules in Rust
5.
OS Concepts in Rust
6.
Building a File System
7.
Implementing Network Protocols
8.
Designing Custom Allocators
9.
Interrupt Handlers and Real-Time Constraints
10.
Writing a Bootloader
11.
Building a Minimal Hypervisor
12.
Production Systems Software
π Rust WebAssembly
(8)
π Rust Unsafe & FFI
(10)
π Rust Microservices Patterns
(8)
π Rust Networking & Distributed Systems
(10)
π Rust Security in Production
(8)
π Rust Deployment & Operations
(8)
π Rust Anti-Patterns & Code Smells
(10)
π Rust Performance Engineering
(12)
1.
Performance Philosophy
2.
Benchmarking with criterion and divan
3.
Profiling
4.
Reducing Allocations
5.
Iterators vs Loops
6.
String Performance
7.
Choosing the Right Collection
8.
Cache-Friendly Data Structures
9.
Inlining
10.
Compile Time Optimization
11.
Binary Size Reduction
12.
Zero-Copy Parsing
π Rust Memory Model & Internals
(10)
π Rust Macros & Metaprogramming
(12)
π Async Rust Masterclass
(20)
1.
Async Mental Model
2.
The Future Trait
3.
Tokio
4.
Spawning Tasks and JoinHandles
5.
tokio::select!
6.
Streams
7.
Async Channels
8.
Async Mutexes
9.
Semaphores and Rate Limiting
10.
Cancellation Safety
11.
Timeouts, Deadlines, and Graceful Shutdown
12.
Async I/O
13.
Building HTTP Clients with reqwest
14.
Tower
15.
Backpressure
16.
How Async Executors Work Under the Hood
17.
Pin in Async Context
18.
Tracing Async Code
19.
Testing Async Code
20.
Production Async Architecture
π Rust Concurrency Masterclass
(25)
1.
Why Rust Concurrency Is "Fearless"
2.
std::thread
3.
move Closures
4.
Channels
5.
Shared State
6.
Arc<Mutex<T>>
7.
Atomics
8.
Memory Ordering
9.
Send and Sync
10.
Rayon
11.
Crossbeam
12.
Worker Pool Patterns
13.
Fan-Out Fan-In in Rust
14.
parking_lot
15.
Condvar
16.
Barriers and Once
17.
Lock-Free Data Structures in Rust
18.
Debugging Deadlocks and Data Races
19.
Thread-Local Storage
20.
The Actor Model with Rust
21.
CSP-Style Concurrency
22.
SIMD
23.
GPU Computing from Rust
24.
Testing Concurrent Code
25.
Production Concurrency Architecture
π Rust Database Patterns
(10)
1.
SQLx
2.
Diesel
3.
Connection Pooling with deadpool and bb8
4.
Schema Migrations in Rust Projects
5.
Transactions and Error Rollback
6.
The Repository Pattern in Rust
7.
Building Type-Safe Query Builders
8.
Testing with Real Databases
9.
N+1 Queries, Indexes, and EXPLAIN
10.
Redis, MongoDB, and Non-Relational Stores
π Rust Web & API Development
(12)
1.
The Rust Web Landscape
2.
Axum from Zero
3.
Middleware with Tower Layers
4.
Request Validation and Error Responses
5.
Authentication
6.
Database Integration
7.
Pagination, Filtering, and Sorting
8.
WebSockets with Axum
9.
Rate Limiting and Throttling
10.
OpenAPI / Swagger Generation
11.
Integration Testing HTTP Services
12.
Production Deployment
π Rust Standard Library Mastery
(10)
π Rust CLI & Tooling
(10)
1.
clap
2.
stdin, stdout, stderr
3.
Configuration Files and Environment Variables
4.
Colored Output and Progress Bars
5.
Signal Handling and Graceful Shutdown
6.
Subcommands and Complex CLI Structures
7.
Cross-Compilation for Linux, Mac, Windows
8.
Distribution
9.
Building TUIs with ratatui
10.
Testing CLI Applications
π Rust Testing Masterclass
(12)
π Rust Pattern Matching & Enums Deep Dive
(8)
π Rust Error Handling at Scale
(10)
π Rust Traits & Generics Masterclass
(15)
1.
Trait Fundamentals
2.
Default Implementations and Selective Overrides
3.
Trait Bounds
4.
where Clauses
5.
Associated Types vs Generic Parameters
6.
Supertraits
7.
dyn Trait
8.
Object Safety
9.
Blanket Implementations
10.
Orphan Rules and the Newtype Workaround
11.
Essential Std Traits
12.
Operator Overloading with Traits
13.
Monomorphization
14.
Const Generics
15.
GATs
π Rust Ownership & Lifetimes Masterclass
(15)
1.
The Mental Model
2.
Move Semantics
3.
Copy vs Clone
4.
The Borrow Checker
5.
Lifetime Annotations
6.
Lifetime Elision Rules
7.
Lifetimes in Structs
8.
'static
9.
Higher-Ranked Trait Bounds
10.
Self-Referential Structs
11.
Interior Mutability
12.
Rc and Arc
13.
Weak References
14.
Pin and Unpin
15.
When You're Fighting the Borrow Checker
π Idiomatic Rust
(25)
1.
Think in Ownership
2.
Borrow Strategically
3.
Option and Result Are Your Control Flow
4.
if let and while let
5.
Iterator Chains Over Manual Loops
6.
The Typestate Pattern
7.
The Newtype Pattern
8.
The Builder Pattern in Rust
9.
From and Into
10.
Deref Coercion
11.
Cow
12.
Designing Error Types
13.
Display and Debug
14.
derive Is Your Best Friend
15.
Exhaustive Matching
16.
Enums Over Booleans
17.
Zero-Cost Abstractions
18.
Drop and RAII
19.
PhantomData
20.
API Design Guidelines
21.
The Turbofish ::<>
22.
Feature Flags and Conditional Compilation
23.
Clippy Is Your Mentor
24.
Writing Great Rust Documentation
25.
When to Reach for unsafe
π Rust from Scratch
(25)
1.
Why Rust Exists
2.
Installing Rust
3.
Hello, World
4.
Variables, Mutability, and Primitive Types
5.
Functions, Expressions, and Statements
6.
Control Flow
7.
Ownership
8.
Borrowing and References
9.
Slices
10.
Strings
11.
Structs
12.
Enums and Option
13.
Pattern Matching
14.
Methods and Associated Functions
15.
Vec, HashMap, and HashSet
16.
Result and the ? Operator
17.
Modules
18.
Crates, Cargo.toml, and Dependencies
19.
Traits
20.
Generics
21.
Closures
22.
Iterators
23.
Writing Your First Tests
24.
Reading and Writing Files
25.
Where to Go from Here
π Rust in Practice
(5)
1.
Mastering Rust Lifetimes: The Comprehensive Guide
2.
Mastering Rust: The Complete Guide to Pattern Matching
3.
Rust Ultimate: The Ultimate Rust Cheatsheet You'll Ever Need
4.
From Novice to Master: 10 Must-Try Low-Level Programming Projects in Rust
5.
Rust in Finance: Building a Scalable High-Frequency Trading Platform from Scratch
Polyglot Engineer Β· Technical Leader. I ship AI-native tools, distributed systems, and developer platforms in Go, Rust, and TypeScript.
Activity
16 posts this year
No posts yet. Discussions will appear here.
Less
Post activity
Mar 9, 2026
π 6 min read
Lesson 10: Zero Values Are Useful β Go types that work before you touch themIn most languages, a freshly declared variable is either uninitialized garbage you can’t touch safely, or it needs a constructor call before it does β¦
Go tutorialgolang
Mar 1, 2026
π 9 min read
Lesson 40: Mock Interview Strategy β The 45-minute framework for any problemI have had interviews where I solved the problem correctly and still got rejected. I have also had interviews where I struggled significantly with the solution β¦
fundamentalsinterviews
Feb 23, 2026
π 5 min read
Lesson 12: Value vs Pointer Receivers β The method that silently does nothingValue vs pointer receivers is one of those topics that seems like a style preference until it silently breaks your program. The tell is a method that looks like β¦
Go tutorialgolang
Feb 20, 2026
π 7 min read
Lesson 28: Production Concurrency Architecture β Putting it all togetherThis is the lesson I wish existed when I started. Not “here’s how channels work” or “here’s a simple worker pool” β but the β¦
Go tutorialgolangconcurrency
Feb 18, 2026
π 8 min read
Lesson 9: Testing with Real Databases β Mocking sql.DB is lying to yourselfFor years, the standard advice for testing Go database code was to use sqlmock β a library that intercepts database calls and lets you assert which queries were β¦
Go tutorialgolangdatabase
Feb 15, 2026
π 8 min read
Lesson 39: Hard Composites β When one pattern isn't enoughThere is a class of interview problem designed specifically to differentiate senior candidates. These are not problems where knowing one pattern is enough β β¦
fundamentalsinterviews
Feb 9, 2026
π 5 min read
Lesson 19: Table-Driven Tests β One test function, fifty test casesMost engineers know to write tests. Fewer think about how the test code itself should scale. When you need to cover thirty input variations of a function, β¦
Go tutorialgolang
Feb 8, 2026
π 8 min read
Lesson 27: Idempotency in Concurrent Systems β Assume everything runs twiceEvery distributed system I’ve worked on eventually ran something twice. A retry after a timeout. A duplicate webhook delivery. A job that got processed by β¦
Go tutorialgolangconcurrency
Feb 3, 2026
π 7 min read
Lesson 38: Design Problems β Build it from scratch in 30 minutesDesign problems in coding interviews are different from system design rounds. You are not sketching architecture at a whiteboard β you are implementing a β¦
fundamentalsinterviews
Jan 27, 2026
π 7 min read
Lesson 8: Migrations Without Downtime β ALTER TABLE can lock your entire databaseThe first time I caused a production outage with a database migration, I was adding a NOT NULL column to a table. The migration looked innocent. It ran fine on β¦
Go tutorialgolangdatabase
Jan 26, 2026
π 5 min read
Lesson 22: Small Packages Win β One package, one jobThere is a particular kind of Go codebase that’s immediately recognizable as written by someone still thinking in another language. It has a utils β¦
Go tutorialgolang
Jan 23, 2026
π 7 min read
Lesson 26: Safe Background Jobs in Web Servers β Don''t spawn goroutines in handlersThe first time I saw go func() inside an HTTP handler, I thought it was clever. Fire off the slow work in the background, respond to the client fast, everybody β¦
Go tutorialgolangconcurrency
Jan 18, 2026
π 7 min read
Lesson 37: Concurrency Problems β The questions Google lovesConcurrency problems are the ones where an interviewer can tell immediately whether you actually understand concurrency or have just memorized solutions. They β¦
fundamentalsinterviews
Jan 15, 2026
π 7 min read
Lesson 25: Observability for Concurrency β You can''t fix what you can''t seeThe goroutine leak doesn’t announce itself. It just slowly inflates your memory graph β 50MB, 80MB, 150MB β until either your alerting fires or the OOM β¦
Go tutorialgolangconcurrency
Jan 12, 2026
π 6 min read
Lesson 7: Slices Are Views, Not Arrays β Mutations you didn''t ask forIf you’re coming from Python, JavaScript, or Java, slices look familiar enough that you’ll assume you understand them. That assumption will hold β¦
Go tutorialgolang
Jan 5, 2026
π 7 min read
Lesson 36: Intervals β Sort by start, merge by endInterval problems show up everywhere β in calendar APIs, in resource scheduling, in genomics, in timeline visualizations. In interviews they appear in a small β¦
fundamentalsinterviews
Dec 30, 2025
π 7 min read
Lesson 24: Testing Concurrent Code β Flaky tests mean flaky designA flaky test is a lie your codebase tells you. It says “this sometimes works and sometimes doesn’t” and if you’re honest with yourself, β¦
Go tutorialgolangconcurrency
Dec 29, 2025
π 7 min read
Lesson 25: Simplicity Is a Language Feature β Why Go says no so you can shipEvery Go design decision that looks like a missing feature is actually a deliberate choice to remove cognitive overhead. No method overloading. No implicit β¦
Go tutorialgolang
Dec 25, 2025
π 7 min read
Lesson 7: The N+1 Problem β One query per row is a performance bugThe N+1 problem is the most common database performance issue I find when reviewing Go code, and it’s especially sneaky because it looks totally fine in β¦
Go tutorialgolangdatabase
Dec 23, 2025
π 7 min read
Lesson 35: Greedy β Local optimal leads to global optimal (sometimes)Greedy algorithms have a brutal failure mode in interviews: the solution looks obvious, you implement it in fifteen minutes, and then the interviewer asks β¦
fundamentalsinterviews
Dec 22, 2025
π 7 min read
Lesson 23: Distributed vs Local Concurrency β Channels don''t cross process boundariesThere’s a particular kind of confidence that comes after you’ve spent a few months writing Go. You’ve learned channels, you understand the β¦
Go tutorialgolangconcurrency
Dec 15, 2025
π 5 min read
Lesson 17: select Is Elegant β Waiting on multiple futures without blockingEvery non-trivial concurrent program eventually needs to wait on more than one thing at a time. Maybe you’re waiting on a job channel but also need to β¦
Go tutorialgolang
Dec 11, 2025
π 6 min read
Lesson 34: Backtracking β Try everything, undo what doesn't workBacktracking scared me for a long time. The problems looked like they needed some clever mathematical insight β some observation that would magically reduce the β¦
fundamentalsinterviews
Dec 10, 2025
π 7 min read
Lesson 22: Rate Limiting and Load Shedding β Say no before you fall overThe most honest thing a server can do is say “no.” Not crash, not time out after 30 seconds, not queue work indefinitely until memory explodes β β¦
Go tutorialgolangconcurrency
Dec 3, 2025
π 8 min read
Lesson 6: Context with Database Queries β Every query needs a timeoutWe once had a query that ran for 47 minutes. I’m not joking. A reporting query that worked fine on the test dataset decided to do a full sequential scan β¦
Go tutorialgolangdatabase
Dec 1, 2025
π 6 min read
Lesson 9: range Gotchas β The loop variable that bit every Go teamrange looks harmless. Index and value, loop over a slice β what could go wrong? Quite a bit, it turns out. Some of the most insidious bugs I’ve seen in Go β¦
Go tutorialgolang
Nov 26, 2025
π 7 min read
Lesson 33: Trie β When you need prefix matchingTries showed up in a Google interview I did early in my career. The problem was autocomplete. I started sketching a hash map of prefixes to word lists and β¦
fundamentalsinterviews
Nov 25, 2025
π 7 min read
Lesson 21: Supervisor Patterns β Let it crash, then restart itErlang got famous for the “let it crash” philosophy. The idea is that trying to handle every possible error in every possible place produces β¦
Go tutorialgolangconcurrency
Nov 17, 2025
π 6 min read
Lesson 24: Prefer Plain Structs β Boring code is correct codeThere is a particular brand of cleverness that feels deeply satisfying to write and deeply painful to maintain. The AbstractServiceProviderFactory. The builder β¦
Go tutorialgolang
Nov 13, 2025
π 6 min read
Lesson 20: Profiling Contention β pprof knows where your goroutines sleepYou’ve added goroutines, you’ve got worker pools, you’ve written careful concurrent code β and the service is still slower than expected. β¦
Go tutorialgolangconcurrency
Nov 11, 2025
π 7 min read
Lesson 32: Heap Patterns β Keep the top K without sorting everythingThe first time I saw a “find the K largest elements” problem in an interview, I sorted the array and returned the last K. Correct answer, wrong β¦
fundamentalsinterviews
Nov 5, 2025
π 9 min read
Lesson 10: When Not to Use Rust β Honest trade-offsI like Rust. I’ve written 9 lessons about using it in production. I think it’s one of the most well-designed languages of the last twenty years. And β¦
Rust tutorialrustarchitectureproduction
Nov 3, 2025
π 4 min read
Lesson 11: Nil Slice vs Empty Slice β Same length, different meaningGo has two ways to have a slice with zero elements, and they are not the same thing. Developers coming from Python, Ruby, or JavaScript expect an empty β¦
Go tutorialgolang
Nov 2, 2025
π 9 min read
Lesson 9: War Stories β Lessons from real Rust deploymentsEvery language looks great in blog posts. Production is where the truth comes out. I’ve been running Rust services in production for a few years now, and β¦
Rust tutorialrustarchitectureproduction
Oct 31, 2025
π 6 min read
Lesson 19: Ordering vs Throughput β You can have fast or ordered, pick oneHere’s a tension that comes up in almost every real concurrent system: you want to process things fast, which means doing them in parallel, but the output β¦
Go tutorialgolangconcurrency
Oct 30, 2025
π 9 min read
Lesson 8: Migrating Services from Go/Python/Java to Rust β When and howI’ve been involved in three Rust migrations. One from Python, one from Go, one from Java. Two were successes. One was a disaster that got cancelled six β¦
Rust tutorialrustarchitectureproduction
Oct 30, 2025
π 6 min read
Lesson 31: Monotonic Stack β The next greater element trickI used to brute-force “next greater element” problems. Nested loops, O(nΒ²), and a silent prayer that the input was small. Then a senior engineer at β¦
fundamentalsinterviews
Oct 29, 2025
π 7 min read
Lesson 5: sqlc vs ORM vs Raw SQL β Pick your tradeoff, not your religionEvery time someone asks “should I use GORM or raw SQL?” a flame war breaks out. I’ve been on both sides of that argument, and I’ve β¦
Go tutorialgolangdatabase
Oct 28, 2025
π 8 min read
Lesson 7: Feature Flags at the Type Level β Compile-time feature controlWe had a feature that was ready for staging but absolutely not ready for production. In my previous Go gig, we’d have used a runtime feature flag service β¦
Rust tutorialrustarchitectureproduction
Oct 26, 2025
π 8 min read
Lesson 6: API Versioning and Backwards Compatibility β Don't break your usersI once shipped a “minor” API change on a Friday. Renamed a JSON field from user_name to username. Seemed harmless β we were cleaning up β¦
Rust tutorialrustarchitectureproduction
Oct 23, 2025
π 9 min read
Lesson 5: Multi-Crate Workspace Architecture β Scaling your codebaseOur 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 β¦
Rust tutorialrustarchitectureproduction
Oct 22, 2025
π 11 min read
Lesson 10: Interpreter Pattern β DSLs and parsingA 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 β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 21, 2025
π 11 min read
Lesson 4: CQRS and Event Sourcing β Separating reads from writesWe had this inventory service that was doing fine until it wasn’t. Reads were simple β “how many units of product X are available?” Writes β¦
Rust tutorialrustarchitectureproduction
Oct 20, 2025
π 5 min read
Lesson 18: sync.Mutex Is Often Simpler β Not everything needs a channelAfter you absorb the Go concurrency philosophy β share memory by communicating β there’s a temptation to reach for channels every time two goroutines need β¦
Go tutorialgolang
Oct 19, 2025
π 8 min read
Lesson 9: Entity Component System β Data-oriented designI spent years thinking about game objects the OOP way. A Player extends Character extends Entity. A Goblin extends Enemy extends Character extends Entity. Then β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 19, 2025
π 9 min read
Lesson 3: Hexagonal Architecture in Rust β Ports, adapters, and boundariesAbout 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 β¦
Rust tutorialrustarchitectureproduction
Oct 19, 2025
π 6 min read
Lesson 18: Backpressure Design β Slow down or blow upEvery 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 β¦
Go tutorialgolangconcurrency
Oct 17, 2025
π 8 min read
Lesson 2: Domain Modeling with Rust's Type System β Making impossible states impossibleWe 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 β¦
Rust tutorialrustarchitectureproduction
Oct 17, 2025
π 8 min read
Lesson 30: Bitmask DP β When the state is a setEvery 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 β¦
fundamentalsinterviews
Oct 16, 2025
π 7 min read
Lesson 8: Middleware / Chain of Responsibility β Tower-styleIf 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 β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 15, 2025
π 9 min read
Lesson 1: Structuring a Large Rust Application β Beyond hello worldThe moment I knew our Rust project structure was broken was when a junior engineer asked me where to put a new endpoint. I opened the repo, stared at the src/ β¦
Rust tutorialrustarchitectureproduction
Oct 13, 2025
π 7 min read
Lesson 7: Repository Pattern β Abstracting storageEvery backend developer eventually writes the same code: a function that takes a database connection, runs a query, maps the rows to a struct, and returns it. β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 11, 2025
π 7 min read
Lesson 6: Factory Patterns β When constructors aren't enoughHere’s a hot take: most “Factory pattern” usage in Java and C# exists purely to work around limitations of constructors. Constructors β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 9, 2025
π 7 min read
Lesson 5: Decorator Pattern β Wrapping with trait compositionI remember the moment Decorator clicked for me. I was reading the source for Java’s I/O library β BufferedInputStream wrapping FileInputStream wrapping β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 8, 2025
π 6 min read
Lesson 17: Go Scheduler Behavior β M:N scheduling is not magicMost Go developers write concurrent code for years without thinking about the scheduler. That’s by design β the scheduler is supposed to be invisible. But β¦
Go tutorialgolangconcurrency
Oct 7, 2025
π 7 min read
Lesson 4: Command Pattern β Closures as commandsThe Command pattern has always struck me as one of those patterns that’s really just “wrap a function call in an object.” In Java, you create β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 6, 2025
π 6 min read
Lesson 3: Multiple Return Values β Go functions don't hide their failuresIn most languages, a function returns one thing and communicates failure through a side channel β an exception, a null, a magic sentinel value. Go’s β¦
Go tutorialgolang
Oct 5, 2025
π 7 min read
Lesson 3: Observer Pattern β Channels and callbacks in RustThe Observer pattern is where Rust’s ownership model gets really opinionated. In C# or Java, Observer is simple β maintain a list of listeners, call a β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 4, 2025
π 8 min read
Lesson 29: State Machine DP β Track what state you're inMost DP problems have a clean one-dimensional state: position in an array, remaining capacity, current index. State machine DP adds another dimension that β¦
fundamentalsinterviews
Oct 3, 2025
π 7 min read
Lesson 2: Strategy Pattern β Trait objects and genericsIn my first real Go project, I wrote an interface for a payment processor. Two implementations β Stripe and PayPal. Simple polymorphism. When I tried the same β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 2, 2025
π 10 min read
Lesson 8: Runtime Comparison β Tokio vs async-std vs smol vs glommioEvery few months, someone asks me “which async runtime should I use?” and every time my answer is frustrating: “it depends.” But after β¦
Rust tutorialrustasyncruntimeinternals
Oct 2, 2025
π 7 min read
Lesson 4: The Repository Pattern β Sometimes a function is enoughThe repository pattern is one of those ideas that sounds great in an architecture talk and causes real pain when applied indiscriminately to a Go codebase. β¦
Go tutorialgolangdatabase
Oct 1, 2025
π 7 min read
Lesson 1: Builder Pattern β Typestate builders and compile-time validationI once spent three days debugging a production outage caused by a builder that silently accepted a missing host field and defaulted to localhost. In Java. The β¦
Rust tutorialrustdesign-patternsarchitecture
Oct 1, 2025
π 7 min read
Lesson 29: sync.Cond β The coordination primitive nobody teachesEvery Go concurrency course covers goroutines, channels, mutexes, WaitGroups, and maybe semaphores. Very few touch sync.Cond. It’s either treated as β¦
Go tutorialgolangconcurrency
Sep 30, 2025
π 10 min read
Lesson 7: Designing a Custom Async Runtime β When Tokio isn't enoughA colleague once asked me, “Why would anyone build a custom async runtime when Tokio exists?” Fair question. Tokio is battle-tested, β¦
Rust tutorialrustasyncruntimeinternals
Sep 29, 2025
π 6 min read
Lesson 16: Atomic Operations β Lock-free when you can, mutex when you mustThe first time I looked at sync/atomic, it felt like a niche tool for systems programmers writing lock-free data structures. Turns out it’s one of the β¦
Go tutorialgolangconcurrency
Sep 27, 2025
π 10 min read
Lesson 6: Work-Stealing Schedulers β Balancing load across coresI once spent two days debugging a performance issue where our Tokio application was using four cores but only one was doing any work. Three threads were idle, β¦
Rust tutorialrustasyncruntimeinternals
Sep 24, 2025
π 10 min read
Lesson 5: The Reactor Pattern β How Tokio actually worksI read the Tokio source code on a Sunday afternoon, expecting to find something inscrutable. Layers of unsafe code, impenetrable abstractions, the kind of thing β¦
Rust tutorialrustasyncruntimeinternals
Sep 22, 2025
π 12 min read
Lesson 10: Dependent Type Tricks β Encoding constraints in typesThere’s a running joke in the Rust community: “Rust has a dependent type system, it just doesn’t know it.” And like most good jokes, β¦
Rust tutorialrusttype-systemadvanced
Sep 22, 2025
π 5 min read
Lesson 13: iota for Enums β Constants that count themselvesGo doesn’t have a built-in enum keyword. What it has is iota, a constant counter that resets to zero at the start of each const block and increments with β¦
Go tutorialgolang
Sep 21, 2025
π 9 min read
Lesson 4: epoll/kqueue β Platform event loopsBefore I understood event loops, I thought async I/O was some kind of kernel magic. You register interest in a socket, and somehow the OS tells you when data β¦
Rust tutorialrustasyncruntimeinternals
Sep 19, 2025
π 9 min read
Lesson 9: Proof Witnesses β Types as proofsThe moment this clicked for me was when I was reviewing a crate that had a function signature like fn process(data: &[u8], _proof: NonEmpty<'_>). That β¦
Rust tutorialrusttype-systemadvanced
Sep 19, 2025
π 9 min read
Lesson 3: io_uring β Zero-copy async I/O on LinuxI ran a benchmark last year that genuinely surprised me. A simple TCP echo server using io_uring was handling 40% more connections per second than the same β¦
Rust tutorialrustasyncruntimeinternals
Sep 19, 2025
π 7 min read
Lesson 28: Interval DP β Optimal strategy between boundariesInterval DP is the pattern that solves problems where you need to find the optimal way to process a contiguous segment, and the answer depends on how you choose β¦
fundamentalsinterviews
Sep 18, 2025
π 6 min read
Lesson 15: Semaphores for Concurrency Limits β A channel with a size is a semaphoreThere’s a class of production bugs I see over and over β and the cause is almost always the same: nothing is telling the program to slow down. A spike in β¦
Go tutorialgolangconcurrency
Sep 17, 2025
π 9 min read
Lesson 2: Building a Minimal Executor β Your own async runtimeThe moment I built my first executor from scratch, async Rust stopped being scary. Not because executors are simple β they’re not β but because once you β¦
Rust tutorialrustasyncruntimeinternals
Sep 16, 2025
π 8 min read
Lesson 8: Sealed Traits β Closing extension pointsI was designing a public API for a parser library when I realized I had a problem. I wanted users to use my trait β call its methods, pass it as a bound β but I β¦
Rust tutorialrusttype-systemadvanced
Sep 15, 2025
π 9 min read
Lesson 1: Future Internals β Poll, Waker, ContextI thought I understood Rust futures until I tried to implement one without async/await. Not a toy future that immediately returns Ready. A real future β one β¦
Rust tutorialrustasyncruntimeinternals
Sep 13, 2025
π 9 min read
Lesson 7: Type-Level Programming β Computing with typesThere’s a moment in every Rust programmer’s journey where they look at typenum or some const-generics trick and think: “Wait, we’re β¦
Rust tutorialrusttype-systemadvanced
Sep 11, 2025
π 9 min read
Lesson 6: Variance β Covariance, contravariance, invarianceVariance is the topic that made me realize I didn’t actually understand Rust’s type system as well as I thought I did. I’d been writing Rust β¦
Rust tutorialrusttype-systemadvanced
Sep 9, 2025
π 9 min read
Lesson 5: Existential Types β impl Trait in depthI used impl Trait for months thinking it was just syntactic sugar for generics. “It’s the same as a type parameter, right? Just shorter?” No. β¦
Rust tutorialrusttype-systemadvanced
Sep 8, 2025
π 5 min read
Lesson 20: internal Package Is Underrated β Compiler-enforced privacy for freeGo has two visibility levels: exported (starts with a capital letter) and unexported (doesn’t). Most engineers use only these two. But there’s a β¦
Go tutorialgolang
Sep 7, 2025
π 9 min read
Lesson 4: Simulating Higher-Kinded Types in Rust β The workaroundsEvery time someone on Reddit says “Rust can’t do higher-kinded types,” a part of me wants to respond with a 200-line code block that proves β¦
Rust tutorialrusttype-systemadvanced
Sep 7, 2025
π 8 min read
Lesson 3: Transactions That Don't Bite β Begin, defer rollback, commitTransactions are the part of database programming where “it’s fine most of the time” really isn’t good enough. A buggy SELECT just β¦
Go tutorialgolangdatabase
Sep 5, 2025
π 9 min read
Lesson 3: Session Types β Protocol safety at compile timeI once spent three days debugging a distributed system where two services were sending messages in the wrong order. Service A expected a handshake β¦
Rust tutorialrusttype-systemadvanced
Sep 5, 2025
π 7 min read
Lesson 27: Knapsack Patterns β Pick or skip, that's the whole patternKnapsack is one of those patterns that shows up in disguise constantly. You’ll see problems framed as “partition this array,” “find a β¦
fundamentalsinterviews
Sep 3, 2025
π 8 min read
Lesson 2: Advanced Typestate β Multi-state machines at compile timeThe first time I implemented a connection pool that couldn’t be misused β not through discipline or documentation, but because the compiler physically β¦
Rust tutorialrusttype-systemadvanced
Sep 2, 2025
π 8 min read
Lesson 14: errgroup for Structured Concurrency β All succeed or all cancelThere’s a pattern that comes up constantly in backend services: make N concurrent calls, collect all their results, and if any one of them fails, cancel β¦
Go tutorialgolangconcurrency
Sep 1, 2025
π 8 min read
Lesson 1: Zero-Sized Types β PhantomData, () as design toolsI remember staring at a struct definition in a library I was reading β it had a field of type PhantomData<T> and I thought, “this does literally β¦
Rust tutorialrusttype-systemadvanced
Aug 30, 2025
π 9 min read
Lesson 8: ML Data Pipelines β polars and processing at speedLast quarter I inherited a Python data pipeline that prepared training data for our recommendation model. It processed 50 million rows. Took 3 hours. Used 64GB β¦
Rust tutorialrustaillm
Aug 26, 2025
π 8 min read
Lesson 7: On-Device Inference β ONNX Runtime and candleI run a sentiment analysis model on every support ticket that comes in. At first I used the OpenAI API β about 2 cents per ticket. Sounds cheap until you do the β¦
Rust tutorialrustaillm
Aug 26, 2025
π 8 min read
Lesson 13: Timeouts Everywhere β Unbounded waits are production bugsI have a strongly held opinion about timeouts: if you’re making a network call, a database query, or waiting on any external resource without a timeout, β¦
Go tutorialgolangconcurrency
Aug 25, 2025
π 6 min read
Lesson 5: Implicit Interfaces β The best decoupling you'll never declareIn Java or C#, you declare that a class implements an interface. You write implements Runnable, and the compiler ties that class to that interface forever. Go β¦
Go tutorialgolang
Aug 22, 2025
π 10 min read
Lesson 6: Building MCP Servers in Rust β Model Context ProtocolThe first time I heard about MCP, I dismissed it as yet another protocol nobody would adopt. Then Claude Desktop shipped with MCP support, then Cursor, then β¦
Rust tutorialrustaillm
Aug 20, 2025
π 10 min read
Lesson 5: Agent Architectures in Rust β ReAct, planning, and loopsI built my first “AI agent” by stuffing a system prompt into a while loop and hoping for the best. It worked β sometimes. Other times it’d get β¦
Rust tutorialrustaillm
Aug 20, 2025
π 7 min read
Lesson 26: DP on Trees β Post-order traversal meets memoizationTree DP is the pattern that catches people by surprise. You’ve been thinking of DP as filling a 1D or 2D table from left to right β a sequential, β¦
fundamentalsinterviews
Aug 18, 2025
π 9 min read
Lesson 8: Reproducible Builds β Same source, same binaryA security auditor once asked me to prove that the binary running in production was actually built from the source code we claimed. I confidently ran cargo β¦
Rust tutorialrustcargobuild-system
Aug 18, 2025
π 9 min read
Lesson 4: Embeddings and Vector Search β Semantic search in RustI spent a week building a keyword search system for internal documentation. Regex patterns, stemming, tf-idf scoring β the whole nine yards. Then someone β¦
Rust tutorialrustaillm
Aug 16, 2025
π 9 min read
Lesson 3: Tool Calling / Function Calling Patterns β Agents need toolsHere’s something that took me embarrassingly long to internalize: LLMs don’t do things. They generate text that describes doing things. The tool β¦
Rust tutorialrustaillm
Aug 15, 2025
π 9 min read
Lesson 7: Linking Strategies β Static, dynamic, LTOI deployed a Rust service to a minimal Docker container once β Alpine Linux, nothing installed except the binary. It crashed immediately with “not a β¦
Rust tutorialrustcargobuild-system
Aug 15, 2025
π 7 min read
Lesson 12: Leak Prevention β Every goroutine must have an exitGoroutine leaks are the memory leaks of concurrent Go. They’re slow, invisible, and tend to surface only under load β or worse, only after days of β¦
Go tutorialgolangconcurrency
Aug 14, 2025
π 8 min read
Lesson 2: Streaming LLM Responses β SSE and WebSocketsThe first time I demoed an LLM-powered feature to stakeholders, I made the rookie mistake of using non-streaming responses. The CEO asked a question, hit enter, β¦
Rust tutorialrustaillm
Aug 12, 2025
π 10 min read
Lesson 6: Monorepo Management with Workspaces β Scaling Rust projectsOur Rust project started as a single crate. Then we split the API handlers from the domain logic. Then we extracted shared types. Then someone added a CLI tool. β¦
Rust tutorialrustcargobuild-system
Aug 12, 2025
π 9 min read
Lesson 1: Building LLM API Clients in Rust β Type-safe AI callsLast month I watched a coworker’s Python script silently swallow a malformed response from the OpenAI API. The choices field came back empty, the code β¦
Rust tutorialrustaillm
Aug 11, 2025
π 6 min read
Lesson 15: Goroutines Are Cheap, Not Free β 2KB that can eat your server“Goroutines are cheap” is something you read in every Go introduction. It’s true. A goroutine starts with a 2KB stack and the runtime handles β¦
Go tutorialgolang
Aug 10, 2025
π 9 min read
Lesson 5: Code Generation β proc macros, build.rs, xtaskI once inherited a codebase where someone had written a Python script that generated 4,000 lines of Rust from a YAML spec. The script ran outside of Cargo, the β¦
Rust tutorialrustcargobuild-system
Aug 9, 2025
π 6 min read
Lesson 25: DP on Strings β Palindromes and partitionsString DP has its own flavor that’s distinct from the two-string comparison problems of the last lesson. Here, the state is typically a single string, but β¦
fundamentalsinterviews
Aug 8, 2025
π 12 min read
Lesson 12: Production Systems Software β Databases, runtimes, proxiesI’ve been building systems software professionally for a while now, and here’s what I’ve noticed: the skills we’ve covered in this β¦
Rust tutorialrustsystemslow-level
Aug 8, 2025
π 7 min read
Lesson 2: Connection Pool Tuning β Your pool config is probably wrongHere’s a scenario that played out for me once: service is running fine for weeks, then we double traffic, and suddenly requests start timing out. Not all β¦
Go tutorialgolangdatabase
Aug 7, 2025
π 9 min read
Lesson 4: Custom Lints with clippy and dylint β Your team's rulesWe had this rule on my old team: never use .unwrap() on database query results. We wrote it in our contributing guide. We mentioned it in code reviews. We added β¦
Rust tutorialrustcargobuild-system
Aug 5, 2025
π 8 min read
Lesson 3: Conditional Compilation β cfg, features, targetA 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 β¦
Rust tutorialrustcargobuild-system
Aug 4, 2025
π 10 min read
Lesson 11: Building a Minimal Hypervisor β Virtualization in RustThe 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 β¦
Rust tutorialrustsystemslow-level
Aug 3, 2025
π 8 min read
Lesson 2: build.rs β Code generation at compile timeThe 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 β¦
Rust tutorialrustcargobuild-system
Aug 3, 2025
π 6 min read
Lesson 11: Graceful Shutdown β Stop accepting, finish what you startedMost Go services handle startup carefully and shutdown carelessly. The startup code has retries, health checks, dependency validation. The shutdown code is β¦
Go tutorialgolangconcurrency
Aug 1, 2025
π 10 min read
Lesson 10: Writing a Bootloader β The first code that runsThere’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. β¦
Rust tutorialrustsystemslow-level
Aug 1, 2025
π 8 min read
Lesson 1: Cargo Deep Dive β Workspaces, features, profilesI’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 β β¦
Rust tutorialrustcargobuild-system
Jul 30, 2025
π 10 min read
Lesson 9: Interrupt Handlers and Real-Time Constraints β When timing mattersI once spent three days debugging a motor controller that would randomly twitch. The code was correct. The hardware was fine. The interrupt handler was β¦
Rust tutorialrustsystemslow-level
Jul 28, 2025
π 5 min read
Lesson 23: Error Values, Not Exceptions β Errors you can actually inspectIn 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 tutorialgolang
Jul 27, 2025
π 11 min read
Lesson 8: Designing Custom Allocators β Beyond the global allocatorHere’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 β¦
Rust tutorialrustsystemslow-level
Jul 24, 2025
π 11 min read
Lesson 7: Implementing Network Protocols β TCP from scratchI 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% β¦
Rust tutorialrustsystemslow-level
Jul 24, 2025
π 7 min read
Lesson 24: 2D DP Advanced β String comparison is always 2D DPEdit Distance from the previous lesson is the template for a whole family of problems. Any time you’re comparing two strings β finding common parts, β¦
fundamentalsinterviews
Jul 22, 2025
π 13 min read
Lesson 6: Building a File System β From blocks to filesThe moment a file system clicked for me was when I stopped thinking of files as “things on disk” and started thinking of them as “names mapped β¦
Rust tutorialrustsystemslow-level
Jul 19, 2025
π 10 min read
Lesson 5: OS Concepts in Rust β Processes, threads, signalsI used to think I understood processes. Then I tried to implement fork() semantics in Rust and realized I’d been cargo-culting UNIX concepts for years β¦
Rust tutorialrustsystemslow-level
Jul 18, 2025
π 9 min read
Lesson 8: The Component Model β Composable WASM modulesHere’s a scenario that actually happened to me: I had a data validation library written in Rust, a business logic layer in Go, and a reporting module that β¦
Rust tutorialrustwebassemblywasm
Jul 17, 2025
π 9 min read
Lesson 4: Writing Linux Kernel Modules in Rust β Rust in the kernelIn December 2022, Rust officially merged into the Linux kernel source tree. Not as an experiment. Not as a sidecar. As a first-class language for writing kernel β¦
Rust tutorialrustsystemslow-level
Jul 17, 2025
π 7 min read
Lesson 10: Pipelines and Stage Isolation β Each stage owns its output channelA pipeline is how you turn a stream of work into a sequence of transformations without writing a single monolithic function that does everything. Each stage β¦
Go tutorialgolangconcurrency
Jul 15, 2025
π 9 min read
Lesson 7: WASI β WebAssembly beyond the browserAbout a year ago, I deployed a Rust function as a Cloudflare Worker using WASM. Cold start: 0.5ms. Compare that to a Lambda function in any other language β β¦
Rust tutorialrustwebassemblywasm
Jul 14, 2025
π 11 min read
Lesson 3: Memory-Mapped I/O β Talking to hardwareThere’s a moment in every systems programmer’s life when they realize that writing to memory address 0x4002_0818 doesn’t store a value β it β¦
Rust tutorialrustsystemslow-level
Jul 14, 2025
π 5 min read
Lesson 1: Error Handling β Your code is lying if it ignores errorsIf you’re coming from Python, Java, or JavaScript, Go’s error handling will feel strange at first. There’s no try/catch. No exceptions β¦
Go tutorialgolang
Jul 13, 2025
π 10 min read
Lesson 6: Multi-Threaded WASM β SharedArrayBuffer and atomicsI got a 4.2x speedup on a real-time audio processing pipeline by adding threads to my WASM module. Four threads, 4.2x faster β nearly linear scaling. That β¦
Rust tutorialrustwebassemblywasm
Jul 13, 2025
π 7 min read
Lesson 23: 2D DP Basics β Two dimensions, one table1D DP was a single row β you filled it left to right and you were done. 2D DP extends that to a full table. You fill it row by row, and each cell depends on β¦
fundamentalsinterviews
Jul 12, 2025
π 9 min read
Lesson 2: Embedded Rust β Microcontrollers and bare metalI bricked my first development board within forty-five minutes of getting it out of the box. Wrote some C code, forgot to configure the clock properly, flashed β¦
Rust tutorialrustsystemslow-level
Jul 10, 2025
π 11 min read
Lesson 5: WASM Performance β When it beats JavaScript“WASM is faster than JavaScript.” I’ve heard this so many times, and it drives me nuts β not because it’s wrong, but because it’s β¦
Rust tutorialrustwebassemblywasm
Jul 10, 2025
π 9 min read
Lesson 1: no_std β Rust without the standard libraryThe first time I tried to compile a Rust program with #![no_std], I felt like someone had pulled the floor out from under me. No println!. No String. No Vec. No β¦
Rust tutorialrustsystemslow-level
Jul 10, 2025
π 6 min read
Lesson 9: Worker Pools β Bounded concurrency or bustProduction Go codebases that run fine in staging will sometimes crater under real traffic. More often than not, the cause is unbounded goroutine creation. Some β¦
Go tutorialgolangconcurrency
Jul 10, 2025
π 7 min read
Lesson 6: Agent Architectures β Building autonomous agents in GoAn agent is a loop: observe, think, act, repeat. The LLM is the “think” step β it decides what to do next given the current state. Your Go code β¦
Go tutorialgolangAILLMMCP
Jul 8, 2025
π 7 min read
Lesson 1: database/sql Done Right β The stdlib is better than you thinkI spent a long time reaching for third-party database libraries in Go before I actually read the database/sql docs. When I finally did, I was embarrassed β the β¦
Go tutorialgolangdatabase
Jul 7, 2025
π 11 min read
Lesson 4: Leptos, Yew, Dioxus β Full-stack RustAfter building that todo list with raw web-sys in Lesson 3, I think we can all agree: manually managing DOM nodes, closures wrapped in β¦
Rust tutorialrustwebassemblywasm
Jul 5, 2025
π 10 min read
Lesson 3: Manipulating the DOM from Rust β Web without JavaScriptThere’s something deeply satisfying about writing document.create_element("div") in Rust and watching it actually work in a browser. It’s β¦
Rust tutorialrustwebassemblywasm
Jul 5, 2025
π 6 min read
Lesson 8: strings and bytes Builders β Stop concatenating in loopsString concatenation with + is one of the most common performance bugs I see in Go code reviews. Not because developers are careless, but because the bug is β¦
Go tutorialgolangstdlib
Jul 4, 2025
π 11 min read
Lesson 10: Soundness β The ultimate safety guaranteeA few months ago, someone filed a soundness bug against a crate I maintained. The report was elegant β three lines of safe code that triggered a use-after-free β¦
Rust tutorialrustunsafeffi
Jul 3, 2025
π 9 min read
Lesson 2: wasm-bindgen β Bridging Rust and JavaScriptThe first time I looked at what #[wasm_bindgen] actually generates, I was equal parts impressed and horrified. Impressed because it seamlessly bridges two β¦
Rust tutorialrustwebassemblywasm
Jul 2, 2025
π 7 min read
Lesson 10: Over-Engineering CRUD β Not every API needs a hexagonal architectureThere is a category of service that I have built many times and will build many more times: an API that creates, reads, updates, and deletes records in a β¦
Go tutorialgolangcode quality
Jul 1, 2025
π 11 min read
Lesson 9: napi-rs β Rust extensions for Node.jsWe had a Node.js microservice that validated JWTs. Under load, the jsonwebtoken npm package was burning 40% of CPU on RSA signature verification. I wrote the β¦
Rust tutorialrustunsafeffi
Jul 1, 2025
π 8 min read
Lesson 1: Rust to WebAssembly β Why and howI was optimizing a client-side image processing pipeline last year β think heavy convolutions, histogram equalization, color space conversions. The JavaScript β¦
Rust tutorialrustwebassemblywasm
Jun 30, 2025
π 6 min read
Lesson 2: defer for Cleanup β Put the cleanup next to the messEvery time you open a file, acquire a lock, or start a database transaction, you’ve created a resource that needs to be released when you’re done β¦
Go tutorialgolang
Jun 28, 2025
π 11 min read
Lesson 8: PyO3 β Rust extensions for PythonI had a Python service that processed 2 million JSON records daily. Profiling showed 80% of the time was spent in one function β a custom similarity scoring β¦
Rust tutorialrustunsafeffi
Jun 27, 2025
π 7 min read
Lesson 22: 1D DP Advanced β When the state space gets interestingClimbing Stairs and House Robber have a comfortable property: dp[i] depends on just the previous one or two positions. Each step you take looks back a fixed β¦
fundamentalsinterviews
Jun 25, 2025
π 9 min read
Lesson 7: Exposing Rust to C β cdylib and cbindgenA team I was advising had a massive C codebase β about 400,000 lines of networking code. They wanted to rewrite their TLS handling in Rust but couldn’t β¦
Rust tutorialrustunsafeffi
Jun 24, 2025
π 7 min read
Lesson 8: Fan-Out / Fan-In β Distribute, collect, don''t leakThere’s a moment in every Go developer’s journey where the serial loop stops being acceptable. You’ve got 200 URLs to fetch, 500 records to β¦
Go tutorialgolangconcurrency
Jun 23, 2025
π 10 min read
Lesson 6: FFI β Calling C from RustMy first real FFI project was binding to SQLite. I thought “how hard can it be β it’s just calling C functions.” Three days later I was β¦
Rust tutorialrustunsafeffi
Jun 20, 2025
π 11 min read
Lesson 5: Building Safe Abstractions Over Unsafe Code β The encapsulation patternThe standard library’s Vec<T> contains over 50 unsafe blocks. HashMap has even more. Yet you use both every day without thinking about safety β β¦
Rust tutorialrustunsafeffi
Jun 20, 2025
π 6 min read
Lesson 10: The Complete Go Service β HTTP + DB + workers + shutdown in 200 linesEvery lesson in this series has been a piece of a puzzle. HTTP routing, middleware, validation, error responses, pagination, idempotency, timeouts, rate β¦
Go tutorialgolangbackend
Jun 18, 2025
π 9 min read
Lesson 4: transmute β Type punning and its dangersI once watched a senior engineer transmute a Vec<u8> into a Vec<u32> and couldn’t figure out why it segfaulted on ARM but worked fine on x86. β¦
Rust tutorialrustunsafeffi
Jun 18, 2025
π 5 min read
Lesson 6: API Gateway Patterns β One entry point, many backendsThe first time I connected a mobile frontend directly to 11 microservices, I created 11 places for the mobile team to integrate, 11 different auth schemes to β¦
Go tutorialgolangmicroservices
Jun 17, 2025
π 13 min read
Lesson 8: Monolith-First β Modular monoliths in RustI’m going to tell you something that might sound weird after seven lessons about microservices patterns: don’t start with microservices. Start with β¦
Rust tutorialrustmicroservicesarchitecture
Jun 16, 2025
π 11 min read
Lesson 3: Dereferencing Raw Pointers Safely β The patterns that workA colleague once showed me a bug that took them three days to find. Their unsafe code dereferenced a pointer that was valid when created but dangling by the β¦
Rust tutorialrustunsafeffi
Jun 16, 2025
π 5 min read
Lesson 14: context.Context β The parameter every function should take firstWithout context.Context, a function that makes a database call, fires an HTTP request, or runs a long computation has no way to be told to stop. The caller β¦
Go tutorialgolang
Jun 15, 2025
π 6 min read
Lesson 8: Zero-Downtime Deploys β Rolling updates without dropping requestsThe first rolling deployment I did without graceful shutdown handling produced about 200 errors for in-flight requests. Kubernetes sent SIGTERM to the old pods, β¦
Go tutorialgolangdeploymentdevops
Jun 14, 2025
π 9 min read
Lesson 2: Raw Pointers β *const T, *mut T and when you need themThe first time I used raw pointers in Rust, I was porting a ring buffer from C. I’d written ring buffers in C a dozen times β head pointer, tail pointer, β¦
Rust tutorialrustunsafeffi
Jun 14, 2025
π 10 min read
Lesson 7: Testing Microservices β Contract tests and integrationI deployed a change to the order service that renamed a field from total_amount to total_cents. Made perfect sense β cents avoid floating-point nonsense. All β¦
Rust tutorialrustmicroservicesarchitecture
Jun 14, 2025
π 9 min read
Lesson 8: Production Error Architecture β Designing the error system for a real serviceThis is the lesson where everything comes together. Over the previous seven lessons we’ve looked at sentinels and typed errors, wrapping strategy, error β¦
Go tutorialgolang
Jun 12, 2025
π 9 min read
Lesson 1: What unsafe Actually Means β The contract you're signingI spent my first six months writing Rust thinking unsafe meant “this code is dangerous and you should feel bad.” That misunderstanding cost me weeks β¦
Rust tutorialrustunsafeffi
Jun 12, 2025
π 8 min read
Lesson 7: Race Conditions and the Go Memory Model β The bug you can't reproduceRace conditions are the category of bug that makes senior engineers paranoid and junior engineers dismissive. They don’t reproduce consistently. Your β¦
Go tutorialgolangconcurrency
Jun 11, 2025
π 10 min read
Lesson 6: Distributed Tracing Across Services β Following requests“It’s slow” is the most useless bug report in a microservices world. Slow where? The API gateway? The order service? The database query inside β¦
Rust tutorialrustmicroservicesarchitecture
Jun 10, 2025
π 6 min read
Lesson 7: go:generate and Code Generation β Let the machine write the boring codego:generate is Go’s mechanism for attaching arbitrary code generation commands to your source files. It is not magic β it is a convention that tells go β¦
Go tutorialgolangreflection
Jun 9, 2025
π 9 min read
Lesson 5: Service Mesh Integration β Istio, Linkerd, and RustI’ll be honest β when someone first pitched “service mesh” to me, I thought it was over-engineered marketing. You’re telling me I need a β¦
Rust tutorialrustmicroservicesarchitecture
Jun 7, 2025
π 11 min read
Lesson 4: Saga Pattern β Distributed transactions without 2PCHere’s a scenario that’ll ruin your week. A customer places an order. Your order service saves it. Your payment service charges their card. Your β¦
Rust tutorialrustmicroservicesarchitecture
Jun 6, 2025
π 6 min read
Lesson 21: 1D DP Basics β If you can solve it recursively, you can DP itEvery time I bombed a DP problem in a mock interview, the pattern was the same: I stared at the problem, thought “this looks like DP,” then froze β¦
fundamentalsinterviews
Jun 5, 2025
π 11 min read
Lesson 3: Event-Driven Architecture in Rust β Decoupled systemsThe worst production incident I ever dealt with was a cascading failure triggered by a single slow database query. Service A called Service B synchronously, β¦
Rust tutorialrustmicroservicesarchitecture
Jun 5, 2025
π 5 min read
Lesson 8: Packaging and Distributing β GoReleaser, Homebrew, and getting your tool to usersBuilding a great CLI tool is half the job. The other half is getting it to users without making them compile it from source, navigate a GitHub releases page β¦
Go tutorialgolangCLI
Jun 4, 2025
π 13 min read
Lesson 10: Distributed System Patterns β Consensus, CRDTs, and consistencyI once watched a team spend six months building a “distributed database” that was really just PostgreSQL with a cron job that copied rows between β¦
Rust tutorialrustnetworkingdistributed-systems
Jun 3, 2025
π 10 min read
Lesson 2: gRPC Microservices with tonic β Production-grade RPCThe first time I used gRPC in production was on a Go project. The experience was fine β protoc generated stubs, you implemented an interface, done. Then I tried β¦
Rust tutorialrustmicroservicesarchitecture
Jun 2, 2025
π 5 min read
Lesson 21: Composition Over Inheritance β Small pieces, loosely joinedIf you’ve come from Java or C++, you’re probably waiting for Go to show you its inheritance model. Where’s the extends keyword? Where are the β¦
Go tutorialgolang
Jun 1, 2025
π 9 min read
Lesson 9: Message Queues β NATS, Kafka, RabbitMQ from RustThe moment I stopped thinking of services as calling each other and started thinking of them as reacting to events, my architecture got dramatically simpler. β¦
Rust tutorialrustnetworkingdistributed-systems
Jun 1, 2025
π 9 min read
Lesson 1: Service Boundaries and API Contracts β Where to draw the linesI once joined a team that had 47 microservices for what was essentially a CRUD app with a payment flow. Forty-seven. Each one had its own database, its own β¦
Rust tutorialrustmicroservicesarchitecture
Jun 1, 2025
π 5 min read
Lesson 8: Linting with golangci-lint β Automate what reviewers shouldn''t waste time onI made a rule for myself a few years ago: if I leave a code review comment about something a tool could have caught, I’ve wasted both the author’s β¦
Go tutorialgolangcode quality
May 31, 2025
π 7 min read
Lesson 6: Mutexes Done Right β The boring tool that actually worksChannels get the spotlight in Go talks and blog posts β they’re the shiny, idiomatic, philosophically interesting tool. Mutexes feel like the C and Java β¦
Go tutorialgolangconcurrency
May 29, 2025
π 9 min read
Lesson 8: Circuit Breakers in Rust β Failing fastPicture this: your payment service depends on a fraud detection API that’s completely down. Every request to it takes 30 seconds to timeout. Your payment β¦
Rust tutorialrustnetworkingdistributed-systems
May 26, 2025
π 9 min read
Lesson 7: Retry Strategies and Exponential Backoff β Resilient clientsHere’s a scenario that’s burned me more than once: a downstream service has a brief hiccup β maybe a pod is restarting, maybe there’s a β¦
Rust tutorialrustnetworkingdistributed-systems
May 23, 2025
π 8 min read
Lesson 6: TLS β rustls and native TLSI’ll never forget the 3am page that turned out to be an expired TLS certificate. Our automated renewal had been silently failing for two weeks, nobody β¦
Rust tutorialrustnetworkingdistributed-systems
May 22, 2025
π 6 min read
Lesson 7: context Internals β How cancellation propagates under the hoodcontext.Context is the most important type in Go’s standard library that most people use by convention without fully understanding. You pass it as the β¦
Go tutorialgolangstdlib
May 21, 2025
π 9 min read
Lesson 5: DNS Resolution and Custom Resolvers β Understanding name resolutionA few months back, our entire staging environment went down for an hour. Not because any service crashed β because someone changed a DNS record and forgot that β¦
Rust tutorialrustnetworkingdistributed-systems
May 21, 2025
π 6 min read
Lesson 5: sync.WaitGroup β Wait for everyone, then move onsync.WaitGroup is one of the first concurrency primitives you reach for in Go, and also one of the first you misuse. The API looks deceptively simple β three β¦
Go tutorialgolangconcurrency
May 20, 2025
π 7 min read
Lesson 9: Fake Clean Architecture β Layers without purpose are just foldersI cloned a Go repository that was described to me as a “clean architecture” implementation. It had six layers: handler, usecase, service, β¦
Go tutorialgolangcode quality
May 19, 2025
π 6 min read
Lesson 4: The comma ok Idiom β Two returns that save you from panicsThere are three places in Go where a missing second return value means your program either silently does the wrong thing or blows up entirely: reading from a β¦
Go tutorialgolang
May 18, 2025
π 9 min read
Lesson 8: Security Fuzzing β Finding vulnerabilities before attackers doI found a panic in a production parser by accident last year. A user in Japan sent a request with a multi-byte UTF-8 character right at a boundary where our β¦
Rust tutorialrustsecurity
May 18, 2025
π 9 min read
Lesson 4: WebSocket Servers and Clients β Real-time communicationI built my first WebSocket server to power a live dashboard that showed deployment status across our fleet. The alternative was polling every 2 seconds β 500 β¦
Rust tutorialrustnetworkingdistributed-systems
May 18, 2025
π 6 min read
Lesson 5: Embedding and Vector Search β Semantic search in Go without PythonFor a long time, embedding-based semantic search felt like Python territory. The tutorials all pointed to LangChain, FAISS, and numpy. But the actual operations β¦
Go tutorialgolangAILLMMCP
May 17, 2025
π 9 min read
Interview Patterns L20: Shortest Path β When edges have weightsIn L16, I explained why BFS solves shortest path problems in unweighted graphs β every edge costs the same, so distance equals hop count, and BFS naturally β¦
fundamentalsinterviews
May 16, 2025
π 9 min read
Lesson 3: gRPC with tonic β High-performance RPCThe first time I used gRPC in production, I was skeptical. We already had REST APIs that worked fine β why add protobuf compilation, code generation, and an β¦
Rust tutorialrustnetworkingdistributed-systems
May 15, 2025
π 9 min read
Lesson 7: Sandboxing and Privilege Dropping β Least privilegeHere’s a pattern I’ve seen too many times: a Rust web service runs as root in a Docker container because “it needs to bind port 443.” β¦
Rust tutorialrustsecurity
May 15, 2025
π 6 min read
Lesson 8: gRPC Basics and Streaming β Protobuf on the wire, types in your codeMy team migrated a set of internal service APIs from JSON over HTTP/1.1 to gRPC roughly two years ago. The motivating factors were type safety across service β¦
Go tutorialgolangnetworking
May 14, 2025
π 8 min read
Lesson 2: HTTP Clients β reqwest and hyperI once spent three hours debugging a production issue that turned out to be an HTTP client with no timeout configured. Three hours. The client was happily β¦
Rust tutorialrustnetworkingdistributed-systems
May 13, 2025
π 7 min read
Lesson 7: Panic, Recover, and When They're Actually Justified β Panic is not error handlingI’ve seen panic(err) used as error handling more times than I’d like to admit β including in codebases I helped build. The reasoning always sounds β¦
Go tutorialgolang
May 12, 2025
π 8 min read
Lesson 6: Supply Chain Security β Lockfiles, vendoring, and trustThe xz backdoor was a wake-up call for the entire industry, but honestly, supply chain attacks had been happening for years before that β just more quietly. β¦
Rust tutorialrustsecurity
May 12, 2025
π 9 min read
Lesson 1: Building a TCP Server from Scratch β Raw socketsLast month I was debugging a flaky microservice at work and realized I couldn’t explain what was actually happening between bind() and the first byte β¦
Rust tutorialrustnetworkingdistributed-systems
May 12, 2025
π 7 min read
Lesson 4: Buffered vs Unbuffered Channels β Buffering hides bugsThe first time someone tells you that buffered channels are faster, you believe them β and you spend the next year throwing make(chan T, 100) at every β¦
Go tutorialgolangconcurrency
May 10, 2025
π 6 min read
Lesson 9: Config Management β Twelve-factor or twelve headachesI have seen configuration managed in at least ten different ways across the Go projects I have worked on: hardcoded constants, config structs passed around by β¦
Go tutorialgolangbackend
May 9, 2025
π 8 min read
Lesson 5: Dependency Auditing β cargo-audit and cargo-denyYou know what keeps me up at night? Not my own code β I can review that. It’s the 200+ transitive dependencies in my Cargo.lock that I’ve never read β¦
Rust tutorialrustsecurity
May 8, 2025
π 9 min read
Lesson 8: Release Profiles and Build Optimization β Shipping fast binariesI was benchmarking two builds of the same service β one with default release settings, one with a tuned profile. Same code. Same hardware. The tuned build was β¦
Rust tutorialrustdeploymentdevops
May 8, 2025
π 7 min read
Lesson 8: Designing Interfaces for Libraries β Libraries export interfaces, apps consume themWriting a library for other Go developers is a fundamentally different design problem than writing application code. In an application, you control every call β¦
Go tutorialgolanginterfaces
May 7, 2025
π 9 min read
Lesson 4: Secret Management β zeroize and secure memoryA while back I was debugging a crash in production and pulled a core dump from the server. Sitting right there in the heap, in plain text, was a database β¦
Rust tutorialrustsecurity
May 5, 2025
π 8 min read
Lesson 3: Cryptography β ring, RustCrypto, and sodiumoxideI’m going to say something controversial: most developers should never write cryptographic code. Not because they’re not smart enough β because the β¦
Rust tutorialrustsecurity
May 5, 2025
π 8 min read
Lesson 7: Configuration β Environment, files, feature flagsI once shipped a service to production with the staging database URL hardcoded. Not in an environment variable β literally in the source code, in a const. It β¦
Rust tutorialrustdeploymentdevops
May 5, 2025
π 6 min read
Lesson 9: Dependency Scanning β govulncheck before you deployThe security posture of your Go application is not just about the code you write β it is also about the code you import. A typical Go microservice will have β¦
Go tutorialgolangsecurity
May 5, 2025
π 5 min read
Lesson 16: Channels Are for Coordination β Stop using channels as fancy mutexesChannels are Go’s most recognizable concurrency feature, and also one of the most misused. The moment engineers learn about them, there’s a strong β¦
Go tutorialgolang
May 3, 2025
π 9 min read
Lesson 2: Input Validation and Sanitization β Trust nothingA few months ago, I was reviewing a PR where someone had written a REST API handler that took a user-supplied filename, appended it to a base path, and opened β¦
Rust tutorialrustsecurity
May 2, 2025
π 8 min read
Lesson 6: Graceful Shutdown β Draining connections cleanlyI deployed a new version of a payment service once, and for about 3 seconds during the rollout, a handful of transactions just… vanished. They β¦
Rust tutorialrustdeploymentdevops
May 1, 2025
π 8 min read
Lesson 1: Memory Safety β What Rust gives you for freeLast year I inherited a C++ service that had been “battle-tested” in production for three years. Within a week of digging through crash dumps, I β¦
Rust tutorialrustsecurity
Apr 30, 2025
π 8 min read
Lesson 5: Health Checks and Readiness Probes β Production livenessA service I maintained once passed all its health checks while silently dropping 30% of incoming requests. The health endpoint returned 200 OK every time β¦
Rust tutorialrustdeploymentdevops
Apr 30, 2025
π 8 min read
Interview Patterns L19: Union Find β Who belongs to whom?Union Find is one of those data structures that most people never implement until they need it in an interview, and then they discover it is both elegant and β¦
fundamentalsinterviews
Apr 27, 2025
π 6 min read
Lesson 4: Observability β tracing, metrics, OpenTelemetryI once spent six hours debugging a production issue where requests were randomly timing out. No errors in the logs. CPU and memory looked fine. Response times β¦
Rust tutorialrustdeploymentdevops
Apr 25, 2025
π 7 min read
Lesson 3: Channel Ownership Rules β Who closes the channel?At some point, you’re going to close a channel twice and the runtime is going to panic with close of closed channel. Or you’re going to close a β¦
Go tutorialgolangconcurrency
Apr 24, 2025
π 7 min read
Lesson 3: CI/CD for Rust β GitHub Actions, caching, cargo-nextestMy first Rust CI pipeline took 45 minutes. Forty-five. Every push triggered a full dependency build, tests ran sequentially, and clippy ran as a separate job β¦
Rust tutorialrustdeploymentdevops
Apr 24, 2025
π 8 min read
Lesson 10: Using unsafe to Escape the Borrow Checker β The wrong reasonI found this in a production codebase:
fn get_or_insert(&mut self, key: &str) -> &mut Value { if !self.map.contains_key(key) { β¦
Rust tutorialrustanti-patternscode-quality
Apr 22, 2025
π 7 min read
Lesson 2: Static Linking with musl β Single binary deploysLast year I had to deploy a Rust service to a hardened environment β no package manager, no shared libraries, no internet access. Just a bare Linux kernel and β¦
Rust tutorialrustdeploymentdevops
Apr 21, 2025
π 7 min read
Lesson 9: Macro Abuse β When a function would doI spent an entire afternoon debugging a test failure that turned out to be caused by a macro expanding variable names in a way I didn’t expect. The macro β¦
Rust tutorialrustanti-patternscode-quality
Apr 21, 2025
π 5 min read
Lesson 8: Capacity Matters β The allocation tax you''re paying without knowingThere’s a one-line fix that will make your hot paths faster, use less memory, and reduce GC pressure. It costs you nothing in readability. Most Go β¦
Go tutorialgolang
Apr 20, 2025
π 8 min read
Lesson 1: Docker for Rust β Multi-stage builds, minimal imagesThe first time I shipped a Rust service in Docker, my image was 2.1 GB. Two. Point. One. Gigabytes. For a binary that was 8 MB. I’d used rust:latest as my β¦
Rust tutorialrustdeploymentdevops
Apr 19, 2025
π 7 min read
Lesson 8: Premature Optimization β Profile before you optimizeA teammate once spent three days replacing every String in our data model with a custom arena-allocated string type. The rationale: “String allocations β¦
Rust tutorialrustanti-patternscode-quality
Apr 19, 2025
π 6 min read
Lesson 6: Error Boundaries Across Layers β Translate at the border, don't leak internalsOne of the most subtle security issues I’ve encountered in Go APIs isn’t an authentication bug or a missing authorization check β it’s a SQL β¦
Go tutorialgolang
Apr 18, 2025
π 6 min read
Lesson 5: Saga Pattern β Distributed transactions without two-phase commitTwo-phase commit is theoretically elegant and operationally painful. I’ve seen it cause system-wide deadlocks during network partitions, coordinator β¦
Go tutorialgolangmicroservices
Apr 16, 2025
π 7 min read
Lesson 7: Arc<Mutex<T>> as Default β Reach for channels firstThere’s a specific moment in every Rust developer’s journey where they discover Arc<Mutex<T>> and start putting everything in it. β¦
Rust tutorialrustanti-patternscode-quality
Apr 15, 2025
π 7 min read
Lesson 6: Trait Bloat β Interface segregation in RustI worked on a project that had a Storage trait with twenty-three methods. Twenty-three. It handled reading, writing, deleting, listing, searching, watching for β¦
Rust tutorialrustanti-patternscode-quality
Apr 15, 2025
π 8 min read
Lesson 8: String Internals β Immutable, backed by bytes, cheaper than you thinkI used to reach for []byte over string in performance-sensitive code, assuming strings were somehow more expensive because “immutability must cost β¦
Go tutorialgolanginternals
Apr 14, 2025
π 7 min read
Interview Patterns L18: Topological Sort β Order tasks with dependenciesTopological sort comes up whenever there is an ordering constraint β “A must happen before B,” “module X depends on module Y,” β¦
fundamentalsinterviews
Apr 13, 2025
π 7 min read
Lesson 5: Over-Genericizing β Not everything needs <T>I reviewed a library last year where the author had made literally everything generic. The HTTP client was generic over the transport, the serializer, the β¦
Rust tutorialrustanti-patternscode-quality
Apr 13, 2025
π 6 min read
Lesson 2: Cancellation with context.Context β Every goroutine needs a kill switchWithout context.Context, you have goroutines running long after the user who triggered them gave up, HTTP connections burning server resources for requests β¦
Go tutorialgolangconcurrency
Apr 12, 2025
π 9 min read
Lesson 12: Zero-Copy Parsing β bytes, nom, winnowI once had to parse 2GB of log files per hour on a machine with 4GB of RAM. The naive approach β read line, split into fields, store as String β peaked at 6GB β¦
Rust tutorialrustperformance
Apr 12, 2025
π 5 min read
Lesson 7: Profiling in Containers β pprof works in Kubernetes tooThe first time I needed to profile a Go service in production, I assumed I’d have to deploy a special build, reproduce the problem locally, or use some β¦
Go tutorialgolangdeploymentdevops
Apr 11, 2025
π 7 min read
Lesson 4: God Structs β When types do too muchI once opened a file called app.rs and found a struct with forty-two fields. Forty-two. It held the database connection, the HTTP client, the cache handle, the β¦
Rust tutorialrustanti-patternscode-quality
Apr 10, 2025
π 8 min read
Lesson 8: Avoiding Premature Optimization β Measure first, optimize never (usually)I’ve spent time in this series showing you how to make Go programs faster β escape analysis, stack allocation, pre-sizing data structures, zero-copy β¦
Go tutorialgolangperformance
Apr 9, 2025
π 6 min read
Lesson 3: Stringly Typed APIs β Use enums, not stringsI inherited a Rust codebase once where the entire state machine was driven by string comparisons. The order status could be "pending", β¦
Rust tutorialrustanti-patternscode-quality
Apr 8, 2025
π 6 min read
Lesson 6: Avoiding Reflection β Generics and code generation often winAfter spending several lessons on what reflection can do, it is worth turning the question around: when should you specifically choose not to use reflection, β¦
Go tutorialgolangreflection
Apr 7, 2025
π 7 min read
Lesson 2: unwrap() in Production β Time bombs waiting to explodeA service I was responsible for went down at 2 AM on a Saturday because of a single .unwrap() call on line 847 of a file nobody had touched in months. The β¦
Rust tutorialrustanti-patternscode-quality
Apr 7, 2025
π 7 min read
Lesson 11: Binary Size Reduction β Smaller deploymentsI shipped a “hello world” Rust binary to a team once and they came back confused: “Why is this 4 megabytes?” Fair question. A C β¦
Rust tutorialrustperformance
Apr 7, 2025
π 6 min read
Lesson 6: Accept Interfaces, Return Structs β Flexibility in, certainty outHere’s a mistake I see in almost every Go codebase written by people coming from Java or C#: they accept concrete types everywhere and return interfaces β¦
Go tutorialgolang
Apr 6, 2025
π 5 min read
Lesson 1: Goroutine Lifecycle Management β Who owns this goroutine?Nobody tells you that the first goroutine you “fire and forget” in production is the one that eventually takes down your service at 3 AM. You start β¦
Go tutorialgolangconcurrency
Apr 5, 2025
π 6 min read
Lesson 1: .clone() Everywhere β Hiding ownership problemsI was reviewing a pull request last year from a developer who’d been writing Rust for about three months. The code compiled. The tests passed. Everything β¦
Rust tutorialrustanti-patternscode-quality
Apr 5, 2025
π 5 min read
Lesson 7: Build Flags and ldflags β Inject version info at compile timeA CLI tool that cannot tell you what version it is running is a frustrating tool to operate. When something breaks, the first question is “which β¦
Go tutorialgolangCLI
Apr 3, 2025
π 7 min read
Lesson 10: Compile Time Optimization β Strategies that actually workMy main Rust project at work took 4 minutes and 38 seconds for a clean build. That was two years ago. Today it takes 52 seconds. Same codebase β more code, β¦
Rust tutorialrustperformance
Apr 2, 2025
π 6 min read
Lesson 8: Premature Abstraction β Wrong abstraction costs more than duplicationThere is a principle in software development β “Don’t Repeat Yourself” β that is so widely known it gets abbreviated to DRY and invoked to β¦
Go tutorialgolangcode quality
Apr 1, 2025
π 5 min read
Lesson 7: Kill the Utils Package β util.go is where code goes to hideEvery Go codebase I’ve worked on for more than a year has a util package. Some have a helpers package. Some have both. I’ve seen common, shared, β¦
Go tutorialgolangcode quality
Mar 31, 2025
π 8 min read
Lesson 9: Inlining β #[inline] and LTOA few years ago I was profiling a JSON parser and noticed something weird. A tiny function β four lines, no allocations β was showing up as a 15% hot spot. Not β¦
Rust tutorialrustperformance
Mar 29, 2025
π 9 min read
Lesson 8: Cache-Friendly Data Structures β Data-oriented designHere’s a number that should change how you think about data structures: reading from L1 cache takes about 1 nanosecond. Reading from main memory takes β¦
Rust tutorialrustperformance
Mar 27, 2025
π 7 min read
Lesson 7: Choosing the Right Collection β It's not always VecA friend asked me to review their service that was doing “thousands of lookups per second” against a Vec of about 50,000 entries. Linear scan every β¦
Rust tutorialrustperformance
Mar 25, 2025
π 7 min read
Lesson 6: String Performance β SmartString, CompactStr, and when to careI was building an in-memory index that stored about 2 million tag strings. Most were short β “rust”, “go”, “api”, β¦
Rust tutorialrustperformance
Mar 25, 2025
π 7 min read
Lesson 10: Test Architecture β Tests that survive refactoringEvery test suite starts clean. Then the codebase grows, the team grows, deadlines hit, and gradually the tests become the thing you dread touching. You add a β¦
Go tutorialgolangtesting
Mar 24, 2025
π 8 min read
Interview Patterns L17: Graph DFS β Explore everything, mark what you've seenGraph DFS is the tool you reach for when you need to explore every reachable node, not just the closest ones. Unlike BFS, which expands in rings of increasing β¦
fundamentalsinterviews
Mar 23, 2025
π 8 min read
Lesson 5: Iterators vs Loops β Performance characteristicsWhen I first started writing Rust, I wrote everything as for loops. Old habits from C. Then someone on my team rewrote one of my loops as an iterator chain and β¦
Rust tutorialrustperformance
Mar 22, 2025
π 11 min read
Lesson 10: How rustc Works β From source code to binaryA junior on my team once asked why Rust compiles so slowly compared to Go. I gave the standard answer about monomorphization and LLVM, but realized I β¦
Rust tutorialrustinternals
Mar 22, 2025
π 6 min read
Lesson 6: sync Package Complete Guide β Mutex, Once, Pool, Map β when to use eachThe sync package is where Go’s concurrency tools live when channels aren’t the right answer. sync.Mutex, sync.RWMutex, sync.WaitGroup, sync.Once, β¦
Go tutorialgolangstdlib
Mar 21, 2025
π 8 min read
Lesson 4: Reducing Allocations β Stack, arena, SmallVecI profiled a Rust web service once and found it was allocating 47,000 times per request. Forty-seven thousand. Most were tiny β 16-byte strings, 3-element β¦
Rust tutorialrustperformance
Mar 20, 2025
π 6 min read
Lesson 7: Outbox Pattern β Reliable events without distributed transactionsHere’s a bug that’s bitten almost every distributed system I’ve worked on: a service saves a record to the database and then publishes an β¦
Go tutorialgolangnetworking
Mar 19, 2025
π 8 min read
Lesson 3: Profiling β perf, flamegraph, samplyA colleague once asked me to look at a Rust service that was “slow.” They’d already spent a week trying to optimize the JSON parsing layer β¦
Rust tutorialrustperformance
Mar 19, 2025
π 9 min read
Lesson 9: Miri β Your safety net for unsafe RustI once shipped a Rust library with an unsafe block that worked perfectly on x86, passed all tests, and ran flawlessly in production for months. Then someone β¦
Rust tutorialrustinternals
Mar 18, 2025
π 7 min read
Lesson 5: Debugging in Kubernetes β kubectl tricks that save hoursThe most stressful hours of my on-call life have been in Kubernetes clusters where something was wrong but nothing was obviously broken. Pods in Pending for β¦
fundamentalskubernetesdevops
Mar 17, 2025
π 8 min read
Lesson 2: Benchmarking with criterion and divan β Statistically rigorous benchmarksLast year I reviewed a PR where someone claimed their new serialization code was “2x faster.” Their benchmark? std::time::Instant::now() called once β¦
Rust tutorialrustperformance
Mar 17, 2025
π 7 min read
Lesson 5: Logging vs Returning β Log at the boundary, return everywhere elseThere’s a smell I encounter in almost every codebase I’ve reviewed β including ones I wrote early in my Go career. Someone discovers that err != nil β¦
Go tutorialgolang
Mar 16, 2025
π 9 min read
Lesson 8: Custom Allocators β GlobalAlloc, arena allocation, and beyondI was building a JSON parser that processed millions of small documents per second. Profiling showed that 40% of the time was spent in malloc and free β not β¦
Rust tutorialrustinternals
Mar 15, 2025
π 8 min read
Lesson 1: Performance Philosophy β Measure, don't guessI once spent three days rewriting a hot loop to avoid a single allocation per iteration. Hand-rolled a custom arena, eliminated two clones, even switched from β¦
Rust tutorialrustperformance
Mar 15, 2025
π 6 min read
Lesson 8: Rate Limiting β Say no before you breakA service I was running had no rate limiting. One night, a script that a client was testing started sending requests in a tight loop β about 4,000 requests per β¦
Go tutorialgolangbackend
Mar 13, 2025
π 10 min read
Lesson 7: Drop Order β Deterministic destruction and why it mattersI once had a deadlock in a Rust program that only manifested during shutdown. A mutex guard and a database connection were being dropped in the wrong order β β¦
Rust tutorialrustinternals
Mar 12, 2025
π 6 min read
Lesson 4: Tool Calling Patterns β Letting the LLM invoke your Go functionsTool calling is where LLM integrations get genuinely powerful. Without tool calling, you’re limited to asking the model to generate text. With tool β¦
Go tutorialgolangAILLMMCP
Mar 11, 2025
π 10 min read
Lesson 6: repr(C), repr(transparent), repr(packed) β Taking control of memory layoutThe first time I wrote Rust FFI bindings to a C library, I defined a struct, passed it across the boundary, and got garbage data back. The C side was reading β¦
Rust tutorialrustinternals
Mar 10, 2025
π 6 min read
Lesson 8: Secure HTTP Defaults β Your production server needs these headersWhen I run the Go HTTP server in the standard library with no configuration, it does a lot of things right β it is fast, it handles HTTP/2, it is well-tested. β¦
Go tutorialgolangsecurity
Mar 9, 2025
π 9 min read
Lesson 5: Fat Pointers β &dyn Trait, &[T], and &str under the hoodI remember being confused why &str was 16 bytes on a 64-bit system. A pointer is 8 bytes β what’s the other 8? That question sent me down a rabbit β¦
Rust tutorialrustinternals
Mar 8, 2025
π 6 min read
Lesson 7: The io.Reader/Writer Ecosystem β The most powerful 2-method interfaces in GoIf you want to understand what makes Go interfaces powerful, do not start with your own code. Start with io.Reader. It is one method β Read(p []byte) (n int, β¦
Go tutorialgolanginterfaces
Mar 7, 2025
π 8 min read
Lesson 4: vtables β How dyn Trait actually works under the hoodI was profiling a parser once and found that a hot path using dyn Iterator was 3x slower than the equivalent code using generics. The algorithm was identical. β¦
Rust tutorialrustinternals
Mar 7, 2025
π 8 min read
Interview Patterns L16: Graph BFS β Shortest path in unweighted graphsThe moment someone says “shortest path” in an interview, I mentally split the problem into two cases: weighted or unweighted? If unweighted β every β¦
fundamentalsinterviews
Mar 5, 2025
π 8 min read
Lesson 3: Box β Heap allocation by choiceWhen I first started writing Rust, I used Box everywhere. Came from a Java background where everything lives on the heap, and wrapping things in Box felt β¦
Rust tutorialrustinternals
Mar 5, 2025
π 7 min read
Lesson 7: The Complete Observability Stack β Logs, metrics, traces, profiles β wired togetherWe have covered each signal in isolation β structured logs, Prometheus metrics, OpenTelemetry traces, correlation IDs, pprof profiles, and latency β¦
Go tutorialgolangobservability
Mar 4, 2025
π 9 min read
Lesson 12: Macro Anti-Patterns β When not to macroI once worked on a codebase where someone had written a macro for everything. Creating structs? Macro. Implementing a two-line function? Macro. Logging? Custom β¦
Rust tutorialrustmacrosmetaprogramming
Mar 3, 2025
π 9 min read
Lesson 2: Stack vs Heap β Where your data actually livesA colleague once asked me why their Rust program was ten times slower than expected. They were allocating a Vec<u8> inside a tight loop β millions of heap β¦
Rust tutorialrustinternals
Mar 2, 2025
π 7 min read
Lesson 5: What's New in Go 1.25β1.26 β Swiss table maps, weak pointers, and the futureEvery major Go release follows a rhythm: one or two headline language features, a handful of standard library additions, and a runtime improvement you probably β¦
Go tutorialgolangmodern Go
Mar 1, 2025
π 8 min read
Lesson 11: Real-World Macro Patterns β serde, clap, sqlx under the hoodI used #[derive(Serialize)] for two years before I actually looked at what it generates. When I finally ran cargo expand on a struct with five fields, I got 150 β¦
Rust tutorialrustmacrosmetaprogramming
Mar 1, 2025
π 8 min read
Lesson 1: Memory Layout β Size, alignment, and the padding you never asked forI spent an embarrassing amount of time debugging a networking project where my hand-crafted packet structs were mysteriously three bytes too large. Turns out β¦
Rust tutorialrustinternals
Mar 1, 2025
π 7 min read
Lesson 7: Values Copy vs Share β When Go copies and when it doesn'tEarly in my Go career I had a bug where I modified a slice inside a function expecting the caller’s slice to remain unchanged β and it did. Then I had a β¦
Go tutorialgolanginternals
Feb 28, 2025
π 7 min read
Lesson 4: Operational vs Domain Errors β Not all errors deserve the same treatmentOne of the more expensive lessons I learned was treating all errors the same. When a database connection drops, you retry. When a user sends an invalid email β¦
Go tutorialgolang
Feb 27, 2025
π 10 min read
Lesson 10: syn and quote β Parsing and generating tokensEvery time I write a proc macro without syn and quote, I regret it within twenty minutes. Raw TokenStream manipulation is like writing HTML by concatenating β¦
Rust tutorialrustmacrosmetaprogramming
Feb 25, 2025
π 7 min read
Lesson 7: go.work and Workspace Mode β Developing multiple modules without replace hacksBefore go.work existed, developing across multiple local Go modules was genuinely painful. You were working on a library in one directory and an application β¦
Go tutorialgolangarchitecture
Feb 24, 2025
π 8 min read
Lesson 9: Function-Like Proc Macros β sql!() and friendsA colleague once asked me why sqlx::query!("SELECT * FROM users WHERE id = $1") can catch SQL errors at compile time. “Is it reading the β¦
Rust tutorialrustmacrosmetaprogramming
Feb 22, 2025
π 8 min read
Lesson 8: Attribute Macros β #[my_attr] in practiceI was reviewing a codebase that used Actix Web and kept seeing #[get("/users")] on handler functions. I knew it was a macro, but I didn’t β¦
Rust tutorialrustmacrosmetaprogramming
Feb 21, 2025
π 9 min read
Interview Patterns L15: Tree BFS Patterns β Level by level reveals structureLevel by level. That phrase shows up in maybe a third of binary tree interview problems, sometimes explicitly and sometimes disguised. “What would you see β¦
fundamentalsinterviews
Feb 20, 2025
π 7 min read
Lesson 7: CPU vs Memory Tradeoffs β Cache it or compute it, pick oneEvery performance optimization ultimately makes the same trade: you’re giving up memory to gain CPU time, or giving up CPU time to reduce memory usage. β¦
Go tutorialgolangperformance
Feb 19, 2025
π 9 min read
Lesson 7: Derive Macros β Custom #[derive()]The first derive macro I shipped to production generated about 200 lines of boilerplate per struct. We had 47 structs. That’s 9,400 lines of code I β¦
Rust tutorialrustmacrosmetaprogramming
Feb 18, 2025
π 6 min read
Lesson 7: Panic as Error Handling β Panic is for bugs, not business logicI have reviewed Go code from developers who learned other languages where exceptions are the primary error handling mechanism. In Ruby, Python, or Java, you β¦
Go tutorialgolangcode quality
Feb 17, 2025
π 8 min read
Lesson 6: Procedural Macros β The three kindsThe moment I realized macro_rules! couldn’t generate new identifier names from captured inputs, I knew I needed something more powerful. I was trying to β¦
Rust tutorialrustmacrosmetaprogramming
Feb 15, 2025
π 6 min read
Lesson 9: Flaky Test Control β A flaky test is worse than no testA flaky test is a test that sometimes passes and sometimes fails with no code change in between. It sounds like a minor annoyance. It’s actually β¦
Go tutorialgolangtesting
Feb 14, 2025
π 8 min read
Lesson 5: Debugging Macros β cargo-expand and trace_macrosYou will write a macro that compiles, runs, and produces the wrong output. You’ll stare at the macro definition, convinced it’s correct. β¦
Rust tutorialrustmacrosmetaprogramming
Feb 12, 2025
π 10 min read
Lesson 20: Production Async Architecture β Connection pools, retries, circuit breakersThis is the lesson that ties everything together. Over the last 19 lessons, we’ve built up from mental models to executors, from channels to cancellation β¦
Rust tutorialrustasynctokio
Feb 12, 2025
π 9 min read
Lesson 4: Macro Hygiene β Scoping and naming pitfallsI once spent an embarrassing amount of time debugging a macro that worked perfectly in one file and broke in another. Same macro, same input, different β¦
Rust tutorialrustmacrosmetaprogramming
Feb 12, 2025
π 6 min read
Lesson 6: Race Detector in CI β Run -race on every PR or ship bugsA data race is a memory safety bug. Two goroutines access the same variable without synchronization, at least one is writing, and the Go memory model makes no β¦
Go tutorialgolangdeploymentdevops
Feb 10, 2025
π 7 min read
Lesson 19: Testing Async Code β Mocking time and I/OAsync code is harder to test than sync code. Not because the logic is more complex, but because time, I/O, and concurrency introduce non-determinism. A test β¦
Rust tutorialrustasynctokio
Feb 10, 2025
π 9 min read
Lesson 3: Macro Pattern Matching β Repetition, fragments, and capturesThere’s a point when writing declarative macros where the syntax stops feeling like Rust and starts feeling like regex for code. You’re stacking β¦
Rust tutorialrustmacrosmetaprogramming
Feb 10, 2025
π 6 min read
Lesson 5: Validation Frameworks β Reflect once, validate everywhereInput validation is one of those problems that looks solved until you realize you are writing the same type of check β not nil, min length, valid email format, β¦
Go tutorialgolangreflection
Feb 8, 2025
π 7 min read
Lesson 18: Tracing Async Code β Context propagation across .awaitDebugging async code with println! is like debugging a highway pileup by asking each car individually what happened. You get disconnected fragments β “I β¦
Rust tutorialrustasynctokio
Feb 7, 2025
π 8 min read
Lesson 2: Declarative Macros β macro_rules! from zeroThe first macro I ever wrote was a disaster. I wanted a shorthand for creating HashMaps β something like map!{ "a" => 1, "b" => 2 }. β¦
Rust tutorialrustmacrosmetaprogramming
Feb 6, 2025
π 7 min read
Lesson 17: Pin in Async Context β Why futures must be pinnedI’ve been hand-waving around Pin for 16 lessons. Every time we saw Pin<&mut Self> in a poll method, I said “don’t worry about β¦
Rust tutorialrustasynctokio
Feb 6, 2025
π 5 min read
Lesson 6: Package Cohesion β Everything in a package should belong togetherGo packages are the primary unit of code organization. They determine what’s visible to whom, what gets compiled together, and β most importantly β they β¦
Go tutorialgolangcode quality
Feb 5, 2025
π 8 min read
Lesson 1: Why Macros β When functions aren't enoughI spent three hours once writing nearly identical impl blocks for sixteen different numeric types. Copy, paste, change i32 to i64, change i64 to u32, repeat. β¦
Rust tutorialrustmacrosmetaprogramming
Feb 5, 2025
π 5 min read
Lesson 6: Embedding Assets β embed.FS puts files inside your binaryBefore Go 1.16, embedding static assets in a Go binary required either a code generation tool that converted files to byte arrays, a third-party library like β¦
Go tutorialgolangCLI
Feb 4, 2025
π 7 min read
Lesson 16: How Async Executors Work Under the Hood β Demystifying the runtimeThere’s a moment in every async Rust developer’s journey where the runtime stops being a black box and starts being a machine you understand. For β¦
Rust tutorialrustasynctokio
Feb 4, 2025
π 7 min read
Lesson 3: Wrapping Strategy β Every wrap should add context, never noiseThere’s a certain kind of error message I’ve come to dread in production logs: auth: db: sql: connection refused. Technically, it contains the full β¦
Go tutorialgolang
Feb 2, 2025
π 7 min read
Lesson 15: Backpressure β Bounded channels and flow controlThe fastest way to kill a production service is to accept work faster than you can process it. I learned this the hard way when a log ingestion pipeline I built β¦
Rust tutorialrustasynctokio
Feb 1, 2025
π 6 min read
Lesson 7: Timeouts and Retries β Your client needs a deadline, your server needs a budgetI once watched a service die in slow motion. An upstream dependency started responding slowly β not failing, just slow. Within minutes, all request goroutines β¦
Go tutorialgolangbackend
Jan 31, 2025
π 7 min read
Lesson 14: Tower β The service middleware patternI avoided Tower for months. The trait bounds looked terrifying, the documentation assumed you already knew what you were doing, and I couldn’t figure out β¦
Rust tutorialrustasynctokio
Jan 30, 2025
π 7 min read
Lesson 13: Building HTTP Clients with reqwest β Async HTTP done rightAlmost every backend service I’ve built makes HTTP calls to something β a third-party API, another microservice, a webhook endpoint. And almost every β¦
Rust tutorialrustasynctokio
Jan 30, 2025
π 8 min read
Interview Patterns L14: Tree DFS Patterns β Every path question is DFSIf a binary tree problem asks anything about paths β longest, shortest, sum along a path, common ancestor between two nodes β the solution is almost certainly β¦
fundamentalsinterviews
Jan 28, 2025
π 6 min read
Lesson 12: Async I/O β Files, sockets, DNSHere’s an uncomfortable truth about async file I/O: on most operating systems, it doesn’t really exist. When you call tokio::fs::read_to_string, β¦
Rust tutorialrustasynctokio
Jan 28, 2025
π 5 min read
Lesson 4: Distributed Tracing β Follow the request across 5 servicesDebugging a microservices system with only logs is like debugging a multi-threaded program with only print statements β possible, but painful in ways that are β¦
Go tutorialgolangmicroservices
Jan 26, 2025
π 7 min read
Lesson 11: Timeouts, Deadlines, and Graceful Shutdown β Bounded operationsEvery production outage I’ve investigated boils down to one of two things: unbounded retries or missing timeouts. A function that “usually takes β¦
Rust tutorialrustasynctokio
Jan 25, 2025
π 6 min read
Lesson 6: Eventual Consistency β Your data will be wrong, temporarilyI used to believe that eventual consistency was an exotic property of distributed databases that I’d only encounter at Google scale. Then I added a Redis β¦
Go tutorialgolangnetworking
Jan 24, 2025
π 7 min read
Lesson 10: Cancellation Safety β The silent footgunThis is the lesson I wish someone had shoved in my face before I wrote my first select! loop. I lost three days to a bug where messages were disappearing from a β¦
Rust tutorialrustasynctokio
Jan 22, 2025
π 6 min read
Lesson 9: Semaphores and Rate Limiting β Bounded async concurrencyI once crashed a third-party API by spawning 10,000 concurrent requests from an async Rust service. The code was correct β every request completed (eventually). β¦
Rust tutorialrustasynctokio
Jan 22, 2025
π 6 min read
Lesson 5: os and filepath β Cross-platform file operations that actually workGo’s os and path/filepath packages are among the most underappreciated in the standard library. Most developers know os.Open, os.Create, and os.ReadFile. β¦
Go tutorialgolangstdlib
Jan 20, 2025
π 7 min read
Lesson 8: Async Mutexes β tokio::sync::Mutex vs std“Should I use tokio::sync::Mutex or std::sync::Mutex in async code?” I’ve seen this question in every Rust Discord server, every forum, every β¦
Rust tutorialrustasynctokio
Jan 20, 2025
π 6 min read
Lesson 8: Race-Aware Tests β If it passes without -race, it hasn't passedA test suite that passes without -race is not a clean bill of health. It’s a test suite that hasn’t checked one of the most insidious categories of β¦
Go tutorialgolangtesting
Jan 18, 2025
π 7 min read
Lesson 7: Async Channels β tokio::sync::mpscThe first real async service I built had a classic architecture: an HTTP handler receives a request, puts work on a queue, a background worker processes it, and β¦
Rust tutorialrustasynctokio
Jan 18, 2025
π 6 min read
Lesson 7: JWT Caveats β JWTs are not sessionsJWT has become the default answer to “how should I handle authentication tokens?” in the Go community. I have shipped JWTs in production and I have β¦
Go tutorialgolangsecurity
Jan 16, 2025
π 6 min read
Lesson 6: Streams β Async iteratorsRegular iterators give you one value at a time, synchronously. Futures give you one value, asynchronously. Streams give you multiple values, asynchronously. β¦
Rust tutorialrustasynctokio
Jan 16, 2025
π 7 min read
Interview Patterns L13: Tree Construction β Build trees from traversal arraysConstruction problems break the mold. Most tree problems ask you to read a tree and return something β a traversal, a value, a boolean. Construction problems β¦
fundamentalsinterviews
Jan 15, 2025
π 8 min read
Lesson 6: Debugging Latency and Leaks β Your p99 is lying to youWe had a service whose p99 latency was 800ms. The p50 was 12ms. The SLA was 200ms at p99. All our dashboards showed the p99 breaching during peak traffic, but β¦
Go tutorialgolangobservability
Jan 14, 2025
π 6 min read
Lesson 5: tokio::select! β Racing futuresA couple months ago I was building a WebSocket handler that needed to do three things simultaneously: read from the socket, check a shutdown signal, and send β¦
Rust tutorialrustasynctokio
Jan 12, 2025
π 7 min read
Lesson 4: Spawning Tasks and JoinHandles β Concurrent work unitsI remember the exact moment async Rust “clicked” for me. I was building an API aggregator that needed to call five different services. My first β¦
Rust tutorialrustasynctokio
Jan 12, 2025
π 6 min read
Lesson 6: Swallowing Errors β The silent failure that cost us 3 hoursWe had a deployment where user preferences stopped being saved. New preferences were accepted by the API β the endpoint returned 200 β but nothing was written β¦
Go tutorialgolangcode quality
Jan 10, 2025
π 7 min read
Lesson 3: Tokio β The runtime that powers async RustEvery async Rust tutorial shows you #[tokio::main] in the first example and then moves on like that’s totally self-explanatory. It’s not. That macro β¦
Rust tutorialrustasynctokio
Jan 9, 2025
π 6 min read
Lesson 2: errors.Is and errors.As β Matching errors through the wrapping chainGo 1.13 shipped what I consider the most important error-handling improvement the language has had: errors.Is, errors.As, and the %w verb. Before that, wrapping β¦
Go tutorialgolang
Jan 8, 2025
π 7 min read
Lesson 2: The Future Trait β What .await actually doesAfter I understood the mental model from lesson 1, my next question was obvious: what happens mechanically when I write .await? I could accept “it’s β¦
Rust tutorialrustasynctokio
Jan 8, 2025
π 8 min read
Lesson 6: Memory Alignment and Struct Padding β Field order affects struct sizeI once reviewed a PR where someone had defined a struct with a bool field between two int64 fields, resulting in a 24-byte struct instead of the 17 bytes you β¦
Go tutorialgolanginternals
Jan 6, 2025
π 7 min read
Lesson 1: Async Mental Model β Futures, not threadsI spent three weeks writing async Rust code that compiled, ran, and produced correct results β while having absolutely no idea what was actually happening. I β¦
Rust tutorialrustasynctokio
Jan 6, 2025
π 6 min read
Lesson 6: Testability Without Over-Mocking β Fakes beat mocks every timeMock frameworks are a seductive solution to a real problem. You have a dependency β a database, an email service, an HTTP client β and you need your tests to β¦
Go tutorialgolanginterfaces
Jan 5, 2025
π 6 min read
Lesson 6: pprof Deep Dive β CPU, memory, goroutine β read all threeWhen I first learned about pprof, I thought it was a single tool that told you “what’s slow.” It took me an embarrassingly long time to β¦
Go tutorialgolangperformance
Jan 3, 2025
π 5 min read
Lesson 4: Operators and CRDs β Extending Kubernetes with your own resourcesI used to manage PostgreSQL on Kubernetes with a collection of shell scripts and Helm hooks. Provisioning a new database instance meant running a script that β¦
fundamentalskubernetesdevops
Jan 2, 2025
π 8 min read
Lesson 6: Dependency Direction β Always depend inward, never outwardWe fixed cycles in lesson 2. But removing cycles is a necessary condition for good architecture, not a sufficient one. You can have a perfectly cycle-free β¦
Go tutorialgolangarchitecture
Dec 29, 2024
π 7 min read
Interview Patterns L12: BST Operations β Sorted order hides in every BSTBST problems are deceptively simple on the surface. The property is easy to state: every node’s left subtree contains only values less than it, every β¦
fundamentalsinterviews
Dec 22, 2024
π 9 min read
Lesson 25: Production Concurrency Architecture β Putting it all togetherAfter 24 lessons of building blocks, let’s talk about how they compose in real systems. I’ve shipped concurrent Rust services handling millions of β¦
Rust tutorialrustconcurrency
Dec 21, 2024
π 7 min read
Lesson 24: Testing Concurrent Code β Loom and beyondI spent a full week writing tests for a lock-free queue. Ran them a thousand times β all green. Shipped it. Two days later, a production crash. A race condition β¦
Rust tutorialrustconcurrency
Dec 20, 2024
π 8 min read
Lesson 4: Code Generation β From AST to bytecode or machine codeThe tree-walking interpreter in Lesson 3 works, but it has a ceiling. Every time you evaluate an expression, you traverse the AST from scratch. No caching, no β¦
fundamentalscompilers
Dec 19, 2024
π 6 min read
Lesson 23: GPU Computing from Rust β wgpu and compute shadersThe first time I ran a matrix multiplication on a GPU, my jaw dropped. A computation that took 8 seconds on an 8-core CPU finished in 40 milliseconds on a β¦
Rust tutorialrustconcurrency
Dec 18, 2024
π 5 min read
Lesson 3: Streaming Responses β Token-by-token output without buffering the whole responseIf you’ve ever used a non-streaming LLM endpoint in a user-facing feature, you know the experience it creates: the user submits a question, watches a β¦
Go tutorialgolangAILLMMCP
Dec 17, 2024
π 6 min read
Lesson 22: SIMD β Explicit vectorizationI had an image processing pipeline that took 4.2 seconds per frame on a single core. After rewriting the hot loop with SIMD intrinsics, it dropped to 0.9 β¦
Rust tutorialrustconcurrency
Dec 17, 2024
π 7 min read
Interview Patterns L11: Binary Tree Traversal β Four ways to walk a tree, four different answersThe moment an interviewer draws a binary tree on the whiteboard, a clock starts. They are not just testing whether you know what inorder means. They are β¦
fundamentalsinterviews
Dec 15, 2024
π 6 min read
Lesson 21: CSP-Style Concurrency β Go channels in RustBefore I wrote Rust full-time, I spent two years writing Go. The goroutine-plus-channel model gets into your brain. You start thinking about problems as β¦
Rust tutorialrustconcurrency
Dec 15, 2024
π 6 min read
Lesson 5: CI/CD for Go β GitHub Actions that actually catch bugsI’ve set up CI pipelines for Go services about a dozen times, and every iteration taught me something about what the pipeline should actually catch. The β¦
Go tutorialgolangdeploymentdevops
Dec 14, 2024
π 6 min read
Lesson 1: Sentinel vs Typed Errors β Know your error before you handle itWhen I first started writing Go seriously, I treated errors like fire: try to avoid them, and when you can’t, put them out as fast as possible with an if β¦
Go tutorialgolang
Dec 13, 2024
π 7 min read
Lesson 20: The Actor Model with Rust β Message-passing architecturesThe first time I saw Erlang’s actor model, I thought it was over-engineered. Every piece of state behind a process, every interaction a message. Then I β¦
Rust tutorialrustconcurrency
Dec 13, 2024
π 10 min read
Lesson 4: Recommendation Systems β Collaborative filtering, embeddings, and the cold start problemRecommendation systems are the most economically consequential ML systems most engineers will ever build. Netflix estimates that its recommendation system saves β¦
fundamentalsMLsystem designAI
Dec 12, 2024
π 5 min read
Lesson 4: Structured Logging with slog β The stdlib logger Go always neededI have switched logging libraries in Go more times than I care to admit. Started with the standard log package β fine for scripts, useless in production because β¦
Go tutorialgolangmodern Go
Dec 11, 2024
π 6 min read
Lesson 19: Thread-Local Storage β Per-thread stateI was optimizing a JSON serializer that allocated a buffer for every call. Under profiling, those allocations were 30% of the cost. The fix? A thread-local β¦
Rust tutorialrustconcurrency
Dec 10, 2024
π 5 min read
Lesson 5: Cross-Compilation β Build for Linux from your Mac in one commandOne of Go’s most practical superpowers is that cross-compilation is a first-class feature, not an afterthought. Two environment variables β GOOS and β¦
Go tutorialgolangCLI
Dec 9, 2024
π 7 min read
Lesson 18: Debugging Deadlocks and Data Races β Tools and techniquesThe worst deadlock I ever encountered wasn’t between two mutexes. It was between a mutex and a channel. Thread A held a lock and tried to send on a full β¦
Rust tutorialrustconcurrency
Dec 8, 2024
π 6 min read
Lesson 6: Idempotency in APIs β Every POST should be safe to retryA client sends a payment request. The network times out. The client does not know if the payment was processed. Should it retry? If it retries and the payment β¦
Go tutorialgolangbackend
Dec 7, 2024
π 7 min read
Lesson 17: Lock-Free Data Structures in Rust β Beyond mutexesA few years ago I was profiling a metrics collection service and found that 60% of the CPU time was spent on mutex contention. Thirty-two threads, one mutex β¦
Rust tutorialrustconcurrency
Dec 7, 2024
π 7 min read
Lesson 3: GraphQL in Go β gqlgen, resolvers, and DataLoader for N+1Go is not the most common language for GraphQL tutorials. Most of the ecosystem documentation assumes you’re working in JavaScript or TypeScript, and a β¦
fundamentalsGraphQLAPI
Dec 6, 2024
π 5 min read
Lesson 5: Small Functions Win β If you can''t name it clearly, it does too muchThere is a simple test I apply to any function I’m about to merge: can I name it clearly without using “and”? If the most honest name for a β¦
Go tutorialgolangcode quality
Dec 5, 2024
π 6 min read
Lesson 16: Barriers and Once β Synchronization primitivesI was building a benchmark suite once β eight threads, each measuring throughput of a different operation. The problem was that threads started at different β¦
Rust tutorialrustconcurrency
Dec 5, 2024
π 6 min read
Lesson 7: Golden File Testing β Store expected output, compare on runSome functions produce output that’s too large or too structured to assert inline. A template renderer, a code generator, a JSON serializer for a deeply β¦
Go tutorialgolangtesting
Dec 3, 2024
π 6 min read
Lesson 15: Condvar β Waiting for conditionsEarly in my career, I wrote a producer-consumer queue using a mutex and a busy-wait loop. The consumer would lock the mutex, check if there’s data, β¦
Rust tutorialrustconcurrency
Dec 2, 2024
π 6 min read
Lesson 6: Password Hashing β bcrypt or argon2, nothing elsePassword hashing is one of those topics where the correct answer is short and clear, the wrong answers are numerous and subtle, and developers who confidently β¦
Go tutorialgolangsecurity
Dec 1, 2024
π 6 min read
Lesson 14: parking_lot β Faster mutexesI switched a high-contention service from std::sync::Mutex to parking_lot::Mutex and saw lock acquisition time drop by 30% under load. The API is nearly β¦
Rust tutorialrustconcurrency
Dec 1, 2024
π 7 min read
Lesson 5: Profiling in Production β pprof is not just for developmentI used to think profiling was something you did when you had a performance problem: reproduce it locally, run pprof, stare at the flame graph, fix the hot path. β¦
Go tutorialgolangobservability
Nov 29, 2024
π 7 min read
Lesson 13: Fan-Out Fan-In in Rust β Parallel pipelinesOne of the most satisfying architectures I’ve built was a real-time analytics pipeline. Events came in through a single ingestion point, fanned out to β¦
Rust tutorialrustconcurrency
Nov 28, 2024
π 6 min read
Lesson 4: Building a Serializer β encoding/json under the hoodencoding/json is Go’s most-used package and one of its most instructive implementations. Under the hood it is almost entirely reflection: it inspects β¦
Go tutorialgolangreflection
Nov 27, 2024
π 7 min read
Lesson 12: Worker Pool Patterns β Bounded concurrencyI blew up a production database once by spawning unlimited concurrent connections. A batch job that normally processed 100 items suddenly got 50,000. Each item β¦
Rust tutorialrustconcurrency
Nov 25, 2024
π 6 min read
Lesson 11: Crossbeam β Scoped threads and lock-free structuresBefore Rust 1.63 added thread::scope to the standard library, crossbeam was the only ergonomic way to spawn threads that could borrow local data. Even now that β¦
Rust tutorialrustconcurrency
Nov 25, 2024
π 10 min read
Lesson 10: Math Patterns β When the Answer Is Math, Not CodeSome interview problems look like they need a data structure or a clever algorithm, but the answer is actually just math. I’ve watched candidates build β¦
fundamentalsinterviews
Nov 24, 2024
π 7 min read
Lesson 3: CQRS + Event Sourcing Together β When the combination makes senseCQRS and event sourcing are often discussed together, presented as a single package, and that conflation is responsible for a lot of unnecessary complexity in β¦
fundamentalsarchitectureevent sourcing
Nov 23, 2024
π 7 min read
Lesson 10: Rayon β Data parallelism made easyI had a batch processing job β reading 50,000 JSON files, parsing them, running validation, writing results. Single-threaded, it took 12 minutes. I added Rayon, β¦
Rust tutorialrustconcurrency
Nov 22, 2024
π 6 min read
Lesson 5: Ignoring Context β The cancellation nobody checkedI spent a Tuesday afternoon tracking down why our service continued doing expensive database work after clients had long since disconnected. An HTTP client with β¦
Go tutorialgolangcode quality
Nov 21, 2024
π 7 min read
Lesson 9: Send and Sync β The traits behind thread safetyThere’s a moment in every Rust developer’s life when they try to send an Rc<RefCell<Vec<String>>> to another thread and get a wall β¦
Rust tutorialrustconcurrency
Nov 21, 2024
π 7 min read
Lesson 2: gRPC-Based Plugin Architecture β How Terraform and Vault do pluginsAfter I understood how hashicorp/go-plugin worked with net/rpc, the next question was obvious: how does Terraform manage hundreds of community-contributed β¦
Go tutorialgolangplugins
Nov 20, 2024
π 6 min read
Lesson 5: Message Queues in Go β NATS, RabbitMQ, Kafka β pick your tradeoffI’ve integrated all three of these systems in production Go services, and the question I get most often is: “Which one should I use?” The β¦
Go tutorialgolangnetworking
Nov 19, 2024
π 7 min read
Lesson 8: Memory Ordering β Relaxed, Acquire, Release, SeqCstMemory ordering is the thing that separates people who use concurrent code from people who write concurrent primitives. I avoided understanding it for years, β¦
Rust tutorialrustconcurrency
Nov 19, 2024
π 8 min read
Lesson 15: CAP Theorem in Practice β What It Actually Means for Your SystemCAP theorem is probably the most cited and most misunderstood concept in distributed systems interviews. Candidates memorize “you can only pick two of β¦
fundamentalssystem design
Nov 18, 2024
π 6 min read
Lesson 4: time Package Gotchas β Timezones, monotonic clocks, and the bug in your cronThe time package looks straightforward right up until the moment a bug report arrives saying “the nightly job didn’t run last Sunday.” It β¦
Go tutorialgolangstdlib
Nov 17, 2024
π 6 min read
Lesson 7: Atomics β Lock-free primitivesI once replaced a Mutex<u64> counter in a hot path with an AtomicU64 and saw throughput jump 40%. Not because mutexes are slow β they’re fast. But β¦
Rust tutorialrustconcurrency
Nov 17, 2024
π 7 min read
Lesson 8: When Duplication Is Better Than Abstraction β Bad abstraction costs more than repeated codeI want to end this course with the idea I wish I’d understood at the start β not just intellectually, but in my gut. It’s this: duplication is a β¦
Go tutorialgolanggenerics
Nov 15, 2024
π 7 min read
Lesson 6: Arc<Mutex<T>> β The shared mutable state patternI remember staring at Arc<Mutex<HashMap<String, Vec<u8>>>> in a codebase and thinking “this is the ugliest type I’ve ever β¦
Rust tutorialrustconcurrency
Nov 15, 2024
π 7 min read
Lesson 5: GC Behavior and Tuning β GOGC and GOMEMLIMIT changed the gameFor years, tuning Go’s GC meant tweaking GOGC and hoping for the best. I operated on vibes and guesswork. Then Go 1.19 introduced GOMEMLIMIT β a hard β¦
Go tutorialgolanginternals
Nov 14, 2024
π 9 min read
Lesson 5: Design Twitter/X β Tweet fanout, timeline ranking, trending topics at 500M usersTwitter is the classic system design problem for good reason. It looks like a glorified blog until you start pulling on the threads: how does a tweet from a β¦
fundamentalssystem designinterviews
Nov 13, 2024
π 6 min read
Lesson 5: Shared State β Mutex, RwLock, and poisoningThe nastiest production bug I ever tracked down involved a Java ConcurrentHashMap that was “thread-safe” in the API sense but not in the logic β¦
Rust tutorialrustconcurrency
Nov 12, 2024
π 6 min read
Lesson 5: Composition with Embedding β Small interfaces compose into powerful contractsOne of the things that surprised me most about Go when I came from Python was that Go has no inheritance. No base classes, no method overriding, no type β¦
Go tutorialgolanginterfaces
Nov 11, 2024
π 7 min read
Lesson 4: Channels β mpsc and beyondThe first concurrent system I built that actually worked well was a log aggregation pipeline. Multiple producers writing log lines, one consumer batching and β¦
Rust tutorialrustconcurrency
Nov 10, 2024
π 10 min read
Lesson 10: Redis, MongoDB, and Non-Relational Stores β Beyond SQLI spent a week optimizing a Postgres query that powered a leaderboard. It involved a complex window function over millions of rows, and no amount of indexing β¦
Rust tutorialrustdatabasepostgres
Nov 10, 2024
π 6 min read
Lesson 5: Benchmarking Done Right β testing.B is not what you thinkWriting a Go benchmark feels simple. You drop Benchmark in front of a function name, loop from 0 to b.N, run go test -bench=., and get a number. The number β¦
Go tutorialgolangperformance
Nov 9, 2024
π 7 min read
Lesson 3: move Closures β Sending data to threadsWhen I first started writing threaded Rust code, I hit the same compiler error about forty times in one afternoon. Something about closures borrowing values β¦
Rust tutorialrustconcurrency
Nov 9, 2024
π 7 min read
Lesson 3: Your Story β Connecting your career narrative to the roleAlmost every interview starts the same way: “So, tell me about yourself.” And almost every engineer I’ve talked to hates this question. Not β¦
fundamentalsinterviewscareer
Nov 8, 2024
π 6 min read
Lesson 5: Monolith vs Multi-Module β One go.mod or many? It depends.When I first started structuring larger Go projects, I defaulted to what felt natural: one repository, one go.mod. It worked for a long time. Then I joined a β¦
Go tutorialgolangarchitecture
Nov 7, 2024
π 6 min read
Lesson 2: std::thread β Spawning and joiningA few years back I was reviewing a Go service that spawned goroutines like confetti at a parade β hundreds of them, no tracking, no lifecycle management. When β¦
Rust tutorialrustconcurrency
Nov 7, 2024
π 8 min read
Lesson 9: Bit Manipulation β The Trick Questions That Test FundamentalsBit manipulation problems have a reputation for being tricks β the kind of problem where you either know the one-liner or you don’t, and if you β¦
fundamentalsinterviews
Nov 6, 2024
π 9 min read
Lesson 9: N+1 Queries, Indexes, and EXPLAIN β Database performance in RustA coworker asked me to look at an endpoint that was taking 8 seconds to return 50 orders. The table had 200K rows β not big by any standard. I opened the code, β¦
Rust tutorialrustdatabasepostgres
Nov 6, 2024
π 5 min read
Lesson 3: Service Discovery β Finding services without hardcoding URLsWhen I first started building Go microservices, every service had a config file with a list of URLs. order-service-url: http://10.0.1.42:8080. That worked fine β¦
Go tutorialgolangmicroservices
Nov 5, 2024
π 6 min read
Lesson 1: Why Rust Concurrency Is "Fearless" β The compiler has your backI once spent three days chasing a race condition in a Java service that only manifested under production load. The bug? Two threads updating a shared HashMap β β¦
Rust tutorialrustconcurrency
Nov 5, 2024
π 6 min read
Lesson 6: Mocking Alternatives β Interfaces over mocks, alwaysMocking has a bad reputation in the Go community, and some of it is deserved. Not because mocks are inherently wrong, but because the way most people use them β β¦
Go tutorialgolangtesting
Nov 4, 2024
π 8 min read
Lesson 14: Designing for Failure β Circuit Breakers, Bulkheads, ChaosIn distributed systems, failure is not an exceptional case β it’s the default condition. Networks partition. Hard drives fail. Memory fills up. β¦
fundamentalssystem design
Nov 3, 2024
π 8 min read
Lesson 8: Testing with Real Databases β No more mocking SQLI spent two days debugging a production issue where a query returned duplicate rows. The unit tests all passed β every mock returned exactly the expected data. β¦
Rust tutorialrustdatabasepostgres
Nov 2, 2024
π 6 min read
Lesson 4: Config Injection β Environment variables, flags, files β in that orderConfiguration management is one of those topics that seems solved until you maintain a service that runs in four different environments, has twenty configurable β¦
Go tutorialgolangdeploymentdevops
Nov 1, 2024
π 9 min read
Lesson 7: Building Type-Safe Query Builders β Queries that can't be wrongI was reviewing a PR that had a search endpoint with 12 optional filters. The handler was a 200-line function full of if let Some(...) blocks, each appending a β¦
Rust tutorialrustdatabasepostgres
Nov 1, 2024
π 8 min read
Lesson 14: Randomized Algorithms β Reservoir sampling, HyperLogLog, probabilistic countingThere is a class of production problems where exact answers are either impossible or not worth the cost. You want to know approximately how many unique visitors β¦
fundamentalsalgorithms
Oct 30, 2024
π 8 min read
Lesson 6: The Repository Pattern in Rust β Abstracting persistenceI once inherited a codebase where every HTTP handler had raw SQL queries inline β sqlx::query! calls scattered through 80+ route handlers. Changing a table name β¦
Rust tutorialrustdatabasepostgres
Oct 30, 2024
π 6 min read
Lesson 4: Signal Handling β Catch SIGTERM or lose your workMost CLI tools work perfectly on the happy path and fail silently on the unhappy one. The user presses Ctrl-C, the OS sends SIGINT, and the process dies β¦
Go tutorialgolangCLI
Oct 28, 2024
π 8 min read
Lesson 5: Transactions and Error Rollback β Atomic operationsA payment service I worked on had a subtle bug: it deducted money from the user’s wallet, then tried to create an order record. If the order insert failed β¦
Rust tutorialrustdatabasepostgres
Oct 28, 2024
π 9 min read
Lesson 12: Production Deployment β Docker, graceful shutdown, observabilityShipping to production is where the real education begins. Your local dev environment is a controlled fantasy β one instance, no load balancer, fast database on β¦
Rust tutorialrustwebapi
Oct 28, 2024
π 6 min read
Lesson 5: Pagination Done Right β Offset pagination breaks at scaleI have shipped offset-based pagination more times than I would like to admit. It looks clean, it is trivially easy to implement, and it works perfectly β until β¦
Go tutorialgolangbackend
Oct 26, 2024
π 7 min read
Lesson 4: Schema Migrations in Rust Projects β Evolving your databaseA teammate once ran ALTER TABLE orders DROP COLUMN status on the production database because he’d tested it locally and “it worked fine.” What β¦
Rust tutorialrustdatabasepostgres
Oct 25, 2024
π 7 min read
Lesson 7: Refactoring Concrete to Generic β Start concrete, extract when provenThe advice “start concrete, extract when proven” is easy to say and surprisingly hard to follow when you’re in the middle of writing the third β¦
Go tutorialgolanggenerics
Oct 24, 2024
π 8 min read
Lesson 11: Integration Testing HTTP Services β Testing without mocksI worked on a codebase that had 600 unit tests with mocked HTTP clients, mocked databases, mocked everything. All 600 passed. The application didn’t work. β¦
Rust tutorialrustwebapi
Oct 24, 2024
π 7 min read
Lesson 3: Connection Pooling with deadpool and bb8 β Managing database connectionsI once watched a Rust service fall over under modest load β maybe 200 concurrent requests β because every request opened a new Postgres connection, used it for β¦
Rust tutorialrustdatabasepostgres
Oct 24, 2024
π 7 min read
Lesson 2: CGo Performance and Pitfalls β The hidden cost of crossing the boundaryWhen I profiled a service that was spending 40% of its time in cgo calls, I thought I was measuring the C library. I was not. I was measuring the overhead of β¦
Go tutorialgolangCGosystems
Oct 22, 2024
π 7 min read
Lesson 2: Diesel β The ORM approachI was two weeks into a project where I had to write about 40 CRUD endpoints for an admin panel. Each one needed the same pattern: validate input, build a query, β¦
Rust tutorialrustdatabasepostgres
Oct 22, 2024
π 6 min read
Lesson 5: Auth Middleware β Authentication is not authorizationA few years ago I audited a Go API where every endpoint was protected by an authentication middleware. The middleware checked for a valid JWT, extracted the β¦
Go tutorialgolangsecurity
Oct 21, 2024
π 8 min read
Lesson 10: OpenAPI / Swagger Generation β Documentation from codeI’ve never seen a team maintain a separate OpenAPI spec in sync with their actual API for more than three months. Someone adds a field, forgets to update β¦
Rust tutorialrustwebapi
Oct 21, 2024
π 7 min read
Lesson 13: Design a Payment System β Idempotency, Reconciliation, Double-EntryPayment systems have a property that almost no other software has: the cost of a bug isn’t a bad user experience β it’s a legal liability and a β¦
fundamentalssystem design
Oct 20, 2024
π 8 min read
Lesson 1: SQLx β Compile-time checked queriesI shipped a typo in a SQL column name to production last year. The column was user_nme instead of user_name. The Go service compiled fine, the tests passed β¦
Rust tutorialrustdatabasepostgres
Oct 20, 2024
π 5 min read
Lesson 4: Code Review Heuristics β What to look for in a Go PRA good code review is not a diff-reading exercise. It’s a transfer of understanding β the reviewer asks “do I understand what this code does, why it β¦
Go tutorialgolangcode quality
Oct 18, 2024
π 8 min read
Lesson 9: Rate Limiting and Throttling β Protecting your serviceWe launched a public API without rate limiting. Within a week, a single user was making 200 requests per second β not maliciously, just a badly written script β¦
Rust tutorialrustwebapi
Oct 18, 2024
π 7 min read
Lesson 4: Correlation IDs β Connect the logs to the trace to the userA support ticket lands: “User 8842 says their order failed at 2:47 PM yesterday.” You open your log aggregator. You search for user_id = 8842. You β¦
Go tutorialgolangobservability
Oct 17, 2024
π 6 min read
Lesson 13: Cryptographic Primitives β Hashing, HMAC, and never rolling your ownThere is a joke in security circles: every developer thinks they can write their own crypto. The punchline is that everyone who has tried has been wrong. β¦
fundamentalsalgorithms
Oct 16, 2024
π 8 min read
Lesson 8: WebSockets with Axum β Real-time in RustA startup I consulted for was polling their REST API every 500 milliseconds to check for new messages. Forty thousand clients, each making two requests per β¦
Rust tutorialrustwebapi
Oct 16, 2024
π 6 min read
Lesson 3: ConfigMaps and Secrets β Configuration without rebuildingWe had a bug where the same Docker image was running in staging and production but behaving differently. I spent an hour diffing the code before I checked the β¦
fundamentalskubernetesdevops
Oct 15, 2024
π 6 min read
Lesson 4: Channel Misuse β You used a channel where a mutex would doGo’s channels are genuinely great. They make certain concurrent programming patterns β pipelines, fan-out, fan-in, worker pools β natural and readable. β¦
Go tutorialgolangcode quality
Oct 14, 2024
π 8 min read
Lesson 7: Pagination, Filtering, and Sorting β API patterns that scaleWe shipped a “list all orders” endpoint that returned everything. No pagination. Worked great in development with 50 test records. In production, β¦
Rust tutorialrustwebapi
Oct 14, 2024
π 9 min read
Lesson 3: Model Serving β Latency, batching, A/B testing in productionTraining a model is satisfying. Deploying it to serve real traffic is humbling. I remember the first time I pushed a model to production and watched the p99 β¦
fundamentalsMLsystem designAI
Oct 13, 2024
π 6 min read
Lesson 3: Loop Variable Fix β The Go 1.22 change that fixed a decade of bugsIf you have written Go for more than a few weeks, you have hit this bug. Or you have reviewed code that had it and caught it. Or β if you were unlucky β you β¦
Go tutorialgolangmodern Go
Oct 12, 2024
π 7 min read
Lesson 6: Database Integration β SQLx and connection managementMy first Rust web service leaked database connections. I opened a new connection per request and forgot that Rust’s ownership system doesn’t β¦
Rust tutorialrustwebapi
Oct 12, 2024
π 6 min read
Lesson 4: Connection Pooling β One connection per request is a performance bugThe first time I benchmarked a Go service against a database, the numbers were embarrassing. Five hundred requests per second, each one taking 30 milliseconds β¦
Go tutorialgolangnetworking
Oct 11, 2024
π 8 min read
Lesson 2: Server-Side WASM β WASI, edge computing, and the universal binaryWhen most people talk about WebAssembly, they mean the browser. That’s where it started, that’s where the tutorials are, and that’s where most β¦
fundamentalsWebAssemblyWASM
Oct 10, 2024
π 6 min read
Lesson 5: Database Testing with Testcontainers β Mock the DB and you mock the truthI used to mock databases. I had a clean Store interface, a MockStore implementation for tests, and 100% coverage on my service layer. I felt good about it. Then β¦
Go tutorialgolangtesting
Oct 9, 2024
π 8 min read
Lesson 5: Authentication β JWT, sessions, OAuthI’ve reviewed auth implementations at four different companies. Three of them stored passwords in SHA-256 without salting. One stored them in plain text β¦
Rust tutorialrustwebapi
Oct 9, 2024
π 9 min read
Lesson 8: Sorting in Interviews β Can You Do Better Than O(n log n)?Most candidates treat sorting as a black box β call sort.Ints and move on. That works until an interviewer says “can you do this without sorting?” β¦
fundamentalsinterviews
Oct 8, 2024
π 9 min read
Lesson 10: Conversion Traits β From, Into, TryFrom, AsRefI used to litter my Rust code with .to_string(), as, and manual conversion functions everywhere. Then I learned the conversion traits properly and my APIs went β¦
Rust tutorialruststdlib
Oct 8, 2024
π 6 min read
Lesson 3: Struct Tags β Metadata your compiler ignores but your framework readsStruct tags are one of Go’s most practically useful metaprogramming tools and one of its least formally documented features. The syntax is simple β a raw β¦
Go tutorialgolangreflection
Oct 7, 2024
π 9 min read
Lesson 4: Request Validation and Error Responses β Clean input handlingA junior engineer on my team once deployed an endpoint that accepted any string as an email address. Someone submitted “lol” as their email, the β¦
Rust tutorialrustwebapi
Oct 7, 2024
π 7 min read
Lesson 12: Design a Search Engine β Inverted Index and RankingSearch is the feature that separates usable products from unusable ones at scale. When your application has thousands of documents, a sequential scan works. At β¦
fundamentalssystem design
Oct 6, 2024
π 5 min read
Lesson 2: LLM API Clients β Calling Claude, GPT, and Groq from GoMost Go developers approach LLM APIs the same way they approach any REST API β write an HTTP client, handle errors, parse JSON. That instinct is correct, but β¦
Go tutorialgolangAILLMMCP
Oct 5, 2024
π 8 min read
Lesson 3: Middleware with Tower Layers β The composable middleware patternI once inherited a Node.js codebase with 23 Express middleware functions chained together. Half of them silently swallowed errors, three of them conflicted with β¦
Rust tutorialrustwebapi
Oct 5, 2024
π 7 min read
Lesson 4: Escape Analysis Deep Dive β The compiler decides where your data livesI used to assume that every time I wrote &someStruct{} or returned a pointer from a function, I was creating a heap allocation. I was wrong β and the β¦
Go tutorialgolanginternals
Oct 4, 2024
π 9 min read
Lesson 9: std::sync β Mutex, RwLock, Once, BarrierI shipped a data race to production exactly once. Go program, shared map, no lock. Took three weeks to reproduce β only happened under heavy load when two β¦
Rust tutorialruststdlib
Oct 4, 2024
π 7 min read
Lesson 3: Paxos and Beyond β When Raft isn't enoughAfter spending time with Raft, I found myself curious about the algorithm it was designed to replace. Paxos has a reputation: brilliant, correct, nearly β¦
fundamentalsdistributed systems
Oct 3, 2024
π 9 min read
Lesson 2: Axum from Zero β Routing, handlers, extractorsThe first time I tried Axum, I wrote a handler that took five extractor arguments and spent twenty minutes staring at a compiler error that said my function β¦
Rust tutorialrustwebapi
Oct 3, 2024
π 7 min read
Lesson 3: AST and Evaluation β Walking the tree to compute resultsAfter the lexer and parser, we have a tree. A beautiful, hierarchical, unambiguous representation of the program. Now we need to make it do something. The β¦
fundamentalscompilers
Oct 3, 2024
π 7 min read
Lesson 12: Compression Basics β Why gzip works and entropy mattersEvery senior engineer I know makes compression decisions regularly: should this API response be gzip-compressed? Should logs be stored compressed? What β¦
fundamentalsalgorithms
Oct 2, 2024
π 6 min read
Lesson 6: Real-World Examples β Generics that survived code reviewLessons 1 through 5 were mostly about principles. This one is about code. Specifically, the five generic implementations I’ve used in real production β¦
Go tutorialgolanggenerics
Oct 1, 2024
π 6 min read
Lesson 1: The Rust Web Landscape β Axum, Actix, Rocket and why I pick AxumI spent three weeks building a service in Actix-web before ripping it out and switching to Axum. Not because Actix was bad β it’s genuinely fast and β¦
Rust tutorialrustwebapi
Oct 1, 2024
π 8 min read
Lesson 8: std::time β Duration, Instant, SystemTimeA few months ago I tracked down a bug where a cache TTL check was wrong because someone compared SystemTime values that had been serialized and deserialized β¦
Rust tutorialruststdlib
Oct 1, 2024
π 6 min read
Lesson 4: Returning Concrete Types β Give callers the real thingThere is a piece of Go advice that sounds almost too obvious to state, and yet I see it violated in production codebases every week: return concrete types from β¦
Go tutorialgolanginterfaces
Sep 30, 2024
π 6 min read
Lesson 3: encoding/json Beyond Basics β Custom marshalers, streaming, and the trapsencoding/json is one of the first packages every Go developer uses and one of the last they fully understand. The basic json.Marshal / json.Unmarshal API is β¦
Go tutorialgolangstdlib
Sep 29, 2024
π 7 min read
Lesson 7: std::process β Running external commandsI once wrote a deployment script in Bash that grew to 800 lines with nested conditionals, string interpolation bugs, and error handling that amounted to β¦
Rust tutorialruststdlib
Sep 28, 2024
π 7 min read
Lesson 4: Interface Placement β Define interfaces where they're used, not where they're implementedThis is the Go idiom that surprises people coming from Java or C# the most. In those languages, you define an interface in the same place as (or even before) β¦
Go tutorialgolangarchitecture
Sep 27, 2024
π 8 min read
Lesson 6: std::net β TCP, UDP, socketsThe first network program I ever wrote β a chat server in college β had a bug where it would block forever waiting for one client’s message while all the β¦
Rust tutorialruststdlib
Sep 25, 2024
π 6 min read
Lesson 4: String and Byte Conversions β The copy nobody seesGo strings are immutable. Byte slices are mutable. Converting between them requires copying the data β every time, without exception, unless you use unsafe β¦
Go tutorialgolangperformance
Sep 24, 2024
π 9 min read
Lesson 5: std::fmt β Formatting internalsI once shipped a monitoring dashboard where all the latency values showed up as “Duration { secs: 0, nanos: 234000000 }” because I’d used {:?} β¦
Rust tutorialruststdlib
Sep 22, 2024
π 9 min read
Lesson 10: Testing CLI Applications β End-to-end CLI testsI shipped a CLI tool with 100% unit test coverage on the core logic. Users immediately found three bugs. The argument parser accepted --port but the value β¦
Rust tutorialrustcli
Sep 22, 2024
π 6 min read
Lesson 3: Health Checks β Readiness vs liveness, and why both matterI’ve seen two types of health check implementations in production: the ones that always return 200 OK, and the ones that actually check something. The β¦
Go tutorialgolangdeploymentdevops
Sep 21, 2024
π 8 min read
Lesson 4: std::fs and std::path β Filesystem operations done rightA colleague once deployed a script that used string concatenation for file paths: dir + "/" + filename. Worked perfectly on Linux, blew up on Windows, β¦
Rust tutorialruststdlib
Sep 21, 2024
π 6 min read
Lesson 11: Design a Notification System β Push vs Pull, Priority, DedupNotifications are the feature that can make or break user retention β and also destroy it. Done right, they bring users back at exactly the right moment. Done β¦
fundamentalssystem design
Sep 20, 2024
π 5 min read
Lesson 4: Error Responses β Your API errors are your documentationI once integrated with an API that returned HTTP 200 for everything β successes and failures alike. The actual outcome was buried in a status field inside the β¦
Go tutorialgolangbackend
Sep 19, 2024
π 9 min read
Lesson 3: std::io β Read, Write, BufRead, SeekEarly in my Rust journey, I wrote a log parser that read a 2GB file byte by byte using read() without buffering. It took forty minutes. Adding a BufReader β¦
Rust tutorialruststdlib
Sep 19, 2024
π 9 min read
Lesson 9: Building TUIs with ratatui β Terminal user interfacesI was monitoring a deployment through five separate terminal windows β one for logs, one for metrics, one for the deployment status, one for the database, and β¦
Rust tutorialrustcli
Sep 18, 2024
π 6 min read
Lesson 4: SSRF and Injection β The URL your user gave you might be localhostI reviewed a Go service that let users provide a “webhook URL” β we would call that URL when their account had a notification. The service fetched a β¦
Go tutorialgolangsecurity
Sep 17, 2024
π 10 min read
Lesson 2: Iterator Trait and Adapters β The full pictureThe moment Rust iterators clicked for me was when I realized they’re not loops with extra steps β they’re a completely different way of expressing β¦
Rust tutorialruststdlib
Sep 17, 2024
π 7 min read
Lesson 11: String Algorithms β KMP, Rabin-Karp, and why regex can be slowString processing sits at the foundation of almost every production system. Log parsing, protocol parsing, search, validation, templating β it all comes down to β¦
fundamentalsalgorithms
Sep 16, 2024
π 7 min read
Lesson 8: Distribution β Static binaries, cargo-dist, HomebrewI built a CLI tool that three teams at work used daily. It lived in a shared directory on an NFS mount. Every time I pushed an update, I’d post in Slack: β¦
Rust tutorialrustcli
Sep 16, 2024
π 8 min read
Lesson 12: Ring Buffers β Fixed-size queues for real-time systemsThe ring buffer is the data structure that makes real-time systems possible. Audio processing, network packet capture, kernel I/O buffers, metrics collection β β¦
fundamentalsdata structures
Sep 15, 2024
π 9 min read
Lesson 1: Collections Deep Dive β Vec, VecDeque, BTreeMap and when to use whichI spent two days debugging a performance cliff in a data pipeline β turns out I’d been using a HashMap where a BTreeMap would’ve cut iteration time β¦
Rust tutorialruststdlib
Sep 15, 2024
π 6 min read
Lesson 3: Distributed Tracing with OpenTelemetry β Follow the request across servicesWe had an incident where checkout was timing out intermittently. The logs showed the API gateway receiving the request and returning a 504 after 30 seconds. The β¦
Go tutorialgolangobservability
Sep 14, 2024
π 7 min read
Lesson 7: Cross-Compilation for Linux, Mac, Windows β Build once, run anywhereFirst time I tried to cross-compile a Rust binary from my Mac to Linux, I ran cargo build --target x86_64-unknown-linux-gnu and got hit with a wall of linker β¦
Rust tutorialrustcli
Sep 14, 2024
π 9 min read
Lesson 4: Design WhatsApp β End-to-end encryption, message delivery guarantees, presenceWhatsApp is deceptively simple from a user perspective: you send a message, it arrives. But building a messaging system that handles 100 billion messages per β¦
fundamentalssystem designinterviews
Sep 13, 2024
π 7 min read
Lesson 2: Projections and Read Models β Build any view from your event streamAfter I shipped the event-sourced account system, the first question from the product team was: “Can we have a page that shows all accounts that have been β¦
fundamentalsarchitectureevent sourcing
Sep 12, 2024
π 6 min read
Lesson 3: File I/O Patterns β Read, write, stream without loading everything into memoryCLI tools spend most of their life doing file I/O. Reading config files, processing log dumps, writing output, transforming data from stdin to stdout β it all β¦
Go tutorialgolangCLI
Sep 11, 2024
π 9 min read
Lesson 6: Subcommands and Complex CLI Structures β git-style interfacesEvery tool starts as mytool --flag input.txt. Then someone asks for a second mode. Then a third. Before you know it, you have mytool --mode=convert --input foo β¦
Rust tutorialrustcli
Sep 10, 2024
π 5 min read
Lesson 2: Inter-Service Communication β HTTP, gRPC, or events? It depends on the coupling.Every time I’ve seen a team choose their inter-service communication protocol by default β “we’ll use REST for everything” or β¦
Go tutorialgolangmicroservices
Sep 9, 2024
π 8 min read
Lesson 5: Signal Handling and Graceful Shutdown β Clean exitsI had a CLI tool that converted video files. Big ones β 10, 20 gigabytes each. The conversion created a temp file, wrote the converted output there, then β¦
Rust tutorialrustcli
Sep 9, 2024
π 5 min read
Lesson 10: Vacuum and Bloat β Why Postgres Tables GrowI watched a Postgres instance run out of disk space on a 500 GB SSD. The database had 50 GB of actual data. The other 450 GB was table bloat β dead row versions β¦
fundamentalsdatabases
Sep 8, 2024
π 10 min read
Lesson 12: Test Architecture β When to unit, integration, or e2eI inherited a Rust project with 800 tests. Running them took 45 minutes. I dug in and found: 600 unit tests that mocked every dependency (most tested nothing β¦
Rust tutorialrusttesting
Sep 8, 2024
π 6 min read
Lesson 5: Anti-Patterns β Just because you can doesn't mean you shouldEvery powerful tool has a failure mode that looks like success. With generics, the failure mode is this: you write something that compiles, works correctly, and β¦
Go tutorialgolanggenerics
Sep 8, 2024
π 8 min read
Lesson 2: Schema Design β Types, queries, mutations, and subscriptionsThe schema is the most important artifact in any GraphQL API. It is simultaneously the contract between your client and server, the documentation for every β¦
fundamentalsGraphQLAPI
Sep 7, 2024
π 8 min read
Lesson 4: Colored Output and Progress Bars β UX for the terminalI used to think terminal output was either plain text or ANSI escape code soup. Then I looked at how tools like cargo, ripgrep, and bat handle their output β β¦
Rust tutorialrustcli
Sep 7, 2024
π 7 min read
Lesson 7: Recursion β Trust the Recursion, Define the Base CaseRecursion trips people up not because the concept is hard, but because they try to trace through it. “If I call f(3), then f(3) calls f(2), which calls β¦
fundamentalsinterviews
Sep 6, 2024
π 7 min read
Lesson 10: Design a News Feed β Fan-out on Write vs ReadThe news feed is the product feature that defines social media. Every time you open Instagram or Twitter, you see a personalized, ranked, real-time stream of β¦
fundamentalssystem design
Sep 5, 2024
π 7 min read
Lesson 11: Testing in CI β GitHub Actions for RustI merged a PR last year that passed all tests on my M2 MacBook and broke on the Linux CI runner. The issue? I’d used std::path::PathBuf with hardcoded β¦
Rust tutorialrusttesting
Sep 5, 2024
π 8 min read
Lesson 3: Configuration Files and Environment Variables β Config that scalesI shipped a CLI tool with 23 flags once. Twenty-three. The --help output scrolled past two terminal screens. Users hated it, nobody could remember the flags, β¦
Rust tutorialrustcli
Sep 5, 2024
π 6 min read
Lesson 3: Global Mutable State β The variable that breaks every testThere was a test suite I worked on where tests passed individually but failed when run together. The failure pattern was non-deterministic β sometimes test A β¦
Go tutorialgolangcode quality
Sep 4, 2024
π 5 min read
Lesson 3: Idiomatic Naming β Names are your documentationWhen I review Go code, naming problems tell me more about the author’s understanding of the codebase than almost anything else. A function called β¦
Go tutorialgolangcode quality
Sep 3, 2024
π 8 min read
Lesson 2: stdin, stdout, stderr β I/O patternsA coworker once asked me to review a Rust CLI they’d written. It read a CSV file, transformed some columns, and wrote the result. Worked perfectly β until β¦
Rust tutorialrustcli
Sep 3, 2024
π 7 min read
Lesson 11: Skip Lists β How Redis sorted sets workRedis chose skip lists for its sorted set implementation, and that choice is more interesting than it first appears. When you have ZADD, ZRANGE, and ZRANK all β¦
fundamentalsdata structures
Sep 2, 2024
π 7 min read
Lesson 10: Benchmarking with criterion β Measure, don't guessI once optimized a hot loop by replacing a HashMap lookup with a Vec indexed by a precomputed key. Felt clever. Ran the benchmarks. The “optimized” β¦
Rust tutorialrusttesting
Sep 2, 2024
π 6 min read
Lesson 10: Backtracking β Constraint satisfaction and config generationBacktracking is the algorithmic equivalent of “try everything, but be smart about giving up early.” It is a systematic way to explore a search space β¦
fundamentalsalgorithms
Sep 1, 2024
π 6 min read
Lesson 1: clap β Argument parsing done rightI’ve written argument parsers by hand in four different languages. Every single time, I ended up with a tangled mess of string matching, edge cases around β¦
Rust tutorialrustcli
Sep 1, 2024
π 6 min read
Lesson 4: HTTP Handler Testing β httptest is your best friendEvery Go HTTP handler is just a function that takes a ResponseWriter and a *Request. That’s the entire contract. The fact that the standard library ships β¦
Go tutorialgolangtesting
Aug 30, 2024
π 7 min read
Lesson 9: Code Coverage β tarpaulin and llvm-covI worked on a team that had a strict “90% code coverage” policy. Every PR had to hit that number or it got rejected. The result? People wrote tests β¦
Rust tutorialrusttesting
Aug 28, 2024
π 6 min read
Lesson 3: Circuit Breaking β Stop calling the service that's already downThere’s a particular kind of production incident that goes like this: Service A calls Service B. Service B starts responding slowly because its database β¦
Go tutorialgolangnetworking
Aug 27, 2024
π 7 min read
Lesson 8: Snapshot Testing with insta β Catch regressions instantlyI refactored a code formatter once β changed how it handles indentation for nested blocks. I had assertions checking specific outputs for five test cases, and β¦
Rust tutorialrusttesting
Aug 26, 2024
π 6 min read
Lesson 1: Go Plugins and hashicorp/go-plugin β Extending Go apps without recompilingThe first time I needed a plugin system in Go, I went straight to plugin.Open in the standard library. Ten minutes later I was reading about RTLD flags and β¦
Go tutorialgolangplugins
Aug 25, 2024
π 6 min read
Lesson 3: Method Sets and Addressability β Why your value can't satisfy that interfaceI spent a solid twenty minutes staring at a compilation error that read “does not implement interface (Write method has pointer receiver)” and β¦
Go tutorialgolanginternals
Aug 24, 2024
π 8 min read
Lesson 7: Fuzz Testing with cargo-fuzz β Breaking your code automaticallyA friend of mine maintains a binary parser in Rust. It had hundreds of unit tests, property tests, the works. He ran a fuzzer against it on a Friday afternoon, β¦
Rust tutorialrusttesting
Aug 24, 2024
π 5 min read
Lesson 9: Partitioning β Range, Hash, List and When Each HelpsI have worked with a few systems that had grown their main tables to 500 million rows or more. At that scale, even well-indexed queries start slowing down β not β¦
fundamentalsdatabases
Aug 23, 2024
π 8 min read
Lesson 8: Technical Debt β When to pay, when to live with itThe term “technical debt” gets used to mean everything from “this code is a mess” to “we made a pragmatic shortcut we need to β¦
fundamentalsarchitecture
Aug 22, 2024
π 7 min read
Lesson 6: Property-Based Testing with proptest β Let the computer find your bugsI wrote a URL parser once. Had fifty hand-crafted test cases. All green. Pushed to production. Within a week, a user sent a URL with a percent-encoded space β¦
Rust tutorialrusttesting
Aug 22, 2024
π 7 min read
Lesson 3: Interface Pollution β More interfaces means more indirectionInterface pollution is not a hypothetical risk. I have walked into codebases where more than half the types in the package are interfaces, where every function β¦
Go tutorialgolanginterfaces
Aug 21, 2024
π 7 min read
Lesson 9: Design a Chat System β WebSocket, Presence, Message OrderingBuilding a chat system is the interview problem that catches people on protocol fundamentals. HTTP is a request-response protocol β the client asks, the server β¦
fundamentalssystem design
Aug 20, 2024
π 6 min read
Lesson 3: Slice and Map Performance β The data structure taxSlices and maps are so convenient in Go that it’s easy to forget they’re not free. They have hidden costs β in allocations, in CPU cache misses, in β¦
Go tutorialgolangperformance
Aug 19, 2024
π 8 min read
Lesson 5: Mocking β mockall and faking dependenciesI spent an embarrassing amount of time early in my Rust journey trying to mock a database connection by hand. I built a fake struct, implemented the trait, β¦
Rust tutorialrusttesting
Aug 19, 2024
π 7 min read
Lesson 10: Bloom Filters β Probably yes, definitely noThere’s a beautiful data structure that will tell you one of two things: “definitely not in the set” or “probably in the set.” β¦
fundamentalsdata structures
Aug 18, 2024
π 7 min read
Lesson 3: internal/ Usage Patterns β Compiler-enforced encapsulationGo does not have access modifiers in the Java or Kotlin sense. There is no protected, no package-private, no friend classes. You get exactly two visibility β¦
Go tutorialgolangarchitecture
Aug 17, 2024
π 7 min read
Lesson 4: Test Fixtures and Setup/Teardown β Reusable test infrastructureI had a test file last year where every single test started with the same twelve lines of setup β creating a database connection, inserting seed data, β¦
Rust tutorialrusttesting
Aug 17, 2024
π 7 min read
Lesson 9: Greedy Algorithms β When being selfish is optimalGreedy algorithms have a simple idea at their core: at each step, make the locally optimal choice. No looking ahead, no considering alternatives, no β¦
fundamentalsalgorithms
Aug 16, 2024
π 6 min read
Lesson 2: io Patterns β Reader, Writer, and the composability that makes Go greatThe io package is three hundred lines of interface definitions and a handful of utility functions. It is also the spine of the entire Go standard library. Every β¦
Go tutorialgolangstdlib
Aug 15, 2024
π 6 min read
Lesson 2: Performance Costs β reflect.ValueOf is not freeEvery time I see reflection in a hot path, I know there is a performance conversation waiting to happen. Reflection in Go is not arbitrarily slow β it is β¦
Go tutorialgolangreflection
Aug 14, 2024
π 7 min read
Lesson 3: Doc Tests β Tested documentationI once read the docs for a popular Rust crate, copied the example verbatim, and it didn’t compile. The API had changed two versions ago but nobody updated β¦
Rust tutorialrusttesting
Aug 14, 2024
π 6 min read
Lesson 4: Interfaces vs Generics β Behavior or data shape? That's your answerOne of the most common mistakes I see in Go codebases post-1.18 is people reaching for generics when interfaces were already the right tool β and vice versa. β¦
Go tutorialgolanggenerics
Aug 14, 2024
π 6 min read
Lesson 2: Leadership and Conflict β The questions that decide senior vs mid-levelThere’s a specific moment in every senior-level interview loop where the conversation shifts. The system design round wraps up, the coding is done, and β¦
fundamentalsinterviewscareer
Aug 13, 2024
π 7 min read
Lesson 8: Memory-Mapped IO β How Databases Read FilesI was reading about how RocksDB works one evening and kept seeing references to mmap for reads. I had heard of memory-mapped files but thought of them as a β¦
fundamentalslinuxoperating systems
Aug 12, 2024
π 7 min read
Lesson 2: Integration Tests β The tests/ directoryA colleague once reviewed one of my Rust libraries and said, “Your unit tests pass, but I can’t actually use the crate β the public API β¦
Rust tutorialrusttesting
Aug 12, 2024
π 5 min read
Lesson 3: TLS Configuration β Your default HTTP server is unencryptedWhen I started writing Go HTTP servers, I thought TLS was someone else’s problem. A load balancer in front of my service handled HTTPS termination, so my β¦
Go tutorialgolangsecurity
Aug 11, 2024
π 8 min read
Lesson 7: On-Call Engineering β Reducing toil, improving reliabilityI did 12 months of on-call on a team that hadn’t invested in reliability. The rotation was weekly. In a bad week, I’d get 15-20 pages. A good week β¦
fundamentalsengineering practices
Aug 11, 2024
π 5 min read
Lesson 2: Enhanced HTTP Routing β Method patterns in net/http, no more gorilla/muxFor most of my Go career, the standard library’s net/http.ServeMux was something I used for toy services and immediately replaced with gorilla/mux for β¦
Go tutorialgolangmodern Go
Aug 10, 2024
π 7 min read
Lesson 1: Unit Tests β #[test] and assertionsI shipped a Rust library last year that had zero tests. Not because I’m lazy β I was prototyping, moving fast, “I’ll add tests later.” β¦
Rust tutorialrusttesting
Aug 10, 2024
π 6 min read
Lesson 2: Docker for Go β Multi-stage builds that produce tiny imagesThe first Dockerfile I wrote for a Go service produced a 1.2 GB image. It was based on golang:1.22, which includes the full Go toolchain, build cache, test β¦
Go tutorialgolangdeploymentdevops
Aug 9, 2024
π 5 min read
Lesson 8: Replication β Streaming, Logical, and FailoverThe first time I had to fail over a Postgres primary, it was 2 AM, the primary was not responding, and I genuinely did not know whether the replica was up to β¦
fundamentalsdatabases
Aug 8, 2024
π 8 min read
Lesson 8: Refutable vs Irrefutable Patterns β Where they applyI remember the first time the Rust compiler told me “refutable pattern in local binding.” I stared at the error for five minutes, Googled β¦
Rust tutorialrustpattern-matching
Aug 8, 2024
π 6 min read
Lesson 3: Request Validation β Never trust the callerI once shipped an endpoint that accepted a limit query parameter for pagination. The valid range was 1β100. I did not validate it. Someone called it with β¦
Go tutorialgolangbackend
Aug 7, 2024
π 7 min read
Lesson 7: Migration Strategies β Strangler fig and feature flagsRewrites are seductive. The existing system is messy, it’s slow to change, and the new system in your head is clean and fast and well-designed. Then you β¦
fundamentalsarchitecture
Aug 7, 2024
π 6 min read
Lesson 2: Deployments and Scaling β Rolling updates, HPA, VPAThe week before a major product launch, our Kubernetes cluster started evicting pods. Traffic was spiking as we ran load tests, but instead of scaling up, the β¦
fundamentalskubernetesdevops
Aug 6, 2024
π 7 min read
Lesson 9: Tries β Prefix matching, autocomplete, routing tablesWhen you type “ath” into a search box and it suggests “atharva,” “athens,” and “athletics,” that’s a trie. β¦
fundamentalsdata structures
Aug 5, 2024
π 9 min read
Lesson 7: The Visitor Pattern via Enums β When trait objects won't cut itI spent a week once trying to make trait objects work for an AST walker. Every new operation meant a new trait, a new impl block for every node type, and a β¦
Rust tutorialrustpattern-matching
Aug 5, 2024
π 6 min read
Lesson 2: Config and Env Handling β Viper, envconfig, or just os.Getenv?Configuration is one of those problems that looks trivial until it is not. A single environment variable is three lines of code. A configuration file with β¦
Go tutorialgolangCLI
Aug 4, 2024
π 6 min read
Lesson 8: Design a URL Shortener β The Classic, Done ProperlyThe URL shortener is the “Hello World” of system design interviews. It appears deceptively simple: take a long URL, return a short one. But if you β¦
fundamentalssystem design
Aug 3, 2024
π 7 min read
Lesson 7: Service Mesh β Sidecar proxies and mTLS without codeA team I worked with had seventeen microservices. Each service had its own implementation of retry logic, circuit breaking, timeout handling, and mutual TLS. β¦
fundamentalsnetworking
Aug 2, 2024
π 9 min read
Lesson 6: State Machines with Enums β Compile-time guaranteesThree years ago, I debugged a payment processing system where an order could go from “refunded” back to “shipped.” Nobody intended for β¦
Rust tutorialrustpattern-matching
Aug 2, 2024
π 7 min read
Lesson 8: Dynamic Programming Intuition β Memoization, not memorizationDynamic programming has an intimidating reputation. The name sounds academic, the problems in textbooks often involve sequences and matrices, and the “aha β¦
fundamentalsalgorithms
Aug 2, 2024
π 8 min read
Lesson 2: Feature Stores β Why feature engineering is 80% of MLThere is a saying in machine learning that is so universally acknowledged it has become a clichΓ©: 80% of the work in any ML project is feature engineering. I β¦
fundamentalsMLsystem designAI
Aug 1, 2024
π 6 min read
Lesson 3: Integration Tests β Unit tests lie, integration tests proveUnit tests feel productive. You write a function, you write a test, everything goes green, and you merge. But unit tests exist in a bubble β a bubble where β¦
Go tutorialgolangtesting
Jul 30, 2024
π 8 min read
Lesson 5: Enums Carrying Data β Modeling real domainsThe worst bug I ever shipped came from a status field that was a string. It could be “active”, “Active”, “ACTIVE”, β¦
Rust tutorialrustpattern-matching
Jul 30, 2024
π 5 min read
Lesson 1: Building MCP Servers in Go β Give AI agents tools with the Model Context ProtocolWhen Claude or another AI assistant needs to look up a database record, call an internal API, or read a file from your filesystem, it can’t do that on its β¦
Go tutorialgolangAILLMMCP
Jul 29, 2024
π 6 min read
Lesson 7: Containers from Scratch β Namespaces, Cgroups, What Docker DoesI spent the first two years of my career using Docker without understanding what it was actually doing. I thought containers were a “lightweight VM” β¦
fundamentalslinuxoperating systems
Jul 28, 2024
π 12 min read
Lesson 10: Production Error Architecture β Logging, reporting, recoveryI shipped a Rust service to production once with great error types, proper Result propagation, context chains β the whole nine yards. And then I couldn’t β¦
Rust tutorialrusterror-handling
Jul 28, 2024
π 7 min read
Lesson 6: Feature Flags β Progressive rollout and kill switchesWe deployed a new checkout flow on a Friday afternoon. It had passed code review, passed testing, passed staging load tests. By Friday evening, the error rate β¦
fundamentalsengineering practices
Jul 28, 2024
π 6 min read
Lesson 2: Metrics That Matter β Count, measure, alertThe first metrics dashboard I built for a Go service had forty-two graphs. CPU, memory, goroutine count, heap allocations, GC pause duration, request rate, β¦
Go tutorialgolangobservability
Jul 27, 2024
π 9 min read
Lesson 4: Or Patterns, @ Bindings, and Rest Patterns β The full syntaxI was reviewing a PR last year where someone had written twelve match arms for an enum β four groups of three variants that all did the same thing. Each group β¦
Rust tutorialrustpattern-matching
Jul 27, 2024
π 5 min read
Lesson 7: Connection Pooling β What PgBouncer Actually DoesA Postgres connection is not cheap. When I first scaled a service from a single server to 20 replicas β each running a Go application with database/sql’s β¦
fundamentalsdatabases
Jul 26, 2024
π 7 min read
Lesson 2: Raft Consensus β The consensus algorithm you can actually understandWhen I first tried to understand Paxos β the original distributed consensus algorithm β I read the paper three times and still felt like I was missing β¦
fundamentalsdistributed systems
Jul 25, 2024
π 7 min read
Lesson 3: Match Guards and Bindings β Fine-grained controlA few months back I was writing a rate limiter. The logic was simple: if the request is from an internal IP and the rate is under the limit, allow it. If β¦
Rust tutorialrustpattern-matching
Jul 25, 2024
π 7 min read
Lesson 2: Parsing β Tokens to AST, recursive descentThe lexer gave us tokens. The tokens are still flat β a sequence with no hierarchy. The expression 1 + 2 * 3 produces six tokens, but it does not yet say that 2 β¦
fundamentalscompilers
Jul 25, 2024
π 6 min read
Lesson 2: Giant God Structs β If your struct has 30 fields, it has 30 problemsI inherited a Go service where the primary domain object was a struct with 47 fields. Some were database columns, some were computed from other fields, some β¦
Go tutorialgolangcode quality
Jul 24, 2024
π 7 min read
Lesson 9: panic!, unwrap, expect β When crashing is correctThere’s a pervasive myth in the Rust community that unwrap() is always bad. I’ve seen code reviews where people mechanically replace every unwrap() β¦
Rust tutorialrusterror-handling
Jul 24, 2024
π 7 min read
Lesson 6: API Versioning β URL, header, or content negotiationThe first time I shipped a breaking change to a production API without a version, I got an incident at 2am because a partner integration stopped working. β¦
fundamentalsarchitecture
Jul 24, 2024
π 5 min read
Lesson 2: Spotting Over-Abstraction β When your abstraction is the problemThere’s a version of Go code I see in almost every codebase that’s been touched by developers who came from Java or C# β it’s covered in β¦
Go tutorialgolangcode quality
Jul 23, 2024
π 6 min read
Lesson 8: Graphs β You're solving graph problems without knowing itMost engineers don’t think of themselves as solving graph problems. They think they’re deploying microservices, resolving package dependencies, β¦
fundamentalsdata structures
Jul 22, 2024
π 8 min read
Lesson 2: Destructuring β Structs, tuples, enums, nestedI used to write code like point.x, point.y, point.z over and over in the same function. Three fields, three accesses, repeated twelve times. Then I learned β¦
Rust tutorialrustpattern-matching
Jul 22, 2024
π 7 min read
Lesson 3: Good Patterns β Generic code should be boringThe best generic code I’ve ever written looks like the worst. No clever type wizardry, no five-level constraint hierarchies β just a function that clearly β¦
Go tutorialgolanggenerics
Jul 22, 2024
π 6 min read
Lesson 1: CGo Basics β When you need C and how to call it safelyThere is a saying in the Go community: “cgo is not Go.” It is not an insult. It is a warning. The moment you add import "C" to a file, you β¦
Go tutorialgolangCGosystems
Jul 21, 2024
π 7 min read
Lesson 8: Adding Context β Error chains and backtracesPicture this: it’s 2 AM, your pager goes off, and the log says "connection refused". Connection to what? From where? During which operation? β¦
Rust tutorialrusterror-handling
Jul 21, 2024
π 6 min read
Lesson 7: Rate Limiting β Token Bucket, Sliding Window, DistributedWithout rate limiting, a single misbehaving client can consume all your resources and deny service to everyone else. A bug in a client that retries in a tight β¦
fundamentalssystem design
Jul 20, 2024
π 6 min read
Lesson 1: match β Exhaustive by designI shipped a Python service once that had a match statement handling four message types. Three months later, the team added a fifth type. Nobody updated the β¦
Rust tutorialrustpattern-matching
Jul 20, 2024
π 6 min read
Lesson 2: Retries with Exponential Backoff β Retry right or retry foreverI once worked on a service that retried failed HTTP requests in a tight loop with no backoff and no jitter. When our upstream had a brief outage, every instance β¦
Go tutorialgolangnetworking
Jul 19, 2024
π 6 min read
Lesson 7: Shortest Path β Dijkstra in routing and network optimizationWhen I joined a team building a multi-region traffic routing system, the first thing I had to understand was why the routing decisions were not always the β¦
fundamentalsalgorithms
Jul 18, 2024
π 7 min read
Lesson 7: Library vs Application Error Strategy β They're not the sameI learned this the hard way. I was building a parsing library and used anyhow::Error as my error type in all public functions. A user opened an issue: “I β¦
Rust tutorialrusterror-handling
Jul 18, 2024
π 7 min read
Lesson 2: Nil Interface Gotchas β nil is not nil when it has a typeA few months into my first production Go service, I had a bug that cost me two hours. A function returned an error, I checked if err != nil and it passed β but β¦
Go tutorialgolanginternals
Jul 17, 2024
π 7 min read
Lesson 6: gRPC and Protobuf β Binary protocols and streamingThe first JSON API I replaced with gRPC was passing []Order objects around β each order had about 40 fields, most of which the caller never used. The JSON β¦
fundamentalsnetworking
Jul 16, 2024
π 7 min read
Lesson 6: anyhow β When you don't care about the typeThere’s a dirty secret in Rust error handling: half the time, you don’t actually need typed errors. You need errors that are easy to create, easy to β¦
Rust tutorialrusterror-handling
Jul 16, 2024
π 6 min read
Lesson 2: Stack vs Heap Intuition β The allocation you didn't know you madeThere’s a class of performance bugs in Go that doesn’t show up in code review, doesn’t trigger the race detector, and doesn’t cause test β¦
Go tutorialgolangperformance
Jul 15, 2024
π 8 min read
Lesson 3: Design Google Docs β Real-time collaboration, OT vs CRDT, conflict resolutionGoogle Docs is the problem I recommend to every engineer who thinks they understand distributed systems. The surface looks trivial: multiple users editing a β¦
fundamentalssystem designinterviews
Jul 15, 2024
π 6 min read
Lesson 2: Consumer-Side Interfaces β Define where you use, not where you buildThere is a convention I spent a long time following without questioning it: put the interface in the same package as the type that implements it. If I had a β¦
Go tutorialgolanginterfaces
Jul 14, 2024
π 6 min read
Lesson 5: thiserror β Derive your way to clean errorsAfter writing my third custom error type by hand β with the Display impl, the Error impl, the From impls β I thought, “there has to be a better β¦
Rust tutorialrusterror-handling
Jul 14, 2024
π 5 min read
Lesson 6: Signals β SIGTERM vs SIGKILL and Graceful ShutdownThe first time I deployed a service to Kubernetes and watched it restart, I noticed that requests in flight were sometimes failing with connection resets. The β¦
fundamentalslinuxoperating systems
Jul 13, 2024
π 7 min read
Lesson 5: Load Testing β k6, vegeta, realistic patternsWe load-tested our new checkout service before launch. 1,000 virtual users, 10 minutes, all hitting /v1/checkout sequentially. It passed with excellent numbers. β¦
fundamentalsengineering practices
Jul 12, 2024
π 8 min read
Lesson 15: GATs β Generic associated types explainedGATs (Generic Associated Types) took seven years from proposal to stabilization. That’s not because Rust’s team is slow β it’s because GATs β¦
Rust tutorialrusttraitsgenerics
Jul 12, 2024
π 7 min read
Lesson 2: Avoiding Cyclic Dependencies β If packages import each other, your design is wrongThe Go compiler refuses to build a program with a cyclic import. It is not a warning. It is not a lint violation. It is a hard failure. I used to find this β¦
Go tutorialgolangarchitecture
Jul 12, 2024
π 6 min read
Lesson 1: WASM from Go β Compile Go to WebAssembly and run it anywhereI came to WebAssembly skeptically. The pitch β “run code anywhere, at near-native speed, in a sandboxed environment” β sounded like the kind of β¦
fundamentalsWebAssemblyWASM
Jul 11, 2024
π 8 min read
Lesson 4: Designing Custom Error Types β Your domain, your errorsI once worked on a project where every error was Box<dyn std::error::Error>. Debugging was miserable. When something failed in production, the logs said β¦
Rust tutorialrusterror-handling
Jul 11, 2024
π 5 min read
Lesson 6: Query Planning and EXPLAIN β Reading Execution PlansThe first time I ran EXPLAIN ANALYZE on a slow query, I stared at the output for five minutes and understood none of it. It looked like a compiler error message β¦
fundamentalsdatabases
Jul 10, 2024
π 8 min read
Lesson 14: Const Generics β Types parameterized by valuesBefore const generics landed (Rust 1.51), working with arrays was painful. You couldn’t write a function that accepted [T; N] for any N. The standard β¦
Rust tutorialrusttraitsgenerics
Jul 10, 2024
π 6 min read
Lesson 2: Fuzzing in Go β Let the machine find your edge casesThere’s a class of bugs that you will never find by thinking about edge cases. You’ll think about empty strings, about zero values, about negative β¦
Go tutorialgolangtesting
Jul 9, 2024
π 6 min read
Lesson 3: The ? Operator β Propagation made elegantBefore the ? operator existed, Rust had try!() β a macro that did the same thing but looked ugly and nested poorly. When ? landed in Rust 1.13, it was one of β¦
Rust tutorialrusterror-handling
Jul 9, 2024
π 7 min read
Lesson 7: Heaps and Priority Queues β Scheduling, top-K, and rate limitersEvery time your operating system picks the next process to run, it’s using a heap. Every time Kubernetes re-schedules a pod, it’s using a priority β¦
fundamentalsdata structures
Jul 8, 2024
π 6 min read
Lesson 2: Secret Handling β Env vars are not a vaultI once found database credentials committed directly in a Go source file β not in a toy project, in a staging environment of a real product. The developer who β¦
Go tutorialgolangsecurity
Jul 7, 2024
π 8 min read
Lesson 13: Monomorphization β How generics become fast“Zero-cost abstractions” is Rust’s battle cry. But what does that actually mean for generics? How does Vec<i32> and Vec<String> β¦
Rust tutorialrusttraitsgenerics
Jul 7, 2024
π 6 min read
Lesson 2: Result and Option β The foundationWhen I first started writing Rust, I used match on every single Result and Option. My code looked like a staircase β match inside match inside match, indented β¦
Rust tutorialrusterror-handling
Jul 7, 2024
π 8 min read
Lesson 5: DDD Essentials β Bounded contexts and aggregatesThe concept of “customer” meant something different in every team I talked to at one company. To the billing team, a customer was a billing account. β¦
fundamentalsarchitecture
Jul 6, 2024
π 5 min read
Lesson 1: Service Boundaries β Split by business capability, not by technical layerThe most expensive architectural mistake I’ve seen teams make with microservices is splitting by technical layer instead of by business capability. β¦
Go tutorialgolangmicroservices
Jul 5, 2024
π 6 min read
Lesson 1: Rust's Error Philosophy β No exceptions, no surprisesI spent three years writing Java before I touched Rust. In Java, any function call might throw an exception β checked, unchecked, runtime, whatever. You never β¦
Rust tutorialrusterror-handling
Jul 5, 2024
π 5 min read
Lesson 2: Middleware Patterns β Wrap the handler, not the logicThe first time I wrote authentication logic, I put it directly inside each handler. Copy-paste, then copy-paste again. By handler number five I had four β¦
Go tutorialgolangbackend
Jul 4, 2024
π 8 min read
Lesson 12: Operator Overloading with Traits β Making your types feel nativeI was building a linear algebra library and got tired of writing vector_a.add(&vector_b) everywhere. It looked ugly. It read poorly. Math should look like β¦
Rust tutorialrusttraitsgenerics
Jul 4, 2024
π 6 min read
Lesson 6: CDNs β Put Your Bytes Close to Your UsersPhysics is the enemy of performance. Light travels through fiber optic cables at about 200,000 km/s β roughly two-thirds the speed of light in a vacuum. A β¦
fundamentalssystem design
Jul 3, 2024
π 6 min read
Lesson 6: BFS and DFS β Dependency resolution, crawlers, cycle detectionGraph traversal sounds abstract until you realize that most interesting data in production is a graph. Service dependencies are a graph. Database foreign key β¦
fundamentalsalgorithms
Jul 2, 2024
π 7 min read
Lesson 11: Essential Std Traits β Iterator, Display, From, DefaultThere’s a tier list of Rust traits. Some you’ll implement once in your career. Some you’ll implement weekly. And then there are the ones β¦
Rust tutorialrusttraitsgenerics
Jul 2, 2024
π 5 min read
Lesson 1: net/http Deep Dive β The most important package you use wrongEvery Go web service I’ve reviewed starts with net/http. Most of them use it correctly for the obvious parts and incorrectly for the subtle ones. The β¦
Go tutorialgolangstdlib
Jul 1, 2024
π 7 min read
Lesson 5: WebSockets β Upgrade, framing, vs SSE vs pollingWhen I first built a real-time notification system, I reached for WebSockets because that’s what everyone said to use for “real-time.” Three β¦
fundamentalsnetworking
Jul 1, 2024
π 7 min read
Lesson 2: Type Parameters and Constraints β Teaching the compiler what you meanThe hardest part of learning Go generics isn’t the concept β it’s the syntax. The first time I read a function signature like func Keys[K β¦
Go tutorialgolanggenerics
Jun 30, 2024
π 7 min read
Lesson 10: Orphan Rules and the Newtype Workaround β Coherence in practicePicture this: you’re using two crates β serde and some db_client crate. You want to implement serde::Serialize for db_client::Row. Sounds reasonable. You β¦
Rust tutorialrusttraitsgenerics
Jun 30, 2024
π 5 min read
Lesson 1: Static Binaries β One file, zero dependencies, deploy anywhereThe first time I deployed a Go binary to a production server, I was braced for the usual ceremony: SSH in, install the right runtime version, copy over config β¦
Go tutorialgolangdeploymentdevops
Jun 29, 2024
π 7 min read
Lesson 1: Event Store Design β Append-only logs that are your source of truthMy first encounter with event sourcing was a financial system that needed a complete audit trail. The business requirement was clear: every change to an account β¦
fundamentalsarchitectureevent sourcing
Jun 28, 2024
π 6 min read
Lesson 9: Blanket Implementations β Implementing for all TThe moment blanket implementations clicked for me, I felt like I’d been handed a cheat code. You write impl<T: Display> ToString for T and suddenly β¦
Rust tutorialrusttraitsgenerics
Jun 28, 2024
π 6 min read
Lesson 1: When Reflection Is Justified β The last resort that sometimes is the only resortGo’s reflect package carries a reputation: “don’t use it unless you have to.” That advice is correct but incomplete. Understanding when β¦
Go tutorialgolangreflection
Jun 27, 2024
π 6 min read
Lesson 5: Epoll and IO Multiplexing β How Go''s Netpoller WorksI used to wonder how a Go HTTP server could handle 100,000 concurrent connections with only 8 OS threads. If each connection required a dedicated thread, you β¦
fundamentalslinuxoperating systems
Jun 26, 2024
π 6 min read
Lesson 6: B-Trees and B+ Trees β How every database index actually worksEvery time PostgreSQL, MySQL, SQLite, or MongoDB uses an index, it’s almost certainly a B-tree or B+ tree underneath. Not a binary search tree β a B-tree. β¦
fundamentalsdata structures
Jun 25, 2024
π 7 min read
Lesson 8: Object Safety β Why some traits can't be dynThe first time I got the error “the trait Clone cannot be made into an object,” I stared at it for a solid minute. Clone is one of the most β¦
Rust tutorialrusttraitsgenerics
Jun 25, 2024
π 6 min read
Lesson 1: Structured Logging with slog β Printf is not observabilityI spent two years writing Go services that logged like this:
log.Printf("processing order %s for user %d, amount %.2f", orderID, userID, amount) It β¦
Go tutorialgolangobservability
Jun 24, 2024
π 7 min read
Lesson 4: Monitoring and Alerting β SLOs and alert fatigueThe on-call rotation I inherited had 47 active alerts. On a bad week, the on-call engineer got paged 30 times. Most pages were “something might be β¦
fundamentalsengineering practices
Jun 23, 2024
π 7 min read
Lesson 7: dyn Trait β Runtime polymorphism and its costEvery Rust programmer hits this wall eventually. You have a Vec and you want to put different types in it β all implementing the same trait, but different β¦
Rust tutorialrusttraitsgenerics
Jun 23, 2024
π 5 min read
Lesson 5: Transaction Isolation β Read Committed vs SerializableI shipped a bug once that allowed a user to spend the same gift card balance twice. Two requests arrived nearly simultaneously, both read the same balance, both β¦
fundamentalsdatabases
Jun 22, 2024
π 5 min read
Lesson 1: Building CLIs with Cobra β From main.go to production CLIEvery Go project that grows into something useful eventually needs a command-line interface. Maybe it starts as a quick main.go with os.Args[1] checks and a β¦
Go tutorialgolangCLI
Jun 21, 2024
π 6 min read
Lesson 6: Supertraits β Building trait hierarchiesI had a trait called Serialize (homebrew, pre-serde days) that needed to format things as strings. I kept calling .to_string() inside default methods and β¦
Rust tutorialrusttraitsgenerics
Jun 21, 2024
π 7 min read
Lesson 4: CQRS β When reads and writes need different modelsI maintained an e-commerce admin dashboard that had a query so complex it took 12 seconds to run. It joined seven tables across the orders, inventory, and β¦
fundamentalsarchitecture
Jun 20, 2024
π 6 min read
Lesson 1: Escape Analysis β Where your data lives matters more than how you write itI spent the first two years of writing Go completely unaware that the compiler was making decisions about my code that I never asked for β and that those β¦
Go tutorialgolangperformance
Jun 19, 2024
π 7 min read
Lesson 5: Associated Types vs Generic Parameters β Choosing the right toolHere’s a question that confused me for months: why does Iterator use an associated type (type Item) instead of a generic parameter (Iterator<T>)? β¦
Rust tutorialrusttraitsgenerics
Jun 19, 2024
π 6 min read
Lesson 5: Message Queues β Decoupling Services Without Losing MessagesSynchronous calls are elegant until they’re not. Service A calls Service B. B is slow. A waits. A’s request pool fills up. A becomes slow. The β¦
fundamentalssystem design
Jun 18, 2024
π 8 min read
Lesson 15: When You're Fighting the Borrow Checker β Restructure, Don't HackEvery Rust developer has been there. You’re implementing something that feels simple. It works in your head. But the borrow checker says no. You try β¦
Rust tutorialrustownershiplifetimes
Jun 18, 2024
π 6 min read
Lesson 1: Interface Everywhere Syndrome β Not every dependency needs an interfaceWhen I came to Go from a Java background, I brought some habits with me that made my code worse, not better. The most persistent one was defining an interface β¦
Go tutorialgolangcode quality
Jun 17, 2024
π 6 min read
Lesson 4: where Clauses β When bounds get complexYou know that moment when a function signature gets so long it wraps three times in your editor and you can’t even find the return type? I hit that wall β¦
Rust tutorialrusttraitsgenerics
Jun 17, 2024
π 6 min read
Lesson 5: Hashing and Consistent Hashing β How load balancers distribute trafficI did not think much about hashing until I had to explain why a cache cluster was unusable after we added two new nodes. We had doubled the cache hit rate over β¦
fundamentalsalgorithms
Jun 16, 2024
π 5 min read
Lesson 1: Refactoring Go Code Safely β Change structure without changing behaviorRefactoring is the one activity that makes codebases better without adding features β and it’s also the activity most likely to introduce bugs if done β¦
Go tutorialgolangcode quality
Jun 15, 2024
π 7 min read
Lesson 4: DNS β Resolution, caching, and why changes take timeWe pushed a production incident fix at 3am β rotated to a new IP address for a critical service, updated the DNS record, set the TTL to 60 seconds. Thirty β¦
fundamentalsnetworking
Jun 15, 2024
π 6 min read
Lesson 1: Subtests and t.Run β Name your test cases or debug blindI used to write tests the way I wrote the first functions I ever wrote in Go β flat, repetitive, and with names so generic that when they failed, I had no idea β¦
Go tutorialgolangtesting
Jun 14, 2024
π 7 min read
Lesson 3: Trait Bounds β Constraining generic typesI once wrote a generic function that looked perfectly reasonable β accepted any T, did some work, returned a result. It compiled. Then I tried to actually use β¦
Rust tutorialrusttraitsgenerics
Jun 14, 2024
π 7 min read
Lesson 14: Pin and Unpin β Why Async Needs ThemPin is the concept that makes experienced Rust developers pause. Not because it’s inherently complex β it’s actually a pretty small API β but β¦
Rust tutorialrustownershiplifetimes
Jun 14, 2024
π 6 min read
Lesson 1: HTTP Client Internals β Transport, connection reuse, and the pool you forgot to configureThe first production Go service I wrote hammered our database proxy with thousands of new TCP connections every minute. The proxy started refusing connections. β¦
Go tutorialgolangnetworking
Jun 13, 2024
π 7 min read
Lesson 5: Trees and BSTs β Why your database is a treeWhen you run SELECT * FROM orders WHERE user_id = 42, your database doesn’t scan every row. It walks a tree. Understanding why databases chose trees over β¦
fundamentalsdata structures
Jun 12, 2024
π 7 min read
Lesson 2: Default Implementations and Selective Overrides β Don't repeat yourselfHere’s something that bugged me when I first started with traits: I had six different types all implementing the same trait, and five of them had β¦
Rust tutorialrusttraitsgenerics
Jun 12, 2024
π 5 min read
Lesson 1: Designing HTTP APIs in Go β net/http is enoughI spent the first few months of writing Go services reaching straight for a framework. Chi, Gorilla, Echo β I cycled through them trying to find the β¦
Go tutorialgolangbackend
Jun 11, 2024
π 5 min read
Lesson 4: TCP/IP Stack β SYN Floods, TIME_WAIT, Connection TuningA load test I ran against a Go HTTP server one afternoon produced a strange result: throughput leveled off at about 30,000 requests per second and β¦
fundamentalslinuxoperating systems
Jun 10, 2024
π 6 min read
Lesson 1: Trait Fundamentals β Defining shared behaviorI spent my first month in Rust writing impl blocks that looked suspiciously like Java interfaces. Copy-paste, copy-paste, tweak one method, ship it. Then I hit β¦
Rust tutorialrusttraitsgenerics
Jun 10, 2024
π 6 min read
Lesson 13: Weak References β Breaking CyclesReference counting has a fatal flaw: cycles. If A owns B and B owns A, neither reference count hits zero. The memory is leaked β not freed when it should be, β¦
Rust tutorialrustownershiplifetimes
Jun 10, 2024
π 7 min read
Lesson 1: Interface Representation β Two words that carry your abstractionsI remember the first time I hit a bug where err != nil returned true even though the function clearly returned nil. I spent forty minutes staring at perfectly β¦
Go tutorialgolanginternals
Jun 9, 2024
π 5 min read
Lesson 4: MVCC β How Postgres Handles Concurrent Reads and WritesOne thing that puzzled me early on was how Postgres could let me read from a table while someone else was writing to it β without locking me out and without me β¦
fundamentalsdatabases
Jun 8, 2024
π 8 min read
Lesson 3: Incident Response β Postmortems and blameless cultureThe first major incident I was on-call for, I spent 90 minutes trying to fix the problem and 30 minutes frantically communicating to stakeholders in a panic. β¦
fundamentalsengineering practices
Jun 8, 2024
π 7 min read
Lesson 1: When NOT to Use Interfaces β Abstractions cost clarityThe first time I saw Go interfaces click in a codebase, I made the same mistake every developer makes: I started reaching for them everywhere. If I had a β¦
Go tutorialgolanginterfaces
Jun 7, 2024
π 6 min read
Lesson 12: Rc and Arc β Shared OwnershipRust’s ownership model says every value has one owner. But what happens when multiple parts of your program genuinely need to own the same data? Trees β¦
Rust tutorialrustownershiplifetimes
Jun 7, 2024
π 6 min read
Lesson 1: What Generics Solve in Go β Remove duplication without hiding intentI spent two years writing Go before generics shipped in 1.18, and I’ll be honest β I didn’t miss them at first. Go’s simplicity felt like a β¦
Go tutorialgolanggenerics
Jun 6, 2024
π 6 min read
Lesson 1: GraphQL vs REST β When GraphQL wins and when it doesn'tI spent about six months being wrong about GraphQL. My first exposure to it was a rewrite pitch from a frontend engineer who was tired of making five REST calls β¦
fundamentalsGraphQLAPI
Jun 5, 2024
π 6 min read
Lesson 4: Database Scaling β Read Replicas, Sharding, and When Each HelpsYour startup ships, gains traction, and one day your database becomes the bottleneck. Queries slow down. CPU spikes. The single machine hosting your Postgres β¦
fundamentalssystem design
Jun 5, 2024
π 6 min read
Lesson 1: Input Validation β Trust nothing from the wireThe first production security incident I dealt with involved a simple integer field in a JSON body. The client sent a negative number where we expected a β¦
Go tutorialgolangsecurity
Jun 4, 2024
π 6 min read
Lesson 11: Interior Mutability β Cell, RefCell, and the RulesRust’s borrowing rules say you can’t mutate through a shared reference. Period. Except β sometimes you need to. Caching, reference counting, lazy β¦
Rust tutorialrustownershiplifetimes
Jun 4, 2024
π 7 min read
Lesson 3: Event-Driven Architecture β Events vs commandsI used to use “event” and “command” interchangeably. A message is a message, right? Then I started debugging an event-driven system β¦
fundamentalsarchitecture
Jun 4, 2024
π 6 min read
Lesson 1: Range Over Integers and Iterators β for i := range 10 and the iterator protocolI have written for i := 0; i < n; i++ so many times that my fingers type it on autopilot. The three-clause for loop is fine β it works, everyone understands β¦
Go tutorialgolangmodern Go
Jun 3, 2024
π 6 min read
Lesson 1: Package Boundaries β One package, one responsibility, zero excusesI have refactored a lot of Go codebases β my own included. And the single most common structural mistake I see is the utils package. Or helpers. Or common. Or β¦
Go tutorialgolangarchitecture
Jun 2, 2024
π 6 min read
Lesson 10: Self-Referential Structs β The Problem and SolutionsEvery Rust developer eventually tries to build this: a struct that owns some data AND holds a reference into that data. It seems perfectly reasonable. β¦
Rust tutorialrustownershiplifetimes
Jun 2, 2024
π 8 min read
Lesson 1: ML Pipelines β From raw data to deployed modelThe first time I built a “production ML pipeline,” it was a cron job that ran a Python script, trained a model, and saved the artifact to disk. It β¦
fundamentalsMLsystem designAI
Jun 1, 2024
π 6 min read
Lesson 4: Two Pointers and Sliding Window β Stream processing in disguiseThe first time I recognized the sliding window pattern outside a textbook, I was reading the source code for a rate limiter. There was no comment saying β¦
fundamentalsalgorithms
May 31, 2024
π 6 min read
Lesson 9: Higher-Ranked Trait Bounds β for<'a> ExplainedIf regular lifetime annotations are Rust’s intermediate boss, for<'a> is the final boss. Higher-Ranked Trait Bounds (HRTBs) look terrifying in β¦
Rust tutorialrustownershiplifetimes
May 31, 2024
π 9 min read
Lesson 6: Linked Lists β Pointer Manipulation Is the Real TestLinked lists are where candidates reveal whether they actually understand pointers. You can read a hundred tutorials on reversing a linked list, but the first β¦
fundamentalsinterviews
May 30, 2024
π 6 min read
Lesson 3: TLS Handshake β What happens in those 2 round tripsA colleague once asked me why adding TLS to a service increased our P99 latency by 50ms. She had measured it carefully, switching between HTTP and HTTPS in a β¦
fundamentalsnetworking
May 29, 2024
π 6 min read
Lesson 8: 'static β Not What You Think'static is the most misunderstood lifetime in Rust. Most people think it means “lives forever” or “global variable.” It kind of does β β¦
Rust tutorialrustownershiplifetimes
May 28, 2024
π 6 min read
Lesson 4: Stacks and Queues β The structures hiding in every systemEvery time you make a function call, your program uses a stack. Every HTTP request in a web server sits in a queue. Every undo operation in your IDE is a stack. β¦
fundamentalsdata structures
May 27, 2024
π 6 min read
Lesson 7: Lifetimes in Structs β References That Live in TypesPutting a reference inside a struct is where lifetimes go from “mildly confusing” to “wait, what?” for most people. I remember spending β¦
Rust tutorialrustownershiplifetimes
May 27, 2024
π 5 min read
Lesson 3: File Descriptors β Why Too Many Open Files Kills Your ServerI got a 3 AM page for a service that was returning connection errors to every client. The application logs said dial tcp: lookup ...: too many open files. We β¦
fundamentalslinuxoperating systems
May 25, 2024
π 6 min read
Lesson 6: Lifetime Elision Rules β Why You Usually Don't Write 'aIf lifetimes are so important, why don’t you see 'a plastered all over most Rust code? Because the compiler is smart enough to figure it out 90% of the β¦
Rust tutorialrustownershiplifetimes
May 25, 2024
π 8 min read
Lesson 2: Design Uber β Real-time matching, geospatial indexing, surge pricingUber is one of the most instructive system design problems because it forces you to think about real-time data pipelines, spatial indexing, and β¦
fundamentalssystem designinterviews
May 24, 2024
π 5 min read
Lesson 1: Pod Design Patterns β Sidecar, ambassador, adapterThe first time I deployed a service to Kubernetes, I put everything in a single container. Logging, metrics, TLS termination, the actual application β all in β¦
fundamentalskubernetesdevops
May 23, 2024
π 6 min read
Lesson 5: Lifetime Annotations β Teaching the Compiler RelationshipsLifetime annotations are where most people’s Rust learning hits a wall. The syntax looks alien. The error messages talk about “named β¦
Rust tutorialrustownershiplifetimes
May 23, 2024
π 5 min read
Lesson 3: Write-Ahead Log β How Databases Survive CrashesDatabases promise durability. When INSERT returns successfully, your data is safe β even if the server loses power a millisecond later. For a long time I β¦
fundamentalsdatabases
May 22, 2024
π 8 min read
Lesson 25: When to Reach for unsafe β And when not toThis is the lesson I almost didn’t write. Not because unsafe is hard to explain, but because most Rust developers will never need it β and I don’t β¦
Rust tutorialrustidiomatic-rust
May 22, 2024
π 7 min read
Lesson 2: Code Review That Works β What to look forI’ve been on the wrong end of bad code reviews in both directions. Reviews that were nitpick sessions about variable naming while missing a race β¦
fundamentalsengineering practices
May 21, 2024
π 7 min read
Lesson 4: The Borrow Checker β What It's Really DoingI used to think the borrow checker was my enemy. It rejected valid programs! It made simple things hard! It was too conservative!
Then I started maintaining a β¦
Rust tutorialrustownershiplifetimes
May 20, 2024
π 8 min read
Lesson 24: Writing Great Rust Documentation β rustdoc that actually helpsThe Rust ecosystem has some of the best documentation I’ve seen in any language. And it’s not an accident β the tooling actively encourages good β¦
Rust tutorialrustidiomatic-rust
May 20, 2024
π 7 min read
Lesson 3: Caching β The Hardest Easy Problem in CSPhil Karlton supposedly said: “There are only two hard things in Computer Science: cache invalidation and naming things.” He was joking, but also β¦
fundamentalssystem design
May 19, 2024
π 6 min read
Lesson 3: Copy vs Clone β When Data Gets DuplicatedA coworker once asked me: “If Rust moves everything, how do I ever use a value twice?” Fair question. The answer is two traits that look similar but β¦
Rust tutorialrustownershiplifetimes
May 19, 2024
π 7 min read
Lesson 2: Clean Architecture β Not the textbook versionI’ve read the Clean Architecture book. I’ve also seen teams implement it so literally that they had six layers of indirection for a CRUD endpoint: a β¦
fundamentalsarchitecture
May 18, 2024
π 6 min read
Lesson 23: Clippy Is Your Mentor β Listen to itI’ll say something controversial: Clippy taught me more about idiomatic Rust than any book. Not because it explains concepts β it doesn’t. But β¦
Rust tutorialrustidiomatic-rust
May 18, 2024
π 6 min read
Lesson 3: Binary Search β The most useful algorithm you'll use weeklyBinary search has a reputation as a simple algorithm β and it is, conceptually. Divide the search space in half, check the middle, repeat. Every programmer β¦
fundamentalsalgorithms
May 17, 2024
π 7 min read
Lesson 2: Move Semantics β Why Assignment Transfers OwnershipThe first time Rust told me I couldn’t use a variable after assigning it to another one, I stared at my screen for a solid minute. In what universe does β¦
Rust tutorialrustownershiplifetimes
May 16, 2024
π 6 min read
Lesson 22: Feature Flags and Conditional Compilation β cfg and featuresI once worked on a crate that pulled in 200+ transitive dependencies because it unconditionally depended on tokio, serde, reqwest, and tracing. Most users only β¦
Rust tutorialrustidiomatic-rust
May 16, 2024
π 6 min read
Lesson 1: Leader Election β Someone has to be in chargeI spent three days debugging a production incident where two nodes in our cluster both believed they were the primary. Each was accepting writes. Each was β¦
fundamentalsdistributed systems
May 15, 2024
π 7 min read
Lesson 1: The Mental Model β Stack, Heap, and OwnershipI spent my first three months in Rust confused about ownership. Not because the concept is hard β it’s genuinely simple β but because every tutorial I β¦
Rust tutorialrustownershiplifetimes
May 15, 2024
π 5 min read
Lesson 3: Hash Maps β O(1) with asterisksHash maps are the workhorse of production software. Nearly every caching layer, session store, deduplication system, and configuration lookup you’ve ever β¦
fundamentalsdata structures
May 14, 2024
π 6 min read
Lesson 21: The Turbofish ::<> β Explicit type parametersThe first time I saw ::<> in Rust code, I thought someone was having a stroke at the keyboard. collect::<Vec<_>>()? What is that β¦
Rust tutorialrustidiomatic-rust
May 14, 2024
π 6 min read
Lesson 2: HTTP/2 and HTTP/3 β Multiplexing and QUICThe first time I looked at a waterfall chart in Chrome DevTools and saw a hundred requests stacking up like rush-hour traffic, I knew HTTP/1.1 was the problem. β¦
fundamentalsnetworking
May 12, 2024
π 6 min read
Lesson 20: API Design Guidelines β The Rust wayI’ve written APIs in a dozen languages, and Rust is the only one where the community has near-universal agreement on how APIs should look. There’s β¦
Rust tutorialrustidiomatic-rust
May 12, 2024
π 6 min read
Lesson 2: Virtual Memory β 1GB RSS but Only 50MB is RealEarly in my career I deployed a Go service and checked top. The VIRT column showed 1.2 GB. I nearly had a heart attack β our server had 4 GB of RAM and I β¦
fundamentalslinuxoperating systems
May 11, 2024
π 7 min read
Lesson 25: What's Next β Your roadmap from beginner to production GoYou made it. Twenty-five lessons ago you didn’t know what package main meant. Now you understand variables, types, functions, error handling, interfaces, β¦
Go tutorialgolangbeginner
May 10, 2024
π 6 min read
Lesson 19: PhantomData β Tagging types without runtime costWhen I first saw PhantomData in a codebase, I thought it was some kind of hack. A zero-sized field that exists only to satisfy the compiler? It felt like a β¦
Rust tutorialrustidiomatic-rust
May 10, 2024
π 6 min read
Lesson 1: The STAR Method β "Tell me about a time you..." and how to actually answerI used to dread behavioral interviews. I was confident in system design rounds, reasonably calm under algorithm pressure, but the moment someone said β¦
fundamentalsinterviewscareer
May 9, 2024
π 8 min read
Lesson 5: Binary Search β When the Search Space Is Sorted or MonotonicBinary search has a reputation as the thing you learned in your first CS course and never thought about deeply again. Then you encounter a rotated array or a β¦
fundamentalsinterviews
May 8, 2024
π 7 min read
Lesson 18: Drop and RAII β Deterministic cleanupIn Go, you write defer f.Close() and hope you didn’t forget one. In Python, you use with blocks and hope the context manager is implemented correctly. In β¦
Rust tutorialrustidiomatic-rust
May 8, 2024
π 5 min read
Lesson 2: B-Tree Indexes β O(n) to O(log n) in one CREATE INDEXI once joined a team that had a users table with 8 million rows. The GET /users/{email} endpoint was consistently timing out under load. When I ran EXPLAIN β¦
fundamentalsdatabases
May 7, 2024
π 6 min read
Lesson 24: The Go Toolchain β build, test, vet, fmt β your daily toolsOne of the things that drew me to Go was that the toolchain ships with the language. You don’t need to choose a build tool, a formatter, or a test β¦
Go tutorialgolangbeginner
May 7, 2024
π 7 min read
Lesson 1: Git Beyond Basics β Rebase, bisect, worktreesMost engineers use maybe 15% of Git. add, commit, push, pull, branch, merge, and status covers daily work. That’s fine until you need to find which commit β¦
fundamentalsengineering practices
May 6, 2024
π 7 min read
Lesson 17: Zero-Cost Abstractions β What it actually means“Zero-cost abstractions” is Rust’s most-repeated promise and its most-misunderstood concept. People hear “zero cost” and think β¦
Rust tutorialrustidiomatic-rust
May 6, 2024
π 8 min read
Lesson 1: Lexing β Turning text into tokensI wrote my first lexer as a side project after reading the first chapter of “Writing an Interpreter in Go.” I expected it to be hard. It was not. A β¦
fundamentalscompilers
May 5, 2024
π 7 min read
Lesson 16: Enums Over Booleans β Make illegal states unrepresentableI once spent an entire afternoon debugging a function with this signature: process(data, true, false, true). Three booleans. What did they mean? I had to read β¦
Rust tutorialrustidiomatic-rust
May 5, 2024
π 7 min read
Lesson 2: Load Balancing β L4 vs L7 and Why It MattersThe first time I drew a system design diagram in an interview, I drew a box labeled “load balancer” and drew arrows from clients to it, and from it β¦
fundamentalssystem design
May 3, 2024
π 6 min read
Lesson 15: Exhaustive Matching β Let the compiler helpA teammate once added a new payment method to our system β CryptoCurrency β and forgot to update the fee calculation logic. In production. For three weeks. β¦
Rust tutorialrustidiomatic-rust
May 3, 2024
π 6 min read
Lesson 1: Monolith First β Starting with microservices is usually wrongI’ve seen two teams start new products with microservices. One spent four months before they had anything deployed β Kubernetes setup, service discovery, β¦
fundamentalsarchitecture
May 2, 2024
π 7 min read
Lesson 14: derive Is Your Best Friend β The macros you should always useI review a lot of Rust code, and one of my biggest pet peeves is types without #[derive(Debug)]. You hit an error, you try to print the value, and you get that β¦
Rust tutorialrustidiomatic-rust
May 2, 2024
π 6 min read
Lesson 23: The Type System β Types, aliases, conversions, and embeddingWhen I first came to Go from Python, the type system felt like a lot of ceremony. Why can’t I just use an int where a float64 is expected? Why do I need β¦
Go tutorialgolangbeginner
May 1, 2024
π 6 min read
Lesson 2: Sorting in Practice β When to sort and why TimSort wonSorting is one of those topics that feels like a solved problem until you actually need to care about it. Every language ships a standard sort. You call it, it β¦
fundamentalsalgorithms
Apr 30, 2024
π 7 min read
Lesson 13: Display and Debug β Formatting done rightPop quiz: what’s the difference between {} and {:?} in a println!? If your answer is “one looks prettier,” you’re not wrong β but β¦
Rust tutorialrustidiomatic-rust
Apr 29, 2024
π 7 min read
Lesson 12: Designing Error Types β thiserror vs anyhowI’ve seen two extremes in Rust error handling. On one end: Box<dyn std::error::Error> everywhere, a stringly-typed mess where you can’t β¦
Rust tutorialrustidiomatic-rust
Apr 29, 2024
π 6 min read
Lesson 1: TCP Deep Dive β Three-way handshake, congestion, NagleI used to treat TCP as a black box. Data goes in one side, data comes out the other β reliably, in order, no duplicates. That was all I needed to know, right? β¦
fundamentalsnetworking
Apr 28, 2024
π 5 min read
Lesson 2: Linked Lists β Almost never the right choiceLinked lists are the most over-taught data structure in computer science and the most under-used structure in production systems. I’ve reviewed hundreds β¦
fundamentalsdata structures
Apr 27, 2024
π 6 min read
Lesson 11: Cow β Clone on write for flexible APIsThere’s a function signature dilemma that every Rust developer hits: should this function return &str or String? If you return &str, you avoid β¦
Rust tutorialrustidiomatic-rust
Apr 26, 2024
π 5 min read
Lesson 22: File I/O β Reading and writing files the Go wayAt some point every program needs to persist something β a config file, a log, a data export. File I/O is one of those topics that sounds tedious but is β¦
Go tutorialgolangbeginner
Apr 25, 2024
π 6 min read
Lesson 10: Deref Coercion β Why &String works as &strHere’s something that confused me for weeks when I started Rust: I’d write a function that takes &str, and I could pass it a &String. β¦
Rust tutorialrustidiomatic-rust
Apr 25, 2024
π 6 min read
Lesson 1: Processes and Threads β What Goroutines Map ToWhen I first started using Go seriously, I accepted goroutines as “lightweight threads” without really understanding what that meant. The Go runtime β¦
fundamentalslinuxoperating systems
Apr 24, 2024
π 7 min read
Lesson 9: From and Into β Seamless type conversionsThe first time I saw .into() in Rust code, I was baffled. “Into what?” There was no type annotation, no explicit conversion function, just .into() β¦
Rust tutorialrustidiomatic-rust
Apr 22, 2024
π 7 min read
Lesson 8: The Builder Pattern in Rust β Ergonomic constructionEvery Rust dev eventually runs into the “struct with 12 fields” problem. You’ve got a configuration type. Some fields are required, some are β¦
Rust tutorialrustidiomatic-rust
Apr 22, 2024
π 5 min read
Lesson 1: How a Query Executes β Parser to Planner to DiskEvery time I call db.QueryContext(ctx, "SELECT * FROM orders WHERE user_id = $1", userID) in Go, I used to think the database just “found” β¦
fundamentalsdatabases
Apr 21, 2024
π 7 min read
Lesson 7: The Newtype Pattern β Type safety for freeTrue story: a Mars orbiter was lost because one team used pounds and another used newtons. Same numeric type, different semantic meanings. $327 million, gone. β¦
Rust tutorialrustidiomatic-rust
Apr 21, 2024
π 5 min read
Lesson 21: JSON and HTTP β Reading and writing the web's languageAlmost every program I write these days talks to something over HTTP β a third-party API, a database service, a webhook. And almost everything speaks JSON. So β¦
Go tutorialgolangbeginner
Apr 20, 2024
π 6 min read
Lesson 1: How the Internet Works β DNS, TCP, HTTP, TLS in 15 MinutesEvery system design interview starts with the same silent assumption: you already know how the internet works. Interviewers won’t ask you to explain DNS. β¦
fundamentalssystem design
Apr 19, 2024
π 6 min read
Lesson 6: The Typestate Pattern β Compile-time state machinesI once spent two days debugging a production issue where someone called .send() on an HTTP request builder before setting the URL. The code compiled fine β it β¦
Rust tutorialrustidiomatic-rust
Apr 18, 2024
π 6 min read
Lesson 25: Where to Go from Here β Your Rust learning pathYou’ve made it through 24 lessons. You understand ownership, borrowing, structs, enums, traits, generics, error handling, closures, iterators, and file β¦
Rust tutorialrustbeginner
Apr 18, 2024
π 7 min read
Lesson 5: Iterator Chains Over Manual Loops β Functional RustI used to write Rust like I was still writing C β for loops everywhere, mutable accumulators, index variables. The code worked, but it was loud. Five lines to β¦
Rust tutorialrustidiomatic-rust
Apr 18, 2024
π 5 min read
Lesson 1: Big-O Thinking β Will this scale to 1M records?I spent two years writing Go services before I really internalized Big-O. Not because I didn’t know the notation β every CS course teaches you to recite β¦
fundamentalsalgorithms
Apr 17, 2024
π 6 min read
Lesson 20: Testing in Go β Every Go file gets a test fileI used to think testing was something you did after you finished writing code β a checkbox you ticked before committing. Go changed that attitude for me, not by β¦
Go tutorialgolangbeginner
Apr 16, 2024
π 8 min read
Lesson 24: Reading and Writing Files β Real I/O in RustEvery tutorial teaches you to manipulate data in memory, but real programs read from files and write to files. Rust’s file I/O is built on the same β¦
Rust tutorialrustbeginner
Apr 16, 2024
π 7 min read
Lesson 4: if let and while let β Concise pattern matchingThere’s a special kind of code smell that I call “match bloat” β when you write a six-line match statement to handle a single variant and β¦
Rust tutorialrustidiomatic-rust
Apr 15, 2024
π 5 min read
Lesson 1: Arrays and Memory Layout β Cache lines decide your performanceI spent two years writing Go services before I genuinely understood why iterating over a two-dimensional slice in the wrong order could tank my throughput by β¦
fundamentalsdata structures
Apr 14, 2024
π 6 min read
Lesson 3: Option and Result Are Your Control Flow β Stop using sentinel valuesI once inherited a C codebase where -1 meant “not found,” 0 meant “error,” and NULL meant… well, it depended on the function. β¦
Rust tutorialrustidiomatic-rust
Apr 14, 2024
π 7 min read
Lesson 23: Writing Your First Tests β #[test] and assert!I have a rule: I won’t merge code without tests. Not because I’m a purist β because I’ve been burned too many times. Rust makes testing so β¦
Rust tutorialrustbeginner
Apr 13, 2024
π 8 min read
Lesson 4: Stack β Last In, First Out Solves More Than You ThinkThe stack is one of those data structures that seems too simple to be interesting β push, pop, peek, done. Then you sit in an interview, stare at a problem β¦
fundamentalsinterviews
Apr 12, 2024
π 8 min read
Lesson 2: Borrow Strategically β &T, &mut T, and when to cloneA colleague once showed me their Rust code where every function parameter was String β never &str, never &String. When I asked why, they said “the β¦
Rust tutorialrustidiomatic-rust
Apr 12, 2024
π 8 min read
Lesson 22: Iterators β Lazy, composable data processingI once profiled a Go service and found it was spending 40% of CPU time allocating intermediate slices in a data pipeline. Each transformation created a new β¦
Rust tutorialrustbeginner
Apr 12, 2024
π 6 min read
Lesson 19: Context β Passing deadlines and cancellation through your codeThere’s a moment in every Go developer’s journey when they realize that starting an operation isn’t the hard part β stopping it cleanly is. β¦
Go tutorialgolangbeginner
Apr 10, 2024
π 7 min read
Lesson 21: Closures β Functions that captureClosures are where Rust stops feeling like a systems language and starts feeling like a functional one. You’ve already been using them β every time you β¦
Rust tutorialrustbeginner
Apr 10, 2024
π 7 min read
Lesson 1: Think in Ownership β Not pointersI spent three months fighting the borrow checker before I realized the problem wasn’t the borrow checker β it was me. I kept thinking in C++ pointers and β¦
Rust tutorialrustidiomatic-rust
Apr 9, 2024
π 7 min read
Lesson 1: Design YouTube β Video upload, transcoding, streaming at scaleYouTube serves over 500 hours of video uploaded every minute and delivers billions of views per day. When I first studied this problem seriously, I made the β¦
fundamentalssystem designinterviews
Apr 8, 2024
π 7 min read
Lesson 20: Generics β Writing code that works for any typeI used to think generics were fancy academic stuff that you’d rarely need in practice. Then I wrote my third function that was identical to a previous one β¦
Rust tutorialrustbeginner
Apr 7, 2024
π 8 min read
Lesson 19: Traits β Your first abstractionTraits are the mechanism I miss most when I leave Rust. They’re interfaces without inheritance, type classes without the math, and the foundation of every β¦
Rust tutorialrustbeginner
Apr 6, 2024
π 6 min read
Lesson 18: The sync Package β Coordination tools for concurrent codeGoroutines make concurrency easy to start, but easy to start isn’t the same as easy to get right. The first time I ran multiple goroutines that touched β¦
Go tutorialgolangbeginner
Apr 5, 2024
π 6 min read
Lesson 18: Crates, Cargo.toml, and Dependencies β The Rust ecosystemThe first time I added a dependency in Rust, I was shocked. Add one line to Cargo.toml, run cargo build, and it downloads, compiles, and links everything β¦
Rust tutorialrustbeginner
Apr 3, 2024
π 7 min read
Lesson 17: Modules β Organizing your codeRust’s module system confused me for longer than I’d like to admit. I came from Go, where packages map directly to directories. Rust’s module β¦
Rust tutorialrustbeginner
Apr 2, 2024
π 6 min read
Lesson 17: Go Modules β Managing dependencies without painBefore Go modules existed, managing dependencies was genuinely painful. People used all sorts of third-party tools with their own conventions, and getting a new β¦
Go tutorialgolangbeginner
Apr 1, 2024
π 7 min read
Lesson 16: Result and the ? Operator β Errors as valuesException-based error handling has a fundamental flaw: you can’t tell by looking at a function signature whether it might throw. Go fixed this by β¦
Rust tutorialrustbeginner
Mar 30, 2024
π 7 min read
Lesson 15: Vec, HashMap, and HashSet β The collections you'll use dailyIn my experience, about 80% of all data structures in real programs are either lists or key-value maps. Rust nails both of them. Vec and HashMap are fast, safe, β¦
Rust tutorialrustbeginner
Mar 28, 2024
π 8 min read
Lesson 14: Methods and Associated Functions β impl blocks explainedIn most object-oriented languages, data and behavior are bundled together inside classes. Rust separates them β you define data with struct (or enum) and attach β¦
Rust tutorialrustbeginner
Mar 28, 2024
π 8 min read
Lesson 3: Sliding Window β Fixed or Variable, the Window Always Moves RightSliding window problems have a tell: the problem asks about a contiguous subarray or substring, and there’s a constraint that makes the brute force β¦
fundamentalsinterviews
Mar 27, 2024
π 6 min read
Lesson 16: Packages and Imports β Organizing code like a professionalEvery Go program I’ve written has taught me the same lesson over and over: good code isn’t just about what you write inside functions β it’s β¦
Go tutorialgolangbeginner
Mar 26, 2024
π 7 min read
Lesson 13: Pattern Matching β The match superpowerPattern matching ruined switch statements for me. After using match in Rust for a few months, going back to C-style switch/case feels like using a butter knife β¦
Rust tutorialrustbeginner
Mar 25, 2024
π 7 min read
Lesson 12: Enums and Option β Null safety by designTony Hoare called null his “billion-dollar mistake.” He invented it in 1965 and has publicly apologized for it multiple times since. Rust took him β¦
Rust tutorialrustbeginner
Mar 23, 2024
π 6 min read
Lesson 11: Structs β Modeling your domainI worked on a Go codebase once where someone had passed around a map[string]interface{} for user data. It was fine until someone misspelled “email” β¦
Rust tutorialrustbeginner
Mar 22, 2024
π 7 min read
Lesson 10: Strings β String vs &str and why it mattersStrings are the #1 source of confusion for Rust beginners. I see the same questions every week: “Why are there two string types?” “Why β¦
Rust tutorialrustbeginner
Mar 22, 2024
π 5 min read
Lesson 15: Select β Waiting on multiple channels at onceBy now you know how to create goroutines and how to communicate between them using channels. But what happens when a goroutine needs to listen to two channels β¦
Go tutorialgolangbeginner
Mar 20, 2024
π 7 min read
Lesson 9: Slices β Views into dataSlices clicked for me when I stopped thinking of them as a language feature and started thinking of them as a design pattern: “here’s a window into β¦
Rust tutorialrustbeginner
Mar 18, 2024
π 8 min read
Lesson 8: Borrowing and References β Sharing without givingAfter the last lesson, you might be thinking “so every function I call takes my data and I never see it again?” That would be terrible. Borrowing is β¦
Rust tutorialrustbeginner
Mar 18, 2024
π 5 min read
Lesson 14: Channels β How goroutines talk to each otherIn the last lesson, I showed you how to run code concurrently with goroutines. But goroutines that can’t talk to each other aren’t very useful. What β¦
Go tutorialgolangbeginner
Mar 16, 2024
π 8 min read
Lesson 7: Ownership β The rule that changes everythingI spent three hours fighting the borrow checker on my first real Rust project. I was furious. Then I realized every single error the compiler flagged was a β¦
Rust tutorialrustbeginner
Mar 14, 2024
π 7 min read
Lesson 6: Control Flow β if, loop, while, for β and why there's no ternaryI once reviewed a pull request that had seven levels of nested if-else. In Go. The author said “the language doesn’t give me better tools.” In β¦
Rust tutorialrustbeginner
Mar 14, 2024
π 9 min read
Lesson 2: Two Pointers β When One Pointer Isn't EnoughOne of my early interview mistakes was throwing a hash map at every array problem. It works a surprising amount of the time, but there’s a whole class of β¦
fundamentalsinterviews
Mar 13, 2024
π 7 min read
Lesson 5: Functions, Expressions, and Statements β Everything is an expressionWhen I first read that “everything in Rust is an expression,” I thought it was marketing fluff. It’s not. It’s a genuine design β¦
Rust tutorialrustbeginner
Mar 12, 2024
π 5 min read
Lesson 13: Goroutines β Lightweight threads that cost almost nothingOne of the first things people told me about Go was “it makes concurrency easy.” I was sceptical β concurrency is never easy. But the more I used β¦
Go tutorialgolangbeginner
Mar 11, 2024
π 8 min read
Lesson 4: Variables, Mutability, and Primitive Types β Let, let mut, and the type systemComing from JavaScript, I was stunned the first time Rust refused to compile because I tried to reassign a variable. “What do you mean it’s β¦
Rust tutorialrustbeginner
Mar 9, 2024
π 7 min read
Lesson 3: Hello, World β Anatomy of a Rust programThe first program I ever wrote was in BASIC on a Commodore 64 emulator. Took me twenty minutes to figure out why PRINT didn’t work (I was typing PIRNT). β¦
Rust tutorialrustbeginner
Mar 7, 2024
π 6 min read
Lesson 2: Installing Rust β rustup, cargo, and your first buildI’ve installed Rust on maybe fifty machines at this point β Linux servers, Macs, Windows boxes, even a Raspberry Pi. The process has gotten remarkably β¦
Rust tutorialrustbeginner
Mar 6, 2024
π 5 min read
Lesson 12: Error Handling β Errors are values, not exceptionsThe first time I wrote Go after years of Python and JavaScript, I kept waiting for the try/catch block. It never came. Instead, almost every function returned β¦
Go tutorialgolangbeginner
Mar 5, 2024
π 5 min read
Lesson 1: Why Rust Exists β And why you should careI mass-deleted a production database once because a C program I’d written had a use-after-free bug that corrupted a pointer used for query routing. Took β¦
Rust tutorialrustbeginner
Mar 3, 2024
π 7 min read
Lesson 1: Arrays and Hashing β The Pattern Behind 30% of All Interview QuestionsWhen I was preparing for my first round of FAANG interviews, I was overwhelmed. Hundreds of LeetCode problems, dozens of patterns, no clear starting point. Then β¦
fundamentalsinterviews
Feb 29, 2024
π 7 min read
Traits: Mastering Traits in RustβββNavigating Edge Cases and Best Practices (PartΒ 3)Hello again, Rust enthusiasts! Weβve journeyed through the foundational concepts and dived into the advanced territories of Rustβs trait system in our previous β¦
rustrust tutorial
Feb 29, 2024
π 12 min read
Mastering Rust: The Complete Guide to Pattern MatchingLooking to take your Rust skills to the next level? Master the art of pattern matching, one of Rust’s most versatile features! This beginner-friendly β¦
rustrust tutorial
Feb 28, 2024
π 3 min read
Traits: Understanding Rust Traitsβ - The Foundation (PartΒ 1)Welcome, fellow Rustaceans and curious minds! Today, we embark on the first installment of our series designed to explore Rustβs powerful trait system. Traits β¦
rustrust tutorial
Feb 28, 2024
π 4 min read
Traits: Advanced Trait Concepts and Dynamic Dispatch in Rust (PartΒ 2)Trait Objects and DynamicΒ Dispatch In Rust, polymorphism achieved through traits can take two forms: static and dynamic dispatch. Static dispatch is like β¦
rustrust tutorial
Feb 28, 2024
π 9 min read
From Novice to Master: 10 Must-Try Low-Level Programming Projects in RustHey there! If youβve been following along, you know weβve been deep-diving into Rust, exploring its nooks and crannies. This time around, Iβm switching gears β¦
rustrust tutorial
Feb 24, 2024
π 4 min read
Lesson 11: Interfaces β Contracts without the paperworkWhen I first learned about interfaces in Go, I expected something complicated β annotations, implements keywords, class hierarchies. Instead, Go just asked: β¦
Go tutorialgolangbeginner
Feb 23, 2024
π 9 min read
Mastering Rust Lifetimes: The Comprehensive GuideMastering Rust Lifetimes: The Comprehensive Guide
Understanding lifetimes in Rust is crucial for any Rustacean aiming to write safe and efficient code. β¦
rustrust tutorial
Feb 20, 2024
π 7 min read
Rust Ultimate: The Ultimate Rust Cheatsheet You'll Ever NeedWhether you’re a seasoned developer juggling multiple programming languages or a newcomer to Rust, it’s not uncommon to hit a roadblock trying to β¦
rustrust tutorial
Feb 17, 2024
π 6 min read
Lesson 10: Pointers β Addresses, not magicPointers have a reputation for being scary. In C, they’re the source of buffer overflows, dangling references, and cryptic crashes. In Go, pointers are β¦
Go tutorialgolangbeginner
Feb 16, 2024
π 5 min read
Rust in Finance: Building a Scalable High-Frequency Trading Platform from ScratchAs I ventured deeper into the Rust ecosystem, I set my sights on a project that would not only challenge my technical acumen but also push the boundaries of β¦
rustsoftware architecture
Feb 11, 2024
π 5 min read
Lesson 9: Methods β Functions that belong to a typeIn the last lesson we defined a User struct. We could pass it to functions β birthday(u), sendEmail(u), formatName(u). That works, but there’s a better β¦
Go tutorialgolangbeginner
Feb 7, 2024
π 5 min read
Lesson 8: Structs β Your first custom typeSo far we’ve been working with Go’s built-in types: strings, ints, booleans, slices, maps. Those are great, but real programs deal with real-world β¦
Go tutorialgolangbeginner
Feb 2, 2024
π 5 min read
Lesson 7: Strings, Runes, and Bytes β Strings aren't what you thinkStrings look simple. You write "hello", you print it, done. But when I first started working with non-ASCII text in Go β names with accents, emoji, β¦
Go tutorialgolangbeginner
Jan 27, 2024
π 5 min read
Lesson 6: Maps β Key-value pairs that power everythingEvery language has some version of the dictionary or hash map. Python calls it a dict, JavaScript calls it an Object or Map, Ruby calls it a Hash. In Go, β¦
Go tutorialgolangbeginner
Jan 22, 2024
π 7 min read
Lesson 5: Arrays and Slices β Slices are what you actually useGo has two sequence types: arrays and slices. I’ll tell you upfront β arrays are rarely used directly. They exist, they matter for understanding how β¦
Go tutorialgolangbeginner
Jan 17, 2024
π 6 min read
Lesson 4: Functions β Small functions are Go's building blocksIf there’s one thing experienced Go programmers agree on, it’s this: write small functions. Not tiny, cryptic one-liners, but focused functions that β¦
Go tutorialgolangbeginner
Jan 12, 2024
π 6 min read
Lesson 3: Control Flow β if, for, and switch are all you needEvery program you’ll ever write needs to make decisions and repeat actions. “If this condition is true, do that. Otherwise, do something β¦
Go tutorialgolangbeginner
Jan 8, 2024
π 6 min read
Lesson 2: Variables and Types β Go is typed, and that's a good thingIf you’re coming from Python or JavaScript, Go’s type system might feel like extra work at first. Why should you have to tell the compiler that a β¦
Go tutorialgolangbeginner
Jan 3, 2024
π 5 min read
Lesson 1: Your First Go Program β Hello World is just the beginningI remember the first time I ran a Go program. The compiler yelled at me for an unused import, and I thought, “Okay, this language has opinions.” β¦
Go tutorialgolangbeginner