What is this obsessions with leaving something behind, or doing something noteworthy? Be selfish. Programming is my selfish pleasure; I love it therefore I do it.
Just remember, we are a tiny, insignificant speck in the history of our own planet, let alone the universe. If you truly believe you can improve people's lives with code, go do that. But don't make it about proving yourself to other people, or creating a lasting legacy. Ask yourself, if everything I made or affected disappeared when I died, would I still be doing this?
Fight Ego.