And drink a tall glass of water three minutes before you feel like snacking. It'll keep you hydrated, which is good, and you'll snack less on average. A lot of the munchies is actually dehydration (like late night snacking).
Also, if you have peanuts or something and you're just watching TV rather than coding try eating them with chopsticks to slow you down so you notice when you're full. Once you get good at that, try peanuts with a fork or do the toss and catch or something ;-)
PS: If grapes aren't quite 'coding munchie' enough for you, try roasting with garlic, olive oil, pepper and salt. This really works. Mmm.
I don't know if it's age (in my late 20s) or an increased interest in being attuned to my body, but food management has become critical to my daily productivity.
So yeah, I get into the coding zone with grapes.
I know, I know, you're supposed to get away from your terminal and eat in the other room. But I never do.
I either a. eat a meal while surfing or b. munch on something while coding. It's the munching while coding that I've never been able to do "mindfully".
The best coding munchies are almost always the worst things to eat, like microwave popcorn, chips, cookies, and soda. When you're 4 levels deep into a nested routine, who notices that the munchies are gone? I suppose I could eat fresh fruit or something like that, but honestly, has anyone ever gotten into the "coding zone" eating grapes?