Technology
Discover facts about technology. Small discoveries that change the way you see familiar things.
Technology

One bad number can contaminate a whole calculation
NaN means Not a Number and appears in operations such as zero divided by zero. Many later calculations involving it also return NaN instead of a useful…
Discover more![Why [] + [] becomes an empty string](https://cdn.stackyfacts.com/images/d1aa02bf-a013-4e2f-8dcf-21df6e97df10_back.jpg)
Why [] + [] becomes an empty string
JavaScript converts each empty array to an empty string, then concatenates the results—so `[] + []` evaluates to `""`.
Discover more
Why computers need a negative zero
The IEEE 754 standard preserves a sign for zero so binary calculations can retain directional information around it.
Discover more
Why JSON has no comments
JSON's creator left comments out because developers were using them to tuck hidden commands into data payloads.
Discover more
JavaScript still calls null an object
In JavaScript, checking null's type returns "object" because of an early implementation choice. Changing it now could break existing code that relies on the…
Discover more
Mutex locks force multi-threaded code into single lanes
A mutex lets only one thread at a time access a protected variable, preventing conflicting updates. Other threads must wait, so that section of code runs…
Discover moreA bigger world.
One discovery
at a time.
Keep discovering with Stacky. Interesting facts in an app that is always within reach.

Garbage collection pauses all execution to clean variables
Some garbage collectors briefly pause an application while reclaiming memory, then clear away objects the program no longer uses.
Discover more
Zalgo text exploits Unicode combining character limits
Stacking dozens of Unicode combining marks on one letter can make it spill far above and below its line, even though the text remains valid.
Discover more
A bad regular expression can freeze an entire app
A poorly designed regular expression can repeatedly test possible matches, consuming enough processing time to freeze an app.
Discover more
Python forcefully limits recursion depth to one thousand
Python’s default recursion limit is 1,000 calls; exceed it and the interpreter raises a RecursionError rather than letting calls pile up indefinitely.
Discover more
Two identical A's can mean different things to a computer
A Latin A and a visually identical Cyrillic А are different characters with different numerical values, so software can treat them as different text.
Discover more
Basic ASCII formatting supports exactly 128 characters
Its 7-bit code has 128 character slots, too few to cover accented letters and the full range of characters in other languages.
Discover more
Someone made a PDF that plays Doom
The DoomPDF project runs the 1993 game using JavaScript supported by Chromium's PDF viewer. Document form fields become the display and controls, stretching…
Discover more
A font file can run computer code
TrueType fonts contain a bytecode instruction set that controls how letters are rendered on screen, so font files can execute small programs.
Discover more
PowerPoint has been made to execute a computer program
Tom Wildenhain demonstrated a Turing machine built inside PowerPoint, and the later PPSuite project explored running compiled code in slides. Carefully…
Discover more
The algorithm that sorts numbers by letting them sleep
Each number gets a thread that waits that many seconds before printing; smaller numbers wake first, so the list comes out sorted.
Discover more
C++ include is basically copy and paste
In C++, an #include statement inserts the contents of a text file into your code before the compiler processes it.
Discover more
The programming language you can barely see
Whitespace uses spaces, tabs, and line breaks as its commands; letters and numbers are ignored. That means a program can hide in plain sight among ordinary…
Discover more
Windows line endings cause Unix terminal scripts to crash
Windows uses a carriage return plus a line feed to mark each new line, while Unix uses only a line feed. The extra invisible character can make a transferred…
Discover more
Windows keeps some filenames reserved for old devices
Names such as CON, PRN, and NUL came from DOS device handling: the console, printer, and a destination that discards output. Windows preserves these special…
Discover more
Multi-threaded deadlocks freeze applications indefinitely
If each thread holds a resource the other needs, neither can proceed, and the application can freeze indefinitely.
Discover more![C arrays allow reversed bracket notation like 5[a]](https://cdn.stackyfacts.com/images/8d1cb281-004c-4034-beec-f92b007ea3e7_back.jpg)
C arrays allow reversed bracket notation like 5[a]
C defines a[5] as *(a + 5), and addition is commutative, so 5[a] points to the same element.
Discover more
GOTO statements actively generate untrackable spaghetti code
A GOTO jumps execution to another line of code, bypassing the program’s usual structure and making the logic harder to follow.
Discover more
The invisible spaces that can break your code
Some copied text contains invisible formatting characters that a compiler reads differently, so code can look correct and still fail its syntax check.
Discover more