Tom McCorklE /The Washington Post

Produce “seconds” can still be useful in cooking.

We all grew up hearing that it’s not what’s on the outside but the inside that counts, that you can’t judge a book by its cover, and all those other oft-repeated pieces of wisdom. Of course, as we’ve learned, those things apply to food, too.

Ugly produce, misfit produce, whatever you want to call it: Those misshapen, bumpy, sometimes holey fruits and vegetables can taste just as good as their more pristine cousins. At farmers markets, they’re typically referred to as seconds.

Seconds can be a great way to get a deal on a large amount of food, while helping farmers waste less from the fields. Here’s some advice:

Know what you’re getting. Liz Whitehurst, owner of Maryland’s Owl’s Nest Farm, says she most often offers seconds on tomatoes. “There’s a lot of quality issues that can come up,” she says, such as holes, splits or bruises.

Farmers may use different criteria for deciding what qualifies as a second. “Sometimes it’s about size; sometimes it’s about shape; sometimes it’s about quality,” Whitehurst says.

Farmers may also decide to second — Whitehurst says the term can be used as a verb as well — produce that is particularly ripe. That’s why you might find discounted peaches during the summer. Often, the problems are merely cosmetic: dented winter squash or russeted apples, for example.

Don’t be afraid to ask. There’s no need to feel ashamed about asking whether a vendor has any seconds to sell, if you don’t see any on display. To catch the eyes of people walking by, “I want to put my best quality, my most perfect-looking things” out for display, Whitehurst says. So seconds might be stored under the table or back on the truck.

Be considerate about the farmer’s time, and try to inquire at a less busy time, either at the beginning or end of the market. Also feel free to call ahead if you want to put in a request. Avoid the hectic harvesting and packing days if you can.

You shouldn’t feel like you’re cheating farmers, either. They’ll sell the seconds if they want — not everyone does, as some use them for their own canned products — and at a price they think is appropriate. Just don’t try to bargain them down, which Whitehurst says some customers do.

Think about what you want to make. Produce appearance is not important in a lot of recipes, but there are certain applications for which seconds are especially ideal, when the fruit or vegetables will be completely broken down. That might include sauces (tomato, apple), canned goods (crushed tomatoes, salsa, jam) and drinks or drink components (shrubs, Bloody Mary mix).

As Washington Post contributor and canning expert Cathy Barrow says, just be sure to cut away any bad spots while you’re prepping your ingredients. Less-than-pristine apples are fine for pie, and no one will know your greens had holes before you wilted them. Puree fruit into a smoothie and ice pops and vegetables into an elegant soup.

Be prepared to make it. Seconds may not have the same shelf life as regularly priced produce and may need to be used in the next day or two after purchase. “Any time you’re buying in bulk, having a plan is important,” Whitehurst says. So not only do you want to have your recipe in mind, but you also want to have all the other ingredients you need to make it. Also important: equipment, especially if you’re going to be canning and require jars, bands and lids.