1. Use programming and software as a tool to accomplish your goals, and build a domain expertise in one or more industries.
2. Pick a programming language and/or ecosystem and stick to it. That's not to say there isn't power in being a polyglot, but in order to get really good you need to pick one thing and practice it. It's that simple. That said, do not brand yourself as any one thing or be too specific. The key is to both specialize and generalize. You need to be malleable enough as things change, but at the same time not constantly chasing your tail with the latest thing. This fine balance comes with experience, as most new technologies and techniques you will find are the result of someone rediscovering something. I can't count the number of times I've seen something rebranded as new or revolutionary that was originally published as a paper in the 50's or 60's.
3. Own what you do. Don't wait for others to come to you with problems, think about ways in which you should be improving your software via instrumentation and closed loop controls. Try to understand the users of your software and what they really want and need. Sometimes little things and details that are seemingly unimportant are very important indeed. Software is a way for you to directly influence and collect information about the world, so you can be constantly testing your assumptions and refining your model.
4. Do personal projects. It's the only way to avoid burn-out and to keep yourself interested. And in many cases, personal projects can shine the light for you on where to go next or what to do next.
5. Get good at interviewing others on a team and make yourself part of the interview process. Real team building is a far more valuable skill in accomplishing your goals as an engineer than becoming a manager.
6. Stay close to the tech. At a certain point you may find yourself in a position where you aren't coding or creating every day. Avoid this at all costs. It doesn't matter if you have a team, or if you're in an architect role, or whatever, you should have the code checked out at all times on your computer, have it working, and be able to contribute at a moment's notice. If at any time any of this isn't true for you, stop what you're doing right now and make it true.
7. Don't be afraid to throw out huge legacy code bases and start over from scratch. Nature does this all the time; it's called trial by fire. The second time you do something is always easier than the first and you can really eliminate a lot of debt for you and your team.
8. The first time you do something, if its not messy and weird you aren't trying hard enough or pushing yourself hard enough. The code will be awful. Don't strive for perfection in the code the first time, if it sticks you and others will have plenty of time to refactor and make it better later. I've seen tons of "perfect", unused code that has never seen the light of day again and its really sad.
9. Work for a variety of companies, small and large, startups, mid-size, big tech, and do freelance at various parts of your career. Different size companies have different goals, needs and problems and it will help you understand what is applicable to a Google does not matter at all to a startup or mid-size company.
10. Work for companies that are actually doing something, preferably new work, and try to match that to your interests at the time. Avoid places and people that are toxic and do not have a deep love of technology and do not identify as "nerd"/"hacker"/"geek" etc (unless you yourself do not identify this way..)