“Twenty rules for writing detective stories,” by S.S. Van Dine, 1928:

The reader must have equal opportunity with the detective for solving the mystery. All clues must be plainly stated and described. No willful tricks or deceptions may be placed on the reader other than those played legitimately by the criminal on the detective himself. There must be no love interest. The business in hand is to bring a criminal to the bar of justice, not to bring a lovelorn couple to the hymeneal altar. The detective himself, or one of the official investigators, should never turn out to be the culprit. This is bald trickery, on a par with offering some one a bright penny for a five-dollar gold piece. It’s false pretenses. The culprit must be determined by logical deductions — not by accident or coincidence or unmotivated confession. To solve a criminal problem in this latter fashion is like sending the reader on a deliberate wild-goose chase, and then telling him, after he has failed, that you had the object of his search up your sleeve all the time. Such an author is no better than a practical joker. The detective novel must have a detective in it; and a detective is not a detective unless he detects. His function is to gather clues that will eventually lead to the person who did the dirty work in the first chapter; and if the detective does not reach his conclusions through an analysis of those clues, he has no more solved his problem than the schoolboy who gets his answer out of the back of the arithmetic. There simply must be a corpse in a detective novel, and the deader the corpse the better. No lesser crime than murder will suffice. Three hundred pages is far too much pother for a crime other than murder. After all, the reader’s trouble and expenditure of energy must be rewarded. The problem of the crime must he solved by strictly naturalistic means. Such methods for learning the truth as slate-writing, ouija-boards, mind-reading, spiritualistic séances, crystal-gazing, and the like, are taboo. A reader has a chance when matching his wits with a rationalistic detective, but if he must compete with the world of spirits and go chasing about the fourth dimension of metaphysics, he is defeated ab initio. There must be but one detective — that is, but one protagonist of deduction — one deus ex machina. To bring the minds of three or four, or sometimes a gang of detectives to bear on a problem, is not only to disperse the interest and break the direct thread of logic, but to take an unfair advantage of the reader. If there is more than one detective the reader doesn’t know who his codeductor is. It’s like making the reader run a race with a relay team. The culprit must turn out to be a person who has played a more or less prominent part in the story — that is, a person with whom the reader is familiar and in whom he takes an interest. A servant must not be chosen by the author as the culprit. This is begging a noble question. It is a too easy solution. The culprit must be a decidedly worth-while person — one that wouldn’t ordinarily come under suspicion. There must be but one culprit, no matter how many murders are committed. The culprit may, of course, have a minor helper or co-plotter; but the entire onus must rest on one pair of shoulders: the entire indignation of the reader must be permitted to concentrate on a single black nature. Secret societies, camorras, mafias, et al., have no place in a detective story. A fascinating and truly beautiful murder is irremediably spoiled by any such wholesale culpability. To be sure, the murderer in a detective novel should be given a sporting chance; but it is going too far to grant him a secret society to fall back on. No high-class, self-respecting murderer would want such odds. The method of murder, and the means of detecting it, must be be rational and scientific. That is to say, pseudo-science and purely imaginative and speculative devices are not to be tolerated in the roman policier. Once an author soars into the realm of fantasy, in the Jules Verne manner, he is outside the bounds of detective fiction, cavorting in the uncharted reaches of adventure. The truth of the problem must at all times be apparent — provided the reader is shrewd enough to see it. By this I mean that if the reader, after learning the explanation for the crime, should reread the book, he would see that the solution had, in a sense, been staring him in the face — that all the clues really pointed to the culprit — and that, if he had been as clever as the detective, he could have solved the mystery himself without going on to the final chapter. That the clever reader does often thus solve the problem goes without saying. A detective novel should contain no long descriptive passages, no literary dallying with side-issues, no subtly worked-out character analyses, no ‘atmospheric’ preoccupations. Such matters have no vital place in a record of crime and deduction. They hold up the action and introduce issues irrelevant to the main purpose, which is to state a problem, analyze it, and bring it to a successful conclusion. To be sure, there must be a sufficient descriptiveness and character delineation to give the novel verisimilitude. A professional criminal must never be shouldered with the guilt of a crime in a detective story. Crimes by housebreakers and bandits are the province of the police departments — not of authors and brilliant amateur detectives. A really fascinating crime is one committed by a pillar of a church, or a spinster noted for her charities. A crime in a detective story must never turn out to be an accident or a suicide. To end an odyssey of sleuthing with such an anti-climax is to hoodwink the trusting and kind-hearted reader. The motives for all crimes in detective stories should be personal. International plottings and war politics belong in a different category of fiction — in secret-service tales, for instance. But a murder story must be kept gemütlich, so to speak. It must reflect the reader’s everyday experiences, and give him a certain outlet for his own repressed desires and emotions. And (to give my Credo an even score of items) I herewith list a few of the devices which no self-respecting detective story writer will now avail himself of. They have been employed too often, and are familiar to all true lovers of literary crime. To use them is a confession of the author’s ineptitude and lack of originality. (a) Determining the identity of the culprit by comparing the butt of a cigarette left at the scene of the crime with the brand smoked by a suspect. (b) The bogus spiritualistic séance to frighten the culprit into giving himself away. (c) Forged fingerprints. (d) The dummy-figure alibi. (e) The dog that does not bark and thereby reveals the fact that the intruder is familiar. (f) The final pinning of the crime on a twin, or a relative who looks exactly like the suspected, but innocent, person. (g) The hypodermic syringe and the knockout drops. (h) The commission of the murder in a locked room after the police have actually broken in. (i) The word association test for guilt. (j) The cipher, or code letter, which is eventually unraveled by the sleuth.

“For the writing of detective stories there are very definite laws,” Van Dine wrote, “unwritten, perhaps, but none the less binding; and every respectable and self-respecting concocter of literary mysteries lives up to them.”

See Ten Commandments and Gumshoe Polish.