When and how did Dostoevsky predict algorithms?
Xavier Duran delves into the fruitful relationship between literature and science in an essay that reviews more than 3,000 years of history, with examples such as Homer, Mary Shelley, Víctor Català, Joan Margarit and Thomas Pynchon.


BarcelonaThe day all the laws of nature that guide behavior have been discovered, human beings will no longer be responsible for their actions. This is the fear that made a 19th-century classic like Fyodor Dostoevsky –an engineer by training– strongly criticized the rationalization in Notes from Underground (in Catalan, by Angle Editorial, translated by Miquel Cabal). Published in 1864 in Russian, it is a novel about a frustrated and furious civil servant who dedicates himself to plotting impossible revenge and, at the same time, offers a harsh portrait of the challenges of the time and the future prospects of a society in crisis. Among the merits of Dostoevsky's book is a visionary note: the prediction of the algorithms that today decide what we read, what we listen to, or even with whom we should have sexual relations. Notes from Underground, Dostoevsky feared that all human actions would end up being mathematically computed: "Everything will be calculated and established with such precision that there will be no more action and adventure in the world."
This is one of the examples he collects 100 literary visions of science and technology (Cosetania, 2025), a journey through more than 3,000 years of history that shows the fruitful – and often unsuspected – links between literature and science. Its author, Xavier Duran (Barcelona, 1959), could even be part of it, because he has dedicated himself for decades to disseminating science and literature. A graduate in chemistry and a doctor in communication sciences, he debuted with The spirit of science (3i4), Joan Fuster essay prize winner in 1990, and since then he has published thirty books, in addition to having directed the program The environment of TV3 between 1999 and 2014. "It was thanks to an essay that I came, more than forty years ago, to Elective affinities by Goethe, a novel in which the German writer applies the late 18th-century concept of chemical affinity to the affinity between couples," he recalls. "From there I wondered if there were other examples, and I was surprised by both the quality and variety of those I found."
This work first crystallized in a chapter of a collective book, Between fear and hope (Proa, 2002), which showed some links between chemistry and literature. Duran's ambition led him to continue working in this field – very little explored both in Catalonia and the rest of Spain, he laments – and he ended up publishing Science in literature (Publications of the University of Barcelona, 2015), of which 100 literary visions of science and technology It is an even more appealing and accessible brother, because it allows us to delve into the relationships between "both cultures", according to the expression popularized by the chemist and writer CP Snow in a 1959 conference. "In the Catalan Countries, the two cultures are still quite separate," says Duran, who this year also published The day after yesterday (L'Albí, 2025), where he addresses how scientific and technical advances determine a relationship that changes with the times. "Taking into account that Catalan is a minority language, culture has focused on building a good literary base and has not paid much attention to scientific culture. Even so, important efforts have been made to ensure that Catalan has an established scientific terminology. And there are literary figures who have dedicated part of their work to exploring science, as is now the case. Núria Perpignan", he says.
Homer's feat
The Iliad helped refute the theory of spontaneous generation
The journey of the volume starts with Atra-Hasis, a mythological poem written between 1850 and 1500 BC in Mesopotamia in the Akkadian language, like the Gilgamesh. "At that time, illness was still seen as a punishment from the gods, although a more earthly medicine had already begun to develop," the author recalls. "It was in Ancient Egypt that this practice in the modern sense was born. Fractures, dislocations and dental problems were treated and surgery was performed..." The first mention of a treatment dates back to 3533 BC, when Pharaoh Sahure was cured of a disease in his nostrils.
Classical antiquity is represented by Homer, with a critique of spontaneous generation, and Lucretius, that in From nature (in Catalan to Laia, translated by Miquel Dolç) proposes to explain, as far back as the 1st century BC, the phenomena "by the combination and action of atoms and not by the intervention of the gods." The case of Homer is even more valuable, because an epic poem dating from the 8th century BC such as the Iliad (the latest Catalan version is by Pau Sabaté for La Casa dels Clàssics) ended up "being a great contribution to science through literature." The fragment in which Achilles asks his mother, Thetis, to watch over the corpse of his friend Patroclus, "to prevent the flies from breeding maggots" on the dead man's wounds and accelerating the putrefaction process, led the physician Francesco Redi, almost 2,000 years later, in the 17th century, to wonder whether maggots appearing on dead bodies arose through spontaneous generation, as had been believed until then, or rather had to do with the eggs that flies might lay. "The theory of spontaneous generation received the final blow in the 19th century, thanks to the work of the French chemist Louis Pasteur," Duran adds. "The process of refutation began thanks to Homer's rigorous description."
Two pioneers
The cases of Margaret Cavendish and Mary Shelley
Xavier Duran does not hide that most of the 100 literary visions of science and technology have been written by men. "Women have suffered historical discrimination that has made it difficult for them to occupy spaces in both science and literature," she comments. "Furthermore, some of the authors featured in the book, such as George Eliot and Víctor Català, had to use male pseudonyms."
The first woman to appear in the volume is Margaret Cavendish (1623-1673), who had "the privilege" of accessing England's intellectual and scientific circles until 1997 as "she was unable to visit the Royal Society." 1945," says Xavier Duran. She was also the first woman to sign a utopia, The shining world (1666; in Catalan in Duna Llibres, translated by Anna Llisterri). The novel's protagonist accidentally ends up in unfamiliar territory, and its inhabitants regard her as a goddess. "Cavendish reflects in the book on what was seen through telescopes and microscopes," the author comments. "She wonders whether what they show is reality itself or a modification."
Mary Shelley warned readers "about the limits of scientific research" in Frankenstein or the modern Prometheus (1818; the last Catalan edition is from Vienna, translated by Xavier Zambrano). In the novel, the protagonist brings a dead body to life and ends up losing control of his creation. "Shelley was very well informed about the scientific debates of the time: her Frankenstein is influenced by galvanism, according to which a small electric current could make a dead frog's leg contract," explains Xavier Duran.
Catalan authors and science
The health of the 'Tirant', the most cinematic Víctor Català and Joan Margarit's structural calculations
One of the successes of 100 literary visions of science and technology is that it includes more than twenty Catalan authors in the selection. It begins with Throwing the White Away of Joanot Martorell, published in 1490: although the knight has "extraordinary strength and his body overcomes even mortal wounds, he ends up being defeated by pneumonia," says Xavier Duran, before recalling that in the novel there are some allusions to the illustrious Roman doctor Galé and that Carmesina assures that chivalry is rather "health", because "it allows one to preserve life."
The book shows the relationship of novels as The manufacturer (1904), by Dolors Monserdà, with the Barcelona textile sector, or the vindication of cinema that Victor Catalan made in A film (3,000 meters) (1921): for the author, the novel was like "a film with all its simplicity, with all its confusion, with all its arbitrariness, with all its excesses... that is to say, with all the liberties that the genre entails." Xavier Duran does not forget that, although the great novel about tuberculosis remains The Magic Mountain, of Thomas Mann –in Catalan in Navona, translated by Carme Gala–, Blai Bonet addressed this same disease successfully in The sea (1958) and also Joan Salvat-Papasseit in some of the poems ofLittle Bear, although Salvat's work also contains abundant references to machines and inventions, as occurs in 54045, where he speaks of the tramway: "The turgid dynamo moves the priapes of fire / in CIRCUMVALACIÓN / I have not seen more majesty than in the stylo of fire / TROLLEY TROLLEY TROLLEY".
The number of Catalan poets among the last 20 names in Xavier Duran's anthology is surprising: there are Gabriel Ferrater from his late passion for mathematics; Joan Margarit, who "compared the calculation of structures that he made as an architect with the construction of the poem", and Rosa Fabregat, a pharmacist and poet from Lleida who dedicated an entire novel to assisted reproduction, Ultra-frozen human embryo no. F-77 (Portico, 1984).
From James Joyce to the postmodernists
Elementary particles and the possibility of cryogenizing ourselves
"If 20th century science shows that the universe is indeed complicated, James Joyce –as a literary creator affected by the sign of time– tries to create an artistic universe as complex as the physical one". Xavier Duran quotes these words from the professor of English philology Carmen Pérez-Llantada to summarise the ambition and peculiarity of the scientific mentions in theUlysses and to Finnegans WakeIn this last one –which Adesiara will publish in Catalan in the autumn, translated by Pol Vouillamoz–, he speaks of "Adomic theory", a mixture of the mention of Adam, the first man according to the Bible, and the atom, and includes the word quark in the phrase "three quarks for Muster Mark!". In English, the quark describes the cry of seagulls and also means "to squawk like a bird." The word was chosen by physicist Murray Gell-Mann to name one of the elementary particles found in the nucleus of the atom.
Joyce shares the linguistic games and formal experimentation with two of the great American postmodern authors, still active, who appear in Xavier Duran's book. They are Thomas Pynchon and Don DeLilloThe first studied engineering physics and worked as a technical writer at Boeing, an experience that is reflected in novels such as V. (1963) and The auction of lot 49 (1966); also one of the important themes of the complex and entertaining Gravity's Rainbow (1973) "is the clash between classical and modern physics and its overall intellectual impact," says Duran. DeLillo makes an appearance through one of his most emblematic novels, Background noise (1985), a title that refers to the technology and drugs that the characters have integrated into their lives: Dylar, for example, interacts with the neurotransmitters that cause the fear of death. DeLillo's obsession with extinction made him dedicated one of his last novels, Zero K (2016), to try to answer this question: Is it legitimate to cryogenize human bodies in order to try to wake them up later, when scientific advances allow it?