Pre-scientific or magical thinking has several key features:
* The idea of a direct or intrinsic connection between things, i.e. that if two things influence each other or are associated in some way, they are bound by an occult link, are subject to the same invisible forces. One can instantly affect the other with nothing linking them.
* The idea that the visible characteristics of something are the expression of an invisible essence.
* The failure to distinguish between perceptions an reality, so that anything we see or imagine or experience is assumed to have an independent existence in the objective world.
Popular thinking about genetics has exactly these characteristics. Anything we can say about an organism, any description we give it, is reified as an objective trait of the organism. (As if the placement of an animal in Borges' Library of Babel was a property of the animal.) These traits are then assumed to be present in the organism's inner being, i.e. its genes. And the genes are then believed to produce and modify the trait by occult direct action, without any need for specific intermediate transmission mechanisms.
It's just scholasticism. They said a person who behaved intelligently must have a property of intelligence. We say they must have a gene for it.
The alternative, scientific view insists that until we know the mechanism by which something happens, we don't know anything about it at all. And there's no expectation that the mechanism has any formal or inherent resemblance to the observed phenomenon.
The beginning of wisdom is that genes code for proteins. (Or for RNA.) The only thing a gene does is produce a particular protein. Nothing except the protein is the product of the gene, there's no sense in which a gene is “for” anything else.
These proteins then participate in causal pathways. These pathways always involve the organism's pre-existing physical state, the products of other genes, and the external environment, and almost always involve the organism's behavior. Each protein may participate in many pathways, and at least as important, various pathways converge at points where they are interchangeable. Great proportions of this protein or that protein or this dietary change or that behavioral stimulus will all produce the exact same developmental response. And multiple points along the pathway may be sites of selective pressure – there is no sense in which the influence of the gene stops at the point we've chosen to identify as a "trait".
There are many wonderful examples of what this means in practice in Mary Jane West-Eberhard's Developmental Plasticity and Evolution. There she also makes the somewhat related point that organisms constantly lean on the self-organizing capacities of inorganic matter -- another way the whole "code" metaphor is wrong.