1. Work on products that other people would find useful, and then be sure to release it. Early in my career I was a contract software engineer for an agency. I was selling my time instead of making products that could be resold with zero marginal cost. I would have focused on making products sooner.
2. Either learn, or earn. The best jobs frankly are both. If you're learning, it's OK if you're not getting paid as well, and ideally it's not forever. If you're not, then you better be earning valuable equity at a company that matters. Investors get a portfolio but you only get one place to work, so it's even more important that you invest your time in a place that matters. I would probably not have worked at Microsoft knowing this. I wasn't earning or learning at the time.
3. For a while, I decided I wasn't going to code anymore. That was a mistake. Thank god I ended up picking up software engineering again. Don't ever stop coding, even for a fancy title like program manager. If a job has a fancy title, the job probably sucks. Writing software is very high leverage, and more meaningful than writing a lot of emails.