Easy concepts in Backend Dev, page 7
Go Table-Driven Tests: Test More with Less Code
Instead of copy-pasting tests, define inputs and expected outputs in a table (a slice or map) and loop through them. This is the idiomatic Go way to test functions with many edge cases. The main footgun is a closure bug in parallel tests; re-shadow the.
Node.js Buffers: Handling Raw Binary Data
A Node.js Buffer is a fixed-size chunk of memory for raw binary data, like an array of bytes. Use it for file I/O or network streams where JS strings fail. The footgun is using allocUnsafe() without overwriting it, which can leak old, sensitive data.
Rust Unit Tests: Co-locating Tests with Code
In Rust, unit tests live inside a special tests module within the same file as the code they're testing. This lets you test a module in isolation, including its private functions.
Rust Doctests
Rust doctests are code examples written inside documentation comments that the compiler extracts, compiles and runs as real tests, so your documentation's example code is guaranteed to keep working instead of silently rotting out of date.
Inverted Index: How Search Engines Find Your Keywords
An inverted index is like a book's index: it maps keywords to the documents containing them. This is the core of full-text search in search engines and databases, allowing instant lookups.
Go Test Coverage: Rewriting Source to See What's Untested
Go's coverage tool rewrites your source code, adding counters to see what's executed during tests. It's a powerful way to find untested code, but remember: high coverage doesn't guarantee your tests are actually checking for correctness.

Cache-Aside Pattern: Your App Owns the Cache
The Cache-Aside pattern makes your application the gatekeeper for the cache. On a read, your code checks the cache first; on a miss, it fetches from the database and writes to the cache. This speeds up read-heavy apps. The key footgun is stale data.
Vector Embeddings: Turning Meaning into Math
Vector embeddings turn complex data like words or images into lists of numbers (vectors). This lets computers measure "similarity" by calculating the distance between these vectors, powering search and recommendations.
Data Retention Policy: Your Schedule for Deleting Data
A data retention policy is your company's official schedule for deleting data, not a plan to keep it forever. It's essential for legal compliance (like GDPR) and managing storage costs.
FastAPI Lifespan: Code Before Startup, After Shutdown
FastAPI's lifespan events are "open for business" and "closing time" routines that run once before startup and after shutdown. Use them to initialize a DB pool or load a model. The footgun is putting request-specific logic here; it runs once only.
The WebSocket Protocol
WebSocket (RFC 6455) is a protocol providing full-duplex, persistent communication over a single TCP connection. It begins as an HTTP request that upgrades, then both client and server can send messages anytime, enabling real-time apps without HTTP's…
Your First Python Dockerfile Blueprint
A Dockerfile is a recipe for building a self-contained environment for your Python app. Use it to ensure your app runs identically everywhere, from your laptop to production. The common footgun is forgetting a .dockerignore file, which bloats your image.

Polling vs. WebSockets: Stop Asking, Start Listening
Polling is like repeatedly asking "Are we there yet?", while WebSockets is a persistent, two-way conversation. Use polling for infrequent updates, but use WebSockets for real-time apps like chat. The footgun is using polling for high-frequency updates.

Socket.IO: More Than Just WebSockets
Socket.IO is a library that guarantees real-time, bidirectional communication. It automatically picks the best transport—WebSocket or HTTP long-polling—to ensure your connection works. Use it for chat apps or live dashboards.
Rust `cfg`: Compile Code for Specific Targets
Rust's cfg attribute acts like a compile-time switch, including or excluding code based on the target platform or features. It's used for cross-platform support (e.g., Windows vs. Unix) or enabling optional dependencies.
Socket.IO: Emitting and Handling Events
Socket.IO events are named messages sent between a client and server. One side emits a message, the other listens with on. This powers real-time apps like chat. The footgun: don't JSON.stringify objects; Socket.IO does it for you.
Go Linker Flags: Injecting Data at Build Time
Go's -ldflags lets you inject data into your program at build time. This is perfect for embedding version numbers or git commit hashes into variables without hardcoding them. The main footgun is that the target variable must be a top-level string.

NODE_ENV: Flipping the 'Production' Switch
Setting NODE_ENV=production is like telling your Node.js app it's showtime, not rehearsal. This triggers performance optimizations in frameworks like Express, such as view caching and less verbose errors.

PM2: The Process Manager for Production Node.js
PM2 is a process manager that keeps your Node.js apps online. Use it to automatically restart crashed apps, run them in the background, and scale across CPU cores. The footgun is forgetting to run pm2 save to make your process list survive server reboots.
Rust's `extern` Block: Talking to Other Languages
An extern block is Rust's contract for calling code from other languages, like C. You declare external functions and statics, promising they exist. Use it for FFI to call system libraries, but know all calls are unsafe as Rust can't verify them.
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