For centuries, human hereditary improvement was a problem in social, not biological, engineering: how to persuade or coerce people into marrying to benefit the population as a whole. The obvious analogy was to agriculture and animal husbandry. In Plato’s Republic, Socrates says that only the best citizens would be allowed to mate, so that the population could be improved, just as dogs and chickens. Fourteen centuries later, Charles Darwin’s half-cousin, Francis Galton, called such a scheme ‘eugenics’, from the Greek for ‘well-born’ or ‘well-bred’. In 1865, in an article in Macmillan’s – a general-interest magazine where serious ideas found a wide audience – Galton indulged in a eugenic fantasy: ‘If a twentieth part of the cost and pains were spent in measures for the improvement of the human race that is spent on the improvement of the breed of horses and cattle, what a galaxy of genius might we not create!’

A galaxy of English genius, that is. Galton feared that the English race was degenerating, declining in both mental and physical ability. (It remains a common fear; the French thought they were degenerating, too.) Like others of his day, Galton used the term ‘race’ loosely. He referred alternately to the English race, the white race, the human race. But overall, English eugenics was less about race than class. To Galton’s mind, the filthy working poor were breeding like rabbits while the gentry were chastely dwindling. He became convinced that unless something were done, the flower of English manhood – not excluding specimens such as his cousin and, ahem, himself – would soon vanish, swamped by a massive tide of Oliver Twists and Tiny Tims.

That said, Galton had great faith in all the English to act rationally for the common good. His scheme called for voluntary measures. Through education, propaganda, tax incentives and the like, he believed that not only would society’s ‘fittest’ members have bigger families, but the unfit – the sickly, crippled, poor and stupid – would take vows of celibacy. For whatever reasons, Galton himself contributed nothing to the gene pool: the father of better human breeding died childless.

In the United States, the seed of Galton’s scheme took root in a soil over-fertilised with racial tension, debates over immigration, and a devotion to science, efficiency, rationality and government bureaucracy as tools of social reform. The resulting plant bore strange and bitter fruit. A new breed of eugenicist used the new science of genetics to bolster arguments against interracial marriage and the propagation of the ‘feebleminded’, an ill‑defined term for the mentally subpar – a condition many believed to be caused by a single gene.

Not all Americans who supported eugenics were racist and nativist. To a first approximation, everyone was a eugenicist in the early 20th-century US. But for the core of the movement, the eugenic tenet that any disability was all in the genes also put scientific teeth into laws setting racial quotas for immigrants. Reformers pressed for mandated sexual sterilisation of those deemed unfit, including the feebleminded, the criminal, the deaf, the crippled, those with venereal disease and other conditions.

In 1922, Harry Laughlin, superintendent of the Eugenics Record Office on New York’s Long Island, drafted a ‘model sterilisation law’, designed to withstand Constitutional challenge. It did. By the start of the Second World War, more than 30 states had eugenic laws on the books, and tens of thousands of criminals, prostitutes, epileptics, syphilitics and people deemed mentally handicapped had been surgically sterilised.

California’s law was particularly effective. The historian Alexandra Minna Stern has shown that, right up until the early 1950s, it provided no mechanism for challenging a sterilisation order, required no documentation, and offered no opportunity for an institutional hearing. This, she writes, helps explain why California had one of the highest sterilisation rates of any state in the US. In Mein Kampf, Hitler knowledgeably praised American eugenics. Returning the favour, in late 1933 the Eugenics Record Office publication Eugenical News crowed that, with the passage of their Law for the Prevention of Genetically Diseased Offspring the previous July, Hitler’s Germany had become ‘the first of the world’s major nations to enact a modern eugenical sterilisation law for the nation as a unit’, and proudly noted the unmistakable stamp of Laughlin’s model law upon it. It was a regular love-fest.

