Book: Digital Discipleship: Faith in the Age of AI and Algorithms – Chapter 2: The Algorithm of the Heart: How Tech Shapes Our Desires
- Dr. Layne McDonald
- Jun 9
- 8 min read
"Keep your heart with all vigilance, for from it flow the springs of life." : Proverbs 4:23 (ESV)
It begins with a twitch.
Maybe it’s three o'clock in the morning, and you’ve woken up to the sound of a distant car or a restless child. Or maybe it’s the first three seconds after your alarm goes off. Before your feet have even touched the floor, before you’ve whispered a prayer or even fully acknowledged the gift of a new day, your hand has already found it. The cold, sleek glass of the smartphone.
In a matter of seconds, you aren't just checking the time. You are checking the world. You are checking the "feed." And in that moment, something profound is happening: something far deeper than a simple exchange of information. You are opening the gates of your heart to a sophisticated, invisible architect designed to decide what you should care about, what you should fear, and what you should want next.
Welcome to the age of the algorithm. But this isn't just about computer code. This is about the algorithm of the heart.
The Myth of the Neutral Tool
For years, we’ve been told a lie. We’ve been told that technology is "neutral." We treat our phones like hammers: tools that sit quietly until we decide to pick them up and use them for good or ill. If we use the hammer to build a house, it’s good. If we use it to break a window, it’s bad. The hammer itself doesn't care.
But your smartphone is not a hammer. It is not neutral. A hammer does not have a team of thousands of psychologists and data scientists working behind the scenes to make sure you never put the hammer down. A hammer doesn't watch where you look, track how long you linger on a certain "brand" of nail, or ping you in the middle of the night to remind you that other people are currently hammering better things than you are.
Technology is not just a tool; it is a formative environment. It is a space we inhabit that actively shapes us while we are in it. In the same way that living in a foreign country eventually changes your accent and your appetite, living in the digital world changes the "accent" of your soul. It recalibrates your desires.
The Mechanics of Digital Desire
To understand how the algorithm shapes us, we have to look at the psychology of "Engagement." In the tech world, engagement is the holy grail. It’s the measure of how long you stay on a platform. And the most effective way to keep you engaged is not to show you what is true, or even what is good: it is to show you what triggers a physiological response.

The algorithms behind social media are built on what psychologists call "Variable Rewards." It’s the same logic used in slot machines. When you pull the "lever" by refreshing your feed, you don't know what you're going to get. Most of the time, it’s nothing: boring updates or repetitive ads. But every now and then, you get a "hit." A like on your photo. A comment that makes you feel seen. A video that makes you laugh.
That unpredictable reward triggers a rush of dopamine in your brain. Dopamine isn't actually the chemical of pleasure; it is the chemical of anticipation. it is the "do it again" chemical. It creates a loop of desire that trains your brain to seek validation and novelty in the palm of your hand.
But here is the spiritual danger: What we attend to, we eventually love.
If the algorithm trains us to spend four hours a day attending to the highlight reels of strangers, the curated aesthetics of influencers, or the polarizing outrage of political pundits, our hearts will begin to mirror those priorities. We start to desire the "curated life" more than the real life. We start to value being perceived as holy more than actually being holy. We become people who "treasure" the digital reward, and as Jesus taught us in Matthew 6:21, "Where your treasure is, there your heart will be also."
Discipleship by Algorithm
In the Christian tradition, we have a word for the intentional shaping of a person’s heart and mind: Discipleship.
We often think of discipleship as something that happens during a 45-minute sermon on Sunday or a small group Bible study on Tuesday night. But the reality is that we are being discipled every waking moment of our lives. We are being formed by what we behold.
The algorithm is a master disciple-maker. It doesn't use a leather-bound book or a pulpit, but it uses the same tools that the Church has used for millennia: Liturgies.
A liturgy is a repeated habit or ritual that aims our loves. The ancient liturgies of the Church: prayer, singing, the Eucharist: are designed to aim our hearts toward God. The digital liturgies: the scroll, the swipe, the notification, the selfie: are designed to aim our hearts toward the self and the "now."
The algorithm doesn't care about your sanctification. It cares about your attention. And because our attention is the most valuable thing we own, the algorithm is constantly trying to "re-baptize" our desires in the waters of consumerism and comparison.
The Biblical Algorithm: Renewal and Guarding
So, how do we respond? Do we throw our phones into the river and move to a cabin in the woods? For some, that might be a temporary solution, but for most of us, we must learn to live in the digital world without being of it.

