Candide is a sustained assault on the optimistic philosophy associated with the German philosopher Gottfried von Leibniz. Essentially, Leibniz argued that since God created the world, everything was as good as it could possibly be. For a reform-minded philosophe like Voltaire, this philosophy encouraged stagnation and the uncritical acceptance of existing institutions. In Candide, this philosophy is represented by Pangloss, who repeats the credo that "all is for the best in this, the best of all possible worlds." Candide's experiences, which entail a series of absurd misfortunes, contradict this philosophy, and eventually he comes to the conclusion that optimism is "a mania for insisting that everything is all right when everything is going wrong." So Candide is a critique of philosophical optimism, and really of anyone who claims that a single philosophical system can encompass all of human experience.
Candide, ou l'Optimisme by Voltaire is a satirical novella or short novel published in 1759. It was written in response to three events: the publication of Leibniz's "Monadology", the Seven Years' War, and the 1755 Lisbon earthquake and tsunami. Voltaire saw the brutality of war and the death of thousands of innocent people in a natural disaster as making a mockery of Leibniz's (and Christianity's) optimism. Thus Candide is a scathing satire in which the notion of divine providence and grand ideals (expressed most programmatically by Doctor Pangloss) is confronted by the reality of everything from war to colonial oppression and from the abuses of the Inquisition to natural disasters.
The central message that Voltaire conveys is that there is no such thing as benevolent Providence and that grand providential narratives simply plaster over real human misery in a world that is a product of random, purposeless mechanical forces. The best a human can do in this real world is attempt to find personal happiness in daily life and work. Finally, echoing the philosophy and life of the Greek philosopher Epicurus, Candide famously concludes:
"We must cultivate our gardens."