# Comparison

Comparison or comparing is the act of evaluating two or more things by determining the relevant, comparable characteristics of each thing, and then determining which characteristics of each are similar to the other, which are different, and to what degree. Where characteristics are different, the differences may then be evaluated to determine which thing is best suited for a particular purpose. The description of similarities and differences found between the two things is also called a comparison. Comparison can take many distinct forms, varying by field:
   To compare is to bring two or more things together (physically or in contemplation) and to examine them systematically, identifying similarities and differences among them. Comparison has a different meaning within each framework of study. Any exploration of the similarities or differences of two or more units is a comparison. In the most limited sense, it consists of comparing two units isolated from each other.
To compare things, they must have characteristics that are similar enough in relevant ways to merit comparison. If two things are too different to compare in a useful way, an attempt to compare them is colloquially referred to in English as "comparing apples and oranges." Comparison is widely used in society, in science and the arts.

## General usage

Comparison is a natural activity, which even animals engage in when deciding, for example, which potential food to eat. Humans similarly have always engaged in comparison when hunting or foraging for food. This behavior carries over into activities like shopping for food, clothes, and other items, choosing which job to apply for or which job to take from multiple offers, or choosing which applicants to hire for employment. In commerce, people often engage in comparison shopping: attempting to get the best deal for a product by comparing the qualities of different available versions of that product and attempting to determine which one maximizes the return on the money spent. In the twenty-first century, as shopping has increasingly been done on the internet, comparison shopping websites have developed to aid shoppers in making such determinations. When consumers and others invest excessive thought into making comparisons, this can result in the problem of analysis paralysis.
Humans also tend to compare themselves and their belongings with others, an activity also observed in some animals. Children begin developing the ability to compare themselves to others in elementary school. In adults, this can lead to unhappiness when a person compares things that they have to things they perceived as superior and unobtainable that others have. Some marketing relies on making such comparisons to entice people to purchase things so they compare more favorably with people who have these things. Social comparison theory, initially proposed by social psychologist Leon Festinger in 1954, centers on the belief that there is a drive within individuals to gain accurate self-evaluations. The theory explains how individuals evaluate their own opinions and abilities by comparing themselves to others to reduce uncertainty in these domains, and learn how to define the self. Following the initial theory, research began to focus on social comparison as a way of self-enhancement, introducing the concepts of downward and upward comparisons and expanding the motivations of social comparisons.
Human language has evolved to suit this practice by facilitating grammatical comparison, with comparative forms enabling a person to describe a thing as having more or less of a characteristic than another thing, or to describe a thing in a group as having the most or least of that characteristic relative to the group. The grammatical category associated with the comparison of adjectives and adverbs is degree of comparison.

## Academics

Academically, comparison is used between things like economic and political systems. Political scientist and historian Benedict Anderson has cautioned against use of comparisons without considering the relevant framework of things being compared:
   It is important to recognise that comparison is not a method or even an academic technique; rather, it is a discursive strategy. There are a few important points to bear in mind when one wants to make a comparison. First of all, one has to decide, in any given work, whether one is mainly after similarities or differences. It is very difficult, for example, to say, let alone prove, that Japan and China or Korea are basically similar or basically different. Either case could be made, depending on one's angle of vision, one's framework, and the conclusions towards which one intends to move.
Anderson notes as an example that "[i]n the jingoist years on the eve of the First World War, when Germans and Frenchmen were encouraged to hate each other, the great Austro-Marxist theoretician Otto Bauer enjoyed baiting both sides" by comparing their similarities, "saying that contemporary Parisians and Berliners had far more in common than either had with their respective medieval ancestors". Notably, the phrase "comparative studies" is generally used to refer to cross-cultural studies, within the fields of sociology and anthropology. Émile Durkheim, one of the founders of the field of sociology, said of this term that "comparative sociology is not a particular branch of sociology; it is sociology itself".

## Literature

The primary use of comparison in literature is with the simile, a figure of speech that directly compares two things. Similes are a form of metaphor that explicitly use connecting words (such as like, as, so, than, or various verbs such as resemble) though these specific words are not always necessary. While similes are mainly used in forms of poetry that compare the inanimate and the living, there are also instances in which similes are used for humorous purposes of comparison.
A number of literary works have commented negatively on the practice of comparison. For example, 15th-century English poet John Lydgate wrote "[o]dyous of olde been comparsionis", which was reflected by many later writers, such as William Shakespeare, who included the line in Much Ado About Nothing, "comparisons are odious". Miguel de Cervantes, in a passage in Don Quixote, wrote, "is it possible your pragmatical worship should not know that the comparisons made between wit and wit, courage and courage, beauty and beauty, birth and birth, are always odious and ill taken?"

## File comparison

Editing documents, program code, or any data always risks introducing errors. Displaying the differences between two or more sets of data, file comparison tools can make computing simpler, and more efficient by focusing on new data and ignoring what did not change. Generically known as a diff after the Unix diff utility, there are a range of ways to compare data sources and display the results.
Some widely used file comparison programs are diff, cmp, FileMerge, WinMerge, Beyond Compare, and File Compare.