Having a self-sacrifice mind-set means consistently making decisions that benefit someone or something other than yourself, and often at a cost to yourself.

This is a very rational way of looking at things, much too rational to describe a "mind-set." From the point of view of most of our brain, the parts of our brain we've lived with our whole lives but still have a hard time communicating with, investing in yourself is self-sacrifice. You sacrifice short-term pleasure for long-term pleasure. You even sacrifice short-term success for long-term success. The long-term success is off the radar of most of your brain, so you need a mindset that sees your "sacrifice" in a positive light.

For example, getting up early and knocking out an extra feature at work brings you immediate positive rewards. People notice it, and they notice you. That's relatively easy, a lower form of self-sacrifice. Staying up late studying linear algebra or a new concurrency paradigm doesn't bring you any immediate external rewards. (Sometimes you get the joy of understanding a major new idea, but more often it's just hard work.) It will bring rewards someday, but that pleasure is off your radar. You need a psychological connection between the pleasure you pass up today and a reward that is unspecified and even unimaginable because it is impossible to predict in any concrete detail.

One way of making that psychological connection is the concept of sacrifice, which often shows up as an important aspect of religious faith. Acting correctly now will bring rewards in the future: in the afterlife, in the next lifetime, or if you believe in the "Prosperity Gospel," next quarter. Christianity explicitly promotes sacrifice by setting up Jesus as the highest model for emulation, and by adopting the symbol of his sacrifice as the symbol of the religion itself.

I am not religious myself, but I think it is significant that we selfish, self-interested human beings are attracted to the power of sacrifice embodied in the story of Jesus(+). Perhaps it has something to do with the potential we see to better our own lives and the lives of the people we care about if only we had the discipline to sacrifice ourselves to what we value. Setting aside the moral question of whether it is appropriate to value our own well-being more highly than that of another person, it is painfully obvious that we value the well-being of ourselves today much more highly than the well-being of ourselves next year, or even next week. If our psychological concept of self and selfishness cannot extend to the person we will be next week, then perhaps it is in our long term self-interest to develop a mentality that helps us sacrifice ourselves to something that is (or merely seems) separate from us.

There are other ways to tackle the problem, but no single strategy will take us very far by itself. Cultivating a sense of intrinsic pleasure in the deferred-reward activities that we substitute for immediate-reward activities helps, but it can be overwhelmed by factors that affect mood, such as fatigue, problems in other areas of our lives, or simply having a bad day. Imagining the rewards can help, but sometimes the rewards are uncertain or unknowable. Pride can be a useful tool, but when we're tackling challenging work or something we aren't very good at, pride is sometimes best kept out of the picture. Sometimes stuff just sucks, and the only thing we can do is embrace the pain as evidence that we are following the right path.

Obviously there are pitfalls. You need to guide your sense of sacrifice so that it serves whatever you think is important. (Your children, your career, your guild, your six-pack abs, whatever.) Some people blindly sacrifice themselves for whoever walks by, hoping to find someone who returns the favor, so there's no arguing that a sense of self-sacrifice can express itself pathologically when it's poorly directed. Still, I think self-sacrifice is not just a morally beautiful idea, but a pragmatic way of pursuing your own interest as well.

(+) Religion is a worthwhile subject for HNers who are interested in "success literature" articles like this one. A common feature of all major religions is that there is an optimal way to live that brings the highest reward, but our morally or intellectually flawed selves naturally revolt from that path and seek lesser pleasures, which ultimately lead to disappointment or even punishment. Religion is the struggle to understand the higher path, detach ourselves from the compelling illusions that dominate our behavior, and attune ourselves to the highest source of good so we can follow it with conviction. Many articles on HN read the same way if you define success as the highest good.