How long should you stay in a job? The answer will depend a bit on your personality. But I think a job is interesting so long as you’re learning a lot and that seems to mean that you should stay in a job about three years. The first year you don’t know how to do the job and your are learning a lot, the second year you are getting the hang of it and by the third year you have become good at the job. But being good at the job typically means that you don’t have much more to learn from the job by continuing to do it. It’s time to move on.
When I say it’s time to move on I don’t mean that you need to move company, although that is certainly one option. If you move to work on a new product you’ll be learning stuff again. If you relocate to Japan you’ll be learning stuff again. If you move from application engineering to product marketing you’ll be learning again.
In particular, if you get promoted your job will change and you’ll be learning stuff again. This is especially acute the first time you are promoted into management. Typically you are the best engineer or salesperson or whatever on the team and so you get promoted. Now you have to learn about management, a subject that previously you may not have taken much interest in. It is an especially difficult transition since your comfort zone is not to do management at all, just do everyone’s jobs for them (after all, you were the best on the team so you are better than they are). It is a hard lesson to learn that as a manager your output is not what you do personally, it is the output of your group. It is not a positive that you did a lot of the work yourself, that means you are not doing a good job of nurturing the people in your group, not training them to be as good as you are.
People will often move on to another company anyway if they are bored since there might not be an appropriate position to move into, or a promotion to be had. This is especially true of new graduates who get fed up with some aspects of the company bureaucracy or culture and move to a new company to escape. However, the new company is typically the same (although different in details). It’s just the nature of companies that they don’t always do just what you think they ought to. The result of this phenomenon is that I think the best value people you can possibly hire are people who have already worked for at least one company and have 3-5 years experience. At that point they are enormously more productive than a brand new graduate, not about to leave because of company bureaucracy, and although they are paid more they are not paid a correct premium. The new graduates are probably overpaid and the 3-5 year people underpaid.
I know mostly about engineering and a good engineer is not 30% better than a poor one, they are ten times more productive. So 3-5 year guy is not 50% better than a new graduate, which may reflect the pay differential, they may be 5 times better.