Also, the world is full of "lies" and most people believe them like facts. These un-truths or unhelpful-truths tend to not do you have favors. They are spread because they are attractive or convenient or benefit someone else's agenda.
Here some things you talked about that you should press x to doubt on:
A Rockstar programmer isn't a desirable professional to hire any more than actual rockstars. All stars are rare and have a big network of people around them enabling then. A lot of the work they get credit for comes from other people.
All performance is 80% situational. We are not islands. Great people in bad situations are failures. Failures in great situations are rockstars.
28 is not old. Teenagers can spend their time being children without affecting their future job prospects. People can spend their 20's partying and still run for office. Most of us get many chances in life.
Hard work does not pay off. (This one is starting to break through for you and is the main reason for your post). Luck pays off. Who you know pays off. Who you can convince pays off. Effort is not linearly correlated with reward and can often be uncorrelated. Lots of people who want to pay you a wage to do things they would rather not do would like you and everyone else to believe otherwise.
Lots of people would like to convince you that your self worth should come from them, from the money they give you, the title they give you and all of the things you can do for them. Do not listen to these people. You are the only person in the world who can properly value you. When it comes to your self-worth, you have the only opinion that matters.