Home » Blog » I found God in Programming

I found God in Programming

Guest Post by Farhan Ali.

Two years ago, in my second year, I heard people say that a certain book has knowledge about everything. That was the time when I was trying to understand this world and the religions it offers. So, motivated by the thirst for knowledge, I began my search there and decided to find Programming in Quran. Was I looking for Dev C++ software in this book? Did I find any library Functions ? Did I find some coding beginning with #include<conio.h> ,using namespace std; int main() ? Well, the answer is a big no … I found no such thing. 

What did I find then? .. Numbers. 

Background of Binary Numbers : Before I tell you how I found God in programming, let me give you a little insight. The computers work on Binary Language. Binary means two. And In binary no. system, there are only two outcomes, 0 or 1. Gottfried Wilhelm Leibniz (1646-1716) was the mathematician to work out systematically the binary representation (using 1’s or 0’s) for any number. He felt a Spiritual significance in the discovery, reasoning that 1, representing Unity, was clearly a symbol for God. While 0 represents the nothingness. Therefore, all numbers can be represented merely by the use of 1 or 0, Now here’s the interesting point The Person who discovered the binary number system, said 1 represents Unity, Not trinity. That’s the Islamic concept of Tauheed. A’had: one God. One Allah.

To further your interest, one realization that amazes me is that computers have zero IQ. And How are they operated and controlled?  Boom! Through 1’s and 0’s. Where as machines lack IQ, Humans have the gift of Intelligence Quotient to wonder about all these things independently and use reason. This way, having IQ means we have the ability and the right tool to look for God and understand His presence in the Universe. To analyze that He created everything out of nothing.


In Electrical engineering, every project we make, is neither acceptable, nor efficient unless we programmed it. Your cellphones, Laptops, TV, ipods and almost every electronic device is being programmed. This Modern area is all about Programming. For those who don’t know loop in programming, it is something you use when you want to repeat something for certain number of times or you want to do Iterations. This technique is so commonly used in Electronic games. If you have spent your childhood helping Super Mario date the Princess then I will have no problem in explaining it. You see that after a certain level, at a certain time, you see the exactly same enemy. Here, the enemy is programmed to appear at a particular spot repeatedly by creating “loop”.

I would suggest you to watch this video to have a better understanding of the verse which I’m about to share.


Indeed, in the creation of the heavens and the earth and the alternation of the night and the day are signs for those of understanding.  Quran – 3:190  

This verse has its own importance regarding its Revelation. The Importance of Revelation is another topic. What I want you to do is to focus on the translation. In the translation you find a word “ Alteration ” .The alteration of the Night and the Day. If you are a Programmer or you have watched the tutorial video I gave above, then the Word “Alteration” is enough hint for you to figure it out that it’s talking about Loop. Here I see something. The power of the words of God. When he says “ Be and it is done ”, not only He created the Heavens and the earth, He programmed everything in the heavens and the earth. And if you are familiar with programming, before you put things in a loop, you would know that 1st you initialize things, define the variable type i.e Int, char, Float etc.

Likewise, Try to see it this way, that 1st He initialized the variables, which was heavens and the earth and what ever lies in it. Then He Programmed things. He put a loop to make night and the day. How amazing it is, that our earth revolves around Sun in 365 days. Then He adds little complexity in the loop by lengthening nights in Winter and Lengthening Days in Summer. Adds 4 seasons to it. Then He puts “if and Else” conditions, Such that if it is a day time in Pakistan, then it’s Night time in America. And in same way with different timings, He varies the Night and Day timings all over the earth. And he adds another day, making it 366 days once in a 4 years. Then, like creating masterpieces,  He makes it more complex. He adds more Planets to the Solar system. And each Planet has it’s own orbit, it’s own rotation. He assigns different no. of moons to each planet. But that’s not it, He adds stars to the universe. His complex Programming doesn’t stop here, He created more. More galaxies, more planets! SubhanAllah !

The Human Creation became familiar with the concept of Programming only in 1970’s but God did it way, way earlier. We have no calendar to keep track of His wonders. That’s why He said in Quran, Recite in the name of your Lord who created, Created man from a clinging substance. Recite, and your Lord is the most Generous – Who taught by the pen – Taught man that which he knew not. And even if, in this advance world, hundreds of programmers worked together to make something awesome, they wouldn’t be able to do so.

Look at the example of Electronic games, Gta V and Watch dogs.  “Watch Dogs” was due in 19 November 2013 but they postponed it because they wanted it to be perfect, everything perfectly programmed, so they launched it few weeks ago. But even this delayed game will have its own glitches. A Game may stuck somewhere, The graphics will take long to load, If you are a gamer you know exactly that there is no game without glitches. So after the launch they would update the glitches, remove errors but still they cant reach perfection. But do you see any glitch in the creation of the “Heavens and the earth and the Alterations of the night and the day”? do you ? 

[And] who created seven heavens in layers. You do not see in the creation of the Most Merciful any inconsistency. So return [your] vision [to the sky]; do you see any rifts? Then return [your] vision twice again. [Your] vision will return to you humbled while it is fatigued. 

Quran – 67: 3-4 

God is the Programmer :

After discovering this all, I was left with the thought “God is a Programmer” and not just any programmer but The Programmer. I checked into his 99 names to see whether He says such a thing for Himself or not and I found His name “Al-Musawwir” which means the Designer, the Shaper of beauty.

We know that in this modern world of ours, the programmer is no different than a designer. Therefore, I feel it’s safe to say, I found God in Programming and God is indeed The Best Programmer.

One fact would be worth mentioning here in the last that In Programming  you are taught the basic thing: the Order, which is otherwise called Algorithms. Amazingly, Quran talks about everything in Algorithms. And when ever Allah talks about the Night and the day together, did you ever notice that He talks about night 1st and the day later?

Indeed, in the creation of the heavens and the earth and the alternation of the night and the day are signs for those of understanding. Quran- 3:190 

The question that why night is mentioned first and day second is my new wonder. People give me different explanations and I don’t find them disagreeable, but I haven’t found that answer yet which can be satisfying and feed my wonder. Everything in the Universe is a great mystery, and we all are looking for those right answers that can quench our thirst.  This cycle continues, Always.

And now that I think about it, perhaps That’s the way He programmed us: To always stay curious and in search of answers.


The Author is a FAST- NU student, studying Electrical Engineering.

  • Woah! I would never be able to see programming in the same way again, was an amazing read!

    • Khanum

      Thankyou for reading this 🙂 I absolutely agree with you. This gives us an understanding we had never thought about before.

  • Lala Rukh

    This post was more than amazing Khanum… I was so impressed while reading this. I have done programming for for years but I never thought of thinking of it that way…. You have done an excellent job MashAllah !
    One thing, Can you please add an option of commenting through our wordpress blog ? It feels difficult filling out all the fields before writing a comment. Hope you don’t mind 🙂 I have been reading your blog silently for quite a time but never commented because of this difficulty.
    Much Love <3

    • Khanum

      🙂 Thank you so much reading, Lala Rukh. This was a guest post by Farhan Ali and he wrote a very great piece indeed.May Allah reward him for this. Ameen