The Question shouldn't be "which is the better pet?", it should be: "which is the better pet, For ME?". A cat is a largely solitary predator, good for fairly low maintenance company, and more relatable than a goldfish. But they do need some attention, and the argument that you don't need to pick up their feces is silly- for house cats at least - they defaecate in a box.
Dogs however regard the creatures they live with as their pack. They can be trained to perform tricks and tasks, but require a good leader. If a dog doesn't have a good leader, it will try to fill the role itself, and it's almost as hard to tell a human what to do as a cat. Again, the feces cleaning argument must be considered, if you live in an urban area or decently sized town you will have to clean up after the dog. However, more importantly, the dog will need to be walked much more diligently, as dogs need lots of space.
This thread, presumably for the sake of brevity, does not mention other pets. But when asking which pet is right for oneself, all options must be considered. A fish is even lower maintenance than a cat is, but isn't quite as good of company. Birds tend to be caged, although they would usually rather be free. Rodents are between cats and fish, since they can usually be kept in a cage, the same could be said for small reptiles. Horses can be ridden, but require more space than even many rural homes can spare.
On my farm, we have cats, dogs, horses, chickens, half-wild ducks, a goose, and a goldfish. We've previously had rabbits, and once even a parakeet. Looking at that statement, you might mistake me for an expert. You would be wrong, I just have a large opinion. However, I feel it is important to note that pets are animals, living creatures, just like humans, and must have their needs looked after. Always be sure when you pick a pet, not just that it is right for you, but also be sure that you are right for the pet you choose.
TL;DR: All pets are good. Be a responsible pet owner.
If you live in town get a fish, or maybe a rat.