If your rooster is simply utility to you, or just a stupid livestock animal, then the rest of my post will probably be of no interest to you. Do as you will!
If you are interested in animal psychology (which I am not an expert of! But I like to read about it) then feel free to read on.
Dominance is a mammalian behavior, whereas birds have flocking and hierarchy. This might sound superficially like the same thing, but there are some differences, and the differences are enough to change how we deal with them somewhat.
Mammals have dominance. Males and females in a social group will establish dominance over one another using several methods, many of which are physical. The social rankings are often established and maintained through physical means. This makes sense to us as it is genetically wired for us. It's why we have an 'easier' time with training dogs than, say, parrots. Many social, domesticated mammals also have a desire to please their dominant figure-- in this case, the human, and this is especially obvious in dogs.
Birds generally have hierarchy. Depending on the social group, if it is a harem-type (which is what most galliformes have, such as chickens) there is generally a top male than then a social ranking of hens. Superficially this is similar to, say, wolves, but there are some subtle differences, for example, such as a chicken low on the totem pole has no drive to please the ones above it. Chickens don't understand 'dominance' in the way that we humans deliver it. We're talking totally different languages, and it rarely works out to be 'dominant' in the way that most people try. I digress, I am getting a bit off topic.
If you are to understand why your rooster is mean, you have to try and look at things from his perspective. I am not trying to overly anthropomorphize him-- only to try and provide insight. We are humans and can only contemplate things with our human minds, and as such this sort of thing is inherently a bit anthropomorphic.
Through the history of chickens, hens have been bred for many traits; shape, size, color, productivity, temperament, broodiness, (etc etc). Roosters have been bred for three main things: Appearance, fertility, and arguably the ability to protect their flock. This was obviously much more important 100 years ago and further back when less people had predator countermeasures such as large enclosed runs, electric fencing, etc.
I digress again! What I am trying to say is... A rooster's main goal in life, in his mind, is to find females, mate them, protect them, and protect the young up until they are on their own... so that he can see his genetics passed off. This is the same goal of his wild ancestors and it really hasn't changed. It's why there are so many tales of heroic roosters dying in a battle with a predator; his genetic programming is such that it is better that he die and his genetics live on through his numerous chicks (real or imagined; modern roosters don't seem to notice that their hens are or are not hatching out their eggs..!). It takes a little of the valor out of his actions, but it is what it is.
Roosters are also programmed to drive off competition-- that is, other roosters-- so that THEIR genetics are guaranteed to be passed on. Even when roosters live together, the top rooster does not often let any other roos breed the hens.
So, our 'mean' roosters are actually just doing what nature programmed them to do. You are, as mentioned by some insightful posters earlier, either being viewed by him as a predator, or as another competing rooster. This probably seems a bit stupid to us sometimes-- surely our rooster that we raised from a chick knows us by now? Surely he can recognize us and know that we're not a predator or another rooster? This is surely a head-scratcher until you realize that chickens use recognition patterns that are far, far different from how we recognize individual people or even individual chickens! In one study, scientists covered the combs of an existing single breed flock. Amazingly, the pecking order was disturbed and the chickens failed to recognize each other. Once the combs were uncovered, the flock reverted back to its original state. Another point to consider is the chicken's eye level and their key focus points- if raised by you by hand, surely they are used to two things. Your legs and feet, and what your hands are doing (that's where the food comes from, they know).
Further, chickens are amazingly shape and color oriented. They can see outside of the spectrum that we do-- they can actually side more colors than a human can, well into the ultraviolet range. Colors and shapes can be big triggers for our roosters. Shapes are also important... at a glance, a rooster's survival depends on him to look at, process, and decide quickly if a shape is threatening or not (predatory or competition). He has to quickly know if the bird silhouette in the sky is a hawk or a sparrow. The lump over there in the lawn-- another chicken or a fox? Etc. Absolutely I believe that things such as large boots, and red/brown clothing can trigger a rooster to respond as if he is seeing another rooster! As an example, my rooster will only attack me if I am wearing my large, super clunky brown hunting boots, OR red pants. Otherwise he is exceptionally friendly. It would be silly to think that there is no correlation between the two.
When you think about it, it becomes clear that the 'nice' roosters are the genetic weirdos, if you raise them the same way as your 'mean' ones.
So what does all this mean? Daisy8 has some good thoughts going on; but it all really depends on what your rooster is, to you. Not wanting to get flogged is entirely reasonable, and there are certainly some roosters out there that are beyond dealing with! Having a friendly pet rooster will require either some training, or the luck of the draw (or both). Some people are lucky to have mellow roos. They just hatch that way! Working with and training most roosters (notice I said most-- not all) is possible if you really have your heart set on it, but be advised that just like any other animal you need to be dedicated.
Having a utility rooster whose welfare you care about -- but he's not a pet-- can be done too. Not everyone has the time nor will to deal with each rooster situation as it arises, and I respect that. Roosters can be worked with, or given away, or eaten-- they are all equally valid options and I don't disagree with any of them (as long as you are honest with the new owner if you give him away). What I don't agree with is kicking, hitting him with a pole, or any other physical abuse of the roo. This doesn't do anything but make the person feel better-- absolutely it doesn't teach the rooster anything. He understands one of two things. You are either a threat-- and now your are hurting him-- so he is obviously not warding you away hard enough! or... you are another rooster-- you are challenging him-- now your are attacking-- he must prove his hierarchy! By throttling him, you're teaching him nothing about dominance or who is in charge. If you find yourself regularly kicking your roo, or smacking him with a rake, do both of yourselves a favor and either work with him, rehome him or humanely butcher him because you're not doing either of you any good.
There is no one right answer for every situation as every situation is unique and each roo is an individual. All I am doing is inviting you to understand your rooster's behavior so that you may better decide how to deal with it. Again there is no wrong answer (except in my opinion, doing physical battle or harm to him is very unfair)-- as in all things, use knowledge as your weapon against your problems.
That said, if a breeder ever works on a breeding program that singles out roosters that produce young with good temperaments (while keeping their protective qualities against true predators), I bet they would be selling eggs and chicks in no time..! ;)
Sorry for rambling on. Those are just my thoughts, and I don't mind if you disagree.