Butter a 1 litre baking dish. Sift the flour, golden caster sugar, baking powder and cocoa with a pinch of salt into a bowl. Combine the milk, melted butter, egg and vanilla. Mix the two sets of ingredients together and add the nuts (if using). Pour the mix into the pie dish. Cover with clingfilm and put in the fridge for 4-5 hours or overnight to set.
When you are ready to cook, remove the clingfilm and heat the oven to 180C/fan 160C/gas 4. Sprinkle the brown sugar and the cocoa over the pudding and pour 250ml of boiling water over the top.
Put in the oven and cook for 45 minutes until puffy and firm in the centre - there will be a puddle of chocolate sauce in the base of the dish when you break the crust. Serve with cream or ice cream.