Here’s a good tip -
When you feel hungry, drink a glass of water instead. Thirst and hunger feel like the same thing initially, but we normally go for the snacks. Try it and see after 5 mins if you still feel hungry.
Obviously, you’ll still need to maintain the status symbol of a true programmer – the pyramid of soda cans on your desk proving you work later than everyone else…