Dorie Greenspan swears by this clever trick.

Cookies have a way of doing their own thing in the oven. But this holiday season, we’re saying goodbye to wayward edges and uneven browning thanks to a brilliant trick from baking extraordinaire Dorie Greenspan.

Greenspan, author of countless cookbooks, including the new Dorie's Cookies, told Epicurious that she learned through trial and error that baking cookies in small metal ring molds is the best way to give them a clean, tailored look.

"Left to their own devices, cookies will spread, but here they had to grow in their tiny little homes, and became crisper around the edges, which I loved," she explained.

It was actually one of Greenspan’s friends who discovered that muffin tins produce the same effect.  The cookie guru was hooked.

"And once I started baking them in muffin tins, I couldn’t stop," Greenspan told Epicurious. "Like ginger molasses cookies. They're delicious baked in balls, but they were crying out for the muffin-tin treatment. It’s a really interesting way to change the texture."

Here’s how to turn that old muffin tin into a cookie making factory. Scoop cookie dough with a standard two-tablespoon cookie scoop or spoon. Most cookies already contain enough butter, don’t worry about buttering the muffin pan, Greenspan explained. Last but not least, use a little jar with plastic wrap to press down the surface of the dough. And then bake, letting the oven do the rest. Just be sure to check on them a little earlier than you’re used to, as the edges could brown more quickly.

Flawless cookies, here we come!