Did the Devil Learn to Code?

Listen to this article

Overview

  • The question of whether the devil has “learned to code” is a provocative way of asking whether Satan, as understood in theological tradition, operates through or within digital technology in the contemporary era.
  • The theological concept of Satan has a long and complex history across the Abrahamic religions, evolving from a Hebrew adversarial figure in the Old Testament to a fully personalised embodiment of cosmic evil in later Christian, Islamic, and Jewish traditions.
  • Computer code and software are human-created systems of mathematical instruction that have no intrinsic moral character but can be deliberately designed, deployed, and weaponised to cause harm at a scale that has no historical precedent.
  • The digital environment has produced genuinely catastrophic forms of harm, including AI-generated disinformation, ransomware attacks on critical infrastructure, algorithmic radicalization, mass psychological manipulation through social media, and the industrial-scale exploitation of human attention and vulnerability.
  • C.S. Lewis argued in “The Screwtape Letters” that the devil’s most effective strategy is not dramatic supernatural intervention but the quiet manipulation of ordinary human distraction, pride, and self-deception, a framework that maps with striking precision onto the documented design principles of modern digital platforms.
  • A responsible assessment of the question concludes that code itself has no moral agency, but the human choices embedded in software design, deployment, and governance can produce effects that the theological tradition would recognise as profoundly consistent with the character and purposes attributed to evil.

The Theological Identity of Satan Across Traditions

Before any serious analysis of the relationship between Satan and digital technology can proceed, the theological concept of Satan must be examined with the care and precision the subject demands, because popular representations of the devil, shaped heavily by medieval art, Renaissance literature, and 20th-century horror cinema, are often far removed from the more nuanced and historically developed theological accounts found in the Abrahamic traditions. The Hebrew word “satan” (שָׂטָן) means, in its most basic form, “adversary” or “accuser.” In its earliest biblical appearances, including in the Book of Job, the figure designated “the satan” is not an independent cosmic evil but an angelic being who functions within the divine court as a kind of prosecuting attorney or testing agent, operating with God’s permission to test the fidelity of human beings. Harvard Theological Review scholar Elaine Pagels, in her influential study “The Origin of Satan,” traced the gradual personification and demonisation of the figure across the Second Temple period, arguing that the transformation of the satan from a divine functionary into an independent cosmic adversary was shaped significantly by the social and political conflicts of Jewish communities in the Hellenistic period. By the time of the New Testament writings, the figure had been fully personalised as Satan, the adversary of God and humanity, and identified with Lucifer, the fallen angel of Isaiah 14, through an interpretive tradition that read that passage as describing a primordial heavenly rebellion. In Christian theology, Satan is understood as a fallen angel of the highest order who, through pride and the refusal to serve, chose to set himself against God and has since operated in creation as the adversary of human spiritual flourishing. In Islamic theology, Iblis, who refused God’s command to bow before Adam, is the template for satanic rebellion, and the shayatin are understood as agents of spiritual corruption who whisper suggestions to human beings, a mode of operation known as “waswasa.” In Jewish tradition, the satan figure remains more ambiguous, serving more as a representation of adversarial moral challenge than as an independent cosmic evil. What is consistent across these traditions is the identification of satanic activity with deception, pride, the corruption of human reason and moral choice, and the systematic effort to turn human beings away from God and from authentic human flourishing.

What Code Actually Is and What It Can Do

