Companies do not pay you by value, generally speaking. Rare ones do, but most often you are paid whatever they can get away with.
That is why you are paid close to your junior colleague. Everyone has base living expenses that drive much of salary demand. Anyone without a job will undercut you towards that level.
But if you look at it another way, your pay is not much higher, but your savings rate is, after all your expenses subtracted.
Yup.
Instead of pouring an excess of effort your energy into your job, perhaps above and beyond what you agreed to do as per your employment contract, pour your effort and energy into investigating and cultivating your other job prospects. See if other companies are willing to make you a decent offer. It may take a fair bit of time to find a company that really wants you, that you'd be willing to work for, and will make you a strong offer. You are in a good position to look for other options when you are not rushed and are not desperate - i.e. - when you are already employed. Once you have one or more offers on the table, then you are in an excellent position to either take the offer, or begin negotiating with your current employer for a raise to a level that is competitive with the offer.
If you go to your employer and say "give me a 20% raise" - or even "give me a 20% raise because <reasons why you are valuable>" without having first cultivated a strong alternative option, and they refuse, what are you going to do? Keep working for them at the same rate of pay?
A few resources that I found useful are:
* the idea of a BATNA - Best Alternative To Negotiated Agreement
* the ever popular Patrick McKenzie's salary negotiation advice
* the book: "getting to yes: negotiating agreement without giving in" by Fisher, Ury and Patton.
On a personal note, I'm finding it far more valuable to become better at business-y things than technical things at this stage in my own career, after spending years thinking about programming, mathematics, and technical things. I regret not doing this earlier.Maybe he had a better sense of what he was worth, or what the company was ready to pay for his skills.
Ask for more money and that's it.
Sometimes they may put it off until a future point. If they do hold them to that date to have the discussion again.
Failing that update your resume and go job hunting. Negotiate up from there.
Many companies still have policies against coworkers sharing salary information. Yes, this is illegal in the US, but practically speaking: it being illegal is about as effective as requiring traffic police to have a "preponderance of wrongdoing" to perform a traffic stop. It still happens near constantly, and the cost/benefit of trying to enforce these laws in most cases isn't enough to actually pursue. (if you were to try and file a cause of action against your workplace for such a violation, you would surely mark yourself to future employers as being litigious - i.e you would paint yourself as a trouble-maker, so the benefit to doing so would have to be pretty big).
Secondly, social conventions don't really provide an incentive for near-strangers (and that's what many coworkers are for much of their careers) to share salary information. Yes, game theory says everyone wins if everyone shares, but we live in a society that is super prone to being offended. I don't even think it's polite to discuss money with friends.
As other posts on HN have stressed over the years, what really gives someone power in negotiations is a "Best Alternative" or BATNA[1].
[1] https://en.wikipedia.org/wiki/Best_alternative_to_a_negotiat...