History is a vast collection of simultaneous processes that can go to opposite directions at the same time. One strand of recent history is the madness caused by the Communist and Nazi totalitarian dreams. However, history has already clearly shown that these totalitarian ideas have lost the game to democratic systems of government.
Democracy has simply shown to be a superior system of government over all forms of totalitarianism. Even the Islamic world is slowly learning the lesson of open societies beating closed ones in the end. History has amply shown how the inner decay of closed totalitarian systems is inevitable.

China still is lingering under a vague totalitarian Communist ideology, but even it is no more a centrally-led totalitarian socialist economy either. On the other hand, at the same time United States is in the name of 'security' closing its traditional open society. I fear that it will feel the immense harm of this policy in the end.
There are vast differences in experiences in different areas too. In Scandinavia, it is hard to understand the pain and sorrow that the countries with totalitarian regimes have gone through. If we look, for example, just on the Scandinavian history and experience, the last century has been a century of steady progress and improvement in all parts and corners of the society.

Sweden for one has been at peace for over 200 years. This lucky country has not experienced inner violence of note either during all of this time. The last hundred years have simply seen a rise in rational thinking and most of all doing things that have no parallel in history.

In fact, one can well ask what century could one characterize as more reasonable than 20th century? The 19th with immense waves of  imperialism and chauvinism the 18th with absolute monarchies ruling the lands and waves?
One must go the Greece of 200-300 BC before one finds reasonable thinking in the form to which we are used in the 20th century. However, all other parts of the earth were still under the veil of supernatural and mystical thinking. A successful version of Christianity soon engulfed also the Roman Empire.

This event did wipe out rational thinking from Europe for about 1500-1700 years, depending if you count the few first lonely voices of Enlightenment as real forces of change. I am afraid that many people are missing the forest for the trees, when they see the last century just as the century of the rise of largely irrational ideologies like Nazism and Communism or the fully irrational fundamentalist Islam.
On the contrary, the big picture is a general rise in reasonable and rational thinking during the last century. Of course, the big flow of history has been at times been even greatly disturbed by sudden currents of irrationalism.
One of them was the quite unexpected and unforeseen rise to power of an obscure populist party in Germany in the 30's. However, this disturbance of a general trend was completely wiped out by more rational and reasonable forces in less than 20 years after the rise to power of Nazi-party in Germany.

Wikipedia

The rise of Communism was not a wholly irrational phenomena as the rise of the NSDAP in Germany can well be labeled to be. This is most of all because they had a much stronger ideological base. They could lean on their new kind of secular religion which among other things rejected private ownership and property. Communism also had a quite different staying power than the Nazis. It did after all cling to power for over 70 years.
However, during the last couple of decades the Russian Communist theocracy just did keep up a papier-mâché facade of Communism. This facade did often hide a personal quest for power and sources of corruption.

This empty facade did not need any violent push to fall. A main problem soon was that Communist totalitarianism had to exist in the more and more rationally working new world. This is the world of computers and most of all a world of the new and often rationally working networks that also bind intellectuals in a quite new way.
It is clear to any objective observer that the systems of government that are based on irrational beliefs find it more and more difficult to stay in power in a  interconnected modern world. They need to cling to power in a world where it is becoming more and more difficult to control the flow of information. Controlling the flow of information has after all always been extremely important for all totalitarian systems.

The democratic forms of government have slowly won more ground. This has happened a decade after a decade and simultaneously all over the world. Of course, there still are large patches of land under the control of belief-systems that are basically just whims of human imagination. However, the current global trend towards democracy is extremely clear.
The continued existence of totalitarian systems does not mean that the general universal sum and the outlook of our times or our zeitgeist or “spirit of time” would not be more rational than ever in the human history.

I must hurry to point out that I am not talking about the ‘Zeitgeist-movement’ at all, but about a concept that was created by philosophers like Johann Gottfried Herder and Georg Wilhelm Friedrich Hegel. A change in Zeitgeist is a change in how people and society generally do see things.

Portrait of Petrarch painted in 1376. German historian Georg Voigt (1827–91) identified Petrarch as the first Renaissance humanist. - Wikipedia

I do not mean that there is any kind of inevitable moral progress. This is the case, even if the rise of humanistic thinking can well be counted as moral progress on a global level. Accepting of the humanistic way of thinking often leads alto to seeing and accepting the real diversity of our world. This idea often just makes people act more kindly towards people of other races, ideologies, and even competing religions.
However, this is not an inevitable historical process, but a thing that just has already happened around us for reasons that we can only guess. This development can also happen just because more people than in the past find the humanistic and human way of doing things appealing.

The humanistic general attitude is not spread by evangelists or missionaries but through things like novels, theaters and the silver screen. A well-established and scientifically provable progress in general human conditions is a fact. It has been achieved by use of technology, science, and advances in medicine.
Exceptions to this global trend are naturally countries that are ravaged by inner or outer conflicts. Excluded are also those countries, which do not want to control the growth of their population. However, generally the disturbances that are created by conflict just slow down the general progress for the duration of the conflict.

(This piece was completely refurbished on 22th of April, 2013)