General Articles
Kubernetes vs Docker — What's the Difference?
Docker builds and runs individual containers; Kubernetes orchestrates many containers across multiple machines, handling scheduling, scaling, networking, and...
What Is a Kubernetes Pod?
A Pod is the smallest deployable unit in Kubernetes, representing one or more tightly coupled containers that are scheduled and run together on the same node...
What Is Serverless Computing?
Serverless computing lets developers run code without provisioning or managing servers directly — the cloud provider automatically handles scaling, and you'r...
What Is Infrastructure as Code (IaC)?
Infrastructure as Code manages and provisions infrastructure (servers, networks, databases) through machine-readable configuration files, rather than manual...
What Is Canary Deployment?
Canary deployment gradually rolls out a new version to a small subset of users or servers first, monitoring for problems before rolling it out to everyone.
What Is Blue-Green Deployment?
Blue-green deployment runs two identical production environments — one live ("blue") and one idle ("green") — and switches all traffic to the new version at...
What Is Auto-Scaling?
Auto-scaling automatically adjusts the number of running server instances based on current demand, adding capacity under load and removing it when demand dro...
Common Load Balancing Algorithms Explained
Load balancers use different algorithms to decide which backend server should handle each incoming request, balancing factors like simplicity, fairness, and...
What Is a DNS Lookup?
A DNS lookup is the process of translating a human-readable domain name (like example.com) into the numeric IP address a computer actually needs to connect t...
What Does the traceroute Command Do?
traceroute (or tracert on Windows) maps the network path a packet takes to reach a destination, showing each intermediate router (hop) along the way and the...
What Does the ping Command Do?
ping sends small packets (ICMP echo requests) to a target host and measures how long it takes to receive a response, providing a basic check of connectivity...
Latency vs Bandwidth — What's the Difference?
Latency is the time it takes for a single piece of data to travel from source to destination; bandwidth is the maximum amount of data that can be transferred...
Proxy vs VPN — What's the Difference?
A proxy routes specific application traffic (often just a browser) through an intermediary server; a VPN encrypts and routes all of a device's network traffi...
What Is a Firewall?
A firewall monitors and controls incoming and outgoing network traffic based on a defined set of security rules, acting as a barrier between trusted and untr...
What Is a Port in Networking?
A network port is a numbered endpoint (0-65535) that lets multiple services run and communicate on the same device via the same IP address.
What Is a Subnet in Networking?
A subnet is a logically divided segment of a larger network, identified by a range of IP addresses, used to organize and isolate groups of devices.
What Is Password Salting?
Salting adds a unique, random value to each password before hashing it, ensuring that identical passwords produce different stored hashes.
What Is a Brute Force Attack?
A brute force attack systematically tries many possible passwords or keys until the correct one is found, rather than exploiting a specific flaw in the syste...
What Is a Man-in-the-Middle (MITM) Attack?
A man-in-the-middle attack occurs when an attacker secretly intercepts (and potentially alters) communication between two parties who believe they're communi...
What Is a Content Security Policy (CSP)?
A Content Security Policy is an HTTP header that lets a site declare which sources of content (scripts, styles, images, fonts) the browser is allowed to load...
What Is the Same-Origin Policy?
The same-origin policy is a browser security mechanism that restricts how a script from one origin can interact with resources from a different origin, preve...
What Is Clickjacking?
Clickjacking tricks a user into clicking something different from what they perceive, typically by overlaying an invisible malicious page on top of a legitim...
What Is SQL Injection?
SQL injection is a vulnerability where untrusted input is inserted directly into a SQL query, letting an attacker alter the query's meaning to read, modify,...
What Is CSRF (Cross-Site Request Forgery)?
CSRF tricks a logged-in user's browser into unknowingly submitting a request to a site they're authenticated with, performing an action the user didn't inten...
What Is XSS (Cross-Site Scripting)?
Cross-site scripting is a vulnerability where an attacker injects malicious script into a web page viewed by other users, letting that script run in their br...
What Is Regression Testing?
Regression testing re-runs existing tests after a code change to confirm that previously working functionality hasn't broken as a side effect.
What Is a Test Fixture?
A test fixture is the fixed, known state or set of data set up before a test runs, ensuring the test starts from consistent, predictable conditions.
What Is an Assertion in Testing?
An assertion is a statement in a test that checks whether an actual result matches an expected one, causing the test to fail if it doesn't.
What Is End-to-End (E2E) Testing?
End-to-end testing verifies an entire application flow works correctly from the user's perspective, typically by driving a real browser through real user int...
What Is Snapshot Testing?
Snapshot testing captures a component's rendered output (or any serializable value) and compares future test runs against that saved snapshot, flagging any u...
What Is Code Coverage in Testing?
Code coverage measures the percentage of a codebase's lines, branches, or functions that are executed while running a test suite.
Mock vs Stub vs Spy in Testing
These are all types of test doubles that stand in for real dependencies, but differ in purpose: a stub returns canned responses, a mock verifies specific int...
Heap Sort Algorithm Explained
Heap sort builds a max-heap from the data, then repeatedly removes the largest element from the top and rebuilds the heap, producing a sorted list.
Selection Sort Algorithm Explained
Selection sort repeatedly finds the smallest remaining element and moves it to the front of the unsorted portion of the list.
Insertion Sort Algorithm Explained
Insertion sort builds a sorted portion of the list one element at a time, repeatedly taking the next unsorted element and inserting it into its correct posit...
Merge Sort Algorithm Explained
Merge sort recursively splits a list in half until each piece has one element, then merges the pieces back together in sorted order.
Quicksort Algorithm Explained
Quicksort picks a "pivot" element, partitions the list into elements smaller and larger than the pivot, then recursively sorts each partition.
Bubble Sort Algorithm Explained
Bubble sort repeatedly steps through a list, comparing adjacent elements and swapping them if they're in the wrong order, until no swaps are needed.
What Is a B-Tree?
A B-tree is a self-balancing tree structure that allows nodes to have more than two children, keeping data sorted and enabling efficient search, insertion, a...
What Is a Graph (Data Structure)?
A graph is a collection of nodes (vertices) connected by edges, representing relationships that don't necessarily form a simple linear or hierarchical struct...
What Is a Trie (Prefix Tree)?
A trie is a tree structure specialized for storing strings, where each path from the root represents a prefix, and nodes are shared between strings with comm...
What Is a Heap (Data Structure)?
A heap is a tree-based structure that satisfies the heap property — in a min-heap, every parent is smaller than or equal to its children (the reverse for a m...
What Is a Binary Search Tree?
A binary search tree is a tree data structure where each node has at most two children, and every node's left subtree contains only smaller values while its...
What Is a Hash Table?
A hash table stores key-value pairs and uses a hash function to compute an index into an array of buckets, enabling average O(1) lookup, insertion, and delet...
Flyweight Design Pattern Explained
Flyweight minimizes memory usage by sharing as much data as possible between many similar objects, rather than storing duplicate data in each one.
Mediator Design Pattern Explained
Mediator centralizes communication between a set of objects through a single mediator object, so they don't need direct references to each other.
Memento Design Pattern Explained
Memento captures and externalizes an object's internal state so it can be restored later, without violating the object's encapsulation.
Prototype Design Pattern Explained
Prototype creates new objects by copying an existing object (a prototype) rather than constructing one from scratch.
Visitor Design Pattern Explained
Visitor lets you add new operations to a group of related classes without modifying those classes themselves, by moving the operation into a separate visitor...
Template Method Design Pattern Explained
Template Method defines the overall skeleton of an algorithm in a base class, deferring specific steps to subclasses without letting them change the algorith...
Chain of Responsibility Design Pattern Explained
Chain of Responsibility passes a request along a chain of handlers, where each handler decides either to process the request or pass it to the next handler.
Bridge Design Pattern Explained
Bridge decouples an abstraction from its implementation so the two can vary and evolve independently.
Composite Design Pattern Explained
Composite lets you compose objects into tree structures and treat individual objects and compositions of objects uniformly through a shared interface.
Proxy Design Pattern Explained
Proxy provides a substitute or placeholder object that controls access to another object, adding behavior like lazy loading, caching, or access control.
State Design Pattern Explained
State lets an object alter its behavior when its internal state changes, appearing to change its class.
Iterator Design Pattern Explained
Iterator provides a way to sequentially access elements of a collection without exposing its internal structure.
Command Design Pattern Explained
Command turns a request into a standalone object containing all the information needed to perform an action, letting you parameterize, queue, or undo operati...
Builder Design Pattern Explained
Builder separates the construction of a complex object from its representation, letting the same construction process create different configurations.
Facade Design Pattern Explained
Facade provides a simplified, unified interface to a larger, more complex body of code, like a set of subsystems.
Adapter Design Pattern Explained
Adapter converts the interface of one class into another interface that calling code expects, letting otherwise incompatible interfaces work together.
Decorator Design Pattern Explained
Decorator lets you attach new behavior to an object dynamically by wrapping it in another object with the same interface, without modifying the original clas...
Strategy Design Pattern Explained
Strategy defines a family of interchangeable algorithms, encapsulating each one and letting the algorithm vary independently from the code that uses it.
Docker restart policies Explained
What Docker restart policies does, with an example.
Docker environment variables (-e / --env-file) Explained
What Docker environment variables (-e / --env-file) does, with an example.
Docker port mapping (-p) Explained
What Docker port mapping (-p) does, with an example.
a docker-compose.yml file Explained
What a docker-compose.yml file does, with an example.
multi-stage Docker builds Explained
What multi-stage Docker builds does, with an example.
docker attach vs docker exec Explained
What docker attach vs docker exec does, with an example.
ENTRYPOINT vs CMD Explained
What ENTRYPOINT vs CMD does, with an example.
docker system prune Explained
What docker system prune does, with an example.
docker commit Explained
What docker commit does, with an example.
docker tag Explained
What docker tag does, with an example.
a .dockerignore file Explained
What a .dockerignore file does, with an example.
docker cp Explained
What docker cp does, with an example.
docker inspect Explained
What docker inspect does, with an example.
a Dockerfile Explained
What a Dockerfile does, with an example.
docker volume Explained
What docker volume does, with an example.
docker network Explained
What docker network does, with an example.
docker-compose down Explained
What docker-compose down does, with an example.
docker-compose up Explained
What docker-compose up does, with an example.
docker push Explained
What docker push does, with an example.
docker pull Explained
What docker pull does, with an example.
docker images Explained
What docker images does, with an example.
docker rmi Explained
What docker rmi does, with an example.
docker rm Explained
What docker rm does, with an example.
docker start Explained
What docker start does, with an example.
docker stop Explained
What docker stop does, with an example.
docker logs Explained
What docker logs does, with an example.
docker exec Explained
What docker exec does, with an example.
docker ps Explained
What docker ps does, with an example.
docker build Explained
What docker build does, with an example.
docker run Explained
What docker run does, with an example.
Regex for Matching Repeated Characters
Uses a backreference to match any character that immediately repeats itself.
Regex for Removing a Trailing Slash From a URL
Matches a single trailing slash at the very end of a string.
Regex for Matching an IPv4 Address With CIDR Notation
Matches an IPv4 address followed by a slash and a prefix length, like 192.168.1.0/24.
Regex for Splitting a Comma-Separated String
Matches a comma optionally followed by whitespace, used to split CSV-like text into fields.
Regex for Extracting Only Digits From a String
Matches every non-digit character, typically used with a replace to strip everything but digits.
Regex for Validating a Domain Name
Matches a domain made of one or more labels separated by dots, ending in a TLD.
Regex for Matching a Markdown Link
Captures the link text and URL from Markdown link syntax.
Regex for Matching an @ Mention
Matches an @ symbol followed by a username made of word characters.
Regex for Matching a Hashtag
Matches a # symbol followed by one or more word characters.
Regex for Matching a Currency Amount
Matches a dollar amount with optional thousands separators and cents.
Regex for Validating a URL Slug
Matches a lowercase, hyphen-separated URL-safe string.
Regex for Extracting a File Extension
Matches the file extension at the end of a filename.
Regex Word Boundary (\b) Explained
The \b anchor matches the position between a word character and a non-word character, without consuming any characters itself.
Regex for Matching Multiple Consecutive Spaces
Matches two or more consecutive space characters, useful for collapsing them into one.
Regex for Trimming Leading and Trailing Whitespace
Matches whitespace at the very start or end of a string.
Regex for Stripping HTML Tags From a String
Matches any HTML tag so it can be removed or replaced.
Regex for Matching a MAC Address
Matches a MAC address as six colon-separated pairs of hex digits.
Regex for Matching a UUID
Matches the standard 8-4-4-4-12 hexadecimal UUID format.
Regex for a US ZIP Code
Matches standard 5-digit ZIP codes and the extended ZIP+4 format.
Regex for a Strong Password (Upper, Lower, Digit, 8+ Chars)
Uses lookaheads to require at least one lowercase letter, one uppercase letter, and one digit, with a minimum length.
Regex for Checking for at Least One Special Character
Tests whether a string contains at least one non-alphanumeric character.
Regex for Checking for at Least One Digit
Tests whether a string contains at least one numeric digit anywhere.
Regex for Checking for at Least One Uppercase Letter
Tests whether a string contains at least one uppercase letter anywhere.
Regex for Matching Alphanumeric Characters Only
Matches a string containing only letters and digits, with no punctuation or whitespace.
Regex for Matching Letters Only
Matches a string made up entirely of alphabetic letters.
Regex for Matching a Hex Color Code
Matches 3-digit or 6-digit hex color codes prefixed with #.
Regex for Matching an IPv4 Address
Matches four dot-separated groups of digits in the shape of an IPv4 address.
Regex for Validating a URL
A basic pattern for matching http/https URLs.
Regex for a US Phone Number
Matches common US phone number formats with optional parentheses and separators.
Regex for Validating an Email Address
A commonly used pattern for basic email address validation.
Regex for Matching Digits Only
Matches a string made up entirely of numeric digits.
Regex for Matching a Whitespace-Only String
Matches a string that contains only whitespace characters (or is empty).
Regex for Matching a 24-Hour Time (HH:MM:SS)
Matches a time string in 24-hour format with hours, minutes, and seconds.
Regex for Matching a Date (MM/DD/YYYY)
Matches dates in the common US slash-separated format.
Regex for Matching a Date (YYYY-MM-DD)
Matches dates in ISO 8601 format.
What Is the Pub/Sub Pattern?
Publish/Subscribe (pub/sub) is a messaging pattern where publishers send messages to a named channel without knowing who (if anyone) is listening, and subscr...
What Is a Message Queue?
A message queue is a system that temporarily stores messages sent from one part of an application until another part is ready to process them, decoupling pro...
What Is Server-Sent Events (SSE)?
Server-Sent Events is a standard that lets a server push a continuous stream of text-based updates to a client over a single, long-lived HTTP connection, usi...
What Is Long Polling?
Long polling is a technique where the client makes a request that the server holds open until new data is available (or a timeout occurs), then the client im...
What Is WebSocket?
WebSocket is a protocol that establishes a persistent, full-duplex connection between client and server, allowing either side to send messages at any time wi...
What Is a Load Balancer?
A load balancer distributes incoming network requests across multiple backend servers, so no single server is overwhelmed and the overall system can handle m...
What Is a Reverse Proxy?
A reverse proxy sits in front of one or more backend servers, forwarding client requests to them and returning the response, while appearing to clients as if...
What Is a CI/CD Pipeline?
A CI/CD pipeline is an automated sequence of steps — building, testing, and deploying code — that runs whenever changes are pushed, replacing manual release...
What Is a Linter?
A linter is a tool that statically analyzes source code to flag potential errors, stylistic inconsistencies, and patterns known to cause bugs, without actual...
What Is Test-Driven Development (TDD)?
Test-Driven Development is a workflow where you write a failing test for a small piece of behavior first, then write the minimum code to make it pass, then r...
What Is Pair Programming?
Pair programming is a practice where two developers work together at one workstation — one actively writing code (the "driver") while the other reviews each...
What Is a Code Smell?
A code smell is a surface-level indicator in source code that suggests a deeper problem in the design, without necessarily being a bug itself.
What Is Refactoring?
Refactoring is the process of restructuring existing code to improve its internal structure, readability, or maintainability without changing its external be...
What Is Technical Debt?
Technical debt is the implied future cost of choosing a quick, easier solution now instead of a better, more time-consuming approach — like financial debt, i...
What Is a Changelog?
A changelog is a file documenting notable changes made to a project across its versions, typically listing additions, fixes, and breaking changes for each re...
What Is Semantic Versioning (SemVer)?
Semantic Versioning is a version numbering convention in the format MAJOR.MINOR.PATCH, where each segment signals a specific kind of change to consumers of a...
What Is a Monorepo?
A monorepo is a single repository containing the source code for multiple distinct projects or packages, managed together instead of split across separate re...
What Is a CDN (Content Delivery Network)?
A CDN is a geographically distributed network of servers that cache and deliver content from a location physically closer to each user, reducing latency comp...
What Is a Memory Leak?
A memory leak happens when a program keeps allocating memory it no longer needs without releasing it, causing memory usage to grow continuously over time.
What Is Garbage Collection?
Garbage collection is an automatic memory management process that identifies objects a program no longer references and reclaims their memory, without the de...
What Is a Deadlock?
A deadlock occurs when two or more processes or threads are each waiting for a resource the other holds, so none of them can ever proceed.
What Is a Race Condition?
A race condition occurs when the correctness of a program depends on the relative timing of multiple operations happening concurrently, and that timing isn't...
What Is Middleware in Web Development?
Middleware is code that runs between receiving a request and producing a response, able to inspect, modify, or reject the request/response, or pass it along...
What Is Dependency Injection?
Dependency injection is a technique where an object receives the other objects it depends on from the outside, rather than creating them itself internally.
What Is MVC (Model-View-Controller) Architecture?
MVC splits an application into three interconnected parts: the Model (data and business logic), the View (what the user sees), and the Controller (handles in...
Observer Design Pattern Explained
The Observer pattern lets an object (the subject) notify a list of dependent objects (observers) automatically whenever its state changes, without the subjec...
Factory Design Pattern Explained
The Factory pattern delegates the creation of objects to a dedicated method or class, instead of calling a constructor directly, so calling code doesn't need...
Singleton Design Pattern Explained
The Singleton pattern ensures a class has only one instance throughout an application's lifetime, and provides a single global point of access to it.
What Is a Design Pattern in Software Engineering?
A design pattern is a reusable, general solution to a commonly occurring problem in software design — not finished code, but a template describing how to str...
White Box vs Black Box Testing — What's the Difference?
White box testing is designed with knowledge of the internal code structure (like unit tests written by the developer); black box testing evaluates only inpu...
Vertical Scaling vs Horizontal Scaling — What's the Difference?
Vertical scaling increases capacity by adding more resources (CPU, RAM) to a single existing server; horizontal scaling increases capacity by adding more ser...
Blocking vs Non-Blocking I/O — What's the Difference?
Blocking I/O halts the calling thread until an operation (like a file read or network call) completes; non-blocking I/O returns immediately, letting the prog...
Pagination vs Infinite Scroll — What's the Difference?
Pagination divides a large result set into discrete, numbered pages the user navigates between; infinite scroll automatically loads more results as the user...
Compile-Time Error vs Runtime Error — What's the Difference?
A compile-time error is caught by the compiler (or a type checker) before the program ever runs, based on static analysis of the code; a runtime error occurs...
JWT vs Session-Based Authentication — What's the Difference?
Session-based authentication stores a session identifier in a cookie, with the actual user data kept server-side; JWT-based authentication issues a signed to...
Webhook vs API Polling — What's the Difference?
A webhook is a server-to-server callback where the source system pushes data to your endpoint as soon as an event happens; polling means repeatedly requestin...
Agile vs Waterfall — What's the Difference?
Waterfall is a linear project methodology where each phase (requirements, design, build, test, release) completes fully before the next begins; Agile breaks...
CI vs CD (Continuous Integration vs Continuous Deployment) — What's the Difference?
Continuous Integration (CI) automatically builds and tests code every time changes are pushed; Continuous Deployment (CD) automatically releases code that passes those checks straight to production without manual steps.
Monolith vs Microservices Architecture — What's the Difference?
A monolith is a single, unified application handling all functionality in one codebase and deployment unit; microservices split functionality into many small, independently deployable services communicating over a network.
Docker Container vs Virtual Machine — What's the Difference?
A virtual machine virtualizes an entire computer, including its own full operating system kernel; a container virtualizes only at the application level, sharing the host machine's kernel while isolating processes and filesystems.
Array vs Linked List — What's the Difference?
An array stores elements in contiguous memory with fixed-time indexed access; a linked list stores elements as separate nodes connected by pointers, allowing efficient insertion/removal but only sequential access.
DNS A Record vs CNAME Record — What's the Difference?
An A record points a domain name directly to an IPv4 address; a CNAME record points a domain name to another domain name, which is then resolved separately.
IPv4 vs IPv6 — What's the Difference?
IPv4 uses 32-bit addresses (like 192.168.1.1), providing about 4.3 billion unique addresses; IPv6 uses 128-bit addresses (like 2001:0db8::1), providing a vastly larger address space designed to outlast IPv4's exhaustion.
Framework vs Library — What's the Difference?
A library is code you call into to perform a specific task, on your own terms; a framework calls into your code according to its own structure and lifecycle — a distinction often summarized as "inversion of control."
Class vs Object — What's the Difference?
A class is a blueprint or template defining properties and behavior; an object is a specific instance created from that class, with its own actual values for those properties.
Public vs Private vs Protected — What's the Difference?
These access modifiers control which code can access a class's fields and methods: public members are accessible from anywhere, private members only from within the same class, and protected members from the class and its subclasses.
Process vs Thread — What's the Difference?
A process is an independent running program with its own memory space; a thread is a smaller unit of execution within a process that shares that process's memory with other threads in the same process.
Stack vs Queue — What's the Difference?
A stack is a Last-In-First-Out (LIFO) data structure where the most recently added item is removed first; a queue is First-In-First-Out (FIFO), where the earliest added item is removed first.
Synchronous vs Asynchronous Programming — What's the Difference?
Synchronous code executes one operation at a time, blocking until each finishes before moving to the next; asynchronous code can start a long-running operation and continue with other work while it completes in the background.
Unit Test vs Integration Test — What's the Difference?
A unit test verifies a single function or component in isolation, typically with dependencies mocked out; an integration test verifies that multiple components work correctly together, often including real dependencies like a database.
Compiler vs Interpreter — What's the Difference?
A compiler translates entire source code into another form (often machine code) before execution begins; an interpreter reads and executes source code directly, line by line, at runtime.
Authentication vs Authorization — What's the Difference?
Authentication verifies who a user is (proving identity, typically via login credentials); authorization determines what an already-authenticated user is allowed to do.
TCP vs UDP — What's the Difference?
TCP is a connection-oriented protocol that guarantees ordered, reliable delivery of data; UDP is connectionless and sends packets without guaranteeing they arrive, arrive in order, or arrive at all.
REST vs GraphQL — What's the Difference?
REST models an API as a set of fixed-shape resources accessed via URLs; GraphQL exposes a single endpoint where clients specify exactly which fields they want in each query.
npm vs Yarn vs pnpm — What's the Difference?
npm, Yarn, and pnpm are all Node.js package managers that install and manage JavaScript dependencies, differing mainly in installation speed, disk usage, and lockfile format.
What Is a JWT (JSON Web Token)? Explained Simply
A JWT is a compact, signed token used to securely transmit claims like user identity between parties. Learn its three-part structure and how verification works.
What Is an Algorithm? Explained Simply
An algorithm is a finite, well-defined sequence of steps that solves a problem or performs a computation. Learn the concept with a simple sorting example.
The Four Pillars of Object-Oriented Programming
Encapsulation, abstraction, inheritance, and polymorphism are the four core principles of OOP. Learn what each one means with simple explanations.
What Is Recursion in Programming? Explained With Examples
Recursion is when a function calls itself to solve a smaller version of the same problem. Learn base cases, the call stack, and a factorial example.
What Is Big O Notation? Explained With Examples
Big O notation describes how an algorithm's running time or memory use grows as input size increases. Learn O(1), O(n), O(log n), and O(n^2) with examples.
What Is an API? Explained for Beginners
An API is a defined way for one piece of software to request functionality or data from another, without needing to know how it's implemented internally.