I came to writing mysteries through poetry and still think that a well-constructed mystery is very much like a well-constructed sonnet. Both are artificial forms. Both start off in one direction and then, with a twist of the concluding couplet/surprising ending, both reveal that they were headed somewhere different all the time.
