My top choice for a home defense gun is a revolver. Revolvers usually hold six cartridges, but some hold more. Revolvers are ambidextrous. Perhaps best of all, they can sit fully loaded and untouched for decades, as all springs are normally at rest, and still be ready to go into service at a moment's notice. Just grab the gun and commence firing should the need arise. Medium size revolvers, the kind I usually favor for home defense, come in two action styles, single action and double action.
Double action revolvers
The all-around best choice among handguns for home defense is the double action (DA) revolver. These are the typical "police" style revolvers, such as the Colt Python, Ruger GP100, or the Smith and Wesson Model 10 Military and Police. Double action revolvers may be thumb cocked, just like a single action revolver, and then fired by a light pressure on the trigger. This is generally referred to as shooting "single action," and it is the most accurate way to deliver aimed fire. They may also be fired by a single long pull on the trigger, which first cocks and then releases the hammer (trigger cocking or "double action" shooting).
Trigger cocking requires a longer and much heavier trigger pull, but it is fast. Shots can be delivered as rapidly as from an autoloading pistol. It is sufficiently accurate for close range shooting (out to perhaps 7 yards) in trained hands.
Double action revolvers are very safe, simple to operate, relatively easy to shoot accurately, very reliable, and extremely difficult to jam. They can be reloaded quickly if a speed loader is employed, and are very easy to reload from a box of loose cartridges should that become necessary. For the average homeowner as well as the expert pistolero, a DA revolver is hard to beat for home defense.
The gun
My personal home defense gun is a .38 Special Colt Diamondback. This is a medium size DA revolver with a 4" barrel and a nickel finish. The silver finish makes it an easy gun to see and point at night, and its fully adjustable target-type sights make it quite accurate in decent light. The Diamondback fits my hand perfectly and is a very high quality revolver. Unfortunately it has been discontinued, and a Colt Diamondback in good condition is expensive even on the used market. It is well worth the cost, however.
I consider a 4" barrel the best compromise for a home defense handgun. The shortest barrel I would recommend for a revolver is 2.5", and the longest 6". My home defense revolver is normally loaded with Glaser Safety Slugs for indoor use, but I also keep a speed loader full of 125 grain hollow-point cartridges available.
I prefer the .38 Special to smaller rounds due to its superior stopping power, and to larger rounds, such as the various Magnums, because it produces less muzzle blast and flash, an important consideration in dim light. If I used an autoloading pistol for home defense I would choose one chambered for the 9mm Luger (9x19) cartridge for exactly the same reasons.