I've had both, and I can say from experience and personal preference that I like dogs better. I've had five dogs before (all at once), they ranged from a Rottweiler, to three Golden Retrievers, and a little Yorkshire Terrier. All of them playful, protective, and fun to be around. Anytime I was down in bad mood, they were there for me like a close friend who you could tell anything to and never have to worry about them spilling it out to someone else.
Cats are great as well, the one cat I had was a Tomcat named Tammy. It wasn't personally my cat, it was my sisters. However, the whole idea of having to clean the litter box, and worry about it scratching up anything was a little edgy. I liked Tammy the Tomcat, but we ended up getting rid of it after it broke one of my mom's ceramic pieces.
I prefer dogs basically because I feel a stronger connection to them. Having the opportunity to actually hand raise two puppies from birth was an experience I don't think I would forget. Though the last dog I had was a young, female Doberman. She was a real sweetheart, but sadly because we had to move recently last year we had to give her away to a friend of ours because dogs were not allowed. ;_; I've been told I can still go see her, but I haven't seen her yet. Hopefully, that time will come soon.
Other pets I've had before were birds, fishes, goats, and of course dogs and a cat.