Preheat the oven to 400 degrees. Grease an 18-by-12-inch sheet pan.
Make the cake:
Combine the flour and sugar in a large bowl.
Combine the water, butter, shortening, and cocoa in a small saucepan and bring to a boil. Pour over the flour mixture.
In a small bowl, whisk the buttermilk, eggs, baking soda, and vanilla together. Add to the batter and blend thoroughly by hand. Don’t use an electric mixer.
Pour into the baking sheet and bake for 20 minutes or until a cake tester come out clean.
When the cake has baked for about 15 minutes, make the icing:
Combine the butter, milk, and cocoa in a large saucepan. Bring to a boil and stir in the confectioners’ sugar and walnuts, if desired. Pour the icing over the cake as soon as it is removed from the oven and spread it out evenly.
Let the cake cool completely on a rack before serving from the pan.