Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: RFC: Proofread POD for my main random module, please? (more)

by hippo (Chancellor)
on Jun 02, 2017 at 08:14 UTC ( #1191927=note: print w/replies, xml ) Need Help??

in reply to Re: RFC: Proofread POD for my main random module, please? (more)
in thread RFC: Proofread POD for my main random module, please? (more)

Personally, I think that this is a great improvement over the original and that the examples add much to the clarity of purpose of the module as a whole. Well done.

Now that it's clear (to me) what the module's purpose is, I would suggest changing the nameline from "RolePlaying::Random is a set of tools to generate randomness." to something like "Randomly select values from sets of lists.". I think that this more accurately reflects what the module does. It certainly doesn't generate randomness, that's for a PRNG to perform. What it does is take randomness generated by other code and apply it in various ways to supplied datasets.

random_from_list doesn't flow out of the fingertips as quickly as tiny_rand does.

Maybe not. This helps to illustrate one of the differences between coding for yourself and coding for others. In the latter case, clarity wins every time. Naming your subs (and other symbols such as packages, variables and constants) to follow their purpose helps make the code which others write using them to be legible and maintainable. If you (or anyone) really wants then in their own code to use a shorthand for a sub they can by aliasing or subclassing or whatever. But careful choice of symbol names improves the chances of code being self-documenting and that's a good target to aim at.

FWIW, I seen nothing in this code which ties it to the RolePlaying space. It seems perfectly general. I've just looked around the namespaces and there's neither List::Random nor Random::List. There is, however, Random::Set which seems to perform a similar task but without your bells and whistles. If you think that Random::Set is no more general than your module then maybe consider a more general name for yours. Don't forget PrePAN for soliciting ideas too.

  • Comment on Re^2: RFC: Proofread POD for my main random module, please? (more)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2020-11-26 10:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found