I can remember reading once that it took JK Rowling four to five months to fix a plot hole in "
Order of the Phoenix". She realized this halfway through writing. You have to look out for them.
I identify them easily but I find it difficult to know how to make sure that my story ties up all its loose ends.
What I'm going to say may sound insane but bear with me - tying up all the loose ends is highly overated. No don't get me wrong - I'm not saying that plot threads shouldn't be left open (unless you want to write sequel but that's a whole other cup of tea) but I believe you should drop enough clues and such, then let the reader draw his own conclusions on how that particular thread might have ended. To say out loud "The two-headed goat supposedly left by the aliens was in fact an animatronic animal escaped from Disneyland" is less fun. Rather mention the two-headed goat and then have a group of Imagineers from Disney land show up occasionally in the narrative although never mention what they're looking for or doing. The best novels in my oppinion should have no definite answers and must leave the reader with a lot to think about. (and yes, I know, my example is ludicrous).
Off course doing this does not mean you need to neglect the plot. Although the plot is never directly explained it should be logical so that when you think it over it would make perfect sense. This is something that happens in the novel "
Howl's Moving Castle". The entire story is wrapped up in a single chapter with few explanations. This is disorientating but the more I thought about it the more the plot came together. This also happens in the book "
Holes". Some of the things are explained but the reader is left to "fill in the holes" by himself.
The best thing a writer can do is never to say anything directly. That is about two thirds the appeal of
2001: A Space Odyssey (and lets forget the movie's subject for the moment and bear with me). It seems paradoxically that some movies (especially bad science fiction ones) get more and more confusing the more the plot is explained. The more you explain the more it exposes how bad the plot is thought-out, whether there are holes or not.
2001 makes no effort to explain the plot to us or what it is about and leaves the viewer to figure it out for himself. The only clues are visuals and the occasional snatch of dialogue, but still it never says anything directly (nor does it twist the saying like the Matrix movies do). I dislike
2001 somewhat but I respect it because, quite frankly, even though I hated it I wanted to figure it out. Some bad movies explain their machinations in idiotic double-speak but this movie made no such attempt. By not tying up the loose threads but hinting at them the movie acquired an air of mysticism and mystery, so much that when a different director made a sequel called
2010 that ventured to explain the happenings, film critic Roger Ebert expressed the desire to cover his ears so that the mystery of the
2001 could not be lost.
So in short when you explain your plot in the utmost detail you basically want the reader to say "ooh, but he's clever" though it ends up with the opposite effect. If you don't explain it and leave the reader to figure it out for himself, he'll be much more impressed.
Well, that's my theory of writing. Putting it into practice however is a different story altogether.