Raise your hand if you've ever headed out to the garden in the morning, only to find that all your lettuces have been chewed up by insects. Or if you've noticed problems with your soil: is it dry, crumbly, and compact, instead of moist, rich, and filled with healthy microorganisms along with fungi and earthworms? There are lots of solutions to these common gardening problems, both organic and chemical, but one of the easiest, and most fun, is companion planting.

What's companion planting? It involves the use of different plants established alongside crops to enrich the soil, protect them from insects, and provide other benefits, though some stout fencing is still recommended to protect the garden from marauders. As a side bonus, many companion plants are also edible, so they can do double-duty in the garden by defending your primary crops and adding a little color to the table. Even better, some are lovely flowers, so they'll make the garden more lively. Win-win, right?

Gardeners and farmers have been using companion planting for centuries to grow healthier crops and reduce losses to pests. It's still in use on some organic, biodynamic, and small farms, although industrial agricultural practices don't necessarily require the use of companion plants. For home gardeners, though, this can be a very cost-effective way to get the best out of a garden, in addition to making the garden more visually interesting and fun to work in.

Ally plants, as they are also known, form mutually beneficial partnerships, making your garden healthier, stronger, and, well, prettier. Marigolds are a very choice, because they provide natural protection against insects, along with rosemary and sage. Nasturtium, thyme, and tansy also offer insect and cabbageworm protection (useful for brassicas, including, surprise, cabbages, along with broccoli, kale, and mustards). Oregano is excellent for general pest control, while alliums like chives and garlic guard against aphids. All of these plants are edible, and many are delicious to boot.

Got a nematode problem? Consider dahlias, which produce absolutely beautiful flowers, and deter these common garden pests. While dahlias are not food plants, they make excellent cut flowers, and come in a stunning array of colors and petal arrangements. Be warned that they can be appealing to gophers, and it can be a good idea to cage them or plant them in buried pots to protect them from these underground pests -- who, by the way, can be kept somewhat at bay with narcissus, which make very colorful and lovely floral displays in the spring and deter gophers year-round.

This detailed list differentiates between companions (mutually beneficial plants that enrich the soil, assist with pollination, and offer other benefits) and allies (which defend against attack). The best choices of companions and allies depend very much on the primary crop: for example, beans are nitrogen fixers and they can make great companion plants for some species, but if grown with beets, they compete, and neither plant wins.

With some experimentation, you'll find out which companion plants work best for you. Over time, you should notice an improvement in your soil, better harvests, and even better quality of individual crops. All that for the price of some bulbs or a few packet of seeds!