01 - Preheat oven to 350°F. Grease and flour a 9-inch round or square cake pan, ensuring all surfaces are coated to prevent sticking.
02 - In a medium bowl, whisk together the flour, baking powder, baking soda, and salt until thoroughly blended. Set aside for later use.
03 - In a large bowl, beat softened butter and granulated sugar with an electric mixer on medium speed until light and fluffy, approximately 3 minutes.
04 - Add eggs one at a time, beating well after each addition until fully incorporated. Stir in vanilla extract.
05 - Gradually add dry ingredients to butter mixture, alternating with buttermilk. Begin and end with dry ingredients. Mix until just combined, taking care not to overmix.
06 - Toss chocolate chips with 2 tablespoons flour in a small bowl until lightly coated. Gently fold chips into batter using a rubber spatula until evenly distributed.
07 - Pour batter into prepared pan, smoothing the top with spatula. Sprinkle with coarse sugar or extra chocolate chips if desired. Bake for 35 to 40 minutes until a toothpick inserted in center comes out clean or with a few moist crumbs.
08 - Allow cake to cool in pan for 10 minutes before transferring to a wire rack to cool completely. Slice and serve at room temperature.