Preheat oven to 400°F. Grease an 8-inch square pan or a 10-inch cast-iron skillet with the oil or butter; if using a skillet, place it in the oven to preheat.
In a large bowl, whisk together the cornmeal, flour, sugar, baking powder, baking soda, and salt.
In a separate bowl, whisk the buttermilk and eggs until smooth. Slowly whisk in the melted butter until combined.
Pour the wet mixture into the dry ingredients and stir just until combined; do not overmix. Fold in corn kernels if using.
Scrape the batter into the prepared pan or hot skillet and smooth the top.
Bake 18 to 22 minutes, until golden and a toothpick inserted in the center comes out clean.
Cool in the pan for 10 minutes. Slice into 9 pieces and serve warm. Great with butter and a drizzle of honey.