Recently (in fact, this morning) I was asked by my wife to give a new work experience person at her workplace my top 5 tips on what I wish I'd been told/done differently if I could go back 19 years and start my career again. This seemed ripe for a blog post so here we go!
1: Forget about being self-employed at first
My career started in 1998, almost as soon as I left school. In 2000 the company I was working for went bankrupt and I decided that I'd had enough of the 'rat race' and started my own freelancing business.
Here is the problem though, I was still a junior. I had no idea how business worked, I had only worked in one company as a junior and that just wasn't enough. My business failed within a year and I got seriously taken advantage of by my main client who obviously thought that a 21-year-old wouldn't have a clue that he was being scammed (and he was correct until I caught him red-handed).
This leads me to:
2: Move around a lot
Once you've been at the same place for about a year or two. It's unlikely you'll learn much more in that place. So to keep your skills and experience as sharp as possible you should switch it up from time-to-time.
Definitely switch between in-house (also known as client-side) teams and proper agencies (and maybe even do a stint in government) as all these places do things very differently and the more you learn about how things are done, the better a position you will be to finally take that step towards seniority because...
3: Being a senior is not all about the development
Once you've reached senior level, you are expected to be a voice of authority and not just when it comes to development. Ideally you should have spent enough time in enough different work environments to be capable of doing the job of a project manager if you had to (although that's rarely the case if you stay in the permanent market).
Make sure you learn at least the fundamentals of project management tools like Jira, Pivotal Tracker etc...
People management skills are also a great thing to learn as the close you get to senior the more likely it will be that you'll be expected to lead a team or at least end up running meetings with clients or stakeholders.
Also learn the things which are adjacent to your job, things like getting really good with git (no matter where you go, it's likely people will be using git or something similar and it seems most people don't really know how to use it beyond the most basic level so being an expert will give you a really good footing there).
Other things like server management, writing automated tests and knowing how to deploy projects using Continuous Integration tools will also benefit you a lot as your career develops.
4: Choose a path (but don't feel you have to be trapped by it)
When I first started, you were expected to be a know-it-all in web development, then things changed and you were expected to specialise. Now it seems, it's come full-circle again and everyone wants you to be a full-stack developer.
I can't say if this trend will continue or if there will eventually be a return to specialism, so it's better to be full-stack, however most people find that they love the front-end (building interfaces) or the back-end (working with data) more than the other so you will probably want to focus on one of those. NodeJS is great for this as it gives you options to explore both.
Keep your options open though, if you see a new language or framework that looks interesting, go build a personal project with it and see if you like how it feels. Nothing stops you from learning as many languages as you want.
5: You will NEVER stop learning
I'm not going to sugar-coat it. This job - whilst hugely rewarding - is exhausting. The industry changes at such a rapid pace that that framework you just spent 3 months struggling to learn is now old-hat and has been replaced by a new one that's completely different.
You'll never have the option to rest on your laurels, you have to be constantly learning new things,I'd advise that in order to keep your skills sharp, learn at least a new framework a year. This is especially true for full-stack developers at the moment as our industry adopts new 'must-learn' technology every 6 months or so. If you decide to specialise in a classic 'back-end' language like C# or PHP then you may find this cycle is a bit slower and less extreme. However it still is true that you will never be able to stop learning, as soon as you do, you'll get left behind.
Bonus tip:
If you do reach senior level or even if you've had a fair amount of experience (at least 5 years) as a middle-weight, look into contracting. It is SO much more rewarding than permanent work and pays a huge amount more too.
Fair warning though: You'd be running a business and have all the responsibilities that go with that so do all the research you can before making the jump and make sure that you are definitely up to the challenge first.