Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Magic number (programming)


Related Topics

  
  Magic number (programming)   (Site not responding. Last check: 2007-10-20)
In computer programming, a magic number is a special constant used for some specific purpose.
Magic numbers become particularly confusing when the same number is used for different purposes in one section of code.
Magic debug values are specific values written to memory during allocation or deallocation, so that it will later be possible to tell whether or not they have become corrupted and to make it obvious when values taken from uninitialized memory are being used.
www.guideofpills.com /Magic_number_%28programming%29.html   (1636 words)

  
  Magic number (programming) - Wikipedia, the free encyclopedia
Magic numbers become particularly confusing when the same number is used for different purposes in one section of code.
The declarations of "magic number" variables are placed together, usually at the top of a function or file, facilitating their review and change.
Magic debug values are specific values written to memory during allocation or deallocation, so that it will later be possible to tell whether or not they have become corrupted and to make it obvious when values taken from uninitialized memory are being used.
en.wikipedia.org /wiki/Magic_number_(programming)   (1446 words)

  
 Magic number - Wikipedia, the free encyclopedia
Magic number (sports), a number used to indicate how close a front-running team is to clinching a season title.
A Magic number, or file signature, may be stored inside a file in order to help programs identify it.
Magic number (physics), a number of nucleons such that they are arranged into complete shells within the atomic nucleus.
en.wikipedia.org /wiki/Magic_number   (209 words)

  
 Debugging - Wikipedia Light!   (Site not responding. Last check: 2007-10-20)
In lower-level programming languages such as C or assembly, bugs may cause silent problems such as memory corruption, and it is often difficult to see where the initial problem happened; in those cases, sophisticated debugging tools may be needed.
Even when the program appears to work, if you examine it with the thought that there is at least one bug remaining and you are going to find it, then you are more likely to find something wrong with the program (assuming a bug still exists).
Programs that write information to log files can provide significant information that can be used to analyze what was going on before, during, and after problems are encountered.
www.bostoncoop.net /~tpryor/wiki/index.php?title=Debugging   (2371 words)

  
 Consumating: A New Way To Find People Who Don't Suck
