'Tis the time of year when amateur and professional bakers alike strut their culinary skills for the holiday party. But not even the simplest recipe or glossiest magazine photo spread can prevent an epic cookie fail. Even pre-packaged cookie boxes like the one below can drive home cooks batty.

Related Content The Great Uprising: How a Powder Revolutionized Baking

That overwhelming frustration of following a recipe so closely, only to open the oven door and discover one big cookie that looks like its been run over by a steam roller, is universal. As is that unfortunate first bite that brings consternation over the two hours wasted producing a treat with a closer resemblance to cardboard than ginger.

Here are some tips to help avoid these common cookie conundrums in the future.

1) Butter vs. Margarine

As food policy expert, gardener and author Joan Dye Gussow once said, “As for butter versus margarine, I trust cows more than I trust chemists.” When it comes to cookies, using butter or margarine is about personal preference. Butter is the all-natural way to go and many bakers claim it is the best option as it also has a little more flavor. But then there are also those who have been using margarine in the same cookie recipe for the past 50 years and swear by it. Whether you love or hate margarine you can thank Emperor Napoleon III ,who offered a prize to anyone who could create a cheap butter substitute that was easily accessible.

Whether you are team butter or team margarine, just make sure you are using it correctly. And if you are debating, Wally Amos, the man behind the original Famous Amos says to always go with butter. If you drop a stick of butter and an open container of margarine from the stairwell, the most that will happen to the butter is get a dent but the margarine will splat across the floor like a melon. The textures are different. If using margarine, make sure it is at least 80 percent vegetable oil or 100 calories per tablespoon. The fatter the better! If the margarine is under 80 percent then it has a high water content and will cause the cookies to spread and stick to the pan.

The temperature of whatever butter product you decide on makes a big impact on your final product. “Butter is like the concrete you use to pour the foundation of a building,” structural engineer turned baker Anita Chu told the New York Times. “So it’s very important to get it right: the temperature, the texture, the aeration.” Professionals say the most common mistake home bakers make when it comes to baking is how the butter is handled. Be sure to thoroughly follow the recipe directions.

The secret to perfect softened or room temperature butter is waiting, which is probably the most frustrating part of making cookies. The best way to get a stick of butter to the right temperature is to put it on the counter and leave it out for 30-60 minutes. If it is not soft enough, it will be clumpy and not mix completely in the batter. Once it is easily spreadable then it is ready. Do not microwave the butter to quicken the process, even if it is only for a few seconds. By microwaving, it is melting the butter and melted butter will cause the cookies to be flat. And if it melts completely, then it should not be used and cannot be re-chilled.

2) Flour

Sift or not to sift? Originally, the purpose of sifting was to get rid of lumps, impurities from the milling process and insects. Today, the latter two aren't big worries, but it is still a good idea to loosen up the flour when baking. When the flour has been sitting in the pantry shelf for days, weeks or, to be honest, months, the flour flattens. If you stick a measuring cup straight into the bag and/or pack the flour into the cup, you will most likely add just a little too much flour to the batter. If your cookies are a little dry, this might be why. A quick way to loosen the flour is to mix it with a spoon before measuring, then level it off with the back of a knife. Do not shake or hit the side of the measuring cup to level, for this will cause the flour to re-settle.

Bleached or unbleached all-purpose flour? Flour needs to age before it is ready for use. At the beginning of the 20th century, bleaching was used to quicken the aging process from months to weeks. During bleaching, the protein content of the flour is lowered, but not significantly enough to make a dramatic difference. Using one over the other is a much-debated topic amongst home bakers. Cindy Mushet, professional baker, teaching pastry chef and author of The Art and Soul of Baking recommends to always use unbleached flour because it is not highly processed, better for the environment and tastes better because of it. Overall, bleached and unbleached flour are interchangeable in a recipe to an extent and like butter and margarine, it is about personal preference.

But, whether bleached or unbleached, all-purpose flour is not interchangeable with other flour types such as cake, self rising or whole wheat.

When storing flour, be aware of the expiration date. The date is an estimate for the shelf life of an unopened bag of flour. Once opened, flour should be stored in a sealed container in a cool and dark area, a pantry shelf is fine. All-purpose flour lasts about 8 months. The life of flour can be extended if put in the fridge or freezer; this is especially so for whole grain flours. But if you bake just once a year, don't bother with that trick and splurge for a new bag of flour that hasn't lost its flavor.

3) Are the cookies a little too brown on the bottom?

