Preheat the oven to 350 degrees F and grease and flour two 9-inch round cake pans.
In a big bowl, mix the flour, sugar, baking soda, and salt.
In a medium saucepan over medium heat, melt the butter. Whisk in the coffee, cocoa powder, and 1/2 cup water and heat it for a minute, stirring constantly. Pour the melted butter mixture into the flour mixture and whisk until well combined.
In a medium bowl, whisk the eggs, buttermilk, and vanilla. Add it to the batter and mix until smooth.
Divide the batter between the two cake pans, scraping all the batter from the bowl with a rubber spatula. Bake for about 40 minutes, or until a toothpick inserted into the center comes out clean. Let cool for 15 minutes in the pans and then turn out onto a wire rack to cool completely.
Frost with buttercream frosting
In the bowl of a stand mixer fitted with the whisk attachment, combine all the ingredients. Whip the mixture on low speed for a while. When the sugar is incorporated, turn the mixer speed up and whip until the buttercream is smooth and looks right to you. If it's too cold, persuade it with a blowtorch if you have one. If it's too wet, add a bit more powdered sugar. If it's too stiff, add a bit more butter. Be sure to scrape the sides of the bowl once or twice to make sure everything is combined.
Use immediately or store in an airtight container at room temperature for 24 hours or in the fridge for up to 2 weeks. Rewhip cold buttercream before using it.
Variation: The water/coffee combo in this recipe can be switched up, but remember, coffee is to chocolate like salt is to beef. Coffee brings out the flavor of chocolate without making it taste like coffee, just as salt brings out the flavor of meat without making it taste salty. The liquid you use can be all water, or it can be a full cup of coffee for more of a mocha-flavored cake. And if you're feeling really bold, go ahead and use a cup of a dark stout beer instead. Get creative and experiment a little — after all, it is a science project.