Programming is a balance of art and science.
for some, programming is an art; for others, it is a copy and paste festival.
Programming should be artful and scientific, meaning the means to which you achieve the end result should be scientific, and the result should be elegant and artful.
www.consumating.com /profiles/Stereotest/topics?id=55471&responseoffset=0   (913 words)

  
 : Magic Numbers, review at WorldSSP.net   (Site not responding. Last check: 2007-10-20)
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.
Numbers of atomic nucleons which are unusually commonly found in nature.
Magic numbers are often chosen based on (among others): ASCII code (most common) Representation in hexadecimal (e.g.
www.worldssp.net /webinfo_l.asp?proid=13794   (526 words)

  
 magic number
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.
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'.
www.antionline.com /jargon/magicnumber.php   (331 words)

  
 Debugging   (Site not responding. Last check: 2007-10-20)
Debugging is a methodical process of finding and reducing the number of computer bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected.
Debuggers are software tools which enable the programmer to monitor the execution (computers) of a program, stop it, re-start it, run it in slow motion, change values in memory and even, in some cases, go back in time.
In lower-level programming languages such as C programming language or assembly language, bugs may cause silent problems such as memory corruption, and it is often difficult to see where the initial problem happened; in those cases, sophisticated debugging tools may be needed.
www.solutionsquare.com /Debugging-538.html   (2059 words)

  
 Magic numbers(NOT the begginer programming project) - GameDev.Net Discussion Forums
I recently read on another forum about something called magic numbers, in which if the program/game is using a certain amount of memory and there is a cetain amount of memory available on the computer, then the program/game will run twice as fast.
The number 100 is a 'magic number' and should be avoided.
a magic number was basically if the amount of memory your program is using and the amount of memory on the computer, when added(or multiplied.
www.gamedev.net /community/forums/topic.asp?topic_id=298874&whichpage=1&   (777 words)

  
 magic number - Ask.com Search
The Magical Number Seven, Plus or Minus Two: Some Limits on Our Capacity for Processing Information is a 1956 paper by the cognitive psychologist George A. Miller.
In it Miller showed a number of remarkable coincidences between the channel capacity of a number of human cognitive...
Three is a magic number, Yes it is, it's a magic number.
iwon.ask.com /web?q=magic+number&o=10361   (319 words)

  
 SHS Computer Contest 99   (Site not responding. Last check: 2007-10-20)
As this shows, positive numbers are easy to represent, and in decimal numbers, so are negative values, a n decimal numbers, so are negative values, a - sign is placed in front of the number to illustrate that it’s value is negative.
Write a program that asks the user how many characters wide the string must be, what the string is originally and what character is to be used to pad with.
A “magic” number is one that the sum of the cube of the digits equals the number itself.
webserver.sandusky.k12.mi.us /cs99.htm   (1619 words)

  
 Computer file - eBooks Encyclopedia   (Site not responding. Last check: 2007-10-20)
Many application software programs use the presence of a header in the file formats with which they work to determine the actual type of a given file.
For example, an executable program on DOS may have an extension of.
In many cases, standardised file extensions are useful because they make it easier for users of different computer systems and operating systems to share files, since the format of a file's content is more clear.
ebooks.teleactivities.com /encyclopedia/index.php?title=Computer_file   (775 words)

  
 SHS Computer Contest 2002   (Site not responding. Last check: 2007-10-20)
If so, your program should state that this is a magic square and say what the magic constant is. If not, your program should state that this is not a magic square.
The program should continue to ask for the width and display the results until zero is entered for the width.
The program should continue to ask for numbers until the ENTER key alone is pressed without typing a number.
webserver.sandusky.k12.mi.us /cs02.htm   (959 words)

  
 DM's Esoteric Programming Languages - LenPEG
LenPEG is not actually a programming language; it is an image compression algorithm, far superior in all respects to any existing or yet to be invented image compression algorithm.
LenPEG files are identified by a "magic number" bit sequence at the beginning of the file, as is standard for image files compressed by various algorithms.
Drop the initial 1 from the file and determine the magic number indicating the other compression algorithm used.
www.dangermouse.net /esoteric/lenpeg.html   (869 words)

  
 Tim's directory of programs   (Site not responding. Last check: 2007-10-20)
In summary, input for the program net is a circuit description in a format which is a subset of LISP (see net.doc).
This curious little program is an artificial life (A-Life) simulation which investigates the properties of so-called ``nervous nets'' (see the README file in the source for details) in a simple, controlled environment.
The original dclock program used very simple calculations to make the digital segments; due to a well-known psychological effect, the numbers seem to lean the wrong way (because almost all LED segments are slightly slanted, and these weren't, although I have seen exceptions).
bach.ece.jhu.edu /~tim/programs   (3507 words)

  
 Magic -   (Site not responding. Last check: 2007-10-20)
Magic (paranormal), alleged influence through supernatural, mystical, or paranormal means
Magic (trade show), the largest and most comprehensive marketplace for the men's apparel and accessories industry
Magic square, a block of numbers with identical row, column, and diagonal sums
psychcentral.com /psypsych/Magic   (284 words)

  
 Cotse - Connected: An Internet Encyclopedia - 6.4. Magic-Number
It is recommended that the Magic- Number be chosen in the most random manner possible in order to guarantee with very high probability that an implementation will arrive at a unique number.
Suggested sources of uniqueness include machine serial numbers, other network hardware addresses, time-of-day clocks, etc. Particularly good random number seeds are precise measurements of the inter-arrival time of physical events such as packet reception on other connected networks, server response time, or the typing rate of a human user.
Reception of a Magic- Number other than the negotiated local Magic-Number, the peer's negotiated Magic-Number, or zero if the peer didn't negotiate one, indicates a link which has been (mis)configured for communications with a different peer.
www.cotse.com /CIE/RFC/1661/34.htm   (1094 words)

  
 [No title]
Once the program works, very few managers or programmers are all that keen on spending several weeks producing quality documentation; there's always other ways to spend this time that look more attractive--such as doing firefighting on the project that's behind.
The advantage of literate programming over small, well documented procedures is simply psychological: splitting into sections a more complicated thing is easy and done on the fly, splitting a procedure into distinct procedures is a pain in the neck, needs additional consideration, reediting and restructuring.
Chances are, when you get both a literate programming program developed in haste and with only a small amount of documentation beside the code, and a procedural approach, that an outsider will with the literate programming understand much more after a reasonable investment of time, than with the normal program.
www.literateprogramming.com /best/lpvsroutine.html   (3773 words)

  
 Live from LA: Tales of the magic number
For instance, many VB developers, like myself, often called upon the magic in the numbers 13 and 10, as these were part of the recipe handed down by the ASCII gods for the new-line and carriage return combination.
The number 37, for instance, might be particularly powerful if you were working with a document that held 37 lines of text per page.
Indeed, part of the magic of these numbers was that you never really could tell what their powers were until you used them.
builder.com.com /5100-6375-1049648.html   (752 words)

  
 Eject! Eject! Eject!: MAGIC
It’s only later, when the magic is over and you’re walking to your car, only when the narrative flow has released you to swim to the shore of reason, that some people begin to ask some questions.
But when magical ideologies are put forward as political positions of equal weight and value, as a chart to sail the ship of state, when assertion carries the same weight as proof, we will surely lose our way.
Magical thinking is the long established term for a psychological phenomenon wherein a person is convinced that his merely thinking of something will make it happen in actuality, and is the sort of thinking common with children, in dream states, and in certain psychoses.
www.ejectejecteject.com /archives/000051.html   (18597 words)

  
 Zeno Programming
Zeno is a programming language named after the philosopher Zeno of Elea.
The program assumes that the executable and on-line help files are in a subdirectory of the directory you chose for Zeno.
A dialog box will popup whenever the program is started as unregistered shareware; it will show the time remaining in the free trial period.
home.att.net /~srschmitt/zeno.html   (368 words)

  
 The Daily WTF - Magic Number Superstition
John was maintaining a client management system written a few years before his time and noticed that the original coder had a strange belief about magic numbers.
He believe that any number less than three was not "magic" and, therefore, perfectly acceptable to hard code.
He was probably on a project that used Checkstyle to look for magic numbers and used parseInt() as a stupid end-run around the Checkstyle rules.
thedailywtf.com /forums/47457/ShowPost.aspx   (1418 words)

  
 P1A1   (Site not responding. Last check: 2007-10-20)
Have the user "guess" the magic number until they are correct.
Since the arrow keys all have 3-digit ASCII numbers starting with a zero, find a way to "hear" both the #0 and the #XX when an arrow key is touched.
Repeatedly write the key to the screen from the main program until the ESC key is touched.
www.kent.k12.wa.us /staff/DJReed/CS_WebPg/cs/P1A4.html   (515 words)

  
 Brian Kohrs’ Blog   (Site not responding. Last check: 2007-10-20)
So Sam and I were programming today, and we found a place in the code where we were using a magic number.
Wanting to replace the magic number with a meaninful symbolic constant, we looked around for what the magic number could represent.
After failing to find what exactly the magic number meant, and not wanting to leave a magic number in the code, we replaced it with our own meaningful constant.
blog.briankohrs.com /page/3   (566 words)

  
 magic number @ Computer-Dictionary-Online.org   (Site not responding. Last check: 2007-10-20)
MS DOS executables begin with the magic string "MZ".
The paper cited below established the number of distinct items (such as numeric digits) that humans can hold in short-term memory.
["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].
www.computer-dictionary-online.org /?q=magic+number   (317 words)

  
 3 is the magic number   (Site not responding. Last check: 2007-10-20)
"It's been a powerful program that has broadened the audience base of the network, provided us with an incredible degree of consistency and heightened themes that are central to our programs: star power, female empowerment, the evolution of family relationships and the use of the supernatural to heighten reality," WB entertainment president Jordan Levin says.
The series also is the latest lucky charm for executive producer Aaron Spelling, whose magic touch previously helped shows such as the WB hit "7th Heaven," "Beverly Hills, 90210," "Melrose Place," "The Love Boat," "Dynasty," "Fantasy Island" and "Charlie's Angels" reach the episode century mark.
After the program's strong debut season, the WB decided the Halliwells were ready to tackle more sinister foes and moved "Charmed" to Thursday nights in 1999.
www.hollywoodreporter.com /thr/article_display.jsp?vnu_content_id=1798340   (1116 words)

  
 UC Davis News & Information ::   (Site not responding. Last check: 2007-10-20)
A regular magic square is a table of numbers in which any row, column or diagonal adds up to the same number.
Franklin's squares are similar, but instead of diagonals adding to the magic number, the bent diagonals add to the magic number.
The numbers in a Franklin square can be described by a series of equations -- 127 equations for an eight-by-eight square.
www.news.ucdavis.edu /search/news_detail.lasso?id=7057   (369 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.