Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: results from pairs combination

by JadeNB (Chaplain)
on Oct 01, 2008 at 22:54 UTC ( [id://714919]=note: print w/replies, xml ) Need Help??


in reply to Re^3: results from pairs combination
in thread results from pairs combination

I think that it is a little misleading to say that one method name is as good as another. Certainly your point about the differences in results is an important one that I hadn't considered; but, absent such peculiarities, I think it's good practice to use a name that's very suggestive to the maintenance programmer of what's going on—no one would name a constructor destroy, even though it could be done; and I think that weakly_connected_components would make a maintainer scratch his or her head over the meaning of 'weakly'. (This is not to say that my suggestion of Algorithms::Graphs::TransitiveClosure, which has one call floyd_warshall to achieve the desired goal, is any better.)

Replies are listed 'Best First'.
Re^5: results from pairs combination
by jdporter (Paladin) on Oct 02, 2008 at 14:33 UTC
    it's good practice to use a name that's very suggestive to the maintenance programmer of what's going on

    Right. But, imho, there is no difference between ajskdl and jaksld — they're both meaningless. When composing this code, there's no way I could have predicted either method name; I had to read the man page to get them. I don't believe that the situation would be significantly different for a maintenance programmer; she would still have to familiarize herself with the documentation of either method to know what it's about. As it was, I had to grok the documentation of dozens of methods from Graph before I had any confidence which one(s) might best suit the need here. It's essentially a question of information content, and that is very much in the mind of the consumer. For someone (such as myself) who doesn't know what "weakly" means in this context, weakly_connected_components means precisely as much as ajskdl_connected_components, which means as much as connected_components. Even an argument about "extra typing" is spurious, since I copy-and-pasted the names.

    Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (None)
    As of 2024-04-25 00:10 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found