On the first day of your experiment, when you feel the urge to go to the cafeteria and buy a cookie, adjust your routine so it delivers a different reward. For instance, instead of walking to the cafeteria, go outside, walk around the block, and then go back to your desk without eating anything. The next day, go to the cafeteria and buy a donut, or a candy bar, and eat it at your desk. The next day, go to the cafeteria, buy an apple, and eat it while chatting with your friends.