from Grits and Eggs:
How to make a perfect hard cooked egg is highly debatable but I know that the majority of folks boil the hell out of the eggs for way too long. That only creates dry, over-cooked, ugly-looking eggs. No one wants to eat that. To make perfect hard cooked eggs every time is not difficult, nor time consuming. It is just like anything else you prepare in the kitchen, it takes consideration; pay attention to what you're doing!
First, and this goes for any amount of eggs to be cooked, place the eggs in a pan and cover them with cold water. Place the pan on the stove and bring water to a boil. Immediately when the water begins to boil, remove the pot from the heat source and cover it. It will continue to cook the eggs, trust me. Set a timer for 10-12 minutes. (I actually set mine for 6 minutes, I like my yolks a bit softer but still done. For a soft cooked egg, I suggest 3-4 minutes.) At the end of 10-12 minutes, immediately drain the pot and cover the eggs with cold water until you can handle them or remove the eggs from the pot and place in a bowl with cold water and ice if going to use for salads and such. You can peel the eggs right away but don't slice them until you are ready to serve them. This will preserve the moisture of the yolk.
Really, this will work every time without fail.