To engage the question of whether the devil has learned to code, an accurate account of what computer code is and what it can do is as necessary as the theological account of Satan. Computer code, in its most fundamental form, is a set of human-authored instructions that directs a computational machine to perform specific operations in a specific sequence. These instructions are written in programming languages that translate human-readable syntax into the binary operations of machine code, sequences of ones and zeros that correspond to electrical states within a processor. Code is, in this sense, a form of human language: a precise, formal, executable expression of human intent. It is written by human beings, reflects human choices about what the software should do and how it should behave, and carries within it the values, priorities, and intentions of the people and institutions that author it. Software can be simple or extraordinarily complex. Modern operating systems contain tens of millions of lines of code, and the algorithms that govern the behaviour of social media platforms represent enormously sophisticated systems for predicting and shaping human behaviour at population scale. Code has no intrinsic moral character in itself. A line of Python or Java is neither good nor evil. What gives code its moral character is the intent with which it is written, the purposes it is designed to serve, and the effects it produces in the world when executed. Malware, which is software deliberately designed to damage, disable, or gain unauthorised access to computer systems, is code that has been written with harmful intent for harmful purposes. A medical diagnostic algorithm that helps clinicians identify cancers earlier is code written with beneficial intent for beneficial purposes. Both consist of the same basic categories of computational instruction. The moral difference lies entirely in the human choices encoded within the software and the human institutional contexts in which it is deployed. This means that asking whether the devil has learned to code is, at the most literal level, a category error: the devil, as a non-material spiritual being, does not write software. But asking whether human beings have written software in ways that produce effects consistent with what the theological tradition attributes to satanic activity is a very different and much more substantive question, and it deserves a serious answer.

C.S. Lewis, Screwtape, and the Architecture of Temptation

The most illuminating theological framework for evaluating the spiritual character of digital technology is not the dramatic supernatural intervention that popular religious imagination associates with the devil, but the far subtler and more psychologically sophisticated account of temptation that C.S. Lewis articulated in “The Screwtape Letters,” published in 1942. Lewis constructed his account as a series of letters from a senior demon, Screwtape, to a junior demon, Wormwood, providing instruction in the most effective techniques for corrupting a human soul. What makes Lewis’s account remarkable is its insistence that the devil’s most effective methods are not dramatic possession, obvious evil, or spectacular supernatural intervention, but the quiet, persistent cultivation of distraction, self-deception, pride, and the substitution of trivial preoccupations for genuine engagement with God, truth, and human love. Screwtape advises Wormwood that the safest road to hell is the gradual one: the gentle slope, soft underfoot, without sudden turnings, without milestones, without signposts. He counsels that the best approach is not to make the human commit some dramatic sin but to keep him from thinking seriously about anything, to fill his time with noise and busyness, to ensure that real decisions are always postponed in favour of one more distraction. Screwtape notes with satisfaction that the humans can be kept distracted by what he calls “the stream of immediate sense experiences,” ensuring that they never achieve the quiet, attentive state in which genuine moral and spiritual reflection becomes possible. The structural parallel between Screwtape’s account of demonic strategy and the documented design principles of modern social media and digital platforms is not merely rhetorical. It is analytically precise and practically important. Social media platforms, by the documented testimony of their own designers, are built to maximise engagement through the exploitation of the same psychological vulnerabilities that Lewis identified: the craving for novelty, the desire for social approval, the discomfort of quiet and attention, and the preference for the emotionally stimulating over the genuinely important. That parallel does not require a claim about supernatural authorship of the algorithms. It requires only the recognition that the effects of these systems on human attention, character, and moral life are precisely those that the theological tradition has always associated with the adversarial influence on the human soul.

The Digital Ecosystem as an Environment Shaped for Harm

Moving from the metaphorical framework to the empirical record, the digital ecosystem as it actually exists in 2026 contains a substantial body of evidence for harms that the theological tradition would classify as morally serious, not because they are produced by supernatural agents but because they are produced by human beings making deliberate choices to prioritise profit over human welfare, engagement over truth, and manipulation over integrity. Social media platforms, as documented extensively by researchers including Jonathan Haidt and Jean Twenge, have been associated with significant increases in rates of depression, anxiety, and suicidal ideation among adolescents, particularly girls, across the period from approximately 2012, when smartphone adoption became widespread, to the present. A 2023 review published in PMC found that heavy social media use among teenagers is associated with measurable increases in mental distress and self-harming behaviours. The design features that produce these effects, including algorithmically curated feeds that prioritise emotionally stimulating and divisive content, social comparison mechanisms, quantified social approval in the form of likes and followers, and variable reward schedules that create compulsive checking behaviour, are not accidents or unintended side effects. They are, in many cases, deliberately engineered features of platforms whose business models depend on maximising time-on-platform. Former Facebook vice president Chamath Palihapitiya said publicly in 2017 that the platform had created “tools that are ripping apart the social fabric of how society works.” Sean Parker, Facebook’s first president, said in the same year that the platform had been built to consume as much of users’ time and conscious attention as possible, and that its designers had been aware that they were exploiting a vulnerability in human psychology. The World Economic Forum’s Global Cybersecurity Outlook 2026 documented that cyberattacks on critical infrastructure, hospitals, water treatment systems, and financial networks continued to escalate through 2025, with ransomware attacks targeting healthcare systems in ways that directly endangered human lives. AI-generated disinformation, capable of producing convincing fake videos, audio, and text at scale, is documented in a February 2026 Stimson Center report as fundamentally changing the landscape of manipulation, making it increasingly difficult for ordinary people to distinguish authentic from fabricated information.

