browse/
9 results
databases/sql-indexes-why-finding-one-row-among-200-000-takes-about-18-steps.md
SQL indexes: why finding one row among 200,000 takes about 18 steps
A database with 200,000 customers can answer "find this email" by reading every row, or by reading about 18 entries. The difference is an…
ai/embeddings-how-a-computer-knows-a-pony-is-closer-to-a-horse-than-a-tru.md
Embeddings: how a computer knows a pony is closer to a horse than a truck
A computer sees the letters in "pony" and nothing else, yet search boxes can still tell that a pony is closer to a horse than to a truck…
computer-science/breadth-first-search-how-a-maze-solver-finds-the-shortest-way-out.md
Breadth-first search: how a maze solver finds the shortest way out
How does a maze solver, or a map app, find the shortest route and not just any route? The answer is breadth-first search: explore every…
computer-science/binary-search-how-to-find-one-number-in-a-million-with-20-guesses.md
Binary search: how to find one number in a million with 20 guesses
Guessing a number between 1 and 1,000,000 sounds like it could take a million tries. With binary search it takes at most 20. Step through a…
tools/path-why-a-terminal-says-command-not-found-for-a-program-you-installed.md
PATH: why a terminal says command not found for a program you installed
You installed a tool, but the terminal says `command not found`, or it runs an older version. The cause is almost always `PATH`: a short…
security/sql-injection-how-a-stray-quote-mark-turns-data-into-instructions.md
SQL injection: how a stray quote mark turns data into instructions
A search box looks harmless, but if a program builds its database question by gluing text together, a stray quote mark can turn a visitor's…
computer-science/hash-tables-how-python-finds-a-key-without-searching-for-it.md
Hash tables: how Python finds a key without searching for it
You type `ages["cat"]` and Python answers instantly, even with a million entries. It does not search. It calculates where "cat" must be…
databases/what-is-a-database-index-find-one-row-without-reading-them-all.md
What is a database index? Find one row without reading them all
Ask a database for one person among a million rows and it could read every row until it finds them. That is slow. An index is the…
computer-science/linear-vs-binary-search-why-30-guesses-can-beat-a-billion.md
Linear vs binary search: why 30 guesses can beat a billion
Need to find one item in a list? You can check every item in turn (linear search), or, if the list is sorted, look at the middle and throw…