Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: [OT] Stats problem

by SuicideJunkie (Vicar)
on Feb 26, 2015 at 14:49 UTC ( [id://1117958]=note: print w/replies, xml ) Need Help??


in reply to [OT] Stats problem

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.

Replies are listed 'Best First'.
Re^2: [OT] Stats problem
by BrowserUk (Patriarch) on Feb 26, 2015 at 19:45 UTC

    See Re^2: [OT] Stats problem


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1117958]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found