I think the other monks have adequately covered the case of writing any possible value anywhere.

However, when things are going wrong, what values are more or less likely to be written to a cell? I would expect the likelihood of writing a number to the cell to be inversely proportional to the "magicness" of the number.

That is to say, writing zeros is pretty common. One, or 0xFFFFFFFF? Still very common values. Byte sequences from strings and constants already present in your code have good odds. Common values of local variables are likely to be written too. That includes the address of the cell, because that's what you're using to write to the cell in the first place (more so in C code than perl, however).

That leaves high value numbers which are somewhat distant from any constants in your program as the least likely to appear as corrupt data. Each byte of the value should be above 0x80 to stay away from common strings. 0xDEADBEEF matches all those conditions while being fairly obvious as a sentinel value to human (and particularly english-speaking) readers. Grepping the dictionary for words that contain only A-FSIO (S->5,I->1,O->0) will get you some nice alternatives if you want to mix it up.


In reply to Re: [OT] Stats problem by SuicideJunkie
in thread [OT] Stats problem by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.