Job-hopping is okay
Job-hopping is okay, provided it is managed properly. This is because the more you hop, the harder it is to convince your next employer to hire you. After all, the whole hiring process can be costly and time consuming. No employers relish the prospect of hiring a candidate who would resign within a year. Not to mention the amount of resources spent on training the candidate. So how long should we stay before moving on to the next company? My take is a minimum stay of two years. One of my ex-bosses told me that typically it takes about one year to train a worker up to speed and another year for the person to contribute meaningful to the organization. So probably you need to stay for at least two years in order to reflect some credible achievements in your resume.
Knowing what you want
I think no one enjoys job-hopping. After all, it can be quite a pain in the ass to learn everything all over again. So my advice is even if you have to switch job, make sure the next one is still within the same industry. Then at least you would still retain the basic foundational knowledge and skills and need not start from scratch in your new company again. It is important to know what you want before you make the next leap. This would certainly help to reduce the incidence of job-hopping. For example, one of my friends switched to another company because it pays good bonuses every year. He totally hates the job because of the heavy workload but stays on three years already, for the sake of money. Do research and ask friends who might know people working in the company you are interested in. Find out about the company's culture, expectations and role of the position you are interested in before you made the jump.