In a large bowl, add butter and sugar. Using a hand mixer (or stand mixer) combine together for 2 minutes.
Add in the egg, the yolk, vanilla, baking powder, and salt. Mix for 1 minute until smooth, scraping the sides of the bowl as necessary.
Set your mixer to low, add in the flour, mixing until just combined. Don't overmix otherwise the dough will make hard cookies.
Divide the dough in half, removing half from the mixing bowl.
Add in the cocoa powder to the remaining dough in the mixing bowl and mix until incorporated.
Form each dough into a long square block, about 15cm long. Make sure both are the same size.
Wrap each dough in plastic wrap and put it in the fridge to harden, for at least 1 hour.
Using a sharp knife slice the dough into thirds, lengthwise. Then turn the dough one turn (90 degrees) and cut into thirds again. You will have 9 long strips. Repeat the process with the other dough. You will have 18 strips in total.
Taking one chocolate length, one vanilla, a second chocolate to make the first layer (see image below).
Repeat but with the opposite - one vanilla length, one chocolate, a second vanilla to make the middle layer (see image below). Then repeat first layer again to complete the cube.
Wrap together in plastic wrap again. Gently press down on all four sides to seal the dough together. The key is to keep the dough in a square shape.
Preheat the oven to 175°C. Line a baking sheet with baking paper.
Unwrap the dough and slice into 1cm thick pieces.
Place the pieces on the prepared baking sheet.
Bake for 9-10 minutes, or until lightly golden brown. Transfer to a wire rack to cool completely.