The second trick is not to buy snacks at all. If they are not in the pantry or the fridge you won't eat them. And if you absolutely must have a snack, how about a fruit or yogurt or dry fruits or nuts?

Thirdly, pop in a sugarless chewing gum when you feel like eating something.