Endings are the most important part of any story. It’s what the beginning hints at and the middle reaches after slogging through a lot of muck. In a way, they are the exact opposite of theme because the ending is the one thing that the writer must not wait to figure out. It must be firmly in place before the first sentence is written.
Because the ending must be behind every sentence that’s written. The writer must know where the story is going in order to write words and sentences and paragraphs that will get the reader there without throwing the book against the wall in frustration because that wasn’t what they expected.
There are exceptions. Some great writers don’t know where they are going until they get there. Hans Christian Anderson is the writer I’m thinking of. He said he wrote stories to find out how they ended. But I firmly believe that his subconscious knew all along what the ending would be and he just followed its lead until it emerged into his conscience.
So unless you trust your subconscience to know more than you do and to lead you in the right direction, write the ending before the beginning. Most writers do. Some write the entire ending scene before starting their story. Most of us at least jot down a sentence or two on a slip of paper and tape it to the wall above our computers. Or, as in my case, on the computer.
Doing this one simple thing will make writing a story a lot easier and will get you to the end a lot faster and might prevent some future reader from throwing your book against the wall.