01 - Preheat oven to 350°F. Thoroughly grease and flour a 9-inch round or square cake pan, ensuring all surfaces are coated to prevent sticking.
02 - In a medium bowl, sift together all-purpose flour, baking powder, baking soda, and salt until evenly distributed. Set aside.
03 - Using an electric mixer or sturdy whisk, beat softened butter and granulated sugar in a large bowl for approximately 3 minutes until the mixture appears pale, light, and fluffy.
04 - Add eggs one at a time, beating thoroughly after each addition until fully incorporated. Mix in vanilla extract.
05 - Gradually incorporate the dry ingredient mixture into the wet batter, alternating with buttermilk in three additions. Begin and end with the dry ingredients. Mix only until just combined to avoid developing gluten, which can make the cake tough.
06 - Toss chocolate chips with 2 tablespoons flour in a small bowl to coat them evenly. Gently fold the coated chips into the batter using a spatula.
07 - Transfer batter to the prepared pan, smoothing the surface. Sprinkle with coarse sugar or extra chocolate chips if desired. Bake for 35 to 40 minutes until a toothpick inserted into the center emerges clean or with a few moist crumbs attached.
08 - Let the cake rest in the pan for 10 minutes to set. Carefully invert onto a wire rack and allow to cool completely before slicing.