How to make a perfect cup of coffee
Rule 1. Buy Fresh Beans
Without question, coffee is best when used within days of being roasted. Buying from a local roaster (or roasting your own) is the surest way to get the absolute freshest beans. Be wary of buying bulk coffee from supermarket display bins. Oxygen and bright light are the worst flavor busters for roasted beans, so unless the store is conscientious about selling fresh coffee, the storage tubes get coated with coffee oils, which turn rancid. Coffee beans packaged by quality-conscious roasters and sold in sturdy, vacuum-sealed bags are often a better bet.

Rule 2. Keep Coffee Beans Fresh
Always store opened coffee beans in an airtight container. Glass canning jars or ceramic storage crocks with rubber-gasket seals are good choices. Never refrigerate (roasted beans are porous and readily take up moisture and food odors). Flavor experts strongly advise against ever freezing coffee, especially dark roasts. Optimally, buy a 5- to 7-day supply of fresh beans at a time and keep at room temperature.