Usually step one of any chocolate chip cookie recipe is to mix the sugar with the fat (i.e. butter, shortening, margarine). Each one has a different makeup and thus has different melting points. Additionally, overall flavor will be affected by what you choose to use. Although it is your personal choice, butter will lend to a more flavorful cookie.
The temperature of your butter (or fat) is another important factor to keep in mind. If you melt the butter (or want to use browned butter for a nuttier flavor), then your finished cookie will be denser and chewier. If you like your cookie to be a bit firmer and lighter (think cakier), then be sure to cream softened butter to achieve this effect.
Both the yolk and the whites have their own components for affecting the texture of your cookie. Using more egg whites will open up the structure internally, making a taller cookie. Conversely, more or all egg yolks will make the cookie denser and result in a fudgier texture.
The ratio of brown to white sugar is another important factor to consider when constructing your perfect cookie. To help illustrate this, the cookie on the left is made with all white sugar while the cookie on the right is made with all brown sugar. The higher the ratio of white sugar, the thinner and crispier your cookie will be. Adding more brown sugar will result in a taller and moister cookie.
Although not common in many recipes, you can substitute some of the white sugar with corn syrup to create a super smooth and thin cookie. Even after cooled, the cookie will still be soft and flexible, and due to its makeup of simple sugars, it will caramelize quicker (this creates a darker cookie).
The two main forms of leaveners are baking powder and baking soda, and as you probably guessed, the one you choose will impact your finished product. If you like your cookie to have a nice craggy, coarse texture on top, then baking soda is your go-to. For a smoother and cakier cookie, use baking powder.
There are two main variables to consider when it comes to flour. The first is the type you use. Most of us stick with all purpose flour, which will yield results that are somewhere in-between using all cake or all bread flour. Using all cake flour will result in softer cookies (that will fall apart more easily), while all bread flour will make a nice, chewy cookie.
Once you choose the type of flour (or flours if you want to do a blend), the next step is choosing the amount of flour to use in your cookie. With regards to the amount of butter (or fat used), a 1 to 1 ratio of flour (which is on the lesser side) will cause your cookies to spread more while baking, creating a thinner, wafer-like lace cookie. Using a higher flour to butter ratio (1.3 to 1 or more) will result in a cookie that will hardly spread, with a dense, dough-like center.
Now the fun part! The first step is to pick out your favorite brand and percentage of cacao. Most recipes call for semi-sweet (which is at least 35% cacao), but if you like something sweeter you can always use milk chocolate (closer to 10% cacao). For a nice variety of flavor and sweetness, try using a variety of chips at varying cacao percentages.
As is the ever running theme, even the shape of the chocolate you choose will effect the texture of your cookie. Choosing chips will create the most uniform texture with little melted pockets of chocolately goodness. Using larger discs or chunks will cause some layering in the dough, resulting with a slightly more flakier cookie. Hand chopping a bar of chocolate will produce the most contrast, with little bits of shavings giving a nice chocolate flavor throughout and the larger pieces still making those luscious pockets of molten chocolate.
You probably never even considered this step, but the temperature of your dough when you incorporate the chocolate is also something to consider. Most likely you mix it in while the dough is still relatively cool, but if you allow your dough to warm up to at least 95°F (sitting the bowl by your preheating oven will do the trick), the chocolate will melt a bit and distribute throughout the dough. This creates a chocolate swirl effect, but will leave you without those classic pockets of melted chocolate.
Most recipes call for an oven temperature of around 350°F, though you can play around with this variable as well. Lowering the temperature and increasing the cooking time will allow the cookies to spread more and cook more evenly (so less contrast between the edges and the center). Conversely, a hotter oven with less cooking time means you'll get a more compact cookie with more contrast.
You are probably a little more aware of this step. Some people swear by letting the dough chill for at least an hour before baking, while others like to get these tasty treats baking A.S.A.P. Allowing the dough to chill will not only make the dough a bit easier to scoop and shape, but it will not spread as much while baking. Warmer dough will get a bit wider and flatter.
Besides the actual temperature of the dough, allowing a rest period will greatly enhance the overall flavor of your cookie. During your cookie's "nap", the flour proteins and starches in the cookie will break down a bit, which, when reconstructed during baking, will give you a deeper, more butterscotchy flavor. You can wait a few days as shown here, but letting it rest overnight will certainly do the trick.
We know, your head might be spinning a bit at this point, but when it comes to making the perfect chocolate chip cookie, knowledge is power. So get in the kitchen and start experimenting until you find the perfect cookie just for you! And if you want more information behind the science of it all, be sure to check out this awesome article by J. Kenji López-Alt. The Science of the Best Chocolate Chip Cookies