For many years now, the conventional viewpoint has been that snacking was unhealthy and something that should be avoided as much as possible. In fact, too much snacking was and still is often blamed as one of the root causes of the current obesity epidemic.

This is true in some ways, as snacking on fatty processed foods definitely doesn’t provide any health benefits—especially for people who aren’t especially active. However, when it comes to athletes and other more active people, science is beginning to show that snacking is one of the best things you can do to keep your body functioning at its optimal level.

People who put themselves through tough workouts or training on a daily basis obviously require many more calories than those who are less active. Still, the problem lies not in ensuring that you get enough calories, but instead that you get those calories at the right time.

Eating healthy snacks right before working out is an easy way to ensure that your body has the energy you’ll be burning. Without providing your body with enough calories, it will end up breaking down and consuming your muscle tissue to provide the necessary energy. This is especially problematic if you’re trying to build muscle, as it means you’ll basically end up treading water and not ever seeing any noticeable gains.

Snacking is especially important for people who train or workout for more than an hour or two a day, as there’s really no way you can provide your body with enough energy to keep this up without snacking in between meals. The problem is that you don’t really get much by increasing the size of your meals because bigger meals take longer and are tougher to digest. Snacking every three or four hours is a much easier way to provide your body with those extra calories.

Still, science is showing that snacking isn’t just a good idea for athletes or those looking to build muscle. In fact, there is evidence that it can also help you lose weight. The reason behind this is that eating healthy, high-energy low-fat snacks is one of the best ways to keep your blood sugar levels steady.

Sudden drops in blood sugar can not only make you cranky but they also often drive people to overeat. This is especially true if you often skip meals. In this case, your blood sugar will likely be quite low when you do finally have a meal, with the result that you’ll generally feel compelled to eat much more. However, having a snack an hour or so before the meal can help bring your blood sugar level back up to normal, which should make it easier for you to practice proper portion control.

No matter whether you’re trying to bulk up or lose weight, the biggest key is to always choose healthy snacks. Your best bet is foods that are high in protein and high in carbohydrates, but the exact ratio between the two depends on what you’re trying to achieve. If you’re looking to lose weight, non-fat yogurt and some fresh fruit are probably better than a few protein bars. Either way, you should always make sure to steer clear of fatty, fried and overly processed foods as much as possible.