Magic Number (programming)

Magic Number (programming)

In computer programming, the term magic number has multiple meanings. It could refer to one or more of the following:

  • A constant numerical or text value used to identify a file format or protocol; for files, see List of file signatures
  • Distinctive unique values that are unlikely to be mistaken for other meanings (e.g., Globally Unique Identifiers)
  • Unique values with unexplained meaning or multiple occurrences which could (preferably) be replaced with named constants

Read more about Magic Number (programming):  Unnamed Numerical Constants, Magic GUIDs, Magic Debug Values

Famous quotes containing the words magic and/or number:

    The work of adult life is not easy. As in childhood, each step presents not only new tasks of development but requires a letting go of the techniques that worked before. With each passage some magic must be given up, some cherished illusion of safety and comfortably familiar sense of self must be cast off, to allow for the greater expansion of our distinctiveness.
    Gail Sheehy (20th century)

    The growing good of the world is partly dependent on unhistoric acts; and that things are not so ill with you and me as they might have been, is half owing to the number who lived faithfully a hidden life, and rest in unvisited tombs.
    George Eliot [Mary Ann (or Marian)