Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

551 bites

Test yourself: Top 30 Backend Dev concepts questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Concepts in Backend Dev, page 7

Promise.any(): Get the Fastest Successful Result
advanced2 min read

Promise.any(): Get the Fastest Successful Result

Promise.any() is a race where only finishers count. It returns the value of the first promise to succeed, ignoring any that fail. Use it to query redundant endpoints and take the first successful response.

advanced2 min read

Rust's Arc<T>: Share Data Ownership Across Threads

Rust's Arc<T> lets multiple threads share ownership of heap data. It's a smart pointer that counts references atomically. Use it for shared caches or config. The footgun: Arc only makes sharing safe, not mutation—you still need a Mutex for that.

advanced2 min read

Write Skew: The Phantom Anomaly of Snapshot Isolation

Write skew is when two transactions read the same data, make decisions, and then update *different* data, violating a business rule. It's common in booking systems or when enforcing multi-row constraints under Snapshot Isolation.

Top-Level Await: `await` Without an `async` Function
advanced2 min read

Top-Level Await: `await` Without an `async` Function

Top-level await lets you use await directly in an ES module, no async function needed. Use it to initialize resources like database connections on startup. The footgun: the entire module's execution blocks until the promise resolves, delaying startup.

advanced2 min read

Serializable Snapshot Isolation: True Serializability Without Heavy Locking

SSI upgrades Snapshot Isolation to true serializability. It optimistically lets transactions run, but aborts one if a dangerous read-write dependency arises. This prevents subtle data corruption in systems like PostgreSQL without heavy locking.

easy2 min read

FastAPI: Handling Form Data, Not Just JSON

FastAPI can handle classic HTML form data, not just JSON. Use Form to define expected fields in your endpoint, just like query parameters. It's ideal for login pages. The footgun: forgetting to pip install python-multipart will break form parsing.

easy2 min read

Creating a Basic HTTP Server in Node.js

A Node.js HTTP server is a listening post that waits for requests on a port and runs your code to reply. It's the foundation for any web service, from simple APIs to full apps. The footgun: forgetting response.end() leaves the client hanging indefinitely.

easy2 min read

Rust Crates: Your Unit of Compilation

A crate is the smallest unit of code the Rust compiler handles—either a runnable program (binary) or a shareable library. A package, defined by Cargo.toml, bundles one or more crates. The footgun: a package can have many binaries but only one library.

easy2 min read

Query Execution Plan: The Database's Road Map

A query execution plan is the database's internal strategy for fetching your data. It's the recipe it creates before running your SQL. This plan determines whether to use an index or scan a whole table, directly impacting performance.

easy1 min read

Declaring Request Headers in FastAPI

Treat request headers like any other parameter in FastAPI. Declare them in your function signature to access values like User-Agent or X-Token. FastAPI automatically converts hyphens to underscores, so User-Agent is accessed via the user_agent

easy2 min read

Node.js File I/O: Synchronous vs. Asynchronous

Synchronous file I/O blocks your app, like waiting at a counter for your order. Asynchronous I/O gets a buzzer, letting your app work on other tasks. Use async for servers and sync for simple, one-off scripts. The footgun is using sync I/O in a server.

easy2 min read

Rust Modules: Your Code's File System

Think of Rust modules as a file system for your code, grouping logic and hiding details. You declare them with mod, and Rust finds the code in corresponding files. The footgun: items are private by default, so you must use pub to expose them.

easy2 min read

B-Tree: The Workhorse of Database Indexes

A B-tree is a self-balancing tree that keeps data sorted for fast lookups, generalizing a binary search tree by allowing nodes to have many children. It enables searches, insertions, and deletions in logarithmic time, making it ideal for large datasets.

easy1 min read

FastAPI: Reading Request Cookies

FastAPI treats request cookies like any other parameter. Declare them directly in your endpoint's function signature using Cookie(), and the framework will extract the value for you. Use this for reading session IDs or user preferences.

easy2 min read

__dirname and __filename: Path Anchors in Node.js

__dirname and __filename act as GPS for your Node.js files, giving you the absolute path to the current file and its directory. This is essential for reliably loading adjacent files, like templates or configs. The main gotcha: they don't exist in ES Modules.

easy2 min read

Go's Entry Point: The `main` Package and Function

A Go program's entry point is package main. The compiler finds this package and its main() function to create a runnable binary. The footgun is naming a library main; this name is reserved for executables and will cause build confusion.

Row Mode vs. Batch Mode Execution in SQL Server
easy2 min read

Row Mode vs. Batch Mode Execution in SQL Server

Row mode processes data one row at a time, like a checklist. Batch mode processes chunks of rows together for vectorized speed. Row mode is classic for OLTP, while batch mode shines in data warehousing for large scans.

FastAPI: Returning HTML with HTMLResponse
easy2 min read

FastAPI: Returning HTML with HTMLResponse

Override FastAPI's default JSON output by using HTMLResponse to return a raw HTML string directly from an endpoint. It's for simple status pages or server-side rendered components.

easy2 min read

Node.js os Module: Reading Your System's Vital Signs

The Node.js os module is your app's dashboard for the host machine's vitals. Use it to check CPU cores, free memory, or platform type to adapt your code. The footgun is assuming consistency; system details can vary wildly between environments.

intermediate2 min read

The Query Optimizer: Your Database's Internal GPS

A query optimizer is your database's internal GPS, turning your SQL "what" into the fastest "how." It chooses the best execution plan—like join order or index usage—for every query. The footgun: stale statistics can trick it into picking a slow route.

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