This started with a reply to a reply and grew into an orthogonal perspective to the OP.
Why not stay at a company for many years ?. Let’s say a new graduate is interested in routing protocols. It will take years to learn, master and develop new algorithms in OSPF.
In general terms, for the vast majority of software engineers jumping jobs every so many years will both dramatically increase their skill set and therefore employability as well as dramatically increase their income.
In specific terms, Cisco is famous for hiring PhDs with specialties in algorithms associated with networking and after a few months of bug fixing in reading power supply voltages and fan rates they quit to work where they can actually use their talents. Not all specialties have enough open roles to accommodate everyone's "interests."
Career options from a software specific perspective:
-
You can go vertical and develop massive skills in a very narrow area. These people don't care about 99% of what it takes to make something that uses what they know, but you can't build things to solve specific problems without these people. If you go this route chose a specialty with broad applications so you can do your thing at a range of companies in a range of industries. From audio to video to radios to 10Gbase-T interfaces to disk drives to anything else involving a signals, signal processing can be a great area to specialize. OSPF? A surprise graduate thesis yielding an open source implementation could end your whole career path then you become the engineering equivalent of a great musician with a PhD playing guitar in the subway.
-
You can go horizontal, being a generalist building systems skills. You may specialize in certain things but you're interested in everything and develop enough knowledge in other areas to communicate with those from bullet point 1 to tie together a range of specialties to create complex systems. Each vertical person might contribute 10,000 lines of critical code but you may need another 10,000,000 lines to make something useful to a customer, and someone needs to bring all the pieces together into a coherent system. Without good people from bullet points 1 and 3 this job quickly becomes impossible so you have to be very choosy about the companies and people you work with to be successful.
-
You can be like most people and be a point. They don't grow in any direction, and only if they they are lucky will they be employed at 65 doing what they did at 25. Get the ones that can at least learn the most basic best practices at 25 and with leadership providing significant guidance and solid process they'll write much of the 10,000,000 lines in bullet point 2 and the resulting systems will generally work. As this represents so many people they're a dime a dozen and therefore the easiest to lay off in bad times. Becoming management after a time is their best defense against pricing themselves out of the market, but they don't have the skills of people from bullet point 2 so they try to do technical leadership with no useful skills.
Other considerations you might not understand if you only worked at Cisco:
Value soft skills in addition to hard skills. Organization, communication, negotiation and persuasion among others are skills critical to the success of projects. I could write an encyclopedia of failures at Cisco because people did not have these skills. Sadly that would go next to the encyclopedia of failures at Cisco because people did not have the hard skills either.
Work somewhere where projects are bounded in time and budget. You'll have to spend more time up front understanding what it is you are doing so you can see a viable path to delivery early on. I've seen Cisco increase the employees on a project by a factor of five and the time by a factor of twelve so the budget was overrun by a factor of 60, and what they produced still didn't work. This isn't "a" failure, it's a collection of epic failures that wouldn't be possible elsewhere. People find it far easier to hear their 80 hours a week for years was heroic rather than their 80 hours a week for years was wasted so a kind word from management easily dissolves their will to make the changes needed to improve their situation.
There is far more to cover, like what skills are eternal but you need to improve upon for an entire career, and skills that change far too frequently because their developers didn't figure out what problem they were trying to solve and they keep getting replaced (common in the development of frameworks.) IOS, IOS-XR, IOS-XE, NX-OS, etc... represent failures across this spectrum.