Given there is no proof of life after death, the only surefire way to become immortal is leaving a footprint of ourselves
Compensating for failures with greatness
E.g. Wolfgang Amadeus Mozart reportedly was kind of a jerk. However, he was able to compensate for this with incredible music that has been amazing people for centuries.
Takeaway: As long as you don't have Mozart's talent, better not be a jerk.
Leave the world a better place than it would have been without you
To leave the world a bit better, whether by a healthy child, a garden patch, or a redeemed social condition; to know that even one life has breathed easier because you have lived — that is to have succeeded.
Bessie Anderson Stanley, Success
See also the Boy Scout Rule of Software Engineering