The Devil in the Details of Algorithmic Design

The theological tradition’s account of satanic activity has always emphasised that evil operates most powerfully not through obvious horror but through gradual, incremental corruption that presents itself as attractive, reasonable, and beneficial. This is why the serpent in Genesis offers fruit that is “good for food and pleasing to the eye and desirable for gaining wisdom”: the temptation works precisely because it appeals to genuine goods, knowledge, beauty, sustenance, through means and in contexts that corrupt those goods rather than fulfilling them authentically. The algorithmic design of modern digital platforms exhibits a structurally identical pattern. The goods that social media genuinely offers, connection with other human beings, access to information, creative expression, community, are real and valuable. The corruption operates not by denying these goods but by delivering distorted versions of them: shallow connection instead of deep relationship, algorithmically filtered information bubbles instead of genuine epistemic access to reality, performative identity instead of authentic self-expression, and the simulation of community instead of the embodied, accountable human community that actually sustains persons. The Frontiers in Political Science journal published a January 2026 study documenting the role of AI-enhanced social media algorithms in facilitating online radicalization by progressively exposing users to more extreme content, a process that has been documented as a pathway into violent extremist movements. The study found that AI-driven recommendation systems, optimised for engagement, consistently push users toward more extreme, emotionally intense, and socially divisive content because such content generates stronger engagement signals. This is the algorithmic equivalent of what Lewis’s Screwtape described as the cultivation of passions that weaken reason and crowd out the possibility of genuine moral reflection. The devil, in this metaphorical but analytically precise sense, is not in the machine. The devil is in the deliberate choice to optimise systems for engagement metrics that are known to produce harmful psychological effects, and to continue making that choice after the evidence of harm is clear and incontrovertible.

Satan as the Father of Lies: Disinformation and Deepfakes

One of the most consistent attributes assigned to Satan across the theological traditions is the role of deceiver. Jesus, in John 8:44, describes the devil as “a liar and the father of lies,” locating deception at the very core of the satanic character. The Islamic tradition identifies the shaytan’s primary mode of operation as “waswasa,” the whispered suggestion of false impressions and distorted perceptions. The Christian patristic tradition, drawing on both biblical texts and the psychological observations of the desert monastics, consistently identified the corrupting of human reason through false impressions as among the primary mechanisms of demonic activity. Against this backdrop, the emergence of AI-generated disinformation and deepfake technology represents one of the most theologically significant developments in the history of human communication. The capacity to fabricate convincing video, audio, and text depicting real people saying and doing things they never said or did has been documented by ISACA’s 2025 report as moving from niche applications into mainstream deployment in scams, political manipulation, and interpersonal harm. A peer-reviewed study published in PMC in July 2025 documented that deepfakes are being increasingly weaponised in political contexts to manufacture false impressions of real events and real people. The Stimson Center’s February 2026 report on AI and disinformation concluded that AI is fundamentally changing how misinformation and disinformation are developed and spread, requiring responses at the international governance level. The capacity for industrial-scale lying, the production and distribution of false impressions designed to mislead human beings about reality, is precisely what the theological tradition has always identified as the signature activity of the father of lies. This does not require the claim that Satan is personally authoring the code that generates deepfakes. It requires only the recognition that human beings have created and are deploying systems whose defining capacity is the large-scale manufacture of false impressions, and that this capacity is being used to harm real people and corrupt the epistemic conditions necessary for human communities to function with integrity.

Code as the New Architecture of Temptation

