What can I do to maximize my salary as a new grad software engineer? originally appeared on Quora: the place to gain and share knowledge, empowering people to learn from others and better understand the world.

Answer by John L. Miller, PhD, Software Engineer/Architect at Microsoft, Amazon, Google, on Quora:

You've just graduated with a degree in software engineering. Let's say your sole goal is to earn as much money as possible in the next twenty years. You have two choices: double-down on an employer, or move frequently.

Doubling down means you pick a company and stay there. If it's not your first job, it should be your second. The company - or at least the part you work in - should have a clear growth path. For example, I joined the Windows NT team in Microsoft in 1991, when Microsoft was 8,000 people and the team was around 100. Years later Microsoft employed more than 100,000 people, and Windows NT employed more than 10,000 people. In the initial team of eight I joined, within ten years two of the people were directors with hundreds of employees, and one was a VP with more than a thousand. They got where they were not just by being competent, but by specializing in their area, staying put, and being the natural pick as the team continued to grow and needed new leaders. Being a solid person in a growing team is one of the best ways to be well rewarded in your company.

Moving frequently works like this: Put in one to three years at a company, staying long enough to deliver something meaningful. If possible, stay until you get promoted to a new position (e.g. from SDE 1 to SDE 2). Then evaluate places to move inside and outside the company. If you move inside, it'll probably be lateral. If you move outside, you'll typically get paid more at the new place. Someone who is good and who moves to strong companies at the right intervals enhances their market value, and can double or triple their compensation in less than ten years, for example from $100k to $300k per year.

A Jiminy Cricket moment from me: remember, money past what you need to live comfortably may not be useful for you. Don't throw away other parts of your life just to have more zeros in a bank account you're not using.

This question originally appeared on Quora - the place to gain and share knowledge, empowering people to learn from others and better understand the world. You can follow Quora on Twitter, Facebook, and Google+. More questions:

Published on: Aug 9, 2017