Hmm, no rule per se. I just try to do the best I can everyday to eat mostly whole foods and avoid most processed foods. The cake batter example is an odd one for me - I don't keep sweets in the house, so I wouldn't have cake batter. I try to keep sweets as isolated, single portion incidents outside the home!
If I were going to make a cake (maybe for an event??) I guess I would use a mix, since I'm not much of a baker. I did recently make a cheesecake from scratch, it wasn't too hard
The processed stuff I buy is balanced with the convenience factor - I would love the time to make my own pasta, bread, tortillas, salsa, granola, etc etc. but I just don't have that kind of time (or I choose not to make the time). I do have strict rules (for myself) for white flour and packaged baked goods products, those I try never to eat and wouldn't bring into the house.
Some other processed foods set off my "triggers" like crackers and cold cereal, so I usually don't buy those (although I don't think there's anything wrong with Kashi organic crackers, I just don't want to eat a whole box in one night).