The 2 hour thing is pure BS. Usually you can leave cooked food out for 12 hours with no issues. It might reduce the time you can store the food in the fridge afterwards but frankly I haven't noticed. It seems that the bacteria that grows in your food at room temperature is different from the kind that grows in the fridge.
This all assumes that you were the one who cooked the food. If the cooked food comes from somewhere else you don't know how long it's been sitting out. The two hour thing might not be a bad idea in that case.
Carbs like pasta can go bad relatively quickly especially in the presence of water, but it will have a very bad smell, so there's no chance you will accidentally eat it in that state.
We are good at detecting spoiled food. Look for changes in texture (slime), look (mold), smell and taste. If something looks off it's probably not a good idea to eat. Otherwise I wouldn't worry too much.
Of course you don't want to eat food that's too old as the nutrients in the food break down over time making it less nutritious. Usually foods that are tasty (freshly cooked) are also the most nutritious.
(post is archived)