If the cookies are coming out burnt or overdone on the bottom then it is most likely your cookie sheet that is the problem. The best sheet for baking is light colored, shiny, without sides and made from heavy-gauge aluminum. Baking pans with sides do not allow the cookies along the edge to spread evenly and make it difficult to pick up the cookies. Though dark non-stick baking pans are popular and many recipes say to use a nonstick pan, they cause the cookies to cook unevenly, leaving burnt or overdone bottoms. Also, the nonstick covering prevents the cookies from spreading and may result in thicker, less crispy cookies. The color also affects the cooking of the cookies. The dark color absorbs more energy from the oven and can lead to uneven baking with overdone bottoms and crispy edges. If all you have is a nonstick dark pan a quick fix is to turn the pan over and use the flat bottom. Then line the pan with aluminum foil or parchment paper.

4) Chill out

If a recipe says to put the dough in the refrigerator, then be sure to follow the rules. Chilling is especially important for making sliced and shaped cookies. By chilling, the dough becomes more malleable for rolling and evenly slicing. If you do not want to wait the whole time for the dough to chill in the fridge or are in somewhat of a rush, you can put the dough in the freezer. About 20 minutes in the freezer equals about 1 hour in the refrigerator. If using margarine, you need to put the dough in the freezer to get the right structure for molding.

5) Icing

When it comes to icing, tasting good should outweigh looking good. When you see those beautiful pieces intricately painted cookie art and say “Hey! I can do that,” think twice before setting off on your next great baking expedition. Not that it’s not possible, just that if it looks incredible, it may be inedible. Most cookie glaze recipes that accompany a lot of sugar cookie recipes consist of confectioners sugar, milk, vanilla extract and sometimes corn syrup. The natural consistency of these all mixed together is transparent and not that thick canvas of colors that appear on those magazine pages. Most likely, the magazine's food artists threw in an unconscionable amount of sugar, a bitter amount of food coloring, and even some inedible toxic ingredients to get that perfect picture. But how do we get the closest to them?

If you want the picture perfect cookie icing, then look for a royal icing recipe. It is a thick pasty consistency that will harden once dried. It is made with meringue powder or egg whites with a lot of powdered sugar. It is extremely sweet and not the most delicious option but will get you that picture perfect consistency. To get the smooth look, you want to pipe and flood the icing.

If using more of a glaze and want a smooth finish on the cookies, a trick is to dip the top of the cookie in the icing instead of spreading with an icing spatula or butter knife. To get a richer color, use icing or gel coloring instead of food coloring. It is much more concentrated and a little of this goes a long way. But, even though it is strong, only put a little at a time and test as you go. You may make the brightest blue icing anyone has ever seen, but it may not taste too good.

6) Transporting

Congrats! You've created the perfect cookie, but when moving that cookie either 5 inches to the cooling rack or 500 miles to grandmother’s house, there is so much that can go wrong. Here are a few ways to help prevent your gingerbread men from losing his limbs.

When transferring to and from the tray, use a flat cookie or pancake spatula. Gently get beneath the cookie and transfer one-by-one to the cooling rack. If you lined your pan with parchment paper, then this part is very easy. The more careful you are, the more likely nothing will go wrong. Make sure the cookies are fully cooled before piling whether that is on a plate for the little ones or in a tin for the in-laws. If the cookies have not cooled and are piled on top of each other, you may get one big mountain of soggy cookies.

For transporting out of the house, pack the cookies in a really tight container once cooled and all icing has dried. Wax paper will become your best friend when it comes to keeping cookies together. Align the container with wax paper and place a cushion of the paper at the bottom and also at the top once filled. Also, wrap the cookies in more wax paper either by row or in groups or . If packing multiple types of cookies, make sure to put the heaviest ones at the bottom.

7) Other Quick Tips

Directions: It may seem obvious but following directions precisely is very important in baking. It is not a cliché that baking is a science and cooking is an art. In cooking, if you add a little nutmeg instead of cayenne pepper you may have found the greatest new recipe. But if you add baking powder instead of baking soda to a cookie recipe you will get a disaster.

Cooking space: Let the cookies breathe. Cookies need their space while baking. Do not try to get as many cookies as possible on the tray. About one tablespoon of cookie dough should have at least 2 inches of breathing room.

Size: If the cookie type requires to simply scoop the dough onto the cookie sheet, then make sure all of your cookie dough balls are the same size. If not, you may end up with some burnt and undone cookies. An easy tool for measuring and placing the dough is a cookie scoop, which looks exactly like a mini ice cream scooper. If not, a measuring tablespoon or regular tablespoon will do. Just make sure you are scooping out the same amount.

Overbaking: To prevent the cookies from being overdone, set the timer to a minute or two less than what the recipe says.

Baking is all about trial and error. Without the fails, the kitchen would be extremely boring. For a few laughs and to restore your faith in baking, check out these cookie fails. Do you have any funny cookie mishaps?