I had read this article by Megan at Sorta Crunchy a while ago and came across it again recently. It is so worth reading, not only if you have kids (though especially if you have kids) but when you're dealing with people in general it's a good reminder that if someone's cranky there might be a very simple reason for it.
That's it. So simple, and covers such a large percentage of child meltdowns. Fix the reason, fix the meltdown.