Original post
I am relatively new to SO and although I understand the basic rules of the site there is a more ethical mater that I don't know how to handle.
Another user and I provided our own answers to this question practically at the same time and with basically the same solution. Of course, in the event that our solution is correct, only one of us will get the accepted answer and relative reputation.
I later on edited my answer with snippets and a source link, but only for the benefit of the users seeking a solution, to provide an answer as complete as I can.
My fear is that this behavior might seem deliberately aggressive to the other answerer, just so that I can get reputation by trying to outclass his/her solution.
How should I behave in a situation like this? Is there a rule I should follow? Or am I thinking too much? I love our community and for this reason I want do to things right and avoid to be a jerk.
Wrapping things up
I'm writing this edit/summary to say that by accepting one answer I don't discard the other ones. I believe that more or less all your contributions, both answers and comments, where very insightful.
I see there is a general consensus among the participants in this post, which is that the main priority is to provide good answers to good questions, thus improving the quality of the site. Motives and methodology for doing so are irrelevant.
Providing an answer that partially overlaps with an existing one is ok as long as it presents a different point of view for the OP. Otherwise edits and comments to the original answer are the way to go for a healthy contribution.
Finally, one should deal with low quality questions and duplicates by flagging them appropriately and not answer them just for the sake of personal reputation.