In a large bowl, beat ½ cup unsalted butter, softened, with ¾ cup light brown sugar and ¼ cup granulated sugar. Add 1 egg and 1 teaspoon vanilla extract and mix very well.
Add sifted dry ingredients (1 ½ cups + 2 tablespoons all-purpose flour, ½ teaspoon baking powder, ½ teaspoon baking soda and ½ teaspoon salt) in 2 additions and mix to combine well.
Add 1 cup walnuts, chopped, and stir to incorporate.
Have prepared a piece of plastic wrap. Place half of the cookie dough along the long side of the plastic. Taking one long side, wrap it over the cookie dough and roll the plastic to cover tightly and produce a cylinder.
Prick with a fork and let the trapped air out. That way, the plastic will stick to the dough. Roll lightly to make the cylinder as round as possible.
Repeat with the rest of the dough. Refrigerate both cylinders for several hours, until firm enough to cut, or freeze them for up to a month.
When you’re ready to bake, preheat oven to 350°F (180°C).
Line cookie sheets with parchment paper.
Take out cookie cylinders from the freezer and wait 5-10 minutes until they can be cut with a sharp kitchen knife.
They don’t have to be soft or they will loose the shape.
Cut rounds about ½ inch thick and place on prepared cookie sheets.
Bake for 10-12 minutes, until golden but barely soft. Let cool completely on wire rack and fill.
Take heaped spoonfuls of pastry dulce de leche and place on the flat side of one cookie. Cover with another cookie and press lightly to spread the dulce de leche.
Notes
Cookies: they are better if baked barely soft. When you bite the alfajor and the cookies are not hard, the dulce de leche won't ooze out. Dulce de leche: There are two common types of dulce de leche, regular and pastry. The latter is better for filling alfajores because it holds better as it's thicker. It should have the word 'repostero'. Keeping: they can be kept in tins or airtight containers, but if they are already filled, they will soften as the days go by. I find this to be a plus, but if you don't, you can keep the cookies alone in a tin and fill them when ready to eat.Filling the cookies: there are two ways of sandwiching the dulce de leche filling: Spoon: This is my favorite way because it means taking a tablespoon of dulce de leche and arranging it in the middle of one cookie. When you press down with the second one, it flattens out a bit, and you get your alfajor. The result is rustic and not picture-perfect, which is fine since these are meant to be eaten at home. Piping bag: You can pipe the dulce de leche. This is a great way of filling these alfajores if you sell them or want to give them out as gifts. It is more time and labor-intensive, though not complicated.