By the 1930s, most professional geneticists had recoiled from the eugenic movement, resigning themselves to dreaming wistfully of a distant future, when hereditary improvement could be achieved through biological rather than social control. Galton’s plan of education and tax incentives had mutated into a cruel programme of state‑controlled reproduction. And, being made law, early 20th-century eugenics provided a scaffolding for sustaining pernicious prejudices and scientific shibboleths.

That’s where most histories leave eugenics – bleeding to death on the doorstep of modern science. However, eugenics never died. Instead, it was brought inside by science’s neighbour, medicine. Indeed, the two were becoming increasingly close. Scientific public health seemed to have worked miracles with infectious disease: in the 1920s, tuberculosis and cholera dipped below cancer and heart disease as leading causes of death. A few visionary physicians thought similar methods might be used for hereditary illness.

Eugenics, then, was preventive medicine for genetic disease. It was the reason medical genetics and genetic counselling came into being. Certainly, those fields have made important, humane contributions to society. But they also kept alive the flame of human genetic improvement. Scientific medicine rescued eugenics, turning human perfection from a social programme into a biotechnical problem.

As the eugenic movement peaked and crashed, advances in reproductive technology made designer babies thrillingly, frighteningly possible. In the 1920s and early ’30s, visionaries imagined divorcing love and even marriage from procreation. Reproduction could be done scientifically, rationally, in a test tube. For optimists such as the biologist J B S Haldane, such ‘ectogenesis’ would permit humans to take the reins of their own evolution, eliminating disease and mutation, and perhaps enhancing qualities such as intelligence, kindness and strength of character. The geneticist H J Muller proposed a sperm bank for Nobel laureates and other high achievers. However, the novelist Aldous Huxley – brother of the geneticist Julian Huxley – had a darker view. In his Brave New World (1932), ‘Bokanovsky’s process’ – what we would call in vitro fertilisation (IVF) – enabled the creation of biological castes, each suited to different tasks, and each smugly happy with its lot.

Just two years later, ‘two Bokanovskys’ – E V Pincus and Ernst Enzmann – seemed to produce rabbits by IVF. As it turns out, it was probably not true in vitro fertilization – that would be accomplished in 1959 by Pincus’ co-worker Min Chueh Chang – but the future nevertheless was arriving faster than anyone had imagined. By the 1970s, Patrick Steptoe and Robert Edwards had perfected the technique in humans. The result was the birth of Louise Brown, the first ‘test‑tube baby’, in 1978. In 1980, the eugenically minded inventor Robert Graham made Muller’s Nobel sperm bank a reality. In using this criterion, he neglected the fact that people tend to win Nobels late in their careers; the men’s sperm was sadly feeble. He relaxed his criteria somewhat, persuaded a number of ‘geniuses’ to sit alone with a beaker and a copy of Playboy, and over the next 20 years the bank produced more than 200 babies. Today, these people are pretty regular folks. One of the progeny said that having ‘genius’ DNA was no guarantee of success. She understood that nurture is important, too: ‘There’s only so much you can control when it comes to genetics. It all has to do with what you give to your family.’

The development of molecular biology in the 1950s and ’60s transformed genes from abstractions into hard chemicals. Suddenly, scientists understood basically what a gene was. They thought they understood what a human was. ‘Now we can define man,’ wrote the bacterial geneticist Joshua Lederberg in 1963. ‘He is… six feet of a particular molecular sequence of carbon, hydrogen, oxygen’ – the amount of DNA in the nucleus of a human sperm or egg. Having learned to read, scientists would soon be composing like Shakespeare. Lederberg imagined that at the current rate of progress, scientists would soon be manipulating individual chromosomes and genes, culturing designer sperm, and more, ‘to accomplish in one or two generations of eugenic practice what would now take 10 or 100’. He continued: ‘The ultimate application of molecular biology would be the direct control of nucleotide sequences.’

Scientific advances continued to trigger fantasies of social control. And yet both sides in the debate tended to exaggerate the linkage between technical ability and real understanding.

