browse/
18 results
computer-science/merge-sort-how-splitting-a-list-in-half-again-and-again-sorts-it-with.md
Merge sort: how splitting a list in half again and again sorts it with far less work
How do you sort 10,000 numbers without making millions of comparisons? Merge sort never sorts a big pile. It splits the list until every…
computers/fetch-decode-execute-the-three-beat-loop-every-cpu-repeats-billions-of.md
Fetch, decode, execute: the three-beat loop every CPU repeats billions of times a second
A processor looks clever, but at its core it repeats one small loop billions of times a second: fetch an instruction, decode what it asks…
web/flexbox-how-a-row-of-boxes-decides-who-gets-the-leftover-space.md
Flexbox: how a row of boxes decides who gets the leftover space
Put three boxes in a row and the browser decides, by a short fixed recipe, who gets the extra room and who gives some up. Learn the three…
networks/diffie-hellman-how-two-strangers-agree-on-a-secret-while-everyone-list.md
Diffie-Hellman: how two strangers agree on a secret while everyone listens
How can a browser and a website that have never met agree on a secret key while everyone on the Wi-Fi is listening? The trick is…
computers/floating-point-why-0-1-0-2-is-not-exactly-0-3.md
Floating point: why 0.1 + 0.2 is not exactly 0.3
Type `0.1 + 0.2` into JavaScript or Python and you get `0.30000000000000004`. It is not a bug, and it is not your mistake. Computers store…
languages/rust-ownership-why-let-b-a-makes-a-unusable.md
Rust ownership: why let b = a makes a unusable
Why does Rust refuse to compile `let b = a;` followed by a use of `a`? Because of ownership: every value has exactly one owner, and…
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…
networks/tcp-how-a-network-that-drops-data-still-delivers-every-byte-in-order.md
TCP: how a network that drops data still delivers every byte in order
The internet underneath your apps drops data and makes no promise to deliver it. TCP adds the promise anyway: it numbers every piece, the…
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…
languages/python-default-arguments-why-a-function-remembers-the-last-call.md
Python default arguments: why a function remembers the last call
Call a small Python function twice and the second call remembers the first. The cause is a default value like `basket=[]`, which Python…
ai/temperature-why-a-chatbot-answers-differently-each-time.md
Temperature: why a chatbot answers differently each time
Ask a chatbot the same question twice and the answers can differ. That is not a bug: the model chooses each next word using chance, and a…
networks/latency-vs-bandwidth-why-a-faster-plan-can-t-speed-up-a-small-page.md
Latency vs bandwidth: why a faster plan can't speed up a small page
You upgraded to a much faster internet plan, yet a small web page loads just as slowly. Why? Network speed is two different numbers…