|Perl: the Markov chain saw|
Re: Simulate a head lice infectionby grinder (Bishop)
|on Jan 22, 2009 at 09:38 UTC||Need Help??|
Looking at the following part of the code:
You're first establishing a random maximum, and then taking a random value between zero and that first random number. This skews the day of death to lower values. I pulled this out and iterated it 2000 times and found the following number of deaths per day, starting from day 15:
44 53 66 106 116 127 128 134 145 173 133 104 90 76 67 69 55 56 50 41 30 26 21 29 24 8 13 8 5 1 2 1
This may be construed as a feature :)
The following block (and similar blocks):
... can be written less noisily using a heredoc:
Off topic information on lice removal below the fold:
My own kids have caught lice at school on a couple of occasions, and I sympathise with you. We used a couple of nasty Agent Orange-like products to get rid of them, but the critters are developing resistance to them and thus they become less effective, and the doses stronger.
During the last infestation our pharmacist told us of a new product with is basically a liquid silicon gel, and as it dries out it suffocates the lice. In other words, a mechanical process rather than insecticidal, and thus nothing the bugs can evolve defenses against. And much less aggressive on a young child's scalp.
• another intruder with the mooring in the heart of the Perl