The bear bangers are effective. We keep two in the porch here because the black bears like to go by the cabin on their way to/from the creek and sometimes stop to munch on the berries.
Banging pots & pans and yelling is also effective but if anyone sees you they might think you've gone crazy. No worries of that at our cabin, no humans around to form an opinion regarding my sanity.
Pepper spray I'm not a fan of ... too easy to get yourself! Need to be sure wind is blowing the right direction AND also need the bear to be too close for my comfort.