Preheat the oven to 170 C (160 C fan). Grease and line the baking loaf tin with baking paper and set aside.
Pour the Guinness into a medium saucepan and add the butter. Cook on medium heat until the butter has melted. Remove from the heat and stir in the cocoa powder and sugar into the warm liquid. In a small jug or mug, mix together the egg, vanilla and buttermilk, and add this to the mixture in the pan.
Sift the flour, baking soda and baking powder into a large bowl or a bowl of a freestanding or an electric mixer. Set the speed on low and pour in the contents of the saucepan. Scrape down the sides and the bottom of the bowl and continue to mix until all the ingredients are incorporated, 1- 2 minutes.
Pour the batter into the prepared baking tin and bake for 35-40 minutes, or until the sponge bounces back when lightly pressed and a skewer inserted into the middle of the cake comes out clean. Set aside to cool, then remove from the baking tin to the wire rack to allow to cool completely.
For the frosting:
Using a freestanding mixer with paddle attachment or an electric whisk, mix the butter for couple of minutes until pale and fluffy. Gradually add the icing sugar in three batches, until you have sandy mixture. Add the cream cheese and mix on low speed, then increase the speed to medium and beat until the frosting is light and fluffy.
Once cake is completely cool, top it generously with the cream cheese frosting. You can decorate the cake with chocolate curls or dusting of cocoa powder. Enjoy!