stackyFACTS
Explore the topic

Technology

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

2,833 factsTechnologyStart exploring ↓
YOUR NEXT DISCOVERY

Technology

Page 76 / 119
STACKY FOR IPHONE

A bigger world.
One discovery
at a time.

Keep discovering with Stacky. Interesting facts in an app that is always within reach.

Download on the App Store
SQL range queries include both the start and end values
Technology

SQL range queries include both the start and end values

Unlike half-open ranges common in programming, SQL’s BETWEEN includes both endpoints, a difference that can trip up date queries.

Discover more
Global variables remain accessible from absolutely anywhere
Technology

Global variables remain accessible from absolutely anywhere

Because any function can change a global variable, its value can shift far from where it was declared, making bugs harder to trace.

Discover more
Unix environments use /dev/null as a data black hole
Technology

Unix environments use /dev/null as a data black hole

Writing data to /dev/null makes it disappear; the special file discards anything sent to it. It's a handy destination when software needs to suppress output,…

Discover more
SQL databases treat NULL as unequal to another NULL
Technology

SQL databases treat NULL as unequal to another NULL

A NULL represents an unknown value, so SQL can't determine whether two NULLs are equal. To test for one, developers use `IS NULL`.

Discover more
Version control systems allow totally empty commits
Technology

Version control systems allow totally empty commits

Git can create an empty commit with a special flag, recording an event in the project history even when no files have changed.

Discover more
JavaScript sorts numbers alphabetically by default
Technology

JavaScript sorts numbers alphabetically by default

Without a comparator function, JavaScript converts values to strings, so [10, 2, 1] sorts as 1, 10, 2 rather than numerically.

Discover more
C's rand function is surprisingly predictable
Technology

C's rand function is surprisingly predictable

The function follows a mathematical sequence, so its output can repeat predictably rather than being truly random.

Discover more
Excel preserves a leap day that never happened
Technology

Excel preserves a leap day that never happened

Earlier spreadsheet software treated 1900 as a leap year, and Excel preserves the error so dates in old files don’t shift.

Discover more
Large floating point numbers lose single digit precision
Technology

Large floating point numbers lose single digit precision

Floating-point numbers have limited precision, so a sufficiently large value can be spaced so far from its neighbors that adding 1 rounds back to the same…

Discover more
Pre-incrementing variables executes faster than post
Technology

Pre-incrementing variables executes faster than post

When the old value isn't needed, `++i` avoids returning it; `i++` returns the pre-increment value, which can require a temporary for some types.

Discover more
Bogobogosort turns sorting into an exercise in wasted effort
Technology

Bogobogosort turns sorting into an exercise in wasted effort

The joke algorithm repeatedly sorts a smaller prefix, checks the next element, and reshuffles when the pieces fail to fit. Even checking progress can send it…

Discover more
Dynamic typing allows passing text strings into math
Technology

Dynamic typing allows passing text strings into math

In a dynamically typed language, a text string may be passed to a subtraction function without being rejected upfront; the error may appear only when the code…

Discover more
Functional programming absolutely forbids mutating values
Technology

Functional programming absolutely forbids mutating values

In pure functional programming, values are immutable: updating a counter means creating a new value rather than changing the old one.

Discover more
Maximum code test coverage still permits fatal logic flaws
Technology

Maximum code test coverage still permits fatal logic flaws

A 100% coverage score means every line ran during testing, not that the program behaved as intended. A test can execute faulty logic without catching the…

Discover more
Why Java treats small integers differently
Technology

Why Java treats small integers differently

Java caches boxed integers from -128 through 127 so those values can be reused instead of newly allocated. This applies to boxed Integer objects, not all…

Discover more
Why a Singleton is basically a global variable
Technology

Why a Singleton is basically a global variable

A Singleton limits a class to one instance, but using that instance as shared state can create the same coupling as a global variable.

Discover more
Boolean variables consume entire bytes instead of single bits
Technology

Boolean variables consume entire bytes instead of single bits

In many systems, a Boolean takes up a byte rather than a single bit because memory is addressed in byte-sized units. Some formats can pack Boolean values more…

Discover more
Boolean short-circuiting skips evaluating half the logic
Technology

Boolean short-circuiting skips evaluating half the logic

In an OR expression, once the first condition is true, the program skips the second. That can save work, but it also means a function call placed there won’t…

Discover more
StackyMore discoveries in the app
Download on the App Store