"If you're nice to people, you can probably waste less time because you don't have to spend time arguing, and when you need a friend you don't have to either spend time being depressed about the lack of one or working forever at getting one, only to find that once you've finally made friends you don't need or want one anymore."
To me it looks more like:
"If you're nice to people, you'll probably be horribly exploited and made fun of by those wretched human beings, who form the majority, but will be liked by the more interesting ones, which are fun to hang out with."
I've always gone with "Be nice to people whether they're being idiots/annoying or not." It's worked fairly well for me so far. I don't extend this policy to people taking advantage of it, though.
I was once like Vector back while I was in school, during college, and some of my past jobs, I learned from some mistakes and tried Barbarossa's method; eventually, I just decided that with situations overall not improving, and having been betrayed a fair amount of times, Mindmaker's became my new truth.
At least, my niceness is moderated, and mostly out of common courtesy/decency, but no further than that. Until my trust is earned, deal with my real self (which I realized over the years, was not the nicest of people; but good natured when best to be). Exceptions to having to earn my trust are usually people I don't run into often (or people I don't sense any force-door-matting vibes off of), most elderly people, and kids.
How I see it, being a good person yields good things; being nice, however, leaves them open to getting stepped on. Good does good, even when it's not always nice. Good can discipline; Nice cannot. Good = Shows Respect, becomes respectful, Nice = Shows passage, becomes passage. Consider it like the mentality of the parent of a spoiled child. A good parent would discipline the child, and cut them off until the child begins to behave itself; A nice one will continue to spoil the child until they win the child's respect again. Though similar, they differ at times.
Best not to confuse good with nice. So to put it, it can help out anyone stuck in the "Nice Guy"/"Just Friend" stage of life. Heck, don't even try to do good, just be yourself. For some reason the Star Trek: First Contact quote comes to mind:
Cmdr. William Riker: Someone once said "Don't try to be a great man. Just be a man, and let history make its own judgment."
Dr. Zefram Cochrane: That's rhetorical nonsense. Who said that?
Cmdr. William Riker: You did, ten years from now.