skip to Main Content

Introducing: PyMentorAI

I love computer programming. I do it for work, for personal projects, and even for fun. I love the feeling of being able to harness the power of technology to do amazing things, like making daunting tasks effortless and accomplishing huge results with lightning speed.

People see me code. Some of them are coders themselves. Many are not. I’ve frequently been told variations of: “It’s so cool that you can do this. I wish I could code. I wish I knew how.

I never thought I would have a way that I could actually help these people. Although I love to teach, I simply don’t have the capacity to tutor everyone. But one day, I thought: maybe there was something I could actually do. It wasn’t long before the idea of PyMentorAI was born.

PyMentorAI: learning Python can be fun!
Read More

You Never Forgot

I wrote this poem almost ten years ago. It never really made it out into the world until now, but I never truly forgot about it. It’s a small tribute to Imam Husayn (‘a) and his sacrifices in Karbala.

Read More

Islamic Rulings as Movie Plots

Did you ever get the feeling that some of the Islamic rulings in Ahkām are oddly specific to some particularly contrived scenarios? I mean, sure, they might occur in real life, but it seems to me that they might actually work well as major plot points in feature films. Here are some of the rulings I came across that, in my opinion, could make great movie plots. (Now with images generated by ChatGPT!)

Read More

Logical Reasoning and the Torn Shirt

The story of Prophet Yūsuf in the Qur’ān includes an episode that presents an interesting exercise in logical reasoning. In the incident where the ‘Azīz of Egypt finds his wife and Prophet Yūsuf making conflicting claims, a witness speaks up and presents a series of statements that make it possible to reach a conclusion about what happened using a combination of observation (of Prophet Yusuf’s shirt) and logic.

Verses 25 to 28 of Surah #12 Yūsuf mention the following:

Read More

Your Efforts Matter!

(I wrote this poem as part of a class assignment back in 2022. The topic was how the knowledge itself that “God judges us based on our efforts” can result in many different kinds of effects. I liked the poem so I decided to post it here.)

The scholar stood up for his speech
And gazed at those he’d come to teach.
From every walk of life they came,
But the words they’d hear would be the same.
How could one message cater all,
The rich, the poor, the big, the small?
He paused, and chose his words with care, 
Addressing those assembled there.
Would he, when preaching their belief,
Be long and flowy, or keep it brief?
Judiciously, he chose the latter,
And spoke three words:

Read More

Juzz’ Word Clouds

A few years ago, I thought it would be interesting to take all of the words in (the English translation of) each Juzz’ of the Qur’ān and see what they would look like as word clouds. The result would be 30 images, each of which captures the most repeated terms in the corresponding section of the Qur’ān. It would be an easy way to see, at a glance, what each Juzz’ is talking about.

Read More

Exceptional Situations

Sometimes, you think you really have reached an understanding of how things work. You get it. The rules have started to make sense.

And then you realize that no, actually, things don’t work the way you think they do, and everything you once believed is now under question. 

This might happen in a lot of different contexts, but it can happen extremely often when studying the Arabic language, which is notorious for having exceptions upon exceptions. Now, usually, it’s very clear that a given rule has a lot of exceptions, and that it should be treated more like a general guideline than an actual law. However, there are some cases where something really looks like it might be an absolute rule that you can put your trust in… until you realize it’s not.

Here are some exceptional cases for what might have appeared to be exceptionless rules…

Read More

Qur’anic Verses for Stuffy Noses

No, I’m not talking about verses of the Qur’ān that can be used to treat nasal congestion. I’m interested in finding out which verses can be pronounced correctly even when the reciter has a stuffy nose.

There is a property called ghunna that applies to some of the letters in the Qur’ān. Basically, in order to recite a letter with ghunna, the nose has to play a role in the pronunciation; the mouth and throat are not enough to generate the correct sound. There are some verses in the Qur’ān that contain no instances of ghunna. For example, the first verse of Sūrah 113: al-Falaq (if recited correctly) will sound the same whether you pinch your nose or not – try it!

قُلْ أَعُوذُ بِرَبِّ ٱلْفَلَقِ

My question is: how many verses are there in the Qur’ān that have this property?

Read More

The Cosmological Argument Using Math

The cosmological argument to prove the existence of God has been my favourite proof of its kind since the first time it was presented to me. It was simple enough to understand, it felt rigorous enough to be convincing, and it left a lot of room open to extract implications and corollaries that were interesting and useful.

Still, the fact that the argument was presented in natural language, rather than the language of symbolic logic, always left me with an unsettled feeling: shouldn’t this proof, like all others that are watertight and irrefutable, be possible to express in mathematical terms? I made some shallow attempts to codify it myself, but I never managed to do it in a way that left me satisfied.

Read More