Intermediate everything in Backend Dev, page 21
The Newtype Pattern: Type Safety for Primitives
Wrap a primitive type in a new struct to give it a unique, compile-time identity. A Miles(f64) is different from a Kilometers(f64). Use it to prevent mixing up IDs or units. The footgun: you must explicitly implement or delegate methods for the new type.
Rust's Serde: Taming JSON with Types
Serde JSON translates between human-readable JSON text and native Rust structs, acting as a bilingual interpreter for your data. Use it for web APIs or config files.
Rust's TcpStream: Your Handle to a Network Connection
A TcpStream is Rust's handle to a network connection, closing automatically when it goes out of scope. Use it to talk to servers. The footgun: connect() can block forever; always prefer connect_timeout() in production to avoid hanging.
Rust Enums and Pattern Matching: Type-Safe Alternatives
Rust enums define a type that can be one of several variants, each holding its own data. They're used to model states like Loading/Success/Error or handle optional values with Option<T>.
Rust's Fearless Concurrency: Catch Bugs Before They Ship
Rust's "fearless concurrency" uses the ownership and type system to turn data races into compile-time errors. This allows you to safely use threads, message passing, or shared state without runtime surprises. The footgun is assuming this prevents all bugs.
Rust Lifetimes: Preventing Dangling References
Lifetimes are Rust's compile-time guarantee that a reference never outlives the data it points to. The borrow checker uses them to prevent dangling pointers, a common source of bugs.
Terminal User Interfaces (TUIs): GUIs for the Console
A TUI is a graphical interface built from text, offering rich interactivity without leaving the console. Use them for system monitoring (btop), file management, or database clients. The footgun: don't confuse them with CLIs; TUIs are stateful apps.
Rust's Deref Trait: Smart Pointers Acting Like Data
The Deref trait lets a "smart pointer" type act like the data it contains, making wrappers transparent. It enables calling an inner type's methods directly on a wrapper, like using &str methods on a String. Its deref() method must never fail.
Go's Functional Options Pattern for Flexible APIs
The functional options pattern uses functions to set optional struct fields, making APIs flexible and readable. It's common for complex constructors like servers or DB clients.

Go's Worker Pool Pattern: Capping Concurrency
A worker pool caps concurrency by using a fixed number of goroutines to process jobs from a queue. Use it for rate-limiting API calls or processing files without spawning unlimited goroutines.
Rust: Expose Functions to C with `#[no_mangle]`
The #[no_mangle] attribute tells the Rust compiler not to alter a function's name, exposing a stable symbol for C code to call. Use it with extern "C" to create Rust libraries for other languages. The footgun is forgetting extern "C", causing crashes.
Rust: Bridging C Strings with CStr and CString
CString and CStr are Rust's safe wrappers for C's nul-terminated strings. CString builds a C-compatible string to pass *out* of Rust; CStr interprets one coming *in*. Use them for any FFI calls.
Cgo: The Bridge Between Go and C Code
Cgo is Go's bridge to the C world, letting you call C functions and use C types from your Go code. It's for leveraging existing C libraries or low-level OS APIs. The footgun: cgo calls have high overhead and break Go's simple cross-compilation.
Go's `unsafe` Package: Breaking the Rules for Performance
Go's unsafe package lets you bypass type safety, treating memory like C with raw pointers for performance gains. It's used for low-level optimizations and C interoperability. The footgun: its behavior isn't guaranteed across Go versions, making code fragile.
Rust Raw Pointers: When References Aren't Enough
Raw pointers (*const T, *mut T) are Rust's C-style pointers, bypassing the borrow checker. They're used for FFI or building low-level abstractions. The footgun is assuming they're safe; they can be null or dangling, requiring unsafe to dereference.
Rust's `unsafe` Keyword: Five Superpowers, Zero Guarantees
Rust's unsafe keyword lets you bypass certain compile-time memory safety guarantees for low-level tasks like OS interaction or FFI. The footgun is thinking it disables all safety; it only enables five specific 'superpowers,' making you responsible for…
Rust Declarative Macros (`macro_rules!`)
Think of macro_rules! as 'find and replace' for your code's structure. It matches patterns at compile time and expands them into boilerplate you don't want to write. It's used for helpers like vec![].
Go Reflection: Inspecting Types at Runtime
Go's reflect package lets your program inspect and manipulate variables of unknown types at runtime. This is the engine behind JSON marshaling and generic frameworks. Misuse leads to slow code and runtime panics; always prefer interfaces when possible.
Rust Mocking: Using Traits as Test Seams
Mocking in Rust uses traits as test doubles. You program a mock's behavior—what calls to expect and what to return—to isolate the code under test. The mockall crate's #[automock] macro generates mocks from traits. The footgun is over-specifying behavior.
Criterion: Statistical Benchmarking for Rust
Criterion isn't just a stopwatch; it's a statistical lab for your code. It provides stable performance metrics by running functions many times, letting you detect regressions and prove optimizations. The footgun is ignoring its statistical reports.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles