You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simone Tripodi <si...@apache.org> on 2012/08/01 17:26:05 UTC

[graph] renaming packages

Hi all grap-ers,

I am doing the n-th review on [graph] and noticed small things could
be improved, such as 2 packages names that IMHO could be improved:

 * s/builder/connect: nothing that really reflects the builder
pattern, rather a small EDSL to describe graph element connections;

 * s/weight/math: Monoid and derivates sounds more familiar to a
generic math domain rather than pure weighted edges on graph.

WDYT?
If there are no objections, I am going to apply that change.

Many thanks in advance, all the best!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] renaming packages

Posted by Simone Tripodi <si...@apache.org>.
!Hola!

> Addition would have signatures like "sum" and "negate", while Multiplication
> would have "multiply" and "invert".
>> What about having Monoid with package visibility and then
>> "Addition/Multiplication... extends Monoid" ?
>
>
> Then it would become a bit painless if a class had to implement both
> interfaces (the current "Integer[...]Operations" is an example). I'd just
> have them fully independent from each other, without a common ancestor
> (Monoid).

OK we have an agreement here :) I'll prepare a patch and attach to an
issue to let you review before applying it.

> cool. Class name = "GraphPopulator"? Though it sounds sooo bad to my ears...
> Maybe a mother tongue can help us with the matter :-)

agreed :) Any suggestion? TIA!!!

-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] renaming packages

Posted by Claudio Squarcella <sq...@dia.uniroma3.it>.
Hi,

On 03/08/2012 15:00, Simone Tripodi wrote:
> ¡Hola!
>
>> Also remember that if we ever want to deal with, say, multiplications,
>> monoids are only going to be in the way (we already touched this topic
>> before, see [1]). I'm still happy to update and simplify names, only
>> following a different pattern: e.g. from "DoubleWeightBaseOperations" to
>> "DoubleOperations". And I'd also replace "Monoid" with "Addition".
> yeah thanks of the reminder - I was searching for it in the mail
> archives and didn't find it :P
>
> wouldn't "Multiplication" have exactly the same methods signature of
> "Addition" aka Monoid? I wouldn't replicate stuff just to implement
> markers...

Addition would have signatures like "sum" and "negate", while 
Multiplication would have "multiply" and "invert".

> Anyway I agree that algorithms need specific monoids, such as Dijkstra
> that needs Addition - guess it wouldn't work with Subtractions :P
>
> What about having Monoid with package visibility and then
> "Addition/Multiplication... extends Monoid" ?

Then it would become a bit painless if a class had to implement both 
interfaces (the current "Integer[...]Operations" is an example). I'd 
just have them fully independent from each other, without a common 
ancestor (Monoid).

>
>> After thinking a bit I'm also a bit perplexed about renaming "builder" to
>> "connect", and in general about the name of the method "connect()". You
>> know the meaning of "connected" in graph theory, while with our method we
>> could actually create a graph which is not connected (e.g. one with no
>> edges at all).
> agreed!
>
>> So I suggest to look for a less ambiguous alternative:
>> "populate" (this gets my vote)? "declare"? "construct"? "assemble"?
> +1 to "populate" (and related class renaming?)

cool. Class name = "GraphPopulator"? Though it sounds sooo bad to my 
ears... Maybe a mother tongue can help us with the matter :-)

Ciao,
Claudio

>
> thanks a lot for your feedbacks and enjoy vacations!
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

-- 
Claudio Squarcella
PhD student at Roma Tre University
http://www.dia.uniroma3.it/~squarcel
http://twitter.com/hyperboreans
http://claudiosquarcella.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] renaming packages

Posted by Simone Tripodi <si...@apache.org>.
¡Hola!

> Also remember that if we ever want to deal with, say, multiplications,
> monoids are only going to be in the way (we already touched this topic
> before, see [1]). I'm still happy to update and simplify names, only
> following a different pattern: e.g. from "DoubleWeightBaseOperations" to
> "DoubleOperations". And I'd also replace "Monoid" with "Addition".

yeah thanks of the reminder - I was searching for it in the mail
archives and didn't find it :P

wouldn't "Multiplication" have exactly the same methods signature of
"Addition" aka Monoid? I wouldn't replicate stuff just to implement
markers...
Anyway I agree that algorithms need specific monoids, such as Dijkstra
that needs Addition - guess it wouldn't work with Subtractions :P

What about having Monoid with package visibility and then
"Addition/Multiplication... extends Monoid" ?

> After thinking a bit I'm also a bit perplexed about renaming "builder" to
> "connect", and in general about the name of the method "connect()". You
> know the meaning of "connected" in graph theory, while with our method we
> could actually create a graph which is not connected (e.g. one with no
> edges at all).

agreed!

> So I suggest to look for a less ambiguous alternative:
> "populate" (this gets my vote)? "declare"? "construct"? "assemble"?

+1 to "populate" (and related class renaming?)

thanks a lot for your feedbacks and enjoy vacations!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] renaming packages

Posted by sq...@dia.uniroma3.it.
Hi there :-)

> Hi Claudio!
>
> happy to read from you here :)
>
> I just noticed that the weight/primitives sub-package contains classes
> which name convention refers to *Weight - WDYT renaming them to
> *SumMonoid ?

I am not convinced about this one.
I've come to the conclusion that we should get rid of all the "math-geeky"
vocabulary (monoid is an example) and replace it instead with simpler
names of properties and operations. Really, even people in my lab would be
kind of perplexed with that nomenclature and graphs are already
non-trivial per se ;-)
Also remember that if we ever want to deal with, say, multiplications,
monoids are only going to be in the way (we already touched this topic
before, see [1]). I'm still happy to update and simplify names, only
following a different pattern: e.g. from "DoubleWeightBaseOperations" to
"DoubleOperations". And I'd also replace "Monoid" with "Addition".

After thinking a bit I'm also a bit perplexed about renaming "builder" to
"connect", and in general about the name of the method "connect()". You
know the meaning of "connected" in graph theory, while with our method we
could actually create a graph which is not connected (e.g. one with no
edges at all). So I suggest to look for a less ambiguous alternative:
"populate" (this gets my vote)? "declare"? "construct"? "assemble"?

Cheers from the seaside :-)
Claudio

[1] https://issues.apache.org/jira/browse/SANDBOX-404

>
> best and TIA!
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
> On Thu, Aug 2, 2012 at 12:45 AM,  <sq...@dia.uniroma3.it> wrote:
>> Hi Simone!
>>
>> Both changes sound good to me. You are more familiar than me with
>> "builder" so I trust your word; and also "s/weight/math" sounds indeed
>> more appropriate given the general purpose classes that it contains.
>>
>> Cheers
>> Claudio
>>
>>> Hi all grap-ers,
>>>
>>> I am doing the n-th review on [graph] and noticed small things could
>>> be improved, such as 2 packages names that IMHO could be improved:
>>>
>>>  * s/builder/connect: nothing that really reflects the builder
>>> pattern, rather a small EDSL to describe graph element connections;
>>>
>>>  * s/weight/math: Monoid and derivates sounds more familiar to a
>>> generic math domain rather than pure weighted edges on graph.
>>>
>>> WDYT?
>>> If there are no objections, I am going to apply that change.
>>>
>>> Many thanks in advance, all the best!
>>> -Simo
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://simonetripodi.livejournal.com/
>>> http://twitter.com/simonetripodi
>>> http://www.99soft.org/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>> -----------------------------------------
>> This email was sent using SquirrelMail.
>> https://email.dia.uniroma3.it
>> Web Site: http://www.squirrelmail.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-----------------------------------------
This email was sent using SquirrelMail.
https://email.dia.uniroma3.it
Web Site: http://www.squirrelmail.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] renaming packages

Posted by Simone Tripodi <si...@apache.org>.
Hi Claudio!

happy to read from you here :)

I just noticed that the weight/primitives sub-package contains classes
which name convention refers to *Weight - WDYT renaming them to
*SumMonoid ?

best and TIA!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/


On Thu, Aug 2, 2012 at 12:45 AM,  <sq...@dia.uniroma3.it> wrote:
> Hi Simone!
>
> Both changes sound good to me. You are more familiar than me with
> "builder" so I trust your word; and also "s/weight/math" sounds indeed
> more appropriate given the general purpose classes that it contains.
>
> Cheers
> Claudio
>
>> Hi all grap-ers,
>>
>> I am doing the n-th review on [graph] and noticed small things could
>> be improved, such as 2 packages names that IMHO could be improved:
>>
>>  * s/builder/connect: nothing that really reflects the builder
>> pattern, rather a small EDSL to describe graph element connections;
>>
>>  * s/weight/math: Monoid and derivates sounds more familiar to a
>> generic math domain rather than pure weighted edges on graph.
>>
>> WDYT?
>> If there are no objections, I am going to apply that change.
>>
>> Many thanks in advance, all the best!
>> -Simo
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> -----------------------------------------
> This email was sent using SquirrelMail.
> https://email.dia.uniroma3.it
> Web Site: http://www.squirrelmail.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [graph] renaming packages

Posted by sq...@dia.uniroma3.it.
Hi Simone!

Both changes sound good to me. You are more familiar than me with
"builder" so I trust your word; and also "s/weight/math" sounds indeed
more appropriate given the general purpose classes that it contains.

Cheers
Claudio

> Hi all grap-ers,
>
> I am doing the n-th review on [graph] and noticed small things could
> be improved, such as 2 packages names that IMHO could be improved:
>
>  * s/builder/connect: nothing that really reflects the builder
> pattern, rather a small EDSL to describe graph element connections;
>
>  * s/weight/math: Monoid and derivates sounds more familiar to a
> generic math domain rather than pure weighted edges on graph.
>
> WDYT?
> If there are no objections, I am going to apply that change.
>
> Many thanks in advance, all the best!
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-----------------------------------------
This email was sent using SquirrelMail.
https://email.dia.uniroma3.it
Web Site: http://www.squirrelmail.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org