In a heavy saucepan or enameled Dutch oven combine the dry ingredients: sugar, unsweetened cocoa powder and cornstarch.
Whisk in the milk.
Continue stirring and cook over medium heat until thickened and bubbly.
Cook 2 minutes more.
Remove the mixture from the heat and gradually stir in one cup of the hot milk mixture into the egg yolks. See note below for how to temper eggs.
Once the eggs are very hot, pour them into the milk mixture and whisk to combine.
Bring it to a gentle simmer and then reduce heat.
Cook and stir for two more minutes.
Remove from heat and stir in butter and vanilla.
Pour the pudding into a bowl or two quart mason jars.
Store in the refrigerator for up to 3 days and see helpful tips below for the best way to keep pudding fresh.
Notes
TROUBLESHOOTING AND TIPS
Did you know that it is possible to keep your chocolate pudding from getting watery? To do this, do not cover your pudding when it is still hot. Once it cools all the way, you can cover it with a piece of plastic wrap. I would recommend pushing the plastic wrap so it is snug against the top of the pudding. This does not leave any room for condensation to form on the plastic wrap. If your homemade pudding is not thickening when you are making it, you might need to add more cornstarch. To do this used 1 tablespoon cornstarch and 1 tablespoon cold water, mix it well and add it to the hot pudding mixture while it is still on the stove. Do not forget the pudding will continue to thicken in the fridge as it cools. If you have noticed that your pudding didn't set once it cooled, it could be a result of your eggs eating your cornstarch. The only way to possibly fix this is by adding more cornstarch and mixing it well then reheating it to a boil.
SERVING SUGGESTIONS
If you looking for something a little more savory that plain chocolate pudding, try topping your chocolate pudding with whipped cream with chocolate shavings on top. My personal favorite "topping" is dipped fresh fruit. There is just something about chocolate covered strawberries or chocolate covered bananas, but not chocolate covered like you are thinking, a thick creamy chocolate.
STORAGE
This homemade chocolate pudding recipe stores in the fridge covered in a layer of plastic wrap. Do not forget about it, though. It will taste best if eaten in the first 3 days.