Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Truly randomized keys() in perl 5.17 - a challenge for testing?

by vsespb (Hermit)
on Sep 30, 2013 at 17:01 UTC ( #1056391=note: print w/ replies, xml ) Need Help??


in reply to Re: Truly randomized keys() in perl 5.17 - a challenge for testing?
in thread Truly randomized keys() in perl 5.17 - a challenge for testing?

Another possibility for your particular case is to sort keys. Performance penalty is small, and having random URLs generated each time is a bigger problem and can cause some caching issue and other troubles.


Comment on Re^2: Truly randomized keys() in perl 5.17 - a challenge for testing?
Re^3: Truly randomized keys() in perl 5.17 - a challenge for testing?
by saintmike (Vicar) on Sep 30, 2013 at 17:05 UTC
    You don't know if the performance penalty is small, who said the function isn't going to be used to run a billion times a second?

    The mere thought of dealing with this by adding useless production code to fix a test problem I find very disturbing.

      In this my answer I am talking not about fixing test, but about adjusting your business-requirements. I don't see case when having program output to be URLs with random parameters ordering is good idea. Better normalized URLs.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (17)
As of 2014-08-27 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (239 votes), past polls