Making a pledge to keep eating in the kitchen or dining room and away from the desk helps to remove your mind's association of food with working at your desk or playing games. The same goes for eating in front of the TV. If you do it often, it becomes an unhealthy habit.
If you're already in an eating-at-the-desk rut, you can also use this habit-forming behavior to your advantage. Instead of snacking at your desk, grab for a bottle of water to build an association between your workspace and getting hydrated.
Of course, sometimes you absolutely must eat in front of the computer. So if you're crunched for time because of a late-night deadline or a terribly important lunch call, you can at least try to keep it clean.