Arthur Schopenhauer, the great pessimist philosopher, lived the last 30 years of his life in two rooms of a boarding house alone but for a dog called Atma (an Indian word meaning world-soul). Most nights he dined at the Englischer Hof, and every night he dined there he put a gold coin in front of him at the start of the meal and replaced it once he had finished.
Eventually a waiter asked him why he did it. He answered that it was a wager with himself. He said that he would drop the coin into the poor box in the church if the English officers who dined there ever talked of anything but horses, women, or dogs.