:macrology: /mak-rol'*-jee/ /n./ 1. Set of usually complex or crufty macros, e.g., as part of a large system written in {LISP}, {TECO}, or (less commonly) assembler. 2. The art and science involved in comprehending a macrology in sense 1. Sometimes studying the macrology of a system is not unlike archeology, ecology, or {theology}, hence the sound-alike construction. See also {boxology}.
:macrotape: /mak'roh-tayp/ /n./ An industry-standard reel of
tape, as opposed to a {microtape}. See also {round tape}.
:maggotbox: /mag'*t-boks/ /n./ See {Macintrash}. This is
even more derogatory.
:magic: /adj./ 1. As yet unexplained, or too complicated to explain; compare {automagically} and (Arthur C.) Clarke's Third Law: "Any sufficiently advanced technology is indistinguishable from magic." "TTY echoing is controlled by a large number of magic bits." "This routine magically computes the parity of an 8-bit byte in three instructions." 2. Characteristic of something that works although no one really understands why (this is especially called {black magic}). 3. [Stanford] A feature not generally publicized that allows something otherwise impossible, or a feature formerly in that category but now unveiled. Compare {black magic}, {wizardly}, {deep magic}, {heavy wizardry}.
For more about hackish `magic', see {A Story About `Magic'} in Appendix A.
:magic cookie: /n./ [Unix] 1. Something passed between routines or programs that enables the receiver to perform some operation; a capability ticket or opaque identifier. Especially used of small data objects that contain data encoded in a strange or intrinsically machine-dependent way. E.g., on non-Unix OSes with a non-byte-stream model of files, the result of `ftell(3)' may be a magic cookie rather than a byte offset; it can be passed to `fseek(3)', but not operated on in any meaningful way. The phrase `it hands you a magic cookie' means it returns a result whose contents are not defined but which can be passed back to the same or some other program later. 2. An in-band code for changing graphic rendition (e.g., inverse video or underlining) or performing other control functions (see also {cookie}). Some older terminals would leave a blank on the screen corresponding to mode-change magic cookies; this was also called a {glitch} (or occasionally a `turd'; compare {mouse droppings}). See also {cookie}.
:magic number: /n./ [Unix/C] 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.
:magic smoke: /n./ A substance trapped inside IC packages that enables them to function (also called `blue smoke'; this is similar to the archaic `phlogiston' hypothesis about combustion). Its existence is demonstrated by what happens when a chip burns up — the magic smoke gets let out, so it doesn't work any more. See {smoke test}, {let the smoke out}.
Usenetter Jay Maynard tells the following story: "Once, while hacking on a dedicated Z80 system, I was testing code by blowing EPROMs and plugging them in the system, then seeing what happened. One time, I plugged one in backwards. I only discovered that *after* I realized that Intel didn't put power-on lights under the quartz windows on the tops of their EPROMs — the die was glowing white-hot. Amazingly, the EPROM worked fine after I erased it, filled it full of zeros, then erased it again. For all I know, it's still in service. Of course, this is because the magic smoke didn't get let out." Compare the original phrasing of {Murphy's Law}.