Acoording to H. Thomas Milhorn in Writing Genre Fiction: A Guide to the Craft:
Amatuer detective writers usually follow the model as laid down by Edgar Allen Poe. As a rule the protagonist has an independent income and tends to be eccentric in some way, such as Poe's C. Auguste Dupin, who disliked the light of day to the extent that he kept all the windows shuttered in his grotesque mansion.
Often the amateur detective has an encyclopedic mind. Sherlock holmes, for instance, knew all the treads for different bicycle tires. The amateur detective usually has a partner or confidant, such as Holmes's Dr. Watson.
The amateur detective pits his wits against the fiendish mind of the antagonist of the story, with the action tending to center on the attempts of the wily amateur detective to solve the crime.
Write a story about an amateur detective (or a character with a mystery to solve).