Find the lowest point in your property. Use a level if a slope isn't readily apparent.
Mark the path for the drainage ditch with a can of marking paint. Place the ditch between the house and a hill to block excessive water from seeping into the foundation or basement. Route the path of the ditch around the house then toward the low point in the yard, where the water can be released. The optimal placement of the ditch routes it beneath the location of a garden to provide a higher moisture content in the garden soil. Position the ditch so gutter downspouts pour into the ditch to help pull water away from the house.
Dig the ditch 1 foot wide and 2 feet deep with a shovel or rent a trencher if you are working with a large area.
Fill the bottom 6 inches of the ditch with pea gravel.
Set the perforated drain pipe on top of the gravel with the holes pointed downward. The use of pipe is optional. Pipe helps control the drainage, but can be difficult to place if your ditch follows several turns and curves.
Fill the hole with 1-inch or larger gravel to within a few inches of the surface. Fill the remainder with topsoil. The dirt will become packed over time, so leave a slight mound and allow the dirt to settle naturally.