MAGIC

An early system on the Midac computer.

[Listed in CACM 2(5):16 (May 1959)].

[Jargon File]

Last updated: 1995-01-25

magic

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 publicised that allows something otherwise impossible or a feature formerly in that category but now unveiled.

Compare wizardly, deep magic, heavy wizardry.

For more about hackish "magic" see Magic Switch Story.

4. magic number.

[Jargon File]

Last updated: 2001-03-19

magic bullet

<jargon>

(Or "silver bullet" from vampire legends) A term widely used in software engineering for a supposed quick, simple cure for some problem. E.g. "There's no silver bullet for this problem".

Last updated: 1999-01-13

magic cookie

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 operating systems with a non-byte-stream model of files, the result of "ftell" may be a magic cookie rather than a byte offset; it can be passed to "fseek", 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. 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.

[Jargon File]

Last updated: 1995-01-25

magic number

<jargon, programming>

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 (hard-coded), 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 pseudorandom numbers. This sense actually predates, and was ancestral to, the more common sense 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". Nowadays only a wizard knows the spells to create magic numbers. MS DOS executables begin with the magic string "MZ".

*The* magic number, on the other hand, is 7+/-2. The paper cited below 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.

["The magical number seven, plus or minus two: some limits on our capacity for processing information", George Miller, in the "Psychological Review" 63:81-97, 1956].

[Jargon File]

Last updated: 2003-07-02

Magic Paper

An early interactive symbolic mathematics system.

[Sammet 1969, p. 510].

Last updated: 1995-01-25

magic smoke

<electronics, humour>

A substance trapped inside integrated circuit 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 Electing a Pope, smoke test.

Usenetter Jay Maynard tells the following story:

"Once, while hacking on a dedicated Zilog 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 backward. I only discovered that *after* I realised 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.

[Jargon File]

Last updated: 1995-01-25

Magic Switch Story

Some years ago, I was snooping around in the cabinets that housed the MIT AI Lab's PDP-10, and noticed a little switch glued to the frame of one cabinet. It was obviously a homebrew job, added by one of the lab's hardware hackers (no-one knows who).

You don't touch an unknown switch on a computer without knowing what it does, because you might crash the computer. The switch was labelled in a most unhelpful way. It had two positions, and scrawled in pencil on the metal switch body were the words "magic" and "more magic". The switch was in the "more magic" position.

I called another hacker over to look at it. He had never seen the switch before either. Closer examination revealed that the switch had only one wire running to it! The other end of the wire did disappear into the maze of wires inside the computer, but it's a basic fact of electricity that a switch can't do anything unless there are two wires connected to it. This switch had a wire connected on one side and no wire on its other side.

It was clear that this switch was someone's idea of a silly joke. Convinced by our reasoning that the switch was inoperative, we flipped it. The computer instantly crashed.

Imagine our utter astonishment. We wrote it off as coincidence, but nevertheless restored the switch to the "more magic" position before reviving the computer.

A year later, I told this story to yet another hacker, David Moon as I recall. He clearly doubted my sanity, or suspected me of a supernatural belief in the power of this switch, or perhaps thought I was fooling him with a bogus saga. To prove it to him, I showed him the very switch, still glued to the cabinet frame with only one wire connected to it, still in the "more magic" position. We scrutinized the switch and its lone connection, and found that the other end of the wire, though connected to the computer wiring, was connected to a ground pin. That clearly made the switch doubly useless: not only was it electrically nonoperative, but it was connected to a place that couldn't affect anything anyway. So we flipped the switch.

The computer promptly crashed.

This time we ran for Richard Greenblatt, a long-time MIT hacker, who was close at hand. He had never noticed the switch before, either. He inspected it, concluded it was useless, got some diagonal cutters and diked it out. We then revived the computer and it has run fine ever since.

We still don't know how the switch crashed the machine. There is a theory that some circuit near the ground pin was marginal, and flipping the switch changed the electrical capacitance enough to upset the circuit as millionth-of-a-second pulses went through it. But we'll never know for sure; all we can really say is that the switch was magic.

I still have that switch in my basement. Maybe I'm silly, but I usually keep it set on "more magic".

GLS

Last updated: 1995-02-22

Nearby terms:

MADCAPMADTRANmaggotboxMAGICmagicmagic bulletmagic cookie

Try this search on Wikipedia, Wiktionary, Google, OneLook.



Loading