To evaluate the risk posed by a particular dish, food safety experts recommend using the mnemonic FAT TOM, which describes the six factors that influence how pathogens grow: Food, Acidity, Time, Temperature, Oxygen, Moisture. The goal of kitchen safety is basically to keep the things on this list under control so food will remain safe and last longer, so you should always be thinking about how they play into one another when you're cooking or storing food. The good news is that a safe kitchen also creates the right conditions for making food last. Rice that's been properly cooled and promptly stored in a sealed container, for example, has a longer shelf-life than rice that's left on the stove for a couple of hours after cooking, then put in the fridge in that same pot. That's because you've done your best to keep the dish at a safe temperature, oxygen level, and moisture level (we'll explain how in a minute). Food that's dried out, either with heat or with salt curing, will last longer. So will food deprived of oxygen by way of canning or a technique called confit, which smothers meats in fat. Keeping foods at the right temperature during their prep and storage (and reheating them properly) will minimize danger, as will a certain degree of acidity—that's how pickling works. Eventually, everything will go bad, so older is generally less safe. You can get more specific guidelines on these factors here.