Magic Numbers
There are a bunch of magic numbers and strings out there that are very revealing for the practiced eye. In fact, if I see most of them in the wild, the meaning in the table below is the first thing that crosses my mind.
They seem harmless at first, but save a lot of time debugging or just establishing the context sometime.
| String | Meaning | References |
|---|---|---|
| 4d5a, MZ, ZM | magic number for windows executables “exe” files | osdev.org |
| PK | magic number of zip files | wikipedia |
| 107,108 | max length of unix socket paths | SO |
| 124 | exit code for linux executables that timed out | man timeout(1) |
| 80 | default http/web server port | wikipedia |
| 200 | success http response code | |
| 404 | “resource not found” http response code | |
| 44.1k, 44100 | common sampling frequency, double of the highest human audible frequency (20kHz) based on the Nyquist-Shanon-Theorem | wikipedia |
| ieee754 | floating point arithmetic standard | ieee |
| 0xa,10, \r | line feed ascii value, linux newline | wikipedia |
| 0x55aa | signature of a bios boot loader | seabios |
| 0x7c00 | start address of a x86 bootloader | wikipedia |
| 0777 | linux file permission allowing everyone everything | man chmod(1) |
| 42 | Answer to the Ultimate Question of Life, the Universe, and Everything, from “Hithhiker’s Guide to the Galaxy” from Douglas Adams | wikipedia, Goodreads |
| 255 | max. unsigned integer number with one byte, 2^8-1 |
|
| last octett of a typical broadcast ip address | wikipedia | |
| 8848 | height of the mt. everest in meters (not IT related) | wikipedia |
| 314 | first digits of π | wikipedia |
| 50 | 50Hz frequency of german electricity network | wikipedia |
| lower limit of human hearing, eq high pass with this cutoff removes some “rumble” | ||
| maximal uncertainty like a coin-flip where chances are 50⁄50 | ||
| 1920x1080 | FullHD screen resolution | wikipedia |
| EOF | end of file | wikipedia |
| 1500,1450 | typical MTUs | wikipedia |
| 127.0.0.1 | localhost, loopback | RFC 5735 |
| 0.0.0.0 | “the internet”, default route which allows all IPs on bit matching | RFC 5735 |
| 192.168.178.1 | default private ip of a “fritze” | |
| 169.254.x.x | APIPA address for direct host communication without DHCP (good old childhood with AOE) | microsoft |
| 1337 | Leet or elite, originated from the hacker culture in the 80s, now used on license plates to identify IT fellows | wiki |
| 555 | timer IC, one of the most famous IC’s | wiki |