Scott Wolinsky has written an enlightening (if cynical) article about the patenting process. According to Scott, successfull prosecution of a patent application requires a novel invention, adequate prosecution skills, and also a bit of luck. Primarily Wolinski finds that the luck is getting the right examiner. (Thanks to Slashdot for the link.)
Professor Lichtman (UChicago) has a nice article (pdf) about this topic and its consequences for prosecution history estoppel. If the patent prosecution process truly has such a significant luck component, then the quality of the examination might need to become an issue when determining validity during litigation. Karl Lenz and Axel Horns discuss the purpose of the patent system (focusing mainly on software patenting).