Preheat the Oven: Start by preheating your oven to 350°F (175°C). Grease and flour a large sheet cake pan (approximately 18x13 inches).
Mix Dry Ingredients: In a large mixing bowl, combine the flour, sugar, baking soda, and salt. Whisk until well combined.
Prepare Chocolate Mixture: In a saucepan, melt the butter and add water and cocoa powder. Bring it to a boil, stirring continuously. Once boiling, pour this mixture over the flour mixture and mix well.
Add Remaining Ingredients: Stir in buttermilk, eggs, and vanilla extract until the batter is smooth and well combined.
Bake the Cake: Pour the batter into the prepared pan and bake for about 20-25 minutes, or until a toothpick inserted in the center comes out clean.
Prepare the Frosting: While the cake is baking, combine powdered sugar, cocoa powder, milk, butter, and vanilla extract in a saucepan. Cook over medium heat until smooth.
Frost the Cake: Once the cake is out of the oven, pour the warm frosting over it, spreading it evenly. Sprinkle with chopped pecans, if desired.
Cool and Serve: Allow the cake to cool slightly before slicing into squares and serving!