Random seeds
When you’re working with software that uses random numbers, it’s helpful to do three things.
- Log your seed.
- When debugging, use a constant value for your seed.
- Be aware of all active random number generators, and make sure to follow #1 and #2 with them.
Randomness can sometimes throw a wrench in debugging, but these steps will help you focus and diagnose.