browse/
156 results
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…
networks/cidr-and-subnets-what-the-24-in-192-168-1-0-24-means.md
CIDR and subnets: what the /24 in 192.168.1.0/24 means
What does the `/24` in `192.168.1.0/24` mean? It counts how many of an IPv4 address's 32 bits name the network, and how many are left to…
databases/sql-null-why-two-people-vanish-from-both-your-queries.md
SQL NULL: why two people vanish from both your queries
Two people have no age in your table. You ask for everyone older than 30, then for everyone not older than 30, and the two lists add up to…
computers/bits-and-bytes-why-a-byte-can-t-count-past-255.md
Bits and bytes: why a byte can't count past 255
A byte is eight on/off switches, and that tiny size explains a lot of odd bugs. In this article you flip the bits of one byte yourself and…
web/event-bubbling-why-clicking-a-button-also-clicks-its-parent.md
Event bubbling: why clicking a button also clicks its parent
You click a button inside a div, and both click handlers run. Why does the parent hear about something that happened to its child? Every…
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…
mobile/app-lifecycle-why-your-phone-forgets-what-you-typed-when-you-switch-ap.md
App lifecycle: why your phone forgets what you typed when you switch apps
You switch apps for a minute, and when you come back the message you were typing is gone. Nothing was broken: the phone needed memory…
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…
security/caesar-cipher-why-25-guesses-break-it-and-what-real-encryption-does-in.md
Caesar cipher: why 25 guesses break it, and what real encryption does instead
The Caesar cipher swaps each letter for one a fixed distance along the alphabet. Slide the key yourself, then play the attacker and break…
software-design/dependency-injection-why-a-test-passes-at-9am-and-fails-at-3pm.md
Dependency injection: why a test passes at 9am and fails at 3pm
A test that passes in the morning and fails in the afternoon, with no change to the code, is a puzzle many beginners meet. The cause is…
infrastructure/cron-schedules-five-fields-that-tell-a-computer-when-to-run-a-job.md
Cron schedules: five fields that tell a computer when to run a job
Want a computer to run a job at 3 a.m. while you sleep? On Linux and macOS, a program called cron does it, and each job is described by…