A magic number and a magic cookie are closely related. The "magic" part is a sequence of bytes that is otherwise meaningless but has some signifigance to a particular program or programs. I use a magic cookie to separate these definitions in the raw data file I keep them in. It's just a string of letters and numbers that I'd never type, so it can separate entries.
Magic numbers are also used in the the first few bytes of executables to help loaders determine what needs to be done, and often in data files to help apps figure out how to handle them.
A magic cookie is similar, but it's something passed between programs, perhaps for authentication or session tracking purposes. It's exactly the same purpose as a web cookie that helps the site know your preferences when you return for another visit.
When something is done automagically, it means that you either don't know the mechanics behind it or it's too obviously trivial to bother describing. It can also be used in a sarcastic sense to describe something that can't actually happen, or is bloody unlikely. You can also use it when you desparately need to fill in some gap in the chain of hoped for events you are building, but at the moment have no idea how to do that. In this sense it's almost interchangeable with "and then a miracle happens".
Related to that thought is "pfm", which is the polite abbreviation of "pure effing magic", which can be an expression of how some unlikely task will be accomplished or could be an honest expression of admiration. It's also sometimes used as a replacement for "that part is none of your business".
Got something to add? Send me email.
More Articles by Tony Lawrence © 2009-11-07 Tony Lawrence
C++ is just an abomination. Everything is wrong with it in every way. So I really tried to avoid using that as much as I could and do everything in C at Netscape. (Jamie Zawinski)