Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by vsespb (Chaplain)
on Sep 30, 2013 at 17:01 UTC ( [id://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?

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1056391]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-18 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found