Composting is good for the planet since it keeps beneficial organic ingredients like dead leaves, grass clippings and vegetable peels out of landfills and puts them back into the soil, where they become beneficial mulch. One caveat of composting is that it can attract mice and rats to your bin. To prevent that, try two things: One, bury food sources -- like potatoes and banana peels -- deep in the compost. This will mask the scent of food and make it less attractive to rodents. If your rodent problem is serious, consider composting only yard waste such as leaves, grass clippings and small branches. When the rodent problem is fixed, begin to add food waste back into your composting routine.