When attempting to maximize the depth of field of focus for an image, the concept of hyperfocal distance comes in handy. When a lens is focused at the hyperfocal distance, everything from that distance to infinity will be sharp.
I keep the following chart in my camera bag so that I know where to focus to maximize the amount of area in the frame that will be sharp for typical landscape and architectural scenarios:

With a 14mm lens attached to a camera body with a full frame sensor (e.g. Nikon D700), the hyperfocal distance is 2.7 feet at f/8. So, if I wish to have everything sharp from 2.7 feet to infinity, I would focus at a point that is 2.7 feet from my lens. For a little more depth of field, I would stop the aperture down to f/16 and focus at a point that is 1.4 feet from my lens to achieve sharpness from 1.4 feet to infinity.
If I'm shooting with a 50mm lens, f/8 will keep everything sharp from 34 feet to infinity. A smaller aperture (e.g., f/16) extends the range of acceptable focus from 17 feet to infinity.
Why is this important? If I wish to have everything in sharp focus in a landscape that has a foreground subject (e.g., flower) positioned 3 feet away from the lens, I need to focus on a point that is 2.7 feet from the lens (at f/8 with a 14mm lens). If focus on a point further away, the foreground subject would no longer be in focus.
By knowing the hyperfocal distance, I'm less likely to select a narrower aperture than is required to achieve the desired depth of field. Higher f/stop numbers (i.e., greater than f/8 or f/11) typically result in less overall sharpness due to the effects of diffraction. So, selecting the most appropriate aperture will result in the sharpest possible photographs.
Earlier today, I captured an image inside the historic train depot in Western Springs, Illinois. The fixture located at middle and far right of the frame was located three or four feet from my lens. Since I was using a 15mm focal length, I knew that by focusing on that fixture (about three feet away) and using a f/8 aperture would ensure that everything from the fixture to the back of the depot would be sharp.
