I spend 30 years surviving in Silicon Valley. Change is unforgiving. 2 years in software is ten years in any other profession. There are three factors to consider. Your company may disappear or jobs get outsourced overseas, in a big company the project may get cancelled and they layoff everybody or you may want a raise so you change companies. If you want to stay an " individual contributor" you better keep refreshing your skills because that's your only security. If you stay with one company you become sidelined as a maintenance programmer. You specialize in one companies' product. When that product eventually gets replaced you are stuck in supporting a 3-5 year old technology. Not a good place to be.