One of the most intellectually productive ways to engage the question of whether the devil has learned to code is to treat it as an inquiry into whether computer code can function as an architecture of temptation, a system of constraints and affordances that makes certain choices easier and others harder, and that systematically inclines human beings toward morally destructive behaviours. The theological tradition has always recognised that the environment in which human moral life takes place shapes, though does not determine, moral choice. The Catholic social tradition speaks of “structures of sin,” following Pope John Paul II’s 1987 encyclical “Sollicitudo Rei Socialis,” to describe social, economic, and institutional arrangements that systematically make it difficult for people to act justly and make it easy for them to participate in injustice, often without even being consciously aware of it. Digital platforms, as currently designed, constitute a powerful contemporary example of what the tradition means by structures of sin. They are architectural environments, built from code, that systematically make certain moral failures easier to fall into, including envy, vanity, anger, sloth, and the abandonment of deep attention, and that systematically make certain virtues harder to cultivate, including patience, humility, gratitude, genuine solidarity, and the capacity for sustained contemplative focus. The Microsoft Digital Defense Report 2025 documented that state-sponsored and criminal actors are using AI to conduct cyberattacks of increasing sophistication against critical infrastructure, healthcare, and democratic institutions. Ransomware attacks, which encrypt hospitals’ and utilities’ systems and demand payment for decryption, have been documented as directly endangering human lives when they disable medical systems during emergencies. The code behind these attacks is written by human beings who have made a deliberate choice to weaponise computational systems against the common good for financial or political gain. The theological question is not whether the devil sat at a keyboard writing the ransomware but whether the human choice to write software designed to cripple hospitals and extort communities is a choice that participates in what the tradition calls evil, and the answer to that question is unambiguous.

The Screwtape Lessons Applied to Social Media Engineering

The specific insights of Lewis’s Screwtape framework deserve more detailed application to the documented design and operational practices of major digital platforms, because the correspondence is striking enough to serve as a genuinely illuminating analytical tool rather than merely a rhetorical flourish. Screwtape advises Wormwood on several specific strategies that map directly onto the documented design principles of social media platforms. First, he advises keeping the human in a state of constant distraction, never allowing sufficient quiet for genuine reflection, a strategy that corresponds directly to the infinite scroll feature deliberately designed to eliminate natural stopping points and keep users in a continuous state of content consumption. Second, he advises cultivating the human’s sense of belonging to an in-group and hostility toward an out-group, since social division intensifies the passions and weakens the capacity for the kind of love that connects people to God. The documented effects of algorithmic content curation on political polarisation, including the January 2025 RSIS study on online radicalisation through algorithmically filtered content, are a direct parallel. Third, Screwtape advises exploiting the human’s desire for approval, not because approval-seeking is itself evil but because the obsessive pursuit of social validation corrodes genuine moral integrity and makes the human’s behaviour responsive to social pressure rather than to genuine virtue. The quantified approval mechanisms of social media platforms, likes, followers, shares, reactions, create precisely the conditions for the obsessive approval-seeking that Screwtape identifies as fertile ground for moral corruption. Fourth, and perhaps most significantly, Screwtape advises that the best outcomes are achieved when the human is not made to commit some dramatic sin but simply kept away from the few moments of genuine attention, prayer, and honest self-reflection in which actual moral and spiritual growth might occur. The documented average of several hours per day that many adults and teenagers now spend on social media represents, from this perspective, not a series of individual dramatic moral failures but something potentially more corrosive: the systematic displacement of the conditions necessary for genuine human and spiritual growth.

Human Responsibility and the Moral Character of Code

