Heat oven to 180C/fan 160C/gas 4. Grease a 2-litre/3½-pint ovenproof dish lightly with butter. Tip the flour, sugar and baking powder, along with a pinch of salt, into a large bowl. Mix together the milk, butter, egg and vanilla extract and stir into the dry ingredients until you get a smooth batter. Arrange the apples in the dish, spoon the batter on top and smooth with a knife until the apples are covered.
For the topping, pour 250ml boiling water over the sugar and stir together until smooth. Pour the liquid over the pudding mixture, then scatter over the pecans. Bake for about 40 mins until the pudding has risen and is golden. Use a big spoon to serve the pudding, making sure you get some of the gooey caramel sauce covering the bottom of the dish. Serve with pouring cream, warm custard or vanilla ice cream.