If you tell someone who is into personal improvement that you compare yourself with others, his kneejerk reaction will be to tell you not to. This advice comes with no contemplation, and is offered because it sounds so noble that no one argues with it-- except for me. I think that it's valuable to compare yourself with others, if it's done habitually and strategically.
On a daily basis I internally compare myself to people less fortunate than myself as a way of remembering how incredibly lucky I am. I'd like to think that I'm responsible for the good in my life, but at the same time I know that if I was born in Liberia when it was caught in civil war, my life would have been far worse. While some comparisons may serve to pat myself on the back, mostly I gain appreciation for the opportunities that have been presented to me, and am reminded how important it is to seize them.
This is the only way in which I compare myself to those I don't envy. I don't rest on my laurels because I feel as though I've exceeded some people's accomplishments in some areas. I filter out those comparisons, and only derive gratitude.
I also compare myself to the very best. When I evaluate my poker game, I compare myself to my friend Todd V., who plays in some of the highest limit games in Vegas and tends to be one of the best players at the table in these games. When coding or designing our startup, I don't compare us to other startups in similar positions, but rather to those who have succeeded and have much more money and labor available to them. I don't stack my diet up against what the average person considers healthy; instead I model it after the most healthy diet I can imagine.
These comparisons don't serve to make me jealous or discouraged. Like the filters in place for considering the less fortunate, I filter out everything but aspiration. I see these people as being examples of what can be done, and define success as meeting or exceeding what they've been able to do.
I don't mean to say that comparing yourself to others is always a good thing; only that it can be a good thing. It's a natural tendency, so rather than fight it, why not gently nudge in a direction that can help you feel grateful for what you have, and motivated to do more?