We were having a big problem with birds sitting on the rain gauge and pooping in it. The nails that my husband put around the top did not stop them. No more poop in the rain gauge now though. He painted an old rubber snake and nailed it to the post. It is keeping the birds off the rain gauge. Almost fooled me, too.
If you don't want birds in your garden, especially if you have fruit trees, CDs can provide a bright flash that many birds avoid. Using CDs to keep birds out of your garden is a common and effective practice.