To the flag-wavers, new biological technologies meant distasteful social control would no longer be necessary. The skeptics feared the technology could get into the wrong hands. Sometimes, the skeptics and the scientists were the same. When, in 1969, a Harvard research team led by Jonathan Beckwith isolated the first gene, they held a press conference warning of the hazards of their own research. Biological warfare, eugenics – who knew where it could lead? The New York Times Magazine took the bait, calling the experiment a ‘step in heredity control’.

By the mid-1980s, enthusiasts were discussing ‘genetic surgery’. The idea was to treat genetic disease by inserting a therapeutic gene into a modified virus and then ‘infect’ the patient; the virus would do the tricky part of inserting the gene into the chromosome. Through the 1990s, gene therapy was hyped almost as hard as CRISPR (clustered regularly interspaced short palindromic repeats), the new technology for ‘editing’ genes, is today. ‘Gene guns’ would cure cancer with an injection. Corner drugstores would peddle ‘universal cells’ that would enable us to ‘kiss high cholesterol, high blood pressure, even AIDS, goodbye’. And yet, hand-wringers agonised that the renewed debate was ‘sending chills down the spines of those who fear it will impose a Brave New World of mind control on the children of America’s violent inner cities’. Some commentators worried that the prospect of ‘fixing’ putative obesity genes, violence genes and other traits would suggest a ‘quick-fix pill to sedate ghetto kids’. In short, scientific advances continued to trigger fantasies of social control. And yet both sides in the debate tended to exaggerate the linkage between technical ability and real understanding.

The hype bubble was pricked by a series of unfortunate events. In 1999, the teen Jesse Gelsinger died from a mysterious massive organ shutdown in a routine efficacy trial at the University of Pennsylvania. Three years later, girls in a French trial successfully had their severe immune disease treated – only to die of leukemia, when the viral vector carrying the new gene inserted at the wrong spot in the genome. Gene therapy funding was slashed, a temporary moratorium was imposed, researchers were chastened. Gene therapy has since made a mild comeback: it has proven useful in limited cases, but it is nothing like the genetic panacea it was supposed to be.

CRISPR must be seen as the latest step in this history of promises: the promise of ending genetic disease, of designer babies, of the self-direction of human evolution. Those enduring fantasies float atop a steady flow toward ever more precise methods of managing reproduction. We’ve moved from influencing marriages to controlling individuals’ reproduction, to manipulating sex itself, to replacing defective or missing genes and now, with CRISPR, to editing the DNA code letter by letter. The ultimate in molecular biology.

Precision has its advantages. Surely the boosters are right when they say that precise control over the DNA allows us to sidestep the repugnant, coercive social controls of the eugenic era. For some, such as the bioethicists Julian Savulescu and John Harris, and the journalist Matt Ridley, this makes eugenics permissible again. They say we are rapidly approaching the day when a eugenics of individual choice, not government mandate, will be possible – choosing our children’s traits from a menu might not be so far off.

The problem is, the dishes do not come à la carte. Most diseases and other traits we’re interested in don’t have simple, direct relations to genes. The number that do is small and steadily shrinking. The layers of complexity, on the other hand, are numerous and growing; I’ll list just four of them.

For starters, genes have upsides and downsides. The tendencies toward schizophrenia, bipolar disorder and autism, for example, might seem traits that you would want to minimise. However, there are now well-established links between these mental disorders and creativity. If you and your partner were artists or musicians, would you accept a higher risk of autism if it gave your child a greater chance of being the next Glenn Gould? For some talents and achievements, a certain amount of obsession with detail is essential, while in others a bit of megalomania or sociopathy can be aids to success.

