Specializing in being a generalist
If you over specialize you will die a slow and painful death. No matter how much money you’re making being the soul living expert of a legacy system or technology, it will catch up to you when you inevitably have to switch jobs. The flip side is that if you over generalize, you won’t have any marketable skill, as no one will know what you’re good at and therefore how to use you. The best approach is to pick a specific area you’re passionate about, and become a generalist with a high degree of proficiency in all the relevant skills.