also barn-yard, 1510s, from barn + yard (n.1). Figurative of coarse or uncivilized behavior from 1920.
The very speeches in which Jefferson and Lincoln spoke of their hope for the future are incomprehensible to most of the voters of that future, since the vocabulary and syntax of the speeches are more difficult—more obscure—than anything the voters have read or heard. For when you defeat me in an election simply because you were, as I was not, born and bred in a log cabin, it is only a question of time until you are beaten by someone whom the pigs brought up out in the yard. The truth that all men are politically equal, the recognition of the injustice of fictitious differences, becomes a belief in the fictitiousness of differences, a conviction that it is reaction or snobbishness or Fascism to believe that any individual differences of real importance can exist. [Randall Jarrell, "The Obscurity of Poetry," 1953]