Cut butter into cubes and place into the mixing bowl. Grate cheddar cheese into the mixing bowl. Let butter and cheese stand at room temperature for 30 minutes until they have softened. It is important that both are at room temperature before you start creaming them.
Preheat oven to 185°C (conventional) / 175°C (convection). Line a baking sheet with Silpat / parchment paper.
Whisk flour, cornstarch and baking powder in a small bowl. Set aside.
Once butter and cheese have softened, add in salt and cayenne pepper (if using). Using an electric mixer, beat on medium speed until everything is blended together, about 3 to 5 minutes, scrapping down the sides with a rubber spatula occasionally.
Sift in the flour mixture and mix on low until the flour mixture is just incorporated. Use a rubber spatula and fold a few times, scrapping the bottom of the mixing bowl with each fold, to ensure the dough is mixed well. Transfer the dough into a piping bag.
Snip off the tip of the piping bag at 1.5cm. Pipe 5-cm sticks onto the lined baking sheet, spacing them about 2 to 3 cm apart. (See Step-by-Step Photos above for further details). If the dough is too stiff, you can massage the piping bag so that the heat from your hands can soften the dough.
Whisk egg yolk in a small bowl with a few drops of water as required to make an egg wash. Brush the top of the dough with egg wash.
Bake the cheese sticks for 10 minutes. Rotate the baking sheet and bake for another 2 to 3 minutes until cheese sticks are golden-brown in colour. Transfer baking sheets onto a wire rack and let the cheese sticks cool completely on the baking sheet. Store the cheese sticks in an air-tight container.
NOTES
Use good-quality cheddar cheese as this will form the base flavour of your cheese sticks. I recommend getting a block of cheese and grate your own as pre-grated cheddar cheese may contain starch (used to prevent sticking) or other additives which may affect the end-result.
Different cheese has different level of saltiness. It is better to under-salt than to over-salt. You can always sprinkle a little more salt on these cookies after baking or adjust the amount of salt the next time you make them.