The Bible offers us a counter-algorithm. In Romans 12:2, Paul writes, "Do not be conformed to this world, but be transformed by the renewal of your mind, that by testing you may discern what is the will of God, what is good and acceptable and perfect."
The word "conformed" in the original Greek implies being poured into a mold. The algorithm is a mold. It wants to pour your desires into the shape of its engagement goals. Transformation, however, is an inward work of the Holy Spirit that breaks the mold.
To break the digital mold, we must practice what Proverbs 4:23 calls "guarding the heart." In the ancient world, the "heart" was not just the seat of emotions; it was the command center of the entire person. It was the place where thoughts, desires, and will met. To guard the heart meant to be a gatekeeper: to watch what was coming in and what was going out.
In the digital age, guarding your heart looks like:
Discerning the "Why": Asking yourself, Why am I opening this app right now? Am I bored? Am I lonely? Am I looking for a "hit" of validation?
Interrupting the Loop: Setting physical boundaries that prevent the "twitch." (e.g., No phones in the bedroom, "Tech-free" meals).
Choosing Better Beholding: Intentionally placing things before our eyes that stir our love for God.
The Dopamine of Grace
There is a fundamental difference between the "reward" of the algorithm and the "reward" of the Gospel. The algorithm’s reward is always temporary. You get the like, you feel the rush, and five minutes later, you need another one. It is a well that never runs dry, but never satisfies.
The Gospel, however, offers a different kind of satisfaction. When we "behold" the glory of God in the face of Jesus Christ (2 Corinthians 3:18), we are changed. But this change isn't a frantic, dopamine-fueled rush. It is a slow, deep-rooted peace. It is the "fruit of the Spirit": love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, and self-control.
Notice that last one: Self-control.
In an algorithmic world, self-control is a revolutionary act. The entire digital economy is built on you losing self-control: on you scrolling one more minute, clicking one more link, buying one more item. When you exercise the Spirit-given gift of self-control, you are reclaiming your heart from the machines.

Practical Digital Liturgies
If we want to re-aim our desires, we have to create "Counter-Liturgies." We have to replace the habits of the algorithm with the habits of the Spirit.
The Scripture-First Rule: Before you look at a screen in the morning, look at the Word. Let the "First Word" of your day come from the Creator, not the feed.
The Digital Sabbath: One day a week, turn it all off. Let your brain reset. Remember that the world continues to spin without your digital input, and that God is the one holding it all together.
Curate for Compassion: Use the algorithm against itself. Unfollow the accounts that stir up envy, anger, or vanity. Follow the accounts that show you the beauty of God’s creation, the needs of the poor, and the truth of Scripture.
The "Slow" Check: When you feel the urge to check your phone, pause for ten seconds. Ask God, "What am I actually hungry for right now?" Usually, it isn't a notification. It’s a sense of being known and loved.
The Battle for the Gaze
Ultimately, the algorithm is in a battle for your gaze. In the ancient Church, there was a practice called "The Contemplative Life." It was the idea that by gazing upon God in prayer and meditation, we become like Him.
The enemy of our souls knows this. He knows that if he can distract your gaze, he can distort your heart. He doesn't need to make you commit a "big" sin; he just needs to make you distracted by a thousand "small" things. He just needs to make sure you are always looking down at the screen instead of up at the Savior.

But we have a promise. When we set our minds on things above (Colossians 3:2), the Holy Spirit begins to re-write the "code" of our hearts. He begins to move our desires away from the fleeting and toward the eternal. He begins to give us a heart that beats not for likes and followers, but for the pleasure of our Father in heaven.
Your heart is the most valuable "real estate" in the universe. Do not lease it out to an algorithm that doesn't love you. Guard it. Give it back to the One who designed it. Because only the Creator of the heart knows the "algorithm" that leads to life.
Reflection Questions
How do you feel after spending 30 minutes scrolling through your favorite social media app? Do you feel more at peace, or more anxious?
What are the "Variable Rewards" in your digital life that keep you coming back for more?
In what ways have your desires or "wants" changed since you started using certain digital platforms?
If someone looked at your screen-time report, what would they say your "treasure" is?
What is one "Counter-Liturgy" you can start tomorrow morning to reclaim your first thoughts for God?
A Prayer for the Digital Heart
Lord, You are the searcher of hearts and the knower of thoughts. I confess that I have often allowed the noise of the digital world to drown out the whisper of Your Spirit. I have allowed algorithms to shape my desires, my fears, and my sense of worth. Today, I reclaim the gates of my heart. I ask for the gift of self-control. Help me to behold Your beauty so that I might be transformed into Your likeness. Let my primary "feed" be Your Word, and my primary "notification" be Your voice. Amen.
Layne McDonald, Ph.D., is an author, researcher, and speaker dedicated to helping believers navigate the complexities of modern culture with biblical wisdom. With a background in theology and leadership, Dr. McDonald specializes in Christian worldview, cultural discernment, and spiritual formation. His mission is to equip the Church to stand firm in truth while walking in grace.
Support the Mission Our work in creating these books and resources is made possible by the generosity of readers like you. If this chapter encouraged you, consider partnering with us to help share biblical truth with the world. Give Here
If the algorithm knows exactly what you’re afraid of, what happens when it starts feeding you those fears as "truth": and how do you tell the difference before it’s too late?
Comments