Facts, Cheat Sheets & Quick References
Bite-sized knowledge across every corner of computer science - from JavaScript quirks to networking, security, AI, and career advice. Search, filter by category, and skim the cheat sheets when you need a fast refresher.
JavaScript
The language of the web · 34 facts
- 01typeof null returns object due to a legacy bug from the very first JS implementation.
- 02NaN is the only value in JavaScript that is not equal to itself.
- 03JavaScript was created by Brendan Eich in just 10 days back in 1995.
- 04It was originally named Mocha, then LiveScript, before being renamed JavaScript for marketing reasons.
- 05Arrays in JS are actually objects with numeric keys under the hood.
- 060.1 + 0.2 does not equal 0.3 in JavaScript because of floating-point precision.
- 07Functions are first-class citizens and can be passed around like any other value.
- 08The value of this depends on how a function is called, not where it is defined.
- 09JavaScript has automatic semicolon insertion, which can cause subtle bugs if you are not careful.
- 10let and const are block-scoped, while var is function-scoped.
- 11Closures let inner functions remember variables from their outer scope even after it has returned.
- 12The event loop lets JavaScript handle async operations despite being single-threaded.
- 13Array.prototype.sort() sorts elements as strings by default, so [10,1,2].sort() gives [1,10,2].
- 14JSON stands for JavaScript Object Notation, though it is used across nearly every language today.
- 15The spread operator was introduced in ES6 and simplifies copying arrays and objects.
- 16Template literals allow embedded expressions using backticks and dollar-brace syntax.
- 17JavaScript engines like V8 use Just-In-Time compilation to make code run faster.
- 18Strict mode catches common coding mistakes and blocks a number of unsafe actions.
- 19Promises were standardized in ES6 to better manage async code than plain callbacks.
- 20Async/await is really just syntactic sugar built on top of Promises.
- 21The Symbol type was introduced in ES6 to create guaranteed unique identifiers.
- 22Array destructuring lets you unpack values directly into named variables.
- 23WeakMap and WeakSet allow their keys to be garbage collected, unlike Map and Set.
- 24Optional chaining prevents errors when reading deeply nested properties that might not exist.
- 25The nullish coalescing operator only falls back on null or undefined, not on falsy values like 0.
- 26JavaScript has no separate integer type, every number is a 64-bit float except BigInt.
- 27BigInt was added so developers could represent integers larger than Number.MAX_SAFE_INTEGER.
- 28Hoisting moves variable and function declarations to the top of their scope before code runs.
- 29Arrow functions do not have their own this, they inherit it from the enclosing scope.
- 30Object.freeze() makes an object immutable, but only at the top level.
- 31The instanceof operator walks the prototype chain rather than checking a simple type tag.
- 32Node.js took JavaScript out of the browser and onto servers starting in 2009.
- 33console.log supports a percent-c format specifier that lets you style output with CSS.
- 34Modern ES modules replaced older patterns like CommonJS's require in most new codebases.
Python
Readable, versatile, everywhere · 34 facts
- 01Python was created by Guido van Rossum and named after Monty Python's Flying Circus, not the snake.
- 02Python uses indentation instead of curly braces to define code blocks.
- 03Python's guiding philosophy is summarized in the Zen of Python, viewable by typing import this.
- 04Everything in Python is an object, including functions and classes themselves.
- 05Python 2 reached its official end of life on January 1, 2020.
- 06List comprehensions offer a concise way to build lists from other iterables.
- 07Python uses dynamic typing, so a variable's type is determined at runtime.
- 08The Global Interpreter Lock allows only one thread to execute Python bytecode at a time.
- 09Python's duck typing philosophy judges an object by its methods, not its declared type.
- 10Tuples are immutable while lists are mutable, even though both are ordered sequences.
- 11Python supports multiple inheritance, unlike many other object-oriented languages.
- 12The walrus operator, introduced in Python 3.8, allows assignment inside an expression.
- 13Python's standard library is so extensive it is often described as batteries included.
- 14Generators use the yield keyword to produce values lazily and save memory.
- 15Decorators let you modify or extend a function's behavior without changing its code.
- 16Python dictionaries have guaranteed insertion order as a language feature since version 3.7.
- 17PEP 8 defines Python's official style guide for formatting and naming conventions.
- 18Python's default recursion limit is 1000, though it can be changed at runtime.
- 19F-strings, introduced in Python 3.6, are the fastest way to format strings in the language.
- 20Python supports operator overloading through special dunder methods like add and repr.
- 21The is operator compares object identity while double-equals compares value equality.
- 22CPython is the default and most widely used implementation of Python, written in C.
- 23Python's garbage collector combines reference counting with cycle detection.
- 24Virtual environments isolate project dependencies to avoid version conflicts between projects.
- 25Python lambdas are limited to a single expression, unlike full function definitions.
- 26The Python Package Index hosts several hundred thousand third-party packages.
- 27List slicing with a negative step is a quick idiom for reversing a list.
- 28Assert statements are stripped out entirely when Python runs with the optimize flag.
- 29Type hints, added in Python 3.5, add optional static typing without changing runtime behavior.
- 30Python is one of the most popular languages for data science, largely thanks to NumPy and Pandas.
- 31The with statement manages resources automatically through context managers.
- 32Mutable default arguments are a classic gotcha since they persist across function calls.
- 33Multiple assignment lets you swap two variables without ever using a temporary one.
- 34Python was first released in 1991, making it older than Java by a few years.
HTML & CSS
The bones and skin of every page · 34 facts
- 01HTML stands for HyperText Markup Language and was created by Tim Berners-Lee in 1990.
- 02CSS specificity is calculated using a scoring system based on IDs, classes, and elements.
- 03The doctype declaration tells the browser to render the page in standards mode.
- 04Flexbox was designed for one-dimensional layouts, while CSS Grid handles two dimensions at once.
- 05The CSS box model consists of content, padding, border, and margin, in that order.
- 06Semantic tags like article and nav improve both accessibility and search engine understanding.
- 07The z-index property only has an effect on elements that are positioned.
- 08CSS custom properties are defined with a double dash prefix and read with the var function.
- 09The viewport meta tag is essential for responsive design to work correctly on mobile devices.
- 10CSS Grid's fr unit represents a fraction of the available space inside a container.
- 11The root pseudo-class targets the highest-level parent in the document, usually the html element.
- 12Rendering engines like Blink, Gecko, and WebKit can interpret the same HTML and CSS differently.
- 13The alt attribute on images is critical for screen readers and for basic accessibility.
- 14CSS transitions animate property changes smoothly without needing any JavaScript.
- 15Media queries let CSS apply different styles depending on screen size or device features.
- 16Setting display to none removes an element from layout entirely, unlike visibility hidden.
- 17HTML5 introduced native audio and video elements, removing the need for plugins like Flash.
- 18CSS specificity climbs from element selectors, to classes, to IDs, to inline styles, to important.
- 19The canvas element lets you draw arbitrary graphics directly using JavaScript.
- 20Grid-template-areas lets you name and visually map out regions of a layout in plain text.
- 21Web accessibility standards are formally defined by the WCAG guidelines.
- 22Box-sizing border-box makes width calculations include padding and border automatically.
- 23CSS animations use keyframes to define multiple stages of a single animation.
- 24The head element holds metadata that is never rendered directly on the visible page.
- 25Inline, block, and inline-block are core CSS display types with distinct layout behavior.
- 26The cascade in CSS is how the browser resolves conflicting rules using specificity and order.
- 27Pseudo-elements like before and after can insert extra content without any extra HTML.
- 28Google's Lighthouse tool audits pages for performance, accessibility, and best practices.
- 29HTML forms can validate input natively using attributes like required and pattern.
- 30CSS position sticky blends the behavior of relative and fixed positioning.
- 31The picture element lets browsers pick different images depending on screen size or format.
- 32The rem unit is relative to the root font size, while em is relative to the parent element.
- 33Progressive web apps use service workers to keep working even when offline.
- 34The very first website ever published, from CERN in 1991, is still online today.
React & Frontend
Building the modern UI · 34 facts
- 01React was created by Jordan Walke at Facebook and first used on the News Feed in 2011.
- 02The virtual DOM lets React update only the parts of the real DOM that actually changed.
- 03React Hooks, introduced in 2019, let function components use state without writing classes.
- 04JSX is syntactic sugar that compiles down to plain React.createElement calls.
- 05The useEffect hook merges what used to be three separate lifecycle methods in class components.
- 06Keys in a rendered list help React identify which items changed, were added, or were removed.
- 07React re-renders a component whenever its own state or props actually change.
- 08The Context API lets you share data across a component tree without manual prop drilling.
- 09React Fiber, shipped in React 16, rewrote the reconciliation engine for better performance.
- 10Controlled components keep form data entirely inside React state rather than the DOM.
- 11Next.js, built on top of React, popularized server-side rendering for React applications.
- 12useMemo and useCallback help skip unnecessary recalculations and re-renders.
- 13Redux was directly inspired by the Flux architecture pattern, also created at Facebook.
- 14React Server Components let a component render on the server without shipping its JS to the client.
- 15A list key should be a stable identifier, never an array index when the order can change.
- 16Vue.js, created by Evan You, was designed to feel more approachable than Angular.
- 17Svelte compiles components into plain vanilla JavaScript at build time instead of using a virtual DOM.
- 18Webpack, Vite, and Turbopack are all bundlers used somewhere in modern frontend pipelines.
- 19Tailwind CSS uses small utility classes instead of writing custom CSS per component.
- 20React's Strict Mode intentionally double-invokes certain functions in development to surface bugs.
- 21TypeScript adds static typing on top of JavaScript and was created by Microsoft in 2012.
- 22Hydration is the process of attaching event listeners to server-rendered HTML on the client.
- 23CSS-in-JS libraries let you write actual CSS directly inside your JavaScript files.
- 24React Router enables client-side navigation between views without a full page reload.
- 25Framer Motion is one of the most popular animation libraries for React interfaces.
- 26Component-driven development builds interfaces out of small, isolated, reusable pieces.
- 27React.lazy combined with Suspense splits code and shrinks the initial JavaScript bundle.
- 28Angular, maintained by Google, uses TypeScript by default and an MVC-like structure.
- 29The single page application model loads one HTML page and updates content dynamically.
- 30React's synthetic event system normalizes differences in how browsers fire native events.
- 31Zustand and Jotai are lightweight alternatives to Redux for managing application state.
- 32Lifting state up means moving shared state to the closest common ancestor component.
- 33Web Components let you build reusable custom elements natively, without any framework.
- 34Storybook lets developers build and visually test UI components completely in isolation.
Git & Version Control
Never lose your work again · 34 facts
- 01Git was created by Linus Torvalds in 2005 to help manage the Linux kernel's source code.
- 02Every commit in Git is identified by a SHA-1 hash generated from its content.
- 03Git is a distributed version control system, so every clone holds the full project history.
- 04Rebase rewrites commit history, while merge preserves it exactly as it happened.
- 05A detached HEAD means you are viewing a specific commit rather than sitting on a branch.
- 06Git branches are just lightweight pointers to commits, not full copies of the codebase.
- 07The gitignore file tells Git which files or folders it should never track.
- 08git stash temporarily shelves uncommitted changes so you can switch context quickly.
- 09GitHub, GitLab, and Bitbucket host Git repositories but are not part of Git itself.
- 10A fast-forward merge happens when the target branch has no new commits since branching.
- 11Cherry-pick applies one specific commit from one branch onto a different branch.
- 12git blame shows exactly who last modified each line of a file, and when.
- 13Git's three-way merge algorithm compares the common ancestor against both diverging branches.
- 14A pull request is a workflow feature added by hosting platforms, not part of Git core.
- 15git reset with the hard flag permanently discards uncommitted changes, so use it carefully.
- 16Semantic versioning, using major, minor, and patch numbers, is a common convention for releases.
- 17git bisect uses binary search across commit history to find which commit introduced a bug.
- 18A merge conflict occurs when Git cannot automatically reconcile changes to the same lines.
- 19git reflog can recover commits even after a hard reset or an accidental branch deletion.
- 20Forking creates your own personal copy of someone else's repository on platforms like GitHub.
- 21Git tags mark a specific point in history, most often used for release versions.
- 22The log command with oneline and graph flags visualizes branch history compactly.
- 23Submodules let one Git repository include another as a tracked subdirectory.
- 24Trunk-based development favors small, frequent merges directly into a single main branch.
- 25GitFlow is a branching model that uses separate branches for features, releases, and hotfixes.
- 26The amend flag lets you edit your most recent commit instead of creating a brand new one.
- 27A shallow clone downloads only recent history to save both time and disk space.
- 28Conventional Commits is a specification for writing structured, machine-readable commit messages.
- 29Squashing combines multiple commits into one, often used to clean history before merging.
- 30Signed commits use GPG keys to verify a commit really came from its claimed author.
- 31The staging area lets you choose exactly which changes go into your next commit.
- 32git worktree lets you check out multiple branches into separate folders at the same time.
- 33CI and CD pipelines often trigger automatically on Git events like pushes or pull requests.
- 34Torvalds reportedly built the first working version of Git in about ten days.
SQL & Databases
Where your data actually lives · 34 facts
- 01SQL stands for Structured Query Language and was developed at IBM in the early 1970s.
- 02A primary key uniquely identifies each row in a table and cannot contain null values.
- 03Normalization organizes tables to reduce redundancy and keep data consistent.
- 04An inner join returns only rows that have matching values in both joined tables.
- 05A left join returns every row from the left table plus matches from the right, or nulls.
- 06Indexes speed up read queries but can slow down writes because of extra upkeep.
- 07ACID stands for Atomicity, Consistency, Isolation, and Durability in transaction processing.
- 08NoSQL databases like MongoDB store data as flexible documents instead of rigid tables.
- 09A foreign key enforces a link between two tables and maintains referential integrity.
- 10Group by is used together with aggregate functions like count, sum, and average.
- 11SQL injection is one of the oldest and still most common web security vulnerabilities.
- 12A view is a virtual table built from the saved result of a stored query.
- 13PostgreSQL supports advanced features like JSONB storage, full-text search, and custom types.
- 14Redis is an in-memory key-value store, often used for caching and real-time features.
- 15Database sharding splits a large database across multiple servers to improve scalability.
- 16A composite key combines two or more columns to uniquely identify a single row.
- 17Having filters grouped results, while where filters individual rows before grouping happens.
- 18B-trees are the data structure most commonly used internally to implement database indexes.
- 19MySQL was originally released in 1995 and remains one of the most widely used databases.
- 20A database transaction groups multiple operations so they either all succeed or all fail.
- 21Denormalization intentionally adds redundancy to improve read performance in specific cases.
- 22Firestore is a NoSQL document database from Google's Firebase platform.
- 23The explain command shows exactly how a database engine plans to execute a given query.
- 24Database replication copies data across multiple servers for redundancy and load balancing.
- 25A stored procedure is precompiled SQL code saved inside the database for reuse.
- 26Isolation levels control how concurrent transactions can see each other's in-progress changes.
- 27Graph databases like Neo4j are optimized for data with complex relationships, such as social networks.
- 28The union operator combines results from multiple select queries and removes duplicates by default.
- 29A deadlock occurs when two transactions end up waiting on each other's locks indefinitely.
- 30Connection pooling reuses existing database connections to avoid the overhead of opening new ones.
- 31SQLite is a lightweight, serverless database engine often embedded directly inside applications.
- 32Data warehouses are optimized for analytical queries, unlike systems built for frequent writes.
- 33The CAP theorem says a distributed system can only fully guarantee two of consistency, availability, and partition tolerance.
- 34Column-oriented databases like Cassandra store data by column instead of by row for faster analytics.
Data Structures
The shapes that hold your data · 34 facts
- 01An array stores elements in contiguous memory, giving constant-time access by index.
- 02A linked list stores elements as nodes with pointers, giving fast insertion but slow access.
- 03Stacks follow last-in-first-out order, much like a physical stack of plates.
- 04Queues follow first-in-first-out order, much like a line at a checkout counter.
- 05A hash table uses a hash function to map keys to indices for near-instant lookups.
- 06Binary trees allow at most two children per node, and binary search trees keep them ordered.
- 07A balanced binary search tree, such as an AVL tree, guarantees logarithmic-time operations.
- 08Heaps are tree-based structures where a parent is always greater, or smaller, than its children.
- 09Tries are tree structures optimized for storing and searching strings, like autocomplete systems.
- 10A graph is made of vertices connected by edges, which can be either directed or undirected.
- 11Hash collisions happen when two keys map to the same index and must be resolved somehow.
- 12A doubly linked list allows traversal in both directions using next and previous pointers.
- 13Red-black trees are self-balancing binary search trees used inside many language standard libraries.
- 14A circular buffer reuses a fixed block of memory by wrapping around once it becomes full.
- 15Sets store only unique elements, and most implementations rely on a hash table internally.
- 16Skip lists use several layers of linked lists to reach logarithmic search without full balancing.
- 17A priority queue serves elements by priority rather than insertion order, often built on a heap.
- 18B-trees generalize binary search trees to allow more than two children, ideal for disk storage.
- 19Adjacency lists and adjacency matrices are the two main ways to represent a graph in memory.
- 20A trie's name comes from the word retrieval, though many people pronounce it like try.
- 21Disjoint-set structures efficiently track and merge groups of connected elements over time.
- 22Dynamic arrays typically resize by doubling their capacity once they run out of room.
- 23A bloom filter can tell you an item is possibly present, or definitely absent, using very little memory.
- 24Segment trees allow efficient range queries and updates, common in competitive programming.
- 25Double-ended queues allow insertion and removal from both ends in constant time.
- 26A perfect binary tree has every single level completely filled with nodes.
- 27LRU caches are commonly implemented using a hash map paired with a doubly linked list.
- 28Sparse matrices store only the non-zero elements to save memory in mostly-empty grids.
- 29Multi-dimensional arrays are stored in memory as either row-major or column-major order.
- 30A trie's search time depends on the length of the string, not the number of strings stored.
- 31Suffix trees and suffix arrays enable very fast substring searches in large bodies of text.
- 32Fenwick trees, also called binary indexed trees, support fast prefix sum queries and updates.
- 33Immutable data structures, common in functional programming, never change after they are created.
- 34XOR linked lists save memory by storing one combined pointer instead of two separate ones.
Algorithms
Step-by-step problem solving · 34 facts
- 01Binary search runs in logarithmic time but requires the input to already be sorted.
- 02Bubble sort is simple to understand but runs in quadratic time, making it slow at scale.
- 03Quicksort has average-case linearithmic performance but can degrade badly on already-sorted input.
- 04Merge sort guarantees linearithmic performance by consistently dividing and merging the array.
- 05Dijkstra's algorithm finds the shortest path in a graph with only non-negative edge weights.
- 06Dynamic programming solves problems by breaking them into overlapping subproblems and caching results.
- 07Greedy algorithms make the locally optimal choice at each step, which does not always give a global optimum.
- 08Breadth-first search explores a graph level by level using a queue.
- 09Depth-first search explores as far as possible along one branch before backtracking.
- 10Big O notation describes the worst-case growth rate of an algorithm's time or space usage.
- 11The traveling salesman problem is NP-hard, meaning no known algorithm solves it efficiently at scale.
- 12Memoization stores the results of expensive function calls to avoid redundant computation later.
- 13A-star search combines Dijkstra's algorithm with heuristics to find paths more efficiently.
- 14Recursion solves a problem by having a function call itself on progressively smaller subproblems.
- 15Bellman-Ford can handle negative edge weights, which Dijkstra's algorithm cannot.
- 16Sorting algorithms are classified as stable or unstable based on whether equal elements keep their order.
- 17Two-pointer techniques often reduce array problems from quadratic time down to linear time.
- 18Backtracking algorithms build a solution incrementally and abandon any path that fails a constraint.
- 19Kadane's algorithm finds the maximum sum subarray in linear time.
- 20Topological sorting orders the nodes of a directed acyclic graph based on their dependencies.
- 21Kruskal's and Prim's algorithms both find a minimum spanning tree, using different strategies.
- 22The sliding window technique efficiently processes contiguous subarrays or substrings.
- 23Radix sort can achieve linear time for integers by sorting one digit at a time.
- 24NP-complete problems can have a solution verified quickly, even though finding one may not be quick.
- 25Divide and conquer algorithms split a problem into pieces, solve each one, then combine the results.
- 26Floyd-Warshall computes shortest paths between every pair of nodes in cubic time.
- 27Huffman coding is a greedy algorithm used for lossless data compression.
- 28The knapsack problem is a classic example used to teach dynamic programming.
- 29Randomized algorithms, like randomized quicksort, use randomness to improve average-case performance.
- 30Amortized analysis measures the average cost of an operation across a sequence, not just one worst case.
- 31The master theorem offers a shortcut for solving recurrence relations in divide-and-conquer algorithms.
- 32Boyer-Moore is a highly efficient string-searching algorithm used inside many text editors.
- 33Genetic algorithms mimic natural selection to search for approximate solutions to hard problems.
- 34P versus NP remains one of the most famous unsolved problems in computer science.
Operating Systems
What runs beneath everything · 34 facts
- 01An operating system manages hardware resources and provides services to application software.
- 02A process is a running instance of a program, while a thread is a smaller unit of execution inside it.
- 03Context switching lets a single CPU rapidly alternate between processes, creating an illusion of multitasking.
- 04Virtual memory lets a system extend available RAM using disk space through paging.
- 05A deadlock occurs when processes get stuck waiting on resources held by one another.
- 06The kernel is the core part of an operating system with full access to hardware.
- 07UNIX, developed at Bell Labs in 1969, heavily influenced the design of Linux and macOS.
- 08Linux, strictly speaking, is only the kernel, with GNU tools completing the rest of the system.
- 09A system call is how a program requests services, such as file access, from the kernel.
- 10Multithreading lets a single process run multiple tasks concurrently while sharing memory space.
- 11The scheduler decides which process gets the CPU next, using strategies like round-robin scheduling.
- 12File systems like NTFS, ext4, and APFS define how data is organized and stored on disk.
- 13A page fault occurs when a program accesses memory that is not currently loaded into RAM.
- 14Semaphores and mutexes are synchronization tools used to prevent race conditions between threads.
- 15The boot process loads the kernel into memory before handing off control from firmware.
- 16Containers share the host operating system's kernel, unlike full virtual machines.
- 17A race condition happens when a program's outcome depends on unpredictable timing between threads.
- 18Windows NT, released in 1993, formed the foundation for every modern version of Windows.
- 19Interrupts let hardware signal the CPU that it urgently needs attention.
- 20The swap file is disk space used as overflow whenever physical RAM becomes full.
- 21Android runs on a modified Linux kernel that has been customized for mobile hardware.
- 22A daemon is a background process that runs without any direct user interaction.
- 23Copy-on-write is an optimization where processes share memory until one of them tries to modify it.
- 24The fork system call creates a new process by duplicating an existing one on UNIX-like systems.
- 25Time-sharing systems from the 1960s let multiple users interact with one computer simultaneously.
- 26A zombie process has finished running but still keeps an entry in the process table.
- 27Real-time operating systems guarantee that certain tasks finish within strict time limits.
- 28The inode in a UNIX file system stores a file's metadata, but never its actual name.
- 29macOS is built on Darwin, an open-source UNIX-like core developed by Apple.
- 30Thrashing happens when a system spends more time swapping memory than doing useful work.
- 31A hypervisor manages virtual machines and can run directly on hardware or on top of an OS.
- 32The chmod command in UNIX-like systems controls file permissions for owner, group, and everyone else.
- 33Preemptive multitasking lets the OS forcibly interrupt a running task to switch to another one.
- 34Solaris, developed by Sun Microsystems, introduced ZFS, a filesystem with built-in data integrity checks.
Computer Networking
How machines actually talk · 34 facts
- 01The OSI model describes networking in seven layers, from physical cables up to application software.
- 02TCP guarantees reliable, ordered delivery of data, while UDP trades reliability for raw speed.
- 03IP addresses come in two versions in wide use today, IPv4 with 32 bits and IPv6 with 128 bits.
- 04DNS translates human-readable domain names into the IP addresses computers actually use.
- 05HTTP is stateless by design, meaning each request is handled independently of the last.
- 06HTTPS encrypts HTTP traffic using TLS to protect data while it is in transit.
- 07A firewall filters network traffic according to a set of predefined security rules.
- 08The TCP three-way handshake establishes a reliable connection before any data is exchanged.
- 09A subnet mask determines which part of an IP address identifies the network versus the host.
- 10Port 80 is the default for HTTP traffic, while port 443 is the default for HTTPS.
- 11NAT lets many devices on a local network share a single public IP address.
- 12A content delivery network caches content across servers worldwide to reduce latency for users.
- 13WebSockets provide full-duplex communication over one long-lived connection, unlike ordinary HTTP requests.
- 14The ping utility uses ICMP packets to test connectivity and measure round-trip time.
- 15A VPN builds an encrypted tunnel between a device and a remote network over the public internet.
- 16DHCP automatically assigns IP addresses to devices as they join a network.
- 17Latency measures delay, while bandwidth measures the maximum data a connection can carry.
- 18HTTP status codes like 200, 404, and 500 signal success, client errors, and server errors respectively.
- 19A load balancer spreads incoming traffic across multiple servers to improve both speed and reliability.
- 20BGP is the core routing protocol that determines how data travels between different networks.
- 21Wi-Fi standards such as 802.11ac and 802.11ax define the speed and range of wireless networks.
- 22REST APIs use standard HTTP methods like GET, POST, PUT, and DELETE to operate on resources.
- 23GraphQL, developed at Facebook, lets a client request exactly the data it needs in a single query.
- 24A MAC address is a unique hardware identifier assigned to a device's network interface.
- 25Packet switching breaks data into small pieces that travel independently and reassemble at the destination.
- 26TLS certificates are issued by certificate authorities to verify a website's real identity.
- 27The Internet Protocol Suite is usually just called TCP/IP after its two foundational protocols.
- 28Traceroute reveals the path packets take across multiple routers on the way to their destination.
- 29A proxy server sits between a client and the internet, often for caching or added privacy.
- 30Multiplexing in HTTP/2 lets multiple requests and responses share a single connection at once.
- 31The first message ever sent over ARPANET was meant to be LOGIN, but the system crashed after LO.
- 32Rate limiting protects APIs from abuse by capping how many requests a client can make.
- 33mDNS lets devices discover one another on a local network without a central DNS server.
- 34QUIC, which underlies HTTP/3, runs over UDP to cut down on connection setup latency.
Cybersecurity
Guarding the code you write · 34 facts
- 01SQL injection attacks exploit unsanitized user input to manipulate database queries.
- 02Cross-site scripting injects malicious scripts into webpages that are then viewed by other users.
- 03Two-factor authentication adds a second verification step on top of just a password.
- 04Hashing is a one-way function, while encryption is deliberately designed to be reversible with a key.
- 05A zero-day vulnerability is a flaw the vendor does not yet know about at the time it is exploited.
- 06Phishing attacks trick users into revealing sensitive information through deceptive messages or sites.
- 07Salting passwords before hashing stops attackers from using precomputed rainbow tables.
- 08A DDoS attack overwhelms a target with traffic from many sources to make it unavailable.
- 09The principle of least privilege limits users and systems to only the access they truly need.
- 10Public key cryptography uses a key pair, where data locked with one key can only be opened by the other.
- 11Cross-site request forgery tricks a logged-in user's browser into performing an unwanted action.
- 12Penetration testing simulates real attacks to find vulnerabilities before malicious actors do.
- 13A honeypot is a decoy system designed to attract and study attackers safely.
- 14Ransomware encrypts a victim's files and demands payment in exchange for the decryption key.
- 15Multi-factor authentication combines something you know, something you have, and something you are.
- 16The CIA triad, standing for confidentiality, integrity, and availability, underpins information security.
- 17Buffer overflow attacks exploit programs that write more data into memory than it can actually hold.
- 18Social engineering exploits human psychology rather than technical flaws to breach security.
- 19Certificate pinning helps prevent man-in-the-middle attacks by trusting only specific certificates.
- 20OWASP maintains a widely referenced list of the top ten most critical web application risks.
- 21A man-in-the-middle attack secretly intercepts, and sometimes alters, traffic between two parties.
- 22Bug bounty programs pay ethical hackers to responsibly disclose the vulnerabilities they find.
- 23Relying on secrecy of design rather than real protection is widely considered weak security practice.
- 24End-to-end encryption ensures only the communicating users can read a message, not even the provider.
- 25Malware is a broad umbrella term covering viruses, worms, trojans, spyware, and ransomware.
- 26A VPN does not make you anonymous, it simply encrypts and reroutes your traffic through another server.
- 27Password managers reduce risk by generating and storing a strong, unique password for every account.
- 28Privilege escalation attacks aim to gain a higher level of access than was originally granted.
- 29Input validation and sanitization form the first line of defense against injection-based attacks.
- 30The Morris Worm of 1988 was one of the first major worms to spread across the early internet.
- 31Rate limiting and CAPTCHAs help defend against automated brute-force login attempts.
- 32Security headers like Content-Security-Policy help browsers block unauthorized script execution.
- 33Air-gapped systems are physically isolated from unsecured networks to shrink their attack surface.
- 34Supply chain attacks compromise trusted software or dependencies to reach a much wider set of victims.
AI & Machine Learning
Teaching machines to learn · 34 facts
- 01The term artificial intelligence was first coined at the Dartmouth Conference back in 1956.
- 02Machine learning models improve by learning patterns from data rather than following explicit rules.
- 03A neural network's structure is loosely inspired by neurons in the human brain, not a direct copy.
- 04Overfitting happens when a model learns its training data too well, hurting performance on new data.
- 05Supervised learning uses labeled data, while unsupervised learning finds patterns in unlabeled data.
- 06Backpropagation, the algorithm behind training neural networks, was popularized in a 1986 paper.
- 07Transformers, introduced in a landmark 2017 paper, power most modern language models today.
- 08Reinforcement learning trains an agent through rewards and penalties rather than labeled examples.
- 09A convolutional neural network is especially effective at image recognition tasks.
- 10Gradient descent is the optimization algorithm most commonly used to train machine learning models.
- 11Large language models are trained largely by predicting the next word across massive amounts of text.
- 12Transfer learning reuses a pretrained model's knowledge as a head start for a new, related task.
- 13The training data a model learns from can introduce real bias if it is not representative.
- 14Tokenization breaks text into smaller pieces, like words or subwords, before feeding it to a model.
- 15Recurrent neural networks were designed for sequential data but struggle with long-term dependencies.
- 16AlphaGo, developed by DeepMind, defeated a world champion Go player in 2016, a landmark moment for AI.
- 17Feature engineering involves selecting and transforming raw data into inputs a model can learn from well.
- 18A hyperparameter is a setting configured before training, such as learning rate, unlike a learned weight.
- 19Generative adversarial networks pit two neural networks against each other to produce realistic data.
- 20Fine-tuning adapts a pretrained model to a specific task using a smaller, targeted dataset.
- 21The Turing Test, proposed in 1950, checks whether a machine can behave indistinguishably from a human.
- 22Embeddings represent words, images, or other data as vectors of numbers that capture meaning.
- 23Diffusion models generate images by gradually removing noise from a random starting point.
- 24Explainable AI focuses on making a model's decisions understandable to the humans using it.
- 25A confusion matrix summarizes a classifier's performance across true and false positives and negatives.
- 26Prompt engineering is the practice of crafting inputs to get better outputs from a language model.
- 27Data augmentation artificially expands a training dataset by creating modified copies of existing data.
- 28AI hallucination describes a model generating confident but factually incorrect information.
- 29Federated learning trains a model across many devices without ever centralizing the raw data.
- 30The curse of dimensionality describes how data grows sparser and harder to model as features increase.
- 31Chatbots existed long before modern LLMs, ELIZA from 1966 simulated a psychotherapist convincingly.
- 32Model quantization reduces the precision of a model's numbers to make it smaller and faster.
- 33Retrieval-augmented generation pairs a language model with an external knowledge source for better answers.
- 34AI ethics research focuses heavily on fairness, transparency, and preventing harm from automated decisions.
DevOps & Cloud
Shipping software that scales · 34 facts
- 01Docker packages an application with its dependencies into portable containers for consistency.
- 02Kubernetes, originally built at Google, automates the deployment and scaling of containerized apps.
- 03CI/CD stands for continuous integration and continuous deployment, or delivery.
- 04Infrastructure as code manages servers and resources through configuration files instead of manual setup.
- 05Terraform, built by HashiCorp, is a widely used open-source tool for infrastructure as code.
- 06AWS, Azure, and Google Cloud together dominate most of the global cloud computing market.
- 07Serverless computing lets developers run code without directly managing the underlying servers.
- 08A microservices architecture splits an application into small, independently deployable services.
- 09Blue-green deployment reduces downtime by running two identical environments and switching traffic between them.
- 10Monitoring tools like Prometheus and Grafana track system health and visualize metrics in real time.
- 11Load testing simulates heavy traffic to reveal how a system performs under stress before it happens live.
- 12GitHub Actions, GitLab CI, and Jenkins are all common tools for automating build and deploy pipelines.
- 13Canary releases roll a change out to a small subset of users before a full rollout.
- 14Auto-scaling automatically adjusts computing resources to match real-time demand.
- 15Vercel and Netlify popularized simple, git-based deployment workflows for modern web apps.
- 16Redis and Memcached are commonly used for caching to reduce database load and latency.
- 17A YAML file is often used to define configuration for CI/CD pipelines and Kubernetes deployments.
- 18Observability goes beyond monitoring by combining logs, metrics, and traces into one clear picture.
- 19The twelve-factor app methodology outlines best practices for building scalable, maintainable cloud apps.
- 20Feature flags let teams turn functionality on or off without shipping an entirely new deployment.
- 21Chaos engineering deliberately introduces failures to test resilience, popularized by Netflix's Chaos Monkey.
- 22A reverse proxy like Nginx handles load balancing, caching, and SSL termination in front of servers.
- 23Environment variables keep sensitive configuration, like API keys, safely out of source code.
- 24Zero-downtime deployment techniques ensure users never notice an outage during a release.
- 25GitOps treats a Git repository as the single source of truth for infrastructure and deployment state.
- 26Deployment frequency is a key metric tracked in the DORA framework for measuring DevOps performance.
- 27A postmortem documents what went wrong after an outage, deliberately without assigning individual blame.
- 28Content delivery networks like Cloudflare cache static assets closer to users all around the world.
- 29Helm is often described as the package manager for Kubernetes, simplifying complex deployments.
- 30Immutable infrastructure replaces servers entirely for updates instead of patching them in place.
- 31A service mesh like Istio manages communication, security, and observability between microservices.
- 32Log aggregation tools like the ELK stack centralize logs from many different services in one place.
- 33Cron jobs schedule recurring tasks, and their basic syntax dates all the way back to early UNIX.
- 34Cloud cost optimization often focuses on right-sizing instances and eliminating resources sitting idle.
Computer Science History
How we got here · 34 facts
- 01Ada Lovelace is often considered the first computer programmer for her 1840s work on Babbage's engine.
- 02The first electronic general-purpose computer, ENIAC, was completed in 1945 and weighed about 30 tons.
- 03Alan Turing's theoretical machine, described in 1936, laid the mathematical foundation for modern computing.
- 04The very first computer bug was literally a moth found trapped inside a relay in 1947.
- 05The word software was first used in print by statistician John Tukey back in 1958.
- 06Grace Hopper developed the first compiler and helped popularize the term debugging.
- 07The transistor, invented at Bell Labs in 1947, replaced bulky vacuum tubes and reshaped computing.
- 08The first computer mouse, built by Douglas Engelbart, was made of wood back in 1964.
- 09ARPANET, the internet's precursor, went live in 1969 connecting just four university computers.
- 10The first email was sent by Ray Tomlinson in 1971, who also chose the at symbol for addresses.
- 11Apple was founded in 1976 by Steve Jobs, Steve Wozniak, and Ronald Wayne in a California garage.
- 12The Altair 8800, often called the first personal computer, was sold as a build-it-yourself kit in 1975.
- 13IBM released its first PC in 1981, helping standardize personal computing for businesses everywhere.
- 14Tim Berners-Lee invented the World Wide Web in 1989 while working at CERN.
- 15The first webcam was built at Cambridge University purely to check whether a coffee pot was full.
- 16Moore's Law, coined in 1965, predicted that transistor counts on chips would double roughly every two years.
- 17IBM introduced the floppy disk in 1971, which initially held only about 80 kilobytes of data.
- 18The first computer virus, called Creeper, appeared in 1971 and displayed a taunting message on infected screens.
- 19Bill Gates and Paul Allen founded Microsoft in 1975 to sell a BASIC interpreter for the Altair 8800.
- 20The QWERTY keyboard layout was designed in the 1870s partly to reduce mechanical typewriter jams.
- 21IBM's first one-gigabyte hard drive, released in 1980, weighed about 550 pounds.
- 22Linus Torvalds created Linux in 1991 as a personal project while he was a student in Finland.
- 23The infamous Y2K bug stemmed from programs storing years as only two digits.
- 24Amazon started in 1994 as an online bookstore before expanding into cloud computing and much more.
- 25The first iPhone, released in 2007, helped popularize touchscreens and modern mobile app ecosystems.
- 26Google was founded in 1998 by Larry Page and Sergey Brin under the original name BackRub.
- 27The word bit, short for binary digit, was coined by statistician John Tukey in 1947.
- 28COBOL, created in 1959, is still running today inside many legacy banking and government systems.
- 29The Apollo Guidance Computer that helped land astronauts on the Moon in 1969 had far less power than a modern calculator.
- 30Wikipedia launched in 2001 and grew into the largest collaboratively edited reference work in history.
- 31IBM's RAMAC 305 from 1956, the first hard disk drive, stored about five megabytes across fifty large discs.
- 32Netscape Navigator, released in 1994, was one of the earliest widely used web browsers.
- 33The USB standard was introduced in 1996 to unify a chaotic mess of proprietary computer connectors.
- 34IBM's Deep Blue defeated reigning world chess champion Garry Kasparov in 1997.
Programming Trivia & Career
Life in and around the code · 34 facts
- 01The Hello World tradition as a first program traces back to a 1972 Bell Labs internal memo for C.
- 02The word bug for a technical glitch predates computing, used by Thomas Edison in his notes in the 1870s.
- 03Rubber duck debugging means explaining your code line by line to an object to help find the bug yourself.
- 04Many interviewers still use the FizzBuzz test to quickly filter candidates who cannot code at all.
- 05The idea of a 10x engineer suggests some developers are ten times more productive, though it is widely debated.
- 06Stack Overflow was founded in 2008 by Jeff Atwood and Joel Spolsky to fix broken programmer forums.
- 07GitHub was founded in 2008 and later acquired by Microsoft in 2018 for around 7.5 billion dollars.
- 08It works on my machine remains one of the most common phrases in software development.
- 09Technical debt describes the implied cost of shortcuts taken now that require rework later on.
- 10Pair programming puts two developers on the same code together, one writing and one reviewing.
- 11Code reviews catch bugs early and spread knowledge across a team, not just enforce style rules.
- 12The Agile Manifesto, written in 2001, prioritized individuals and working software over rigid process.
- 13Scrum, one of the most popular Agile frameworks, organizes work into fixed-length sprints.
- 14Imposter syndrome is extremely common among developers, including senior engineers at top companies.
- 15Open source projects like Linux and VS Code are built and maintained largely by volunteer communities.
- 16Many developers keep a personal brag document to track achievements ahead of performance reviews.
- 17The Pareto principle suggests roughly 80 percent of effects often come from just 20 percent of causes.
- 18Whiteboard interviews remain controversial since they rarely reflect real day-to-day coding work.
- 19Competitive programming platforms like LeetCode and Codeforces help developers practice algorithmic thinking.
- 20Full-stack developers work across both frontend and backend, while specialists focus deeply on one layer.
- 21The term full stack does not have one fixed definition and varies significantly between companies.
- 22Continuous learning is considered essential in tech since languages and frameworks keep evolving.
- 23Many senior engineers recommend reading other people's code as much as writing your own to grow faster.
- 24Soft skills like communication and collaboration are often valued just as highly as technical skill.
- 25The Dunning-Kruger effect can cause beginners to overestimate their skill before experience corrects it.
- 26Open-source contribution is a common way for students to build a public portfolio before their first job.
- 27Yak shaving describes getting sidetracked into a chain of unrelated tasks to solve one small problem.
- 28Structured internship programs give students hands-on experience that classroom learning alone cannot provide.
- 29Remote work became mainstream across the tech industry following the global shift during 2020.
- 30Many successful engineers started out by building small side projects rather than only studying theory.
- 31The bus factor describes how many team members could disappear before a project stalls completely.
- 32Interview processes increasingly test system design skills, not just algorithms, for mid to senior roles.
- 33Writing clear documentation is frequently ranked as one of the most undervalued skills among developers.
- 34Consistency in daily practice, even just thirty minutes of coding, compounds significantly over months and years.
Cheat Sheets
Big-O Complexity
Git Commands
JS Array Methods
SQL Joins
Flexbox & Grid
Regex Basics
Diagrams & Sketches
Big-O Growth Curves
Git Feature Branch Flow
HTTP Request / Response Cycle
OSI Model, 7 Layers
Important Things to Keep in Mind
Readable code beats clever code. You will read a line ten times more than you write it.
Always understand the time and space complexity of your solution before calling it done.
Write the test before you trust the fix, a passing test is proof, a feeling is not.
Small, frequent commits with clear messages save you hours during debugging later.
Never trust user input directly. Validate and sanitize on both client and server.
Premature optimization wastes time. Profile first, then optimize the actual bottleneck.
A good name for a variable or function is worth more than a comment explaining a bad one.
Version control everything, including config and infrastructure, not just source code.
Learn to read documentation and stack traces before reaching for a search engine.
Design for failure. Networks drop, APIs time out, and users always find the edge case.
Consistency across a codebase matters more than any single developer's personal preference.
Security and accessibility are not features to add later, they are part of the design from day one.