¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: [TDD] Testing a class which utilizes randomness


 

¿ªÔÆÌåÓý

I¡¯m pretty sure OP is trying to learn how to TDD, not how to create really great random strings.
:)
R
On Apr 4, 2014, at 2:48 PM, Steven Gordon <sgordonphd@...> wrote:

This project is presumably using an RNG rather than coding one.

The criteria that matters would be whether the strings being generated (using an RNG) is sufficiently random, not whether the sequence of numbers that are being used to generate those strings are sufficiently random.

It is quite possible for the RNG to be random enough, but the strings to not be. ?For example, the long term behavior of the random number generator could always create a nice random distribution on bins, but that subsequences are not as random. If each string would be created by a subsequence rather than individual number, then they would not be random enough.

It could make a difference whether or not the size of the character set is prime.


Ron Jeffries
I know we always like to say it'll be easier to do it now than it
will be to do it later. Not likely. I plan to be smarter later than
I am now, so I think it'll be just as easy later, maybe even easier.
Why pay now when we can pay later?

Join [email protected] to automatically receive all group messages.