Fences are normally built for two reasons: The first is to provide some level of containment, whether this is for the family dog or a herd of cattle grazing in the back 40. The second reason for fence construction is to provide a visual barrier. Over the years I have built a good deal of both. During my years in graduate school I worked at an equestrian center and maintained more fences than most would see in a lifetime. Containment there was accomplished using injury-free materials. PVC rails and strips of conveyor belt kept the barbed wire away and left the horses injury free.
Fences, like personalities, can vary widely. Common types include chain link, welded wire, split rail, vinyl pickets, and cedar "dog ear". The posts for these fences can be simple metal "T" posts, to logs and sawn lumber. The basics of straight line and plumb are universal to any good fence; the post placement is where is gets complicated when you're dealing with wood fences.
Wood post failures comprise a good portion of the repair work I have done over the last few years. The most common failure is wood rot at ground level, which leads to a lack of support and causes the post/fence to tip over. Sometimes whole sections of fence will fail this way, since one post helps support its neighbors. When one support is gone the others need to bear more load; cascade failure is the result. Here in the Denver area, we are no strangers to wind storms. Healthy 8 to 10" diameter trees can get snapped like toothpicks. When a rotten post base with dozens of square feet of exposed fence "siding" is exposed to these winds the results are pretty predictable.
One method I use to extend the life of these posts is to limit the soil-to-wood exposure. Lumber set directly in soil will fail the quickest. Rot-resistant wood (pressure treated, cedar, redwood, etc.) will help, but these materials are still subject to nature's microbes. Setting the post in concrete is better, but it still leaves some areas vulnerable. In a recent rebuild I completed, the concrete encased portions of the posts were fine — the post's failures were located a few inches above the concrete where soil had been back filled. Years of exposure to wet soil acted like a microbial saw, and this nibbled away at the wood's strength. With one end of the post firmly secured in the concrete, and the post top and fence subjected to wind forces, the ground level failure point was guarantied.
Ironically many concrete manufactures recommend poor installation methods, and common old school methods die-hard. The old school method of digging a hole, inserting a post and adding dry concrete then flooding works…but it is less than ideal.
A better method is to dig the hole, and then to line the bottom with some crushed rock. The post is then set on the rock. Concrete is mixed outside of the hole in a mixing tray or wheelbarrow and then added to the hole. Mixing the concrete separately ensures a stronger pour and dry "voids" are eliminated. The fill depth of the concrete is critical to longevity. Some fence designs will have the footers poured in "tubes" and extend above the soil height. Others will pour concrete close to soil level. In both cases the top of the concrete should be shaped with a slight "crown" to allow water to drain away from the post. If the top of the concrete is below or near grade, I like to back fill with the same crushed stone used earlier. This eliminates the soil-to-wood contact zone above the concrete. The coarse crushed stone allows the moisture to dissipate near the post base.