The formula is foolproof. Collect organic waste in a pile, let it decompose over time with the help of friendly bacteria, and the result is compost. The best fertilizer and soil conditioner money needn’t buy. Compost makes itself, for free.

“But won’t it smell?” some gardeners ask, and it’s not a dumb question. Rotting matter such as kitchen garbage would certainly smell if left to decompose in the kitchen. But that’s not how a compost pile works. In a properly managed pile, moist, organic, nitrogen-rich materials such as food waste, green weeds, grass clippings and animal manure are alternated with dry, brown, carbon-rich materials such as straw, hay, and dried-up bean vines. The two groups go to work together, aided by the aforementioned bacterial crew. A small amount of soil is also needed, to introduce those bacteria into the pile. Usually the soil clinging to the weeds you toss in is sufficient, but it’s helpful to sprinkle a shovelful over a large addition of food waste to get the process going quickly.

If a compost heap does smell, it is usually because it lacks another all-important ingredient: air. The right type of bacteria for digesting organic matter is the aerobic kind, and when a heap smells sour or sewage-like, it’s because it’s airless (anaerobic) and probably too moist. Making sure you have enough of those dry, brown ingredients will usually prevent the problem. But, for air insurance, the famous homesteader Scott Nearing used to begin building a pile with a bundle of alder stems tied together across the bottom, with an upright connected chimney of alders in the center.

I asked my favorite compost guru, Will Brinton of Woods End Laboratories, whether he had any such tips.

“It’s pretty hard to get a pile wet and smelly,” he said. “More typically, it’s too dry, so you need to water it.” Brinton recommends keeping a bale of hay or straw and a spading fork within reach. Instead of the usual “dump and run” technique, grab a handful of hay and spread it over any moist ingredients you’ve just added. Use the fork to jostle things up a bit — “30 seconds or less is all it takes,” he says.

“What about those plastic drums that are used to contain and to turn compost?” I asked. “They appeal to urban and suburban gardeners, afraid that their compost might offend.”

“We’ve trialed them,” he replied, “and they don’t work. Since they’re off the ground, the worms don’t get in. They keep the materials too dry, and by the time they’re half full you can’t rotate them. Better to just keep your pile tidy and looking nice.”

I suppose you could cover the top of your pile neatly with a tarp, as long as you remove it once or twice a week to hose the compost down. But I say: Why not show off your pile as an example of nature’s engineering? Compost with pride.

Damrosch’s latest book is “The Four Season Farm Gardener’s Cookbook

Tip of the week

When planting tomato transplants, remove the lower pairs of leaves and set the plant deeper than in its pot to encourage greater root growth. Mulch the tomato bed generously with leafmold or straw to help retain moisture and reduce the risk of early blight disease, which is spread from soil-splashed spores.

— Adrian Higgins