Pepper spray is what you want. Trust me.
By the time the dog is close enough to hit with the stick, it'll be close enough to take a chunk out of you. Various pepper spray pattern sprayers will give you at least a 10' stand off distance. Also, pepper spray is effective against dogs. It really throws them for a loop and when hit with it they'll usually stop what they're doing and start trying to smear it off by sticking there face in the dirt.
I DO NOT agree that a gun is the best thing to use against an aggressive dog. I would MUCH rather hit the dog with pepper spray/mace that is proven effective against them that will not permanently kill them or severely injure them. Can you think of any legal repercussions from killing someones dog, justified or not, by shooting them? I can. Also you might get hit with all manner of things like discharging a firearm in city limits etc. etc. I know some will say "better that than get eaten by a dog" but the truth is, I'd recon pepper spray is actually more effective at stopping them than a bullet can be if it doesn't hit CNS. Large angry dogs can and will fight through being shot. They don't understand television and unlike humans, a dog doesn't know it's supposed to lay down and die when it gets shot.
Overwhelming the pooch who uses it's eyes and nose far more than you do with pepper spray will make them settle down in a hurry. Look it up, there are many videos showing this to be true. To some extent this effective can happen with other animals like bears to. I for one would MUCH rather have a can of mace in my hand if a dog was after me than a darn stick of any kind, and in truth the mace would probably be better than a gun.
Leave the silly stick at home and get yourself some pepper spray!