News for hackers. Stuff that matters.
Re:What is a magic number, and why is it bad? by greenyoda on Wednesday August 28, 2013 @12:50PM (#6291149)
Unix even has "man 5 magic", which describes the format of the magic numbers file that the "file" command uses to determine the type of a file (executable, object code, shell script, etc.) from its first few characters.

My personal favorite magic numbers are the values that debuggers use to fill uninitialized memory, like 0xDEADBEEF, 0xBAADF00D, etc.

Wikipedia has a good article on magic numbers:

https://en.wikipedia.org/wiki/Magic_number_(programming)

There are no comments on this comment yet.