Everyone knows that developers are creatures with a talent for turning caffeine and pizza into software. I assume, also, that everyone knows the best delivery medium for caffeine is a hot cup of coffee. And yet, brewing that perfect cup of coffee at home is not easy. This post is all about getting that consistently-great cup of coffee at home without spending a ton of money on a proper espresso machine.

I’m a bit of a coffee snob. I’ve tried everything from drip, pour over, french press, and even the Keurig (gasp!) in search of the perfect cup at home. Still, nothing came close to that shot of espresso pulled by an experienced barista at my favorite coffee shop. So, I decided I had to have my own proper espresso machine. The problem is decent espresso machines are expensive, bulky, and require regular maintenance. You also need a really good grinder for that perfect powdery espresso grind. I was discouraged.

AeroPress to the Rescue

Then a friend told me about his AeroPress. The snob in me was skeptical—I mean LOOK at that thing—but at $30 figured it was worth a try. I can definitely say the AeroPress is awesome and makes a cup of coffee that rivals true espresso from a machine. But the AeroPress is not for the casual coffee enthusiast. It takes some trial and error to figure out the best recipe and technique to get that perfect shot. There are so many factors that go into a great cup of coffee. Get any of them wrong and you’ve got a bitter, lifeless cup of brown water. The following is the recipe I follow every day and it’s so good I never feel the need to hit the coffee shop anymore.

Step 1: The Grind

First, a word about coffee grinders

For the best results you’ll want freshly ground beans. That means grinding them yourself. You might be tempted to go cheap and grab a $15 blade grinder like this one. Try to resist that temptation. Blade grinders work much like a blender—blades spinning at high speeds chopping up your precious coffee beans into a mixture of big chunks and tiny fine particles. This will result in an inconsistent and bitter-tasting coffee as those tiny particles will over-extract before the larger chunks have extracted at all.

The best coffee grinder is a burr grinder. Burr grinders are more expensive, but you can pick up a manual crank burr grinder for the same price as the junk blade grinders. The grinder I use is the Bodom Bistro Electric Burr Grinder and I’ve been very happy with it.

Weigh your beans

Do yourself a favor and invest in a kitchen scale. It’s the only way to measure out your beans consistently. For a double-shot espresso I use 30 grams of coffee. If you don’t have a scale: That’s about 1/2 cup of beans.

Once you’ve measured out your beans you’re ready to grind them. The AeroPress works best with a grind that is somewhere between traditional espresso and drip. The ground coffee should be about the consistency of table salt.

Step 2: The Extraction

Take your AeroPress and pull the plunger almost all the way out until the seal is lined up with the number 4. Place the AeroPress upside down on a counter or other flat surface. This is called the “inverted method” and allows you to let your coffee extract without it leaking through the filter.

Pour your ground coffee into the chamber being careful not to spill any on the rim where the filter cap attaches. The supplied funnel is really handy for this, just be sure to rinse off all the coffee grounds as you’ll need it again later!

Carefully add hot water to the chamber until it is about 2/3 full. Use the supplied paddle to gently mix the coffee and water together just until all the grounds are saturated with water. Let stand for 15 seconds. During this step the hot water starts to soften up the coffee grounds and allows them to release gases in a process called “blooming”. Some coffee blooms more than others. Very dark roasts like Starbucks don’t bloom at all because they lose their gases in the roasting process.

Add more water to fill the chamber completely. Place a filter in the cap and attach it securely to the end of the chamber. Let stand for 1 minute.

A note on water temperature

Water temperature is one of those factors that can seriously impact the taste of your coffee. Ideal temperature is 205° F. Boiling water will cause over-extraction and give your coffee burnt, acidic, and bitter flavors. Too cool and it won’t extract enough making it weak and sour-tasting. If you don’t have a thermometer handy you can heat your water until it just starts to boil and then let it sit for a minute or two to cool down to an ideal temperature.

Step 2: The Brew

Now the fun part.

Place the (rinsed off) funnel in your cup of choice. Quickly flip the AeroPress over onto the funnel and begin pressing down on the plunger. Expect some resistance as you’re pressing the coffee through the fine filter. Some guides say to stop as soon as you hear a slight hissing sound, but I ignore that. I keep pressing hard until all the liquid has been expelled.

Step 3: Enjoy

At this point your coffee is ready to drink. You could also add more hot water for nice caffè americano. My personal favorite is to froth some milk for a latte. Enjoy!