Preheat oven to 350 degrees. Melt chocolate in a small heatproof bowl set over a small pot of gently simmering water over medium-low heat, stirring occasionally with a wooden spoon. Remove bowl from heat and set aside until chocolate is cool. Meanwhile, grease a 8 inch square cake pan or 1 10 by 6 pyrex dish with butter and set aside. Sift flour and salt together in a small bowl and set aside. Stir baking soda into buttermilk in another small bowl and set aside.
Beat sugar and the remaining 5 tablespoons butter together with an electric mixer on medium speed until light and fluffy, about 2 minutes. Beat in egg yolks, then add melted chocolate and beat thoroughly combined. Add 1/3 of the buttermilk mixture, beating well after each addition. Repeat process to use all of both mixtures, then pour batter into prepared pan and bake until a toothpick inserted in center of cake comes out clean, 40 to 50 minutes. Transfer cake to a rack to cool in pan, then invert onto a cake plate.
Sift confectioners sugar and cocoa together in a medium bowl. Stir in butter, then coffee, then
vanilla, mixing well with a wooden spoon after each addition, until frosting is smooth. Spread
over top and sides of cake with frosting.