Personal reference
Programming and software engineering terms, for whenever you're bored and want to keep the vocabulary sharp.
75 terms · Practice problems → · AI Learning →
Programming Fundamentals
Pure Function
A function that always returns the same output for the same input, and doesn't touch anything outside itself (no network calls, no mutating outer variables, no reading the current time/random values).
add(2, 3) is pure. A version that also does console.log(...) is technically impure — it has a side effect.
Side Effect
Any change a function makes beyond returning a value — mutating a variable outside its scope, writing to a file, making a network request, logging to console.
Immutability
Data that can't be changed after it's created — instead of modifying it in place, you produce a new copy with the change applied. Makes state easier to reason about since nothing can change a value out from under you.
const next = [...arr, newItem] instead of arr.push(newItem).
Closure
A function that remembers variables from the scope it was created in, even after that outer scope has finished running.
function counter() { let n = 0; return () => ++n; } — the returned function keeps access to n forever.
Higher-Order Function
A function that takes another function as an argument, returns one, or both. .map(), .filter(), and .reduce() are all higher-order functions.
Currying
Transforming a function that takes multiple arguments into a chain of functions that each take one argument, so you can partially apply it.
add(a, b) becomes add(a)(b) — add(2) returns a function waiting for the second number.
Hoisting
JavaScript's behavior of moving variable and function declarations to the top of their scope before code runs. var declarations are hoisted and initialized as undefined; let/const are hoisted but stay in a 'temporal dead zone' until their line executes.
Truthy / Falsy
How a value behaves when coerced to a boolean (in an if, &&, ||, etc.), regardless of its actual type. In JS, falsy values are false, 0, -0, "", null, undefined, and NaN — everything else, including [] and {}, is truthy.
Duck Typing
"If it walks like a duck and quacks like a duck, it's a duck." Caring about whether an object has the methods/properties you need, not what class or type it's declared as.
Idempotent
An operation that produces the same result no matter how many times you run it. Setting a value (x = 5) is idempotent; incrementing it (x++) is not.
PUT /users/5 with the same body twice leaves the user in the same state either way — a well-designed REST PUT is idempotent. POST usually isn't (it creates a new resource each time).
Async & Concurrency
Event Loop
The mechanism that lets JavaScript, despite being single-threaded, handle async work: it runs code on the call stack until it's empty, then pulls the next task off a queue (timers, I/O callbacks, promise reactions) and runs that.
Call Stack
The structure tracking which function is currently running and what called it. Each function call pushes a frame; returning pops it. A 'stack overflow' is this filling up, usually from unbounded recursion.
Microtask vs Macrotask
Two queues the event loop drains from. Microtasks (promise .then callbacks, queueMicrotask) always run before the next macrotask (setTimeout, setInterval, I/O) — which is why a resolved promise's callback fires before setTimeout(fn, 0).
Callback
A function passed into another function to be called later, usually once some async work finishes. 'Callback hell' is the nested-pyramid mess that results from chaining many of these, which promises and async/await were designed to fix.
Promise
An object representing a value that will exist eventually — pending, then either fulfilled or rejected. async/await is syntax sugar for working with promises without chaining .then().
Race Condition
A bug where the outcome depends on the unpredictable timing/order of concurrent operations. Two requests reading a counter, both incrementing it, and both writing back the same stale value is a classic example — one increment gets lost.
Deadlock
When two or more processes/threads are each waiting on a resource the other one holds, and neither can proceed. Nothing crashes, everything just freezes forever.
Mutex / Semaphore
A mutex (mutual exclusion lock) allows only one thread to access a resource at a time. A semaphore is the generalized version — it allows up to N concurrent accesses instead of just one.
Thread vs Process
A process is an independent running program with its own memory space. A thread is a unit of execution within a process — multiple threads in the same process share memory, which makes them cheaper but riskier (shared state = race conditions).
Concurrency vs Parallelism
Concurrency is dealing with multiple things at once (structuring code to make progress on several tasks by interleaving them — what JS's single thread does). Parallelism is actually doing multiple things at the same literal instant, which requires multiple cores/threads.
Debounce vs Throttle
Debounce delays running a function until a burst of calls stops for a set period (good for search-as-you-type). Throttle guarantees a function runs at most once per set interval no matter how often it's called (good for scroll/resize handlers).
Architecture & Design
Design Pattern
A named, reusable solution to a recurring design problem — a shared vocabulary for structure, not a specific piece of code. Singleton, Factory, and Observer below are three of the most common.
Singleton Pattern
Ensures a class has only one instance, shared globally, with a single access point to get it. Common for things like a database connection pool or a config object.
Factory Pattern
Delegates object creation to a dedicated function/class instead of calling new directly everywhere, so the calling code doesn't need to know the exact class being instantiated.
Observer Pattern
One object (the subject) maintains a list of dependents (observers) and notifies them automatically when its state changes. DOM events and React's re-render-on-state-change both work this way.
Dependency Injection
Instead of a class creating the objects it depends on internally, those dependencies are handed to it from the outside (usually via the constructor). Makes swapping in a mock/fake for testing trivial.
Inversion of Control
The broader principle behind dependency injection: instead of your code calling a library, the framework calls your code (e.g. a test runner calling your test functions, or React calling your component function).
MVC
Model-View-Controller — a pattern that separates data/business logic (Model), what the user sees (View), and the glue that responds to input and updates the model (Controller).
Middleware
Code that sits between a request and the final handler, able to inspect, modify, short-circuit, or log it before passing it along. Auth checks, logging, and CORS handling are all typically implemented as middleware.
Monolith vs Microservices
A monolith is one deployable app containing all functionality. Microservices split that functionality into independently deployable services communicating over the network — more operational complexity, but independent scaling/deployment per service.
SOLID Principles
Five OOP design guidelines: Single Responsibility (a class should have one reason to change), Open/Closed (open for extension, closed for modification), Liskov Substitution (subtypes must be usable wherever their base type is expected), Interface Segregation (many small interfaces beat one big one), Dependency Inversion (depend on abstractions, not concrete implementations).
DRY, KISS & YAGNI
Don't Repeat Yourself (every piece of knowledge should live in one place), Keep It Simple, Stupid (favor the simplest solution that works), You Aren't Gonna Need It (don't build for hypothetical future requirements). Three of the most repeated — and most argued-about — mantras in software.
Coupling & Cohesion
Coupling is how much one module depends on the internals of another (lower is better — easier to change one without breaking the other). Cohesion is how focused a single module's responsibilities are (higher is better — a module should do one related set of things).
Web & APIs
REST
An architectural style for APIs built around resources (nouns, like /users/5) manipulated with standard HTTP verbs (GET, POST, PUT, DELETE), typically stateless — each request carries everything the server needs to handle it.
GraphQL
A query language for APIs where the client specifies exactly which fields it wants back, in a single request — avoids the classic REST problem of either under-fetching (need a second request) or over-fetching (getting fields you don't need).
gRPC
A high-performance RPC framework using HTTP/2 and Protocol Buffers (a compact binary format) instead of JSON over HTTP/1.1. Common for fast internal service-to-service communication where both ends control the schema.
WebSocket
A persistent, full-duplex connection between client and server — both sides can push messages at any time, unlike HTTP's request-then-response model. Used for chat, live updates, multiplayer features.
Webhook
A way for one system to notify another in real time by making an HTTP request to a URL you provide, the moment an event happens — the reverse of polling, where you'd repeatedly ask 'anything new yet?'
CORS
Cross-Origin Resource Sharing — the browser security mechanism that blocks a webpage from making requests to a different domain unless that domain's server explicitly allows it via response headers.
JWT
JSON Web Token — a signed (not necessarily encrypted) token encoding claims like user ID and expiry, so a server can verify who's making a request without a database lookup. Anyone can decode and read a JWT's contents; the signature just proves it wasn't tampered with.
OAuth
A protocol that lets a user grant one app limited access to their data on another app, without sharing their password. 'Sign in with Google' is OAuth in action.
Rate Limiting
Capping how many requests a client can make in a given time window, to protect a service from being overwhelmed (accidentally or maliciously). See the Sliding Window entry in the DSA notes for how it's often implemented.
Circuit Breaker
A pattern that stops calling a failing downstream service after enough consecutive failures, failing fast instead of piling up slow timeouts, then periodically tests if the service has recovered before fully reopening.
Databases
ACID
The guarantees a transactional database makes: Atomicity (a transaction fully happens or not at all), Consistency (it can't leave data in an invalid state), Isolation (concurrent transactions don't see each other's half-finished work), Durability (once committed, it survives a crash).
CAP Theorem
A distributed system can only fully guarantee two of three: Consistency (every read sees the latest write), Availability (every request gets a response), Partition tolerance (it keeps working despite network splits between nodes). Since networks do partition, in practice it's really a choice between consistency and availability during a partition.
Database Index
A separate data structure (usually a B-tree) that lets the database find rows matching a condition without scanning the whole table — the tradeoff is extra storage and slightly slower writes, since the index has to be kept in sync.
Normalization
Structuring a relational database to reduce data duplication — splitting data into related tables instead of repeating it. Denormalization deliberately reintroduces some duplication to trade storage/consistency for faster reads.
Sharding
Splitting a database horizontally across multiple machines, where each shard holds a subset of the rows (e.g. users A-M on one server, N-Z on another) — done to scale beyond what one machine can hold or handle.
Replication
Keeping copies of the same data on multiple database servers, for redundancy and read scaling. In a leader-follower setup, writes go to the leader and get propagated to followers, which can usually serve reads.
N+1 Query Problem
A performance bug where fetching a list of N items triggers 1 query for the list, then N additional queries (one per item) to fetch related data — instead of one query (or a join) that gets everything at once.
Fetching 50 blog posts, then looping through them and querying each post's author separately — 51 queries instead of 1-2.
Eventual Consistency
A consistency model where, if no new writes happen, all replicas will eventually converge to the same value — but a read right after a write isn't guaranteed to see it yet. Common in distributed/NoSQL systems that prioritize availability.
ORM
Object-Relational Mapper — a library that lets you interact with a database using your language's objects/classes instead of writing raw SQL. Prisma, TypeORM, and Sequelize are common JS examples.
Infrastructure & DevOps
CI/CD
Continuous Integration (automatically building/testing code on every push, catching integration issues early) and Continuous Deployment/Delivery (automatically shipping code that passes those checks to staging or production).
Load Balancer
A layer that distributes incoming traffic across multiple servers, so no single server gets overwhelmed and traffic can keep flowing if one server goes down.
Reverse Proxy
A server that sits in front of your backend servers, forwarding client requests to them and returning the response — used for load balancing, SSL termination, caching, and hiding your backend's real structure. Nginx is a common one.
CDN
Content Delivery Network — a distributed set of servers around the world that cache and serve static assets (images, JS, CSS) from a location physically close to each user, reducing latency.
DNS
Domain Name System — the internet's phonebook, translating human-readable domain names (banguis.com) into IP addresses that computers actually connect to.
Containerization
Packaging an app with everything it needs to run (code, dependencies, runtime) into a single portable unit that behaves the same on any machine. Docker is the dominant tool for this.
Orchestration
Automatically managing the deployment, scaling, networking, and recovery of many containers across a cluster of machines. Kubernetes is the dominant tool for this.
Blue-Green Deployment
Running two identical production environments (blue = current, green = new version); once the new one is verified healthy, traffic is switched over all at once, and you can switch back instantly if something's wrong.
Feature Flag
A toggle that turns a piece of functionality on/off without deploying new code — lets you ship code dark, roll a feature out gradually, or kill a broken feature instantly without a rollback.
Observability
How well you can understand a system's internal state from its external outputs — built on three pillars: logs (discrete events), metrics (aggregated numbers over time), and traces (the path a single request took across services).
Security
XSS
Cross-Site Scripting — an attack where malicious JavaScript gets injected into a page (often via unescaped user input) and runs in other users' browsers, able to steal cookies/tokens or act as them.
CSRF
Cross-Site Request Forgery — tricking a logged-in user's browser into making an unwanted request to a site they're authenticated on, exploiting the fact that cookies get sent automatically. Defended against with CSRF tokens or SameSite cookies.
SQL Injection
An attack where untrusted input is concatenated directly into a SQL query, letting an attacker inject their own SQL. Prevented by using parameterized queries/prepared statements instead of string concatenation.
Hashing vs Encryption
Hashing is one-way — you can't get the original value back from a hash, which is exactly why passwords are hashed, not encrypted. Encryption is two-way — anyone with the right key can decrypt it back to the original.
TLS/SSL
The protocol that encrypts traffic between a client and server (the 'S' in HTTPS). SSL is the older, deprecated name; TLS is its modern successor, though people still say 'SSL certificate' out of habit.
Software Practices
Technical Debt
The implied future cost of choosing a quick/easy solution now over a better one that would take longer — like financial debt, it accrues 'interest' the longer it's left unaddressed (harder to change, more bugs around it).
Code Smell
A surface-level sign that something might be wrong with the design, without being a bug itself — a huge function, deeply nested conditionals, duplicated logic. A hint to look closer, not a guaranteed problem.
Refactoring
Restructuring existing code to improve its internal structure without changing its external behavior — same inputs, same outputs, cleaner path in between.
TDD
Test-Driven Development — writing a failing test for behavior you want first, then writing the minimum code to make it pass, then refactoring. 'Red, green, refactor.'
Mocking & Stubbing
Replacing a real dependency (an API call, a database) with a fake version in a test, so the test is fast, deterministic, and isolated from things outside your control. A stub returns canned data; a mock also asserts it was called correctly.
Semantic Versioning
A version numbering scheme, MAJOR.MINOR.PATCH — bump MAJOR for breaking changes, MINOR for backwards-compatible new features, PATCH for backwards-compatible bug fixes. Lets consumers of a package know at a glance whether an upgrade is safe.
Git Rebase vs Merge
Merge combines two branches' histories with a new merge commit, preserving exactly what happened. Rebase replays your branch's commits on top of another branch, producing a linear history — cleaner to read, but it rewrites commit history, which is risky on shared branches.
Trunk-Based Development
A branching strategy where developers merge small changes into a single main branch frequently (at least daily), often behind feature flags, instead of maintaining long-lived feature branches that drift and cause painful merges.
No terms match your search.