I am ALWAYS hungry when I finish a ride, I get lightheaded/headachey when I don't each soon enough after a ride. Just make sure you eat proteins.

What about the other problem? When you know you've eaten bad stuff all day? Do you just ride more? after the fact?