One of the big questions a junior developer must ask early on his career is whether to stay or go. I know quite early in my career I realized that I was being underpaid relative to my colleagues, simply because they had more years under the belt. My work was on a par and my resentment grew quickly.
However this was a company that had given me a job following university, and paid for me to go to New York on a comprehensive training course, and had generally given me a very cushy start to my career when a lot of my peers weren't even able to get a job. Not to mention the risk of moving firms. What if I hated my new job? What if I wasn't good enough? I no longer would have the protective banner of "I'm a graduate" to hide behind.
It's an interesting question with no clear cut answer; in this case I did move firms and it was the best decision I could have made, but that's by no means the standard. A couple of years ago I was offered a job at another firm and turned it down thankfully; The entire team was made redundant less than 12 months later. There's always risk.
All you can do is thoroughly research your new firm and team to make sure you're happy with it. Gut feel is a very important barometer of these things. But what of the benefits of moving for your career? Will it help?
The answer, like the answer to most questions in software development, is "it depends.". Moving roles inherently comes with a pay rise, and who doesn't love one of those; traditionally it's 10% but can be a bit more or less (there's an amazing article here about how someone negotiated an extra $15k on top of their original target). That might be reason enough for you to move, and it was certainly my main motivating factor when I moved jobs for the first time (along with job happiness).
But there's a lot more to life and work than money. Job satisfaction, work-life balance, and career progression are all very important. You spend the vast majority of your life in the workplace, so you deserve to be happy. Whereas the previous generation would be loyal to the firm for half a century even if they hated their job (mostly for a final salary pension) the world is a very different place now- people only stay at roles for 2-5 years and the job market is very active, particularly in software development. Loyalty from employee to firm and firm to employee has eroded significantly. If you dislike your job then you should absolutely look to move roles — you deserve to be happy!
The same goes for work-life balance. This is something that is particularly important to me; even though I enjoy my job, I work to live, I don't live to work. I have friends who work long into the evenings and sometimes come in at weekends to catch up with work because they're under too much pressure. In my recent article on writing online, someone commented they didn't have time to write because they were working such long hours. If you keep doing this then the company isn't going to stop you as they're effectively getting free work out of you by stretching you over capacity. If this is you, then change jobs! A good employer will have you working sensible hours the majority of the time which means the work you'll do when you are there will be better. Right now it's an employees market. Good developers are desperately needed and there are more jobs than good people.
How a company move will affect your career also depends, but overall it's likely to be a good thing as long as you aren't changing every 6-12 months as employers like to see some stability. A new firm is a big challenge but an incredible learning opportunity, and the only way to improve your skillset is with constant learning. You will be exposed to new technologies and new ways of working. Some will be better than what you've experienced before, some will be worse. Either way you're adding the knowledge into your memory so that in the future if you were asked, for example, to run a team, you'd have a good selection of experiences to draw on to help you decide how to do it.
I recommend that Junior developers move at least once in their early careers so that they can get an experience of different company cultures, plus a well-deserved pay raise. This will help you to decide what sort of environment makes you happiest to work in. Hopefully it's in the new firm! In my recent interviews with a range of senior developers for my upcoming book, the general concensus was that to move from being a junior to senior developer was not contingent on being at lots of different firms, although staying at one firm and team was a bit of a red flag as it can lead to complacent and stale developers.
What did come up consistently was the idea of changing teams internally. This allows you to reduce the risk of the move as you're still in the same company but get many of the benefits of a new team- interacting with new people, new technologies and new designs. It's something I've done 3 or 4 times now and I can highly recommend it, particularly if you're starting to get bored on your current project or role.
So what's the conclusion? If you're a junior developer, make sure you change your employer at least once, and try and rotate through new teams once every couple of years. This is the most effective way to increase your learning and knowledge, and help you on the journey to becoming a senior developer. There's a big difference between someone who does the same job every year for 10 years versus doing 10 different roles in 10 years. They've both got the same number of years as a developer, but the second has 10 times the experience.