I learned most of this after reading a book, which had an article by Julia Childs, which describes how to cook the perfect hard boiled egg. The following is basically what I’ve learned from this, with a slight change that seems to work better for me.
First, you’ll want to prick the bottem side of each egg with a little pin. By bottem I am referring to the bottem of the wide end. We do this because in that part of the egg is a little air pocket, that when heated expands. This can often crack the shell while the egg is cooking.
Next bring the water to a simmer. Completely submerge each egg in the simmering water, and let them sit for fifteen minutes (Julia childs recommented 13 minutes, but I find this can cause a slightly uncooked center.)
After fifteen minutes, completely submerge the eggs in a container filled with ice water. Keep them in this ice water for at least five minutes.
To peal the egg, first crack the shell all around, until every part of the shell is cracked. Under cold water, start pealing the shell off the egg. It should come off in one piece.