软件工程大师Robert C. Martin把里氏代换原则最终简化为一句话：“Subtypes must be substitutable for their base types”。也就是，子类必须能够替换成它们的基类。即：子类应该可以替换任何基类能够出现的地方，并且经过替换以后，代码还能正常工作。另外，不应该 在代码中出现if/else之类对子类类型进行判断的条件。里氏替换原则LSP是使代码符合开闭原则的一个重要保证。正是由于子类型的可替换性才使得父类 型的模块在无需修改的情况下就可以扩展。
Do not fear to be eccentric in opinion, for every opinion now accepted was once eccentric.
Democracy is the process by which people choose the man who’ll get the blame.
Drunkenness is temporary suicide.
I say quite deliberately that the Christian religion, as organized in its Churches, has been and still is the principal enemy of moral progress in the world.
A process which led from the amoeba to man appeared to the philosophers to be obviously a progress though whether the amoeba would agree with this opinion is not known.
I would never die for my beliefs because I might be wrong.
In America everybody is of the opinion that he has no social superiors, since all men are equal, but he does not admit that he has no social inferiors.
It has been said that man is a rational animal. All my life I have been searching for evidence which could support this.
Man is a credulous animal, and must believe something; in the absence of good grounds for belief, he will be satisfied with bad ones.
Many a man will have the courage to die gallantly, but will not have the courage to say, or even to think, that the cause for which he is asked to die is an unworthy one.
Many people when they fall in love look for a little haven of refuge from the world, where they can be sure of being admired when they are not admirable, and praised when they are not praiseworthy.
Many people would sooner die than think; in fact, they do so.
Men are born ignorant, not stupid. They are made stupid by education.
Conventional people are roused to fury by departure from convention, largely because they regard such departure as a criticism of themselves.
A hallucination is a fact, not an error; what is erroneous is a judgment based upon it.
A life without adventure is likely to be unsatisfying, but a life in which adventure is allowed to take whatever form it will is sure to be short.
Against my will, in the course of my travels, the belief that everything worth knowing was known at Cambridge gradually wore off. In this respect my travels were very useful to me.
Aristotle maintained that women have fewer teeth than men; although he was twice married, it never occurred to him to verify this statement by examining his wives’ mouths.
Contempt for happiness is usually contempt for other people’s happiness, and is an elegant disguise for hatred of the human race.
For most people, the real life is long, is the ideal and may compromise between continuous compromise.
Undoubtedly the desire for food has been, and still is, one of the main causes of great political events. But man differs from other animals in one very important respect, and that is that he has desires which are, so to speak, intimate, which can never be fully gratified, and which should keep him restless even in Paradise. The boa constrictor, when he had an adequate meal, goes to sleep, and does not wake until he needs another meal. Human beings, for the most not part are not like this. When the Arabs, who had been used to living sparingly on a few dates, acquired the riches of the Eastern Roman Empire and dwelt in palaces of almost unbelievable luxury, they did not, on that account, become inactive. Hunger could no longer be a motive, for Greek slaves supplied them with exquisite viands at the slightest nod. But other desires kept them active; four in particular, which we can label acquisitiveness, rivalry, vanity and love of power.
Acquisitiveness-the wish to possess as much as possible of goods, or the title to goods-is a motive which, I suppose, has its origin in a combination of fear with the desire for necessaries.
I once befriended two little girls from Esthonia, who had narrowly escaped death from starvation in a famine. They lived in my family, and of course had plenty to eat. But they spent all their leisure visiting neighbouring farms and stealing potatoes, which they hoarded. Rockefeller, who in his infancy had experienced great poverty, spent his adult life in a similar manner. Similarly the Arab chieftains on their silken Byzantine divans could not forget the desert, and hoarded riches far beyond any possible physical need. But whatever the psychoanalysis of acquisitiveness, no one can deny that it is one of the great motives -especially among the more powerful, for ,as I said before, it is one of the infinite motives .However much you may acquire you will always wish to acquire more ;satiety is a dream which will always elude you.
But acquisitiveness, although it is the mainspring of the capitalist system, is by no means the most powerful of the motives that survive the conquest of hunger .Rivalry is a much stronger motive. Over and over again in Muhammadan history, dynasties have come to grief because the sons of a sultan by different mothers could not agree, and in the resulting civil war universal ruin resulted. The same sort of thing happens in modern Europe When the British Government very unwisely allowed the Kaiser to be present at a naval review at Spithead, the thought which arose in his mind was not the one which we had intended. What he thought was.” I must have a Navy as good as Grandmamma’s.”And from this thought pier place than it is if acquisitiveness were always stronger than rivalry. But in fact ,a great many men will cheerfully face impoverishment if they can thereby secure complete ruin for their rivals, Hence the present level of taxation.
Vanity is a motive of immense potency. Anyone who has much to do with children knows how they are constantly performing some antic and saying “Look at me”. “Look at me “is one of the most fundamental desires of the human heart. It can take innumerable forms, from buffoonery to the pursuit of posthumous fame. There was a Renaissance Italian princeling who was asked by the priest on his deathbed if he had anything to repent of “Yes,” he said “There is one thing. On one occasion I had a visit from the Emperor and the Pope simultaneously .I too tem to the top of my tower to see the view, and I neglected the opportunity to throw them both down .which would have given me immortal fame.” history does not relate whether the priest gave him absolution. One of the troubles about vanity is that it grows with what it feeds on .The talked about. The condemned murderer who is allowed to see the account of his trial in the Press is indignant if he finds a newspaper which has reported it inadequately. And the more he finds about himself in other newspapers, the more indignant he will be with those whose reports are meager. Politicians and literary men are in the same case. And the more famous they become, the more difficult the press cutting agency finds it to satisfy them .It is scarcely possible to exaggerate the influence of vanity throughout the range of human life, from the child of three to the potentate at whose frown the world trembles. Mankind have even committed the impiety of attributing similar desires to the deity, whom they imaging avid for continual praise.
But great as is the influence of the motives we have been considering, there is one which out weighs these all……Power, like vanity, is insatiable. Nothing short of omnipotence could satisfy it completely. And as it is especially the vice of energetic men, the casual efficacy of love of power is out of all proportion to its frequency. It is ,indeed, by far the strongest motive in the lives of important men .Love of power is greatly increased by the experience of power ,and this applies to petty power as well as to that of potentates ,In the happy days before 1914,when well-to -do ladies could acquire a host of servants, their pleasure in exercising power over the domestics steadily increased with age .Similarly, in any autocratic regime, the holders of power become increasingly, tyrannical with experience of the delights that power can afford. Since power over human beings is shown in making them do what they would rather not do, the man who is actuated by love of power is more apt to inflict pain than to permit pleasure .If you ask your boss for leave lf absence from the office on some legitimate occasion, his love of power will derive more satisfaction from refusal than from consent .If you require a building permit, the petty official concerned will obviously get more pleasure from saying “No” than from saying “Yes”. It is this sort of thing which makes the love of power such a dangerous motive ,But it has other sides which are more desirable .The pursuit of knowledge is ,I think ,mainly actuated by love lf power ,And so are all advances in scientific technique ,In politics also ,a reformer may have just as strong a love of power as a despot .It would be a complete mistake to decry love of power altogether as a motive ,Whether you will be led by this motive to actions which are useful ,or to actions which are pernicious ,depends upon the social system ,and upon your capacities .
I come now to other motives which ,though in a sense less fundamental than those we have been considering ,are still of considerable importuned ,The first of these is love of excitement .Human beings show their superiority to the brutes by their capacity for boredom ,though I have sometimes thought ,in Examining the apes at the Zoo, that they ,perhaps ,have the rudiments of this tiresome emotion .However that may be, experience shows that escape from boredom is one of the really powerful desires of almost all human beings.
When white men first effect contact with some unspoilt race of savages, they offer them all kinds of benefits, from the light of the Gospel to pumpkin pie. These, however, much as we may regret it, most savages receive with indifference. What they really value among the gifts that we bring to them is intoxicating liquor ,which enables them .for the first time in their lives ,to have the illusion, for a few brief moments ,that it is better to be alive than dead.
Red Indians ,while they were still unaffected by white men ,would smoke their pipes .not calmly as we do ,but orgiastically ,in haling so deeply that they sank into a faint ,And when excitement by means of nicotine failed ,a patriotic orator would stir them up to attack a neighbouring tribe ,which would give them all the enjoyment that we (according to our temperament ) derive from a horse race of a General Election.
With civilized men, as with primitive Red Indian tribes, it is, I think, chiefly love of excitement which makes the populace applaud when war breaks out; the emotion is exactly the same as at a football match, although the results are sometimes somewhat more serious.
It is not altogether easy to decide what is the root cause of the love of excitement. I incline to think that our mental make-up is adapted to the stage when men lived by hunting .When a man spent a long day with very primitive weapons in stalking a deer with the hope of dinner and when ,at the end of the day ,he dragged the carcase triumphantly to his cave ,he sank down in contented weariness, while his wife dressed and cooked the meat ,He was sleepy ,and his bones ached ,and the smell of cooking filled every nook and cranny of his consciousness. At last after eating, he sank into deep sleep. In such a life there was neither time nor energy for boredom. But when he took to agriculture, and made his wife do all the heavy work in the fields, he had time to reflect upon the vanity of human life, to invent mythologies and systems of philosophy, and to dream of the life hereafter in which he would perpetually hunt the wild boar of Valhalla.
Our mental make-up is suited to a life of very severe physical labour , I used ,when I was younger ,to take my holidays walking ,I would cover 25 miles a day ,and when the evening came I had no need of anything to keep me from boredom ,since the delight of sitting amply sufficed .But modern lift cannot be conducted on these physically strenuous principles ,A great deal of work is sedentary and most manual work exercises only a few specialized muscles. When London crowds assemble in Trafalgar Square to cheer to the echo an announcement that the government has decided to have them killed ,they would not do so if they had walked 25 miles that day .This cure for bellicosity is ,however ,impracticable and if the human race is to survive – a thing which is ,perhaps ,undesirable -other means must be found for securing an innocent outlet for the unused physical energy that produces love of excitement.
This is a matter which has been too little considered, both by moralists and by social reformers .The social reformers are of the opinion that they have more serious things to consider , The moralists ,on the other hand ,are immensely impressed with the seriousness of all the permitted outlets of the love of excitement; the seriousness ,however ,in their minds is that of Sin ,Dance halls ,cinemas ,this age of jazz are all ,if we may believe our ears gateways to Hell, and we should be better employed sitting at home contemplating our sins. I find myself unable to be in entire agreement with the grave men who utter these warnings. The devil has many forms, some designed to deceive the young ,some designed to deceive the old and serious .If it is the devil that tempts the young to enjoy themselves ,is it not ,perhaps ,the same personage that persuades the old to condemn their enjoyment? And is not condemnation perhaps merely a form of excitement appropriate to old age? And is it not , perhaps ,a drug which -like opium -has to be taken in continually stronger doses to produce the desired effect? Is it not to be feared that ,beginning with the wickedness of the cinema, we should be led step by step to condemn the opposite political party ,dagoes ,wops, Asiatics ,and ,in short, everybody except the fellow members of our club? And it is from just such condemnations, when widespread, that wars proceed. I never heard of a war that proceeded from dance halls.
What is serious about excitement is that so many of its forms are destructive. It is destructive in those who cannot resist excess in alcohol or gambling. It is destructive when it takes the form of mob violence. And above all it is destructive when it leads to war. It is so deep a need that is will find harmful outlets of this kind unless innocent outlets are at hand. There are such innocent outlets at present in sport, and in politics so long as it is kept in constitutional bounds. But these are not sufficient, especially as the kind of politics that is most exciting is also the kind that does most harm.
Civilized life has grown altogether too tame, and, if it is to be stable, it must provide harmless outlets for the impulses which our remote ancestors satisfied in hunting. In Australia ,where people are few and rabbits are many ,I watched a whole populace satisfying the primitive impulse in the primitive manner by the skilful slaughter of many thousands of rabbits ,But in London or New York, where people are many and rabbits are few ,some other means must be found to gratify primitive impulse ,I think every big town should contain artificial waterfalls that people could descend in very fragile canoes ,and they should contain bathing pools full of mechanical sharks ,Any persons found advocating a preventive war should be condemned to two hours a day with these ingenious monsters.