I've had, and quit, a lot of jobs. The reasons for doing so vary from moving out of state to seeing layoffs (I've never been laid off myself, but I've survived massive layoffs and I see that as writing on the wall) to being totally unsatisifed with my work situation.
With each new job search, friends and colleagues ask me if I worry that my resumé, showing that I hop jobs, will become a liability. I always tell them that my experience has reinforced that it isn't a problem. It rarely comes up during interviews. And when it has, my explanation of the circumstances that lead to each new position has always satisfied the person interviewing me. Plus - as a computer programmer, I benefit from demand far outweighing supply.
That said, it does weigh on me. I would like circumstances to work out whereby all of the following remain the same for a longer period of time: my happiness with the work I'm doing, my personal life remaining stable and the company remaining economically viable.
In either case, there are a lot of opinions on job hopping so I wanted to spend some time expounding on my experiences. One thing to note: since I am a job hopper, all of my opinions are coming from that experience. Someone who has been at one job for a long period of time may have a completely different perspective. What I see as benefits or drawbacks, they may see otherwise.
A little insight into my background: I've had 8 jobs in the last 11 years. The longest time I've stayed with a company is two years and two months. The shortest was 8 months. Two of those job changes occurred while I was an independent contractor - a 10 month gig and a 1.25 years gig. Some people consider the sum total of their contractor experience as one job, but I break it up by who was paying me. I wasn't working for an agency. I went directly to companies who needed temporary contractor help. Other than that - most full-time positions I had lasted between one and two years.
The Pros
A benefit of job hopping is that you get a nice breadth of knowledge. I think there's a misconception floating around that when you don't stay with a company for a long time, you don't really get a deep understanding of the business, or technical, problems they're trying to solve. I think that's a little too black and white. It really depends on what the business is and what your goals are. I've built banking applications, payment processing applications, ecommerce applications, financial planning applications, intranet sites and more. Each one of these domains and applications serve different needs and require slightly different technology choices. I don't mean they use different programming languages. I mean that the class of problems you're likely to face, or the features you're likely to add, are different. That adds up to a lot of experience in different settings.
You also gain a lot of organizational and general work experience. I've been a full-time, salaried employee. I've also been a contractor paid hourly, both with and without taxes withheld. I've worked at places with almost no process. I've worked in places that were new to Agile development. I've worked at shops that were doing strict XP Agile development. You gain experience into how each of these practices work, the benefits of drawbacks of each and in what environments they flourish or fail. And you can bring that experience with you to each new place.
This experience is useful when it comes to selecting your next job. With each job comes a little more insight into what you do and do not like about a given work situation. You can take each of those lessons to help determine what type of role and which type of organization you will be suited for.
I believe job hopping also keeps you on the top of your game. There is a tendency for tenured employees to get comfortable and coast. They rest on their laurels whereas new employees want to prove themselves as being worth the effort that went into hiring them.
Finally - I'd be remiss if I didn't mention compensation. Statistics bare out that you are likely to get a larger raise when changing jobs than you are from staying at your current job. The cost of living raise that most employees get annually is about 3% of your salary. If you get a promotion, you may get a bump of a few thousand dollars. But when you take a new job, you will likely get a respectable raise. Your prospective employer will want to make you an offer that is attractive so that you feel its worth the uprooting that comes with taking a new job. And frankly, since you have a job, you are in control. You don't have to take an offer that is lower, or even equal, to what you're currently making if you don't want to.
The Cons
Of course there are some downsides as well. For one, you lose out on the ability to "climb the corporate ladder" as it were. You usually have to put your time in at each rung before you move up to the next one and always being the new person means you are always starting out towards the bottom rung. Sure - sometimes the years of experience you have may bump you up slightly but you're unlikely to move up the way you do when you've put your time in. This really depends on your long-term career goals. For me, I've always just wanted to write code so it's never bothered me.
You also lose a chance for depth of knowledge. While a job hopper may have some experience in a lot of domains, when you stay at one job, you begin to have deep experience in that domain. Since I've never had a long-term job, I can't really speak to how a deep knowledge of your working domain would be beneficial. A guess is that it provides a better understanding of what features would be most useful to your product. That would be nice to have. One thing I do wish is that I could take more control, or understand more, of why I'm building whatever feature I'm working on. When you're relatively new to a job, you just know that you're working on something because someone told you to.
Starting a new job is jarring. There is the change to your routine that comes with any new position. Your commute may be different. Your hours may be different. You have those awkward first few weeks in the office where you have to get to know everyone. No matter what your expectations are, you don't really have any idea what the work environment is going to be like until you've spent a month or two at the job. No matter how many new jobs you take, this part never gets any easier.
Along the same lines, it takes time to prove your value at a new job. Yes, they like what they heard in your interview enough to bring you on board, but you're still going to have the earn the respect of your colleagues before they're not skeptical of your ideas. You will be starting from scratch each time.
While you'll benefit salary-wise from hopping jobs, there are a few forms of compensation that you may sacrifice. One is retirement. There is often a vesting period on the 401k match your employer gives you. If you don't stick out the job long enough, you're leaving free money on the table. Another is with vacation days. Typically - all new employees start with a given amount of vacation days per year. After a certain number of years, you start accruing more. Of course, you can negotiate everything, but if you don't, you will always be starting with the bare minimum.
Final Thoughts
The term "job hopping" used to have a negative connotation, but that is changing as more and more workers do it. Surviving, but witnessing, a few rounds of layoffs very early in my career gave me the perspective that loyalty is a two-way street. Your employer is not necessarily going to take care of you. Personally, I see job hopping as taking an active role in your career.
That doesn't mean you should be wary of your employer. It just means that you need to be prepared to do what is best for you. If you're totally happy in your position, why would you leave it? At the same time, if you're staying in a job just because you're worried about how it will look if you go find another one, you're doing yourself a disservice.
One final piece of advice. If you are going to switch jobs, make sure you've accomplished something at the current one. When you leave one position for another, you want to take some experience with you.