I'm a helpful guy. I've got a lot of practice helping people... I've been publishing software under my alias for twenty-one years now, two-thirds of my life. And it goes for my day job as well: literally 90% of my time at work is either helping other people, or planning things. Only about 10% of my time is spent actually building software. But my attitudes about helping people have changed a bit over the past few years.
For my personal projects, I've begun to fine-tine my sense of when help is too great a cost. I answer every request for technical support that people send about the products I've written. A few years ago, I began to get really overwhelmed by the volume of the requests: my most popular app has been downloaded several million times, and answering all of the requests began to become an unfulfilling, depressing chore that might take away a couple hours each week. I spent a long time writing up a series of articles answering the most common questions, and worked on finding other ways to help people help themselves. And that worked fairly well—now on average I spend less than an hour a week helping people.
But I've also developed a sense of peace with knowing and reminding myself that I'm under no obligation. Sometimes I receive questions that are too complicated to answer: they're too technical, or too vague, or maybe someone had a hard drive crash and stored some really critical account information in a sticky note on their desktop, and need to get it out. (That problem occurred with surprising frequency.) In the past, I might have spent hours of my life helping strangers on the internet recover their lost data. People talk about cutting Facebook friends out of their lives that cause them too much drama, but here I was helping strangers I'd never meet recover files from failed computers. It wasn't until the past year or two that I started to realize how tired some of these people were making me. It was painful at first, but I'm learning to live with myself for just telling these people "hey, sorry, you're going to need to figure things out on your own."
What I'm still trying to figure out is how to apply that to work. Random people on the internet who want technical support wield no power against me at all other than maybe making me feel bad when I say "that's all I can think of to help, sorry it didn't work, tough luck" to them. But at work is a very different story. Anyone at work, anyone at all, holds enormous power over me, because anyone who wants to can craft a story in an email to my manager if I don't help them to their satisfaction. It sounds like delusional paranoia being worried about that kind of extortion, but almost every non-positive thing that has ever showed up on one of my performance reviews is a direct result of someone doing that (or something awfully similar) to me, so it's constantly on my mind. But that's mostly unrelated to my main point.
I'm going to continue helping people. Making an altruistic positive contribution to humanity is the reason we're all here. But if you look at it in a utilitarian way, an hour of my time spent helping someone else save an hour of theirs is not a good trade-off. The net gain to the world is zero. In fact, it's probably not zero, it's probably negative: if I could have otherwise used that hour of my life to create something that makes the world better and they would have used it to watch two reruns of The Big Bang Theory, I probably made the world a worse place by helping them. So I need to make the right cost/benefit decisions.
I can make a positive impact on the world with my time, I know it. I know it because I've built things that people have told me have made them extraordinarily happy, time and time again, for more than a decade. Stories like the woman who didn't have any money to buy a gift for her parents so she used the app I built to make something special for them instead for free, warm my heart. But to do those things I need to use my time wisely, and be in control of how I spend it.
My time is a fixed resource. To maximize my positive impact on the world, I non-intuitively need to minimize time spent helping people one-on-one. That doesn't mean I have to stop helping people altogether; I just need to be conscious of my own value to the world, and make reasonable decisions about how much of my time (and ultimately happiness) I'm willing to trade for the happiness of a stranger. (And probably the same applies to work in some way: to make a greater positive impact on the company, I need to find ways to spend less time helping people, or at least the ones who aren't extorting sociopaths.)