Having established both the theological framework for understanding satanic activity and the documented empirical record of digital technology’s effects on human moral and psychological life, it is important to address directly the question of moral responsibility, because mislocating that responsibility distorts both the theological analysis and the practical response. Code does not make moral choices. Algorithms do not have intentions. Software does not pursue goals. The moral character of digital technology resides entirely in the human beings who design it, deploy it, govern it, and use it. This is not a trivial or deflating observation. It is a precisely important one, because it locates responsibility where it actually belongs and thereby points toward where effective responses need to be directed. The engineers who designed the engagement-maximising algorithms of major social media platforms made choices: choices about what metrics to optimise, what evidence about harm to acknowledge, and what trade-offs between profit and wellbeing to accept. These choices have moral character, and that character ranges from ethically defensible to genuinely indefensible depending on the specific choices made and the intentions behind them. The executives who received clear evidence that their platforms were damaging the mental health of teenagers and chose to suppress that evidence, as documented in the testimony of Frances Haugen before the US Senate in 2021, made choices of a very specific moral character. The state actors and criminal organisations that deploy ransomware against hospitals and water treatment systems make choices of a similarly specific moral character. The question “did the devil learn to code?” is, at its most analytically useful, a question about whether human beings who write code and design digital systems are making choices that the theological tradition would recognise as participating in evil, and the answer, in a significant number of documented cases, is yes. The appropriate response to this is not the attribution of supernatural agency to software but the insistence that human beings are morally accountable for the systems they build, the effects those systems produce, and the choices they make about whether to continue building and deploying systems whose harmful effects they know.

Spiritual Disciplines for a Coded World

If the question “did the devil learn to code?” is taken seriously as an invitation to theological and ethical reflection on digital technology, then it naturally generates a further question: what does responsible and spiritually grounded engagement with the digital world look like for individuals, communities, and institutions? The theological tradition’s response to the satanic strategies identified in the Screwtape framework has always been the cultivation of the virtues and disciplines that make human beings less susceptible to those strategies. Against distraction, the tradition recommends attention, the deliberate practice of sustained focus on what is most real and most important. Against the exploitation of the approval-seeking impulse, the tradition recommends the grounding of identity in the relationship with God rather than in social recognition. Against the erosion of genuine community by its digital substitutes, the tradition recommends the prioritisation of embodied, accountable, face-to-face human relationship and the institutions that sustain it. Against the corruption of reason through algorithmically filtered information, the tradition recommends the cultivation of epistemic humility, diverse sources, and the disciplines of careful reading and genuine dialogue. These recommendations are not merely pious gestures. They are, in many cases, empirically supported by research on the conditions for human psychological flourishing and resilience. Studies on attention restoration theory, on the psychological benefits of deep work and sustained concentration, and on the mental health effects of reducing social media use all converge on conclusions that align with what the spiritual tradition has always taught about the conditions necessary for human flourishing. The communities that have most successfully developed frameworks for healthy engagement with digital technology, including various monastic and intentional communities, as well as secular digital wellness movements, have in common the recognition that the default settings of modern digital platforms are not designed for human flourishing and that flourishing requires deliberate counter-cultural choices about how one inhabits the digital environment.

A Considered Final Assessment

The question “did the devil learn to code?” is, as a literal claim about the devil writing software, not a proposition that the theological tradition itself supports, since Satan, as consistently described across the Abrahamic traditions, is a non-material spiritual being whose mode of operation is the corruption of human will and reason from within, not the authorship of executable machine instructions. But as a serious theological and ethical question about the relationship between digital technology and the forces that the tradition identifies as hostile to human flourishing, it points toward some of the most important and urgent questions of the contemporary moment. The digital ecosystem, as it has actually been built and as it actually operates, exhibits a remarkable consistency with the strategic account of the adversary’s activity that the most perceptive theological writers have articulated. It cultivates distraction over attention, vanity over humility, tribal hostility over genuine solidarity, shallow stimulation over deep reflection, and manufactured false impressions over truthful engagement with reality. These effects are not accidents. They are, in many cases, the direct and documented products of deliberate design choices made by human beings who prioritised certain values, primarily engagement, revenue, and growth, over other values, including honesty, mental health, democratic integrity, and human dignity. The theological tradition does not require that the devil personally wrote these systems in order to recognise their effects as morally serious and spiritually dangerous. It requires only the recognition that human beings are moral agents who are accountable for what they build, what they deploy, and what they choose to continue doing after the evidence of harm is clear. The devil did not learn to code. But some of the humans who did have produced systems whose effects on human moral and spiritual life are precisely those that the tradition has always associated with the work of the adversary: the systematic corruption of attention, truth, community, and the conditions in which genuine human flourishing is possible.

Disclaimer: This article is for informational purposes only and should not be considered professional advice. Please consult with qualified professionals regarding your specific situation. For questions, contact info@gadel.info

Scroll to Top