Concepts in Backend Dev, page 8
Rust Item Visibility: Private by Default
In Rust, all items are private by default. Think of modules as locked rooms; you need the pub keyword to unlock the door. This is crucial for creating a public API or letting modules interact.
FastAPI: Use UploadFile for Efficient File Uploads
FastAPI handles file uploads as 'form data', giving you a streamable UploadFile object instead of a raw byte blob. Use this for endpoints like image or document submissions. The footgun is reading large files into memory instead of streaming them.
path.join() vs. path.resolve(): Concatenation vs. Calculation
path.join() glues path segments together, while path.resolve() calculates an absolute path. Think string building vs. cd commands. Use join for relative paths and resolve for absolute ones.
Composite Indexes: One Index for Multiple Columns
A composite index is like a phone book sorted by last name, then first name. It's for queries filtering on multiple columns, like finding a specific person. The footgun is creating separate indexes, which is far less efficient than a single composite one.
Rust Methods: Attaching Behavior to Data
Rust methods are functions attached to your data structures, defined in an impl block. Instead of do_thing(my_struct), you call my_struct.do_thing(). The key footgun: instance.name() calls a method, but instance.name accesses a field.
go.mod: Root of Go Module Identity
A go.mod file anchors a Go module, declaring its canonical path and dependencies to turn a directory into a versioned unit. Every project needs one at its root, and the path dictates how others import your packages.
FastAPI: Set Cookies Without Returning a Response Object
Inject a Response object into your endpoint to set cookies without manually building the whole response. Use this for session tokens while still returning data like a dict.
WHATWG URL API: Safely Parse URLs, Not Strings
Treat URLs as structured objects, not messy strings. The WHATWG URL API parses a URL into components like protocol and path, just like JSON.parse. Use it for incoming requests or outgoing API calls. The footgun is using the legacy url.parse().

Database Statistics: The Query Optimizer's Internal Map
Database statistics are the raw data the query optimizer uses to guess the cheapest way to run your query. It uses stats like row counts and value distribution to decide between a full table scan and an index seek.
Cargo.toml: Rust's Project Recipe
Cargo.toml is your Rust project's recipe, telling the compiler what to build and what dependencies it needs. It defines metadata, production dependencies, and dev-only dependencies for testing.
Cardinality Estimation: How Databases Guess Query Costs
A database's query optimizer guesses how many rows each part of a query will return to pick the fastest execution plan. This guess, cardinality estimation, is key for choosing join strategies.
FastAPI `yield` Dependencies for Setup and Teardown
A yield dependency is a context manager for your endpoints. Code before yield runs setup, like getting a DB connection; code after yield runs teardown.
Rust's Module-to-Filesystem Mapping
Rust's module system maps directly to your file system. A mod foo; statement tells the compiler to look for foo.rs or foo/mod.rs. This is how you organize any multi-file Rust project.

Predicate Pushdown: Filter Data at the Source
Predicate pushdown tells the database to filter data at the source, not after fetching it. This speeds up queries in data warehouses and lakehouses by reducing network traffic. The main footgun: not all data sources can execute all types of filters.
Hashing Data with Node.js's `crypto` Module
Hashing creates a unique, fixed-size fingerprint of data. It's a one-way process used to verify data integrity or store passwords securely without saving the plain text. The footgun is using weak algorithms like MD5 or SHA1 for security-sensitive tasks.
Storage Engine: The Database's Filing System
A database's storage engine is its specialized filing system, handling how data is physically written to and read from disk. Different engines optimize for different tasks, from fast writes to complex queries.
FastAPI: Setting Custom Response Headers
Set custom HTTP headers in FastAPI by adding a Response parameter to your endpoint. This lets you add metadata like trace IDs without changing your return data. The footgun is thinking you must return the Response object; just return your data as usual.
Node's zlib Module: Trading CPU for Bandwidth
Node's zlib module trades CPU cycles for network bandwidth by shrinking data with algorithms like Gzip and Brotli. Use it to compress large API responses or files before sending them. The main footgun: never use synchronous ...Sync methods in a server.
Go's `internal` Directory: Private by Convention
Go's internal directory creates private packages within your module, making them inaccessible to external projects. Use it for helper logic you don't want to support as a public API.
Row vs. Columnar Storage: Organizing Data for Speed
Row stores group data by record, like a phone book entry. Column stores group by attribute, like separate lists for all names. Use row stores for transactions (OLTP), but for analytics (OLAP), they force you to read unneeded data from disk.
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