Grease and lightly flour an 8-inch round or square cake springform pan.
Preheat your oven to 180°C/Gas 4.
Melt the chocolate, coffee, rum or brandy (if using) and butter in a heavy-bottomed saucepan over low heat or in a bowl sitting in a pot of barely simmering water.
Remove from the heat and stir until well mixed.
Add the ground almonds and mix well.
Place eggs and sugar in the bowl of your mixer, using the whisk attachment, beat until really pale and fluffy (ribbon stage) you can test this by lifting the whisk from the bowl and if the egg mixture can hold its shape for at least 4 seconds.. you've reached the ribbon stage.
Fold the beaten egg mixture into the melted chocolate batter by first adding a little of the beaten eggs to lighten it then quickly fold in the rest of the eggs and mix only until incorporated.
Pour the batter into the prepared pan and bake for about 45 to 50 minutes or until a toothpick inserted in the center of the cake has a few moist crumbs.
Leave to cool before removing gently from the tin, and dust with icing sugar to serve.
Don't be alarmed if the cake sinks in the middle after taking it out of the oven to cool, that is supposed to happen.
Once cake is completely cooled, run a spatula around the inside of the pan before releasing the sides.
Dust with powdered sugar or cocoa before serving.