The dog poo in the hole worked for us - escape artist beagle X would routinely dig her way out of the yard until DH put poo in the holes, filled them over - she wouldn't dig there again. Gross but effective.

I've heard the chain works because it's a scary noise. You have to growl in an assertive dog voice at the same time. I've used it on the dog over the back when it was aggressing thru the fence whenever the kids went near there. BARK - scary noise of chain on fence - me growling. Seems to have fixed the problem. But I don't think it would work for a habitual, bored hour-after-hour barker, kwim?