Genes also act in clusters. Several genes are connected to various forms of autism and psychosis. None account for much of the variation in autism – in the order of 1 to 2 per cent but, taken together, the effect is significant. There’s OXTR, a receptor for the ‘love hormone’ oxytocin; SAT1 (linked to suicide risk); FOXP2 (also implicated in language ability); and several others. Many of these genes encode proteins such as hormone receptors with broad effects throughout the brain. You can’t eliminate the possibility of one trait without triggering a cascade of other effects, many of which will be unknown.

In addition, the effects of such gene clusters depend heavily on the environment. One study looked at the combined effects of pathological variants of five genes. One, MAOA‑L, was identified in serial killers and violent gang members. It was dubbed the ‘warrior gene’. Another is 5‑HTTLPR, a serotonin transporter gene whose short variant has been linked to anxiety and depression. A third, DRD4-7R, is a serotonin‑receptor gene variant that has been called the slut gene, the violent drunk gene and the bully gene. Doesn’t sound like ‘the best’ of anyone.

We thought of the genome as a showroom car but it’s more like an old jalopy, with bumper stickers, fuzzy dice, soda stains and worn clutch

But in some cases, these same gene variants were linked to qualities such as sharing and conscientiousness – traits any parent would want in their child. Two research teams suggested independently that the real trait being selected for is not any sort of sociopathy or mental disorder, but sensitivity. Give a child carrying DRD4-7R a warm, nurturing environment, and he’ll be more likely to share his toys and grow up to be politically liberal. But treat him harshly, and he will have a higher risk of being a bullying, drunken depressive who can’t form long-term relationships. (Of course, none of these outcomes is certain.) The MAOA-L variant has also been linked to making good financial decisions under pressure. So arrest ‘pre-criminals’ based on genetic predispositions, as in the movie Minority Report (2002), and you could wind up triggering a stock‑market crash. Genes do not encode traits; they encode proteins – complex molecules with complex effects.

Finally, there’s epigenetics. In recent years, research has exploded on how our gene activity is regulated by modifications to both our DNA and the intermediate molecule RNA. Epigenetic modifications can turn gene activity up, or down, or modify it in unexpected ways. Such changes begin in the womb and can be influenced by the mother’s nutrition, stress levels and traumatic experiences. Some studies have suggested they can even be handed down through the generations. We used to think of the genome as though it were a showroom car, passed down in mint condition like an heirloom. In fact it might be more like inheriting your mother’s old jalopy, with its bumper stickers, fuzzy dice, soda stains and worn clutch.

In short, most interesting traits are inherently unpredictable from DNA alone. In order to design your baby, you would not only have to make an astronomically complex set of choices, each of which tips a line of dominoes with cascading implications. You would also have to control every important element of your offspring’s experience, like ensuring that you and your spouse don’t divorce; that no drunk driver hits you while your child is still young; that your daughter never has an abusive boyfriend, gets mugged or witnesses a murder. Or perhaps you should make sure she does experience some hardship, to build resilience and grit. It’s impossible to tell.

Whether the thought excites or terrifies you, if you believe that made-to-order babies are possible, you oversimplify how genes work. It’s popular to think of DNA as software: genetic code = computer code. Indeed, for a virus or even a small bacterium, the metaphor might work tolerably well. But as soon as we begin talking about higher organisms, the reality becomes much more complicated.

Once the hype dies down, embryo editing can eventually become a clinical technique, but it will likely be on a small scale. A few diseases might be treatable: devastating, single-gene diseases with distinct reparable mutations, such as cystic fibrosis, Tay-Sachs disease, anaemias such as thalassemia and sickle-cell, certain cancers. But, even for them, old-fashioned prenatal genetic diagnosis and embryo selection could be just as effective and much cheaper.

Yet in terms of bringing us closer to a science-fiction world of intelligently designing our children – utopia or dystopia, take your pick – gene editing is more precise than accurate. The qualities we want in a child or in society can’t be had by tweaking a few nucleotides. There are no short cuts. To think otherwise is to conflate power with knowledge, to overestimate our understanding of biology, and to overestimate the role of genes in determining who we are.