The ecology of farm habitats