The gender issue is a matter of personal preference. There is a misconception that male dogs aggressive and not affectionate. Males are just as affectionate and cuddly as females. It seems the biggest concern most people have about getting a male is that it will "mark its territory." The trick to keep them from doing that is to make sure that you get them neutered around 6 months, before the males hormones "kick" in. I personally recommend that females should go thru one heat cycle to get the female hormones. There are many people who do get their females spayed before the first heat cycle. There are two schools of thought on this subject. I just think letting a female develop the female hormones is an advantage to the temperament of the dog.
PERSONALITY MATCHING You want to match the personality of the puppy with your life style. Don't get a large dog that requires lots of exercise when you don't have a yard, or the time to take it for long walks. I try to match the puppies that are the most active, with a family that is active, especially if they have children. Those pups who are more laid back are perfect for the older couple or a family with no children, as the puppy is happy to just sit on you lap and doesn't require a lot of activity.
It is important for you to know as much as possible about the breed. Terriers are trained to do specific things. A lot of them like to dig. Some breeds are known to have specific health or skin problems. Dachshunds like to burrow and are prone to back problems. Just know what the possibilities are when you pick your breed so that you are not surprised if it happens. I have Min. Dachshunds and I have a ramp to my bed and stairs going to the couch to avoid them jumping on and off things, so they don't cause back issues.
FOR MORE INFORMATION
There are a lot of books out there, which I suggest you get at a used book store, or use the search engine to look up a particular breed for more information.