Spray 9 x 13 baking pan with nonstick cooking spray.
In a large bowl, with an electric mixer, stir together cake mix, dry pudding mix, eggs, oil and Coke for about 2 minutes on medium speed.
Pour batter into prepared baking dish and bake according to package directions (usually 35-40 minutes). Note: The cake will have a slight dip in the center. This is normal. When it is done, a toothpick will come out clean.
For the frosting:
In a medium saucepan, over medium-low heat, start melting butter.
Add in cocoa powder and heavy cream (or milk, if using) and stir.
Then whisk in confectioners sugar. Stir briskly with a whisk to get all the lumps out.
Take mixture off heat and stir in vanilla extract.
Pour frosting over cake and evenly spread it out over cake.
Sprinkle chopped nuts on top, if using. I think this cake is best served warm with a scoop of vanilla ice cream.
If you are using milk instead of heavy cream, you will probably only need about 3-4 tbsp. of it because milk is thinner than heavy cream. Just use your judgement on it. Start with less and add a little at a time to get the right consistency. Or, you can always add a bit more powdered sugar to the frosting to make it thicker if you like.