magic number n.
[Unix/C; common] 1. In source code,
some non-obvious constant whose value is significant to the
operation of a program and that is inserted inconspicuously in-line
(hardcoded), rather than expanded in by a symbol set by a
commented #define. Magic numbers in this sense are bad
style. 2. A number that encodes critical information used in an
algorithm in some opaque way. The classic examples of these are
the numbers used in hash or CRC functions, or the coefficients in a
linear congruential generator for pseudo-random numbers. This
sense actually predates and was ancestral to the more commonsense
1. 3. Special data located at the beginning of a binary data file
to indicate its type to a utility. Under Unix, the system and
various applications programs (especially the linker) distinguish
between types of executable file by looking for a magic number.
Once upon a time, these magic numbers were PDP-11 branch
instructions that skipped over header data to the start of
executable code; 0407, for example, was octal for `branch 16 bytes
relative'. Many other kinds of files now have magic numbers
somewhere; some magic numbers are, in fact, strings, like the
!<arch> at the beginning of a Unix archive file or the
%! leading PostScript files. Nowadays only a wizard
knows the spells to create magic numbers. How do you choose a
fresh magic number of your own? Simple -- you pick one at random.
See? It's magic!
The magic number, on the other hand, is 7+/-2. See
"The magical number seven, plus or minus two: some limits on
our capacity for processing information" by George Miller, in the
"Psychological Review" 63:81-97 (1956). This classic paper
established the number of distinct items (such as numeric digits)
that humans can hold in short-term memory. Among other things,
this strongly influenced the interface design of the phone system.
[Unix/C; common] 1. In source code,
some non-obvious constant whose value is significant to the
operation of a program and that is inserted inconspicuously in-line
(hardcoded), rather than expanded in by a symbol set by a
commented #define. Magic numbers in this sense are bad
style. 2. A number that encodes critical information used in an
algorithm in some opaque way. The classic examples of these are
the numbers used in hash or CRC functions, or the coefficients in a
linear congruential generator for pseudo-random numbers. This
sense actually predates and was ancestral to the more commonsense
1. 3. Special data located at the beginning of a binary data file
to indicate its type to a utility. Under Unix, the system and
various applications programs (especially the linker) distinguish
between types of executable file by looking for a magic number.
Once upon a time, these magic numbers were PDP-11 branch
instructions that skipped over header data to the start of
executable code; 0407, for example, was octal for `branch 16 bytes
relative'. Many other kinds of files now have magic numbers
somewhere; some magic numbers are, in fact, strings, like the
!<arch> at the beginning of a Unix archive file or the
%! leading PostScript files. Nowadays only a wizard
knows the spells to create magic numbers. How do you choose a
fresh magic number of your own? Simple -- you pick one at random.
See? It's magic!
The magic number, on the other hand, is 7+/-2. See
"The magical number seven, plus or minus two: some limits on
our capacity for processing information" by George Miller, in the
"Psychological Review" 63:81-97 (1956). This classic paper
established the number of distinct items (such as numeric digits)
that humans can hold in short-term memory. Among other things,
this strongly influenced the interface design of the phone system.
Related:
- magic cookie n.
[Unix; common] 1. Something passed
between routines or programs that enables the receiver to perform
some operation;
a capability ticket or opaque identifier. Especially... - magic cookie: [UNIX] n. 1. Something passed between routines or
programs that enables the receiver to perform some operation;
a capability ticket or opaque identifier. Especially... - HAKMEM /hak'mem/ n.
MIT AI Memo 239 (February 1972).
A legendary collection of neat mathematical and... - file signature n.
A magic number,
sense 3... - hardcoded adj.
1. [common] Said of data inserted
directly into a program,
where it cannot be easily modified, as opposed to... - file signature: n. A {magic number}, sense 3.
--
The AI Hackers... - hardcoded: adj. 1. Said of data inserted directly into a program,
where it cannot be easily modified, as opposed to data... - restriction n.
A bug or design error that limits a
program's capabilities,
and which is sufficiently egregious that nobody... - crunch 1. vi.
To process, usually in a time-consuming or
complicated way.
Connotes an essentially trivial operation that is ...
From the same category:
- Gosperism /gos'p*r-izm/ n.
A hack, invention, or
saying due to elder days arch-hacker R.
William (Bill) Gosper. This notion merits its own... - sock puppet n.
[Usenet: from the act of placing a sock
over your hand and talking to it and pretending it's talking back]
In Usenet parlance,
a pseudo through which the puppeteer posts ... - hand-hacking n.
1. [rare] The practice of translating
hot spots from an HLL into hand-tuned assembler,
as opposed to trying to coerce the compiler into... - control-O vi.
"Stop talking." From the character used on
some operating systems to abort output but allow the program to
keep on running.
Generally means that you are not interested in ... - hotlink /hot'link/ n.
A hot spot on a World Wide Web
page;
an area, which, when clicked or selected, chases a...
