Ikram Hawramani's Blog, page 51
April 1, 2019
How to think critically and creatively in solving problems
How to think critically and creatively in solving our daily problems as well as in the process of seeking knowledge?
I recommend reading as many books as you can, on any topic, whether fiction or non-fiction. Books can help you face various situations and scenarios before they happen to you in real life, and this enables you to build a data bank in your brain full of solutions and experiences that you can use in the future whenever you need it.
Birth control in Islam: A study of the hadith on coitus interruptus
A hadith found in three places in Sahih al-Bukhari suggests that birth control is not recommended in Islam:
We asked (the Prophet
Sahih al-Bukhari 4138) about it and he said, 'There is no harm if you do not do [coitus interruptus1], for if any soul (till the Day of Resurrection) is predestined to exist, it will exist."
First, this hadith does not say that birth control is bad. It merely say that there is no harm in not using birth control.
This hadith, however, is not a very high-quality one due to its meager chain of narrators. Below is a diagram of all of the chains of the authentic versions of this hadith:

This hadith has only an 11.79% chance of authenticity, which is quite low. In my mathematical hadith verification methodology (which I discuss here), a hadith that falls between 10% and 20% is munkar (strange and unlikely to be true, but not clearly false and fabricated). A munkar hadith is not strong enough to act as a basis for establishing sunna (the tradition of the Prophet ). For this reason, we cannot say with certainty that a negative view of birth control is part of Islam. In this case, the commonsense view should be used that birth control is a matter of personal choice.
March 31, 2019
It is permitted for Muslim women to marry if their guardian wrongfully prevents the marriage
i am a virgin woman of 35 and and my burning desire to marry a man of my choice and luckily i have found that man…but my family my guardian who is my brother does not in anyway recommend me to marry him…the person i m willing to marry is holding an upright character ,he is a religious man and a goverment office,he is hailing from a noble lineage..he is handsome…i truly love him and willing to marry him….m i supposed to go for court marriage and solemnize my nikah in the presence of two witnesses and magisterate who would act like WALI on my behalf…
If the man you mention is able to take care of you financially and if your brother has no good reason for refusing the marriage, then he loses his right to guardianship because he does not have your best interests in mind. In such a case, if the Muslim judge investigates and finds that your brother is truly wrongful in preventing the marriage, then he can find a better person to act as your guardian (such as another relative, or himself). In such a case the marriage would be valid according to Islam.
However, keep in mind that going against your brother’s wishes could forever destroy your good relations with him, therefore before you go forward with the marriage, try to get your relatives involved and any imams you know in order to convince him to agree to the marriage. The Muslim judge should also try to reach out to him to convince him to agree. If he still does not, then you can still legally marry with the judge’s approval.
Sources:
Fatwa from the Jordanian Fatwa Authority (Arabic PDF)Fatwa from Shaykh Muhammad b. Ibrahim, Grand Mufti of Saudi Arabia (Arabic PDF of an article that mentions his statements)
Feeling useless and purposeless as a Muslim
I sometimes feel useless. Like I don’t know what my purpose is in life. I am lost and don’t know what to do with my life. I pray, and read Quran whenever I can. I also ask for forgiveness. But like I’m just not happy with the way things turned out and the future does not excite me like it used to.
Think of that as a stage that will pass when God wants. I too have gone through periods when I felt like that and like there was no way out and nothing that I could do about it.
Realize that you cannot help yourself and that it is all in God’s hands. Submit to Him truly and seek help only through Him and He can open His doors for you when He wants. Leave it to Him to take care of you.
Please also see these two pages:
When life’s difficulties cause you to doubt God
God has not abandoned you: Regaining your sense of purpose when life feels spiritually empty, lonely and meaningless
Speeding up grep of a 12.4 GB text file
I am working on a vocabulary-building book for SAT and GRE students. Below is a picture of the provisional cover of the book:

In order to have a wide corpus of classical texts to find word usage examples, I downloaded a massive ebook collection from the Gutenberg project and merged all of the text files into one big file that reached 12.4 gigabytes in size.
I then used the grep utility to find word usage examples. Here is an example of the results for the word “taciturn”:

In order to find interesting examples, I use the following regular expression:
egrep -aRh -B 20 -A 20 "\b(she|her|hers|his|he)\b.*taciturn" merged.txt
This finds usages of the word that start with a pronoun such as “she”. This helps find usages that occur mostly in novels, rather than other types of books (the Gutenberg collection contains many non-novel files, such as encyclopedias and legal works).
My first step toward speeding up the grep was to move the file to an old SSD I have that is attached to my desktop. The SSD supports up to 200 MB/second read speeds. This was not good enough, so I eventually moved it to my main Samsung SSD which has over 500 MB/second read speeds. Below is a screenshot of the iotop utility reporting a read speed of 447 M/s while grep is running:

