YA Weekly
3 Things Computer Science Has Taught Me about the Gospel
May 2024


3 Things Computer Science Has Taught Me about the Gospel

The gospel of Jesus Christ has a lot in common with computers, but it offers much richer blessings.

a man looking at a computer

As members of the Savior’s Church, we often gain gospel insights from leaders who come from different occupational backgrounds—from pilots and heart surgeons to gardeners and shepherds, these great teachers have used principles gained from their professions and hobbies to point us heavenward!

However, when you envision a computer scientist, making those associations might prove a bit more challenging. The mere thought of computer science could conjure frightening images of binary code or frustrating technical difficulties.

But from my studies, I’ve seen that there are many gospel lessons we can learn from the perspective of a computer scientist.

1. Gospel Algorithms

In computer science, we learn a lot about algorithms. An algorithm is a step-by-step process that computers follow to solve problems. For example, there are algorithms for sorting numbers quickly or displaying the information you’re looking for on the internet. Algorithms usually take an input and produce an output.

Likewise, there are what I like to call “gospel algorithms,” or divine laws, we can follow to become more like our Heavenly Father. Following these laws can also help us find answers to our problems and can bring order and simplicity to our lives. Obedience to these divine laws always brings promised blessings (see Doctrine and Covenants 130:20–21).

For example, one of my favorite “algorithms” is found repeatedly throughout the Book of Mormon: “Inasmuch as ye shall keep the commandments of God ye shall prosper in the land” (see Alma 36:1).

It is important to realize that we, as mortals, do not and cannot change divine law. We don’t set the conditions of these “algorithms.” And, as Elder D. Todd Christofferson of the Quorum of the Twelve Apostles taught, “We ought not to think of God’s plan as a cosmic vending machine where we (1) select a desired blessing, (2) insert the required sum of good works, and (3) the order is promptly delivered.”1 Instead, we learn gospel algorithms from divinely authorized sources like the scriptures and prophets.

And as we obey God’s laws, He fulfills His promises to us according to His will and timing. The Savior’s gospel is kind of like an algorithm optimized for joy! Because of the Savior’s atoning sacrifice, He has power to magnify our input to produce a miraculous output. As we exercise faith in the Savior by keeping His commandments, we can draw His redeeming and strengthening power into our lives. We might each progress along the covenant path at a different pace, but with the Savior’s help we can all receive God’s greatest blessings.

2. No Eternal Trade-Offs

In real-world applications, computer scientists often must choose between trade-offs—if you optimize for recall, you’ll pay for it in precision. If you go for speed, you may lose out on accuracy.

We face many more of these trade-offs in our daily lives, such as doing something quickly versus doing it well or choosing to spend time at work versus time at home.

In computer science, we decide between trade-offs like these frequently. But unlike computer science, the Savior’s doctrine has no trade-offs! 

As President Nelson recently taught, “The very things that will make your mortal life the best it can be are exactly the same things that will make your life throughout all eternity the best it can be!”2

There is no trade-off between optimizing your earthly life and your eternal life.

There is no trade-off between loving God and loving others.

There is no trade-off between happiness now and happiness in eternity.

When it comes to blessings, love, and happiness, you don’t have to choose between two good things.

3. Machine Learning versus God’s Knowledge

Ever heard of artificial intelligence (AI)? Like ChatGPT and image generators? These tools have developed thanks to machine learning, which involves helping computers learn like humans do.

Often when dealing with a machine-learning problem, the goal is to help the computer identify patterns, correlations, and trends in the data that we may not be able to notice on our own. With machine learning, we can train computers to recognize a dog from a cat, unlock our smartphones with only our faces, and estimate how tall someone is from their shoe size.

And yet, machine learning still has limitations. Even after years of tweaking to help them perform a little better, computers still often predict the wrong thing!

This has helped me to realize just how amazing God’s perfect love and knowledge is.

With 100 percent accuracy, God can name each one of His children. But He doesn’t just know about us. He knows our hopes, our dreams, and our fears. He doesn’t need to consult a large language model to remember who you are. He doesn’t need thousands of rows of data to predict your potential. He knows who you are.

You are His.

Elder Alan T. Phillips of the Seventy recently asked a thought-provoking question: “Can you imagine how a perfect, glorified, loving Heavenly Father feels about you?”3 His love for us is unfathomable. It reaches beyond what computers—or even humans—can imagine.

He knows us intimately and loves us perfectly—which a computer could never do.

Optimizing Our Lives

I never thought that studying computer science would help me better understand gospel truths—but here I am! God loves us more than we can comprehend. Because of that, He has shown us divine algorithms that we can implement into our own life programs to receive an output of infinite blessings.

So let us “think celestial”4 and live the gospel of Jesus Christ to optimize our lives for happiness now and in eternity.