But the point I wanted to understand is: My friend suggested - we have to know the DOF for a particular f stop and choose our Focal length! That is where I got confused. I felt that was like altering the feet for the footwear. Now I see this clear.
There is no single "the DOF for a particular F stop." At any given lens to subject distance and aperture, DOF will be different for lenses of different focal lengths (or a zoom set at different focal lengths).
It might be instructional to go to the link Doc recommended, download the free DOFMaster software and work with it on your PC for awhile. You can see and change all the parameters and examine what effect each of them has with respect to the others, at least in a numerical sense.http://www.dofmaster.com/dofjs.html
When we go digital, why can't we simply follow trial and error method?
You can. So can the film imagemaker. Only the cycle time for feedback is much longer. Some keep notes when experimenting with film, to compare later with negatives, slides, or prints. Now with digital we can just "chimp" and try again, if time permits. But it's far better to know how to get it right in the first place.
If one is to elevate himself above hit and miss automatic photography, at some point he will have to learn the underlying fundamentals of imagemaking, and thereby gain actual control of the camera.
Even the automatic shooter benefits by understanding the foundational principles. He is better able to understand how automatic cameras "think," and can anticipate when they will think wrongly. So, he can redirect the machine's efforts into a more productive path.