The way chocolate pudding ought to be: smooth, rich and skinless. (Edward Schneider)

At some point I outgrew box-based foods (which are probably not foods at all by Michael Pollan’s criteria in his “Food Rules”), but I never outgrew my fondness for chocolate pudding. There’s no real substitute: An airy chocolate mousse is a great thing, and so is a cream-rich, eggy pot de creme au chocolat. But when you want pudding, you want pudding with its density and uniform smoothness.

 Like many convenience foods, chocolate pudding appears at first blush to be something that can’t easily be duplicated from scratch. But once you realize that it is chocolate-flavored starch-thickened pastry cream, it becomes a possibility, and an easy one at that — far easier than those French-pudding imitations.

 After a few attempts (some better than others, but no real failures; the result always tasted good), I settled on this way of making it. For six to eight servings, I whisked together 2 whole eggs (as opposed to the 7 yolks a classic pastry cream would use for this quantity of milk), 2 tablespoons cornstarch, 1/4 cup sugar (you might try it with none, as there’s plenty in the chocolate), 1/4 teaspoon fine salt, a little pure vanilla extract and 2 tablespoons unsweetened cocoa powder. In a heavy saucepan, I brought 2 1/2 cups whole milk to just under a boil and gradually stirred it into the egg mixture, then returned this to the saucepan and carefully brought it to boiling point, slowly whisking all the time until the mixture thickened and the occasional bubble burped its way to the surface. Keep the mixture moving lest it burn; it is unlikely to curdle like a starch-free custard cream.

 I took it off the heat and immediately added 6 ounces of good dark chocolate (you could make it 7 ounces, but there’s no need): I used a 64 percent cacao chocolate bought in the form of quick-melting little disks. If you buy your chocolate in a bar, break it up beforehand. I kept stirring with a rubber spatula until the chocolate had melted and was integrated into the mixture.

 That was that. I scraped half into each of two serving bowls, one for that evening and one for later and left it to cool, its surface covered with plastic wrap. This, for the sake of fellow diners, prevented the formation of a skin. If I’d had enough matching custard cups I could have made individual servings, but spooning it out of a larger bowl is fun as well. Likewise, if I’d had some good, skinned hazelnuts in the house I could have toasted a handful, chopped them and offered them as a topping. As it was, I served the pudding with whipped cream and plain butter cookies.

 Thanks to the use of both cocoa and good chocolate, this pudding is intensely flavorful, and has the requisite smoothness and density. Of course, it wasn’t any better than my memory of the version out of a box, but the fact is that it was infinitely superior to that stuff itself.

Edward Schneider has been writing about food and travel for more than 30 years, for publications including The Washington Post, the New York Times, the Christian Science Monitor and Huffington Post. His Cooking Off the Cuff column appears Fridays in All We Can Eat. Follow him on Twitter: @TimeToCook.