Picard, a German toolmaking company, developed this clever design named the Lattenhammer. It's designed for those situations when you need to drive a nail, but you can't use a second hand to steady the nail. The nail slips into a groove in the top of the hammer. It's held in place magnetically. Once you've driven the nail in, it slips right out of the hammer, as you can see in this demonstration video.