Add the sugar and cornstarch to a medium-sized pot. Mix them together and set the pot over medium heat.
Add the milk and stir constantly until it comes to a boil. Continue stirring for 1 minute longer.
The milk should be thick enough to coat the back of wooden spoon. Take the mixture off the heat.
Beat the egg yolks. Whisk one tablespoon of the hot milk into the beaten egg yolks.
Continue to whisk in the milk, tablespoon by tablespoon, until the egg mixture is very warm.
Set the remaining pot of milk over medium heat and whisk in the warmed egg mixture. Bring the pudding to a boil while stirring constantly. Continue stirring for 1 minute longer.
Take the pudding off the heat. Add the vanilla and the butter. Stir until the butter has melted.
Strain the pudding through a fine mesh sieve.
Add the strained pudding to a large bowl. Serve warm or cover with plastic film touching the pudding's surface and store in the refrigerator until the pudding has cooled.