My first idea to speed up the grep was to use GNU parallel or xargs, both of which allow grep to make use of multiple CPU cores. This was misguided since the limiting factor in this grep was not CPU usage but disk usage. Since my SSD is being maxed out, there is no point in adding more CPU cores to the task.
Using the following grep command, it took a little over 30 seconds to finish grepping the entire file:

Here is the output for the time command which tells how long a command takes to finish:

One of the first suggestions I found is to prefix the command with LC_ALL=C, this tells grep to avoid searching through non-ANSI-C characters.

That seemed to make the grep very slightly faster:

Just to see what happens, I next used the fmt utility to reformat the file. The file currently is made up of short lines all separated by new lines. Using fmt, I changed it to having lines of 500 characters each. This was likely going to make the grep slower since it was going to match a lot more lines since the lines were going to be longer:

But on the upside, I was going to get a lot more results. The fmt command decreased the number of lines from 246 million to only 37 million:

But actually what happened when I did the next grep was that the grep time decreased to only 23 seconds:

I guess the reason is that grep has a lot fewer lines to go through.
Unfortunately it looked like fmt had corrupted the text. Here is an example:

I think the reason was that some (or most, or all) of the text files were using Windows-style newlines rather than Unix-style ones which was perhaps confusing fmt. So I used this command to convert all Windows-style newlines into spaces:

After that operation and running fmt again on the result, grepping again seems to result in non-corrupt results:

And:

I also looked for the corrupted passage above to see how it looked now:

So it all seems fine now.
As far as I know there is no way to speed up the grep significantly further unless I get a lot of RAM and do the grep on a ramdisk, or get a much faster SSD. Just out of curiosity I decided to try out changing the fmt command to make lines of 1500 characters each to see how that affects the grep:

That didn’t actually do anything to speed up the grep further:

March 30, 2019
Losing faith in yourself as a believer after failing many times
AssalamAleikumWarahmatullah How does one have faith in yourself after disappointing yourself many times? I pray during day, listening to music at night. I study Quran 3 days a row, I don’t study for 3 weeks. I keep going forth and back. I lose hope in myself and am very disappointed in myself..
Alaikumassalam wa rahmatullah,
You do not actually need to have any faith in yourself. Long ago I lost all faith in myself, realized that I could not do any good deeds or anything that benefits me except by God’s will and permission, and so I realized that all of my faith should be in God alone.
Rather than seeking to be good through your own efforts, seek it through God. Ask God to make it easy for you to be good and consistent in your good deeds. Ask Him every day and rely on Him and acknowledge your own powerlessness. Even if you fail a thousand times, keep going back to Him.
Face God with your heart day and night and stop looking at yourself. All good comes through Him. And whenever you are disappointed in yourself, use this as an opportunity to pray to God for guidance and the ability to be better.
So hold tightly to God through everything that happens to you and keep going back to Him and asking Him for help and guidance. The first step is to stop relying on yourself and to rely on God. Once you do that, His help can come to you and make you better than you could imagine.
Best wishes.
Wearing high heels is permitted in Islam
assalamu aleikum, is it true that women can’t wear high heels?
Alaikumassalam wa rahmatullah,
Wearing high heels is permitted in Islam.
Source:
Fatwa from the Qatari Fatwa Authority (Arabic PDF)
What my average working day looks like
What does your average working day look like? And how did you became interested in Islamic topics?
My first task in the morning is to read and answer the questions I have received through my site, email or on tumblr.
After that I work on any programming project that my clients have sent me. If there are no projects, I work on my own projects, mainly books I write.
Sometimes I have an idea for an essay or blog post, so I may stop working on my projects to write the essay or post.
If I have no projects to work on I read books. I have thousands of books on my reading list, so I am never short of books that I want to read.
I work until around 4 PM. After that I listen to Quran for an hour, maybe exercise, then spend time with my children.
I have always had a special relationship with Islam, maybe because of growing up in a devout and educated Muslim family and having a few Islamic scholars among my relatives. So it simply seemed natural to me to study Islam. But I started studying Islam in a serious and scholarly manner only at the end of 2017. That is when I decided to dedicate my life to Islamic studies and started reading scholarly books, both classical Arabic books and books published by Western (Muslim and non-Muslim) scholars of Islam. I also started reading scholarly papers in Islamic studies published in Western academic journals.
“I feel like I failed God’s test”
I feel like I failed God's test that was sent to me, miserably. What do I do?
Ask for forgiveness and realize that you will be tested again and again every day of your life. If you fail one test, you still have the opportunity to pass thousands of tests in the future.
Never let your failures dishearten you. Always go back to God and seek His help and guidance. He is ready to forgive and give you another chance even if you fail countless times. God’s mercy and forgiveness are greater than your failures and sins.
Best wishes.
Istikhara and dreams
After performing istikhara, can what is about to happen in the future come in the form of dreams?
While that is always possible, there is no guarantee that the dream is related to the istakhara since we do not have anything in the Quran or hadith that says so.
Source:
Fatwa from the Qatari Fatwa Authority (Arabic PDF)