I've been playing with varying degrees of depth of field while using and testing different lenses and it can be a tricky thing. We all want those great 50mm portrait shots of our kids where the back is all blurry and their eyes twinkle. Those seem easy compared to trying to get a street sign in focus from 30 feet away while other objects are out of focus.
Matt Brandon over at Digital Trekker did a great field test to demonstrate:
took my Canon 5D MKIII and my 70-200 mm f/2.8 lens, set the aperture to f/4 and focused on a street sign. I chose a sign that had several other signs behind it as a way show off the depth of field. After taking a photo at 200 mm I then switched lenses to my 17-40mm f/4 lens. Keeping the aperture at f/4 I tried to “zoom” the 17-40mm to 18mm–I ended up shooting at 19mm. And, wait for it–here is the important part, I physically moved the camera to the point where at 19mm focal length the sign was at the same magnification. In other words, I had the sign fill the same exact proportions of the viewfinder at 19 mm as it did at 200 mm.
Always a great idea to physically move your body to get a better shot. It's remarkable how composition can change when you move just a few feet.