Somewhere before the quote, after the quote, or in the middle of the quote the speaker should be identified. Whether a he, she, Joe, Doc, Betty, or Sweetie—identify the speaker.
It is good to identify the speaker as soon as possible. Yes, at times it can precede the quote, but that may take away from dialogue epically if it is a tight or fast moving conversation.
“Nothing bad can happen on a day like this,” Bill said.
“It sure looks nice,” Joe said, “but tragedy looks for nice days to spoil.”
In the case above, the dialogue is what drives the story, not the characters. The quote comes first. In the second line the quote continues the dialogue, however identifies the speaker as soon as possible; at a natural break and sets up a meaningful or surprisings retort. The break in dialogue helps build anticipation.
There are occasions when there is a long conversation consisting of many one line short exchanges. For example:
“Did you shut the door?” She said.
“No,” he said.
“Why not?” She said.
“I don’t know,” he said.
“Do you know anything?” She said.
“I know I didn’t shut the door,” he said.
“How do you know that?” She said.
“Otherwise I wouldn’t be talking to you,” he said.
Many think it is tiring and repetitive to end every line of dialogue with he said or she said. The opinion given, is the dialogue, if well written, will reveal who is speaking. I won’t argue the point, however my preference is to always identify the speaker. If the reader knows through the dialogue who is speaking, than they don’t have to read on, just go to the next line. Sometimes a reader may move so fast through dialogue the may lose track; the writer should always be there to remind them.