Author Archives: Ikram Hawramani

Ikram Hawramani

About Ikram Hawramani

The creator of IslamicArtDB.

IslamQA: What to do when your spouse is less religious than you

A question I received recently:

I am in my early twenties and have married a woman who comes from a Muslim family. After marrying her, I have found that religion is not very important to her. I had wished to marry a woman who was my equal in faith, so that we could create a faithful family together. I feel like I have made a mistake in marrying her, and I don't know where to go from here. Why did God allow me to marry her?

My answer:

It is normal to start having doubts after marriage when you have no previous experience with it. Many ideas and assumptions about the other sex will be proven false or inaccurate once you are living the reality of marriage.

Women are generally more liberal than men and laxer when it comes to religion. I come from a conservative Muslim family but I’ve had trouble convincing close female relatives to stop engaging in negative gossip about people (i.e. backbiting, ghaibah). I know a woman who is a civil engineer (so she is educated and intelligent enough to know better), and even though she went to an Islamic boarding school where they recited Quran every night and sometimes stayed up all night for prayer, she continues to think it is her every right to gossip about people.

When dealing with women, always remember Imam al-Shafi`i’s saying: “Be harsh on yourself, easy on others.” You shouldn’t hold your wife to the same standards as yourself, and if she does the minimum that is requested of her by religion, you should be thankful for that.

I grew up knowing many great men in my extended family, highly religious, kind and observant men. But almost none of these men had wives who could match them in faith, and some had wives who only did the minimum and didn’t care about religion at all. This hasn’t stopped them from bringing up good religious families.

In a household, men and women are not equal when it comes to authority. The Quran gives men a degree of authority over women (Quran 2:228, 4:34), and perhaps part of the reason for that is that men are, in general, more observant and more conservative, though a minority of women can be found who are like this too. It is a man’s duty to keep standards high in his household, preventing lax behaviors like not praying, not fasting or eating what is not halal, though he must do this with love and kindness, not with authoritarianism:

"Invite to the way of your Lord with wisdom and good advice, and debate with them in the best possible manner."1

If your wife does the obligatory deeds (praying, fasting, etc.) and avoids haram (alcohol, interest, etc.), then this is the most you can expect of her, and leave it to her as a free-willed human being to make up her mind to do more if she wants. If she doesn’t do the obligatory deeds or engages in haram, then you have a clear right to give her an ultimatum, for her to come back to the Straight Path and do the minimum of what’s requested of her in Islam. If she doesn’t, then in effect she is refusing to do what the Quran asks of her, meaning that she is denying its truth, and in a way she is a non-believer. There is no obligation for you to stay married to her in such a case.

If she does the minimum required of her, then the Quran encourages you to be patient and to rely on God to steer your destiny for you. The Quran says in 4:128 that when a (devoutly Muslim) husband and wife are in disagreement, making peace is always the best option, and warns them to be wary of their ego’s greedy desire for better things.

One of the companions of the Prophet (peace be upon him) didn’t like his wife. The Prophet told him to fear God and keep her, this advice of the Prophet to him is recorded in the Quran in verse 33:37. The companion (Zayd, the only companion mentioned by name in the Quran) ultimately decided to divorce her. So, while Islam teaches that a man should hold onto his wife, a man’s right of freedom of choice is respected.

A man’s role in life is to acquire worth, marry a woman, have children, take care of his family, and in this way continue Islamic civilization. For this to be successfully done, it is not necessary for the woman to be as religious as the man. Ideally, of course, that’s what we want, but in reality, the nature of men and the nature of women is different, and you will have a very hard time finding women who cares about religion as much as you do.

It is better to be practical. To be thankful for what God has given you and to try to make the best of it. Do your best to be kind, generous, patient and forgiving, rather than judgmental and demanding. Some men mistakenly try to force their women to become what they want, only to give up after years of futile effort. You must learn to trust God and leave it to Him to steer your destiny. If you do separate in the end, you should be able to say “I did my best to make things work, but it didn’t work out.”

I am not saying to be like a feather in the wind, going wherever life throws you. You must rather always face God, working to please Him. You must not face your wife constantly trying to change her. She is only a small part of the big picture. You are a servant of God and you were made to serve Him. He recommends that you try to make your marriage work even if you are not pleased with your wife. Since you are facing God and aiming to please Him, you will be kind, generous and non-judgmental toward your wife as long as she does the minimum that Islam asks of her. Whether you think she deserves this lenient treatment or not, you are not doing it for her, but for God, and you expect your reward from God.

Having an unsatisfactory wife is a difficult test since you might be thinking that maybe this is how things will be for the rest of your life. You do not want to be stuck with someone who doesn’t live up to your standards. You probably wish to get in charge of your destiny, get rid of her and get a far better woman in her place.

The problem with this is that 1. It is not your job to manage your destiny and 2. No matter how good the imaginary new woman is, assuming you can find her and marry her, you could run into new and unexpected problems that could make your life with her miserable, she may develop an illness, she may suffer an accident and go blind, she may have a bad family who constantly interfere with your life.

As a Muslim, you believe that God is the King of the universe, and that He has the power to do anything He wills. He had the power to prevent your marriage from taking place. He had the power to make you marry the perfect woman. But He didn’t. And today He has the power to swiftly end your marriage with little effort on your part, and He has the power to give you the type of woman you desire. But He doesn’t.

It is God who manages your destiny, taking you from one stage of life to another, testing you, helping you learn, helping you grow in wisdom, understanding and kindness. Your focus should be on God, He can take your life anywhere He wants, and He has the power to do it this instant if He wanted to. Since He is not doing it, that should tell you something. You must do your best in the current test you are in, you must follow His advice that trying to make your marriage work is better than separation, and the Prophet’s advice to fear God and hold onto your wife, and leave it to God to change your situation if and when He wants. You must expect only from God and ask only of Him.

You could of course ask, “What if this test is not intended for me? What if I will needlessly suffer for nothing?” If you put your focus on God, since you know that He has the power to take you out of any unwanted situation, then you will know that there is no such thing as needlessly suffering. If you keep your wife for the sake of God, God will reward you for it, both in this life and the next. And if He doesn’t want you to keep her, He will make it easy to separate.

If your marriage somehow naturally falls apart, with both of you, or at least you, trying your best to keep it together through non-judgmentalism, forgiveness and generosity, and you reach an agreement to separate without any negative emotions, without guilt and without fearing that you might be doing the wrong thing, then you can take that as a sign that God approves of the separation.

But if things go along normally, if things are good enough, if the thought of separation contains tremendous amounts of uncertainty, guilt and fear, then that is your sign that it is not time to separate, that if you were to work toward separation, you’d be going against the flow of the destiny God has chosen for you. You can do it, like Zayd did, since God respects your freedom. But it is better for you to accept it and do your best, constantly asking God for forgiveness and betterment. If you reject this test, God will give you an equally demanding test, because God will never stop testing you.

Until the day you die, if God loves you, He will constantly give you new opportunities to prove your patience, your generosity, your worth. If He gave you the perfect life, you’d have no opportunity to prove these things.

What I would do in your situation is this: I would do my best to improve myself as a Muslim, reading as much Quran as I can, praying tahajjud and constantly asking for God’s forgiveness. I would do my best to be kind and forgiving toward my wife no matter how distasteful I find her behavior. I would do more than what is strictly necessary to make the marriage work, for God’s sake, even if it displeases me to do this. I would always try to be the bigger person. I would put my focus on God, recognizing His power to change my wife and my life in any way He wishes, recognizing that all good things come from Him, not from my own efforts.

And if after all of this, I receive a clear sign that my marriage should end (she decides she wants divorce and is intent upon it), then I would do what is necessary in that situation. Maybe you will stay married to her for the next ten years, and after that separate to enjoy the type of life you desire. Or maybe in some years she will change into someone with as much faith as yourself, and then you may be glad that you stayed with her.

So my advice is the Prophet’s advice, peace be upon him: Fear God and keep her.

And leave it to God to take care of your destiny. Trying to steer your destiny is a heavy and exhausting burden. Free yourself from that burden. Enjoy the life that God has given you, do your best, constantly ask for God’s forgiveness, and know that God can put you in a better place anytime He decides. If you want to speed this process up, you can do it through worship, asking for forgiveness, and avoidance of sin.

To improve your situation in life, raise your status in God’s eye, and He will do it for you better than you ever could. Trying to improve your situation in life through your own efforts, rather than through God, will always lead to new situations that are as equally difficult as the one you left.

Patience means to go against your desire for the sake of God. If you patiently keep your wife despite your wishes, you will be rewarded for your patience. Patience might possibly the greatest virtue of a believer. The angels commend the believers on their patience when they are about to enter Paradise, as the Quran describes in Surat al-Ra`d:

22. And those who patiently seek the presence of their Lord, and pray regularly, and spend from Our provisions to them, secretly and openly, and repel evil with good. These will have the Ultimate Home.

23. Everlasting Gardens, which they will enter, along with the righteous among their parents, and their spouses, and their descendants. And the angels will enter upon them from every gate.

24. “Peace be upon you, because you endured patiently. How excellent is the Final Home.”

And do not try to push your wife to change for the better, or to buy her Islamic books, forward her Islamic articles or make her go to lectures hoping she will be better guided. Calling people to Islam should never be inflicted on people. They must seek Islam themselves.

It is God Who guides people, it is not people who guide people. Therefore no matter how hard we try or wish that someone was guided, our efforts and wishes may never come true.

You cannot guide whom you love, but God guides whom He wills, and He knows best those who are guided.2

God will not leave all the tests to you and neglect your wife. He will continue testing her too to help her grow and to guide her, but the stage she is in could be very different than yours, and the types of lessons she needs could be nothing like you imagine.

Leave it to God to guide her, He will do it in the best way possible.

On the evolution of language

Languages evolve or devolve until they reach the state of minimum energy consumption necessary for its speakers to conduct their affairs.

Low IQ descendants of speakers of English will quickly lose most of their vocabulary and complex grammatical structures if they end up on an isolated island for generations. While the complexity of the language will increase if there is a general rise in IQ as the population of speakers is held steady or increases.

The way of speaking of the upper class seems unnecessarily complicated and pretentious to the average person. Some of the upper class do make their speech more complex to show off and differentiate themselves from those below them, but since the upper class has a higher IQ than the lower classes, their speech will always be more complex.

Some people who are desperate to enter the upper class, or who are already there and have nothing better to do with their sad lives, go out of their way to use rare and unnecessarily complex words and structures to impress others with similarly sad lives, because it is apparently a mark of intelligence to use ten words when five would do.

An actually good and intelligent speaker (like George Orwell) will use the minimum number of words necessary, and the simplest available, to express their ideas. The writing’s complexity only increases when the ideas demand it. Complexity is never used when simplicity would do just as well. While a pretentious speaker, like so many philosophy professors, will use a thousand words when a single sentence would do.

A guide to adding Google Drive (and OneDrive) upload functionality to Froala

Froala is a great JavaScript editor until you try to extend its functionality. Its documentation is horrible and there is little extra functionality you can add without having to do a lot of reverse-engineering and reading of GitHub comments.

Below is a guide to my solution for adding a Google Drive button to the Froala editor.

Here is the custom black and white icon I use for Google Drive to match the style of the rest of the Froala icons. The icon is from a free icons website and doesn’t require attribution.

Setting Up the Froala Google Drive Plugin

Place the following code inside a file that is included on the page along with the rest of the plugins you use (such as the file upload plugin). You can call it froala_google_drive_plugin.js:

$.FroalaEditor.DefineIcon('googleDriveIcon', {
    SRC: '/some/path/google_drive_bw.png',
    ALT: 'Google Drive', template: 'image'
});


$.FroalaEditor.RegisterCommand('googleDriveUpload', {
    title: 'Insert File From Google Drive',
    icon: 'googleDriveIcon',
    focus: false,
    undo: false,
    refreshAfterCallback: false,
    callback: function () {
        util.saveFroalaUserPlace(); // will be covered down below
    }
});

The above code registers an icon, then registers a Froala button that uses the icon. The callback function does nothing besides storing the user’s place in the editor (or the user’s selection, if they have selected any text right before clicking the Google Drive icon), otherwise their place will be lost once we insert the file, and the file would end up at the bottom of the editor. The user’s place in the editor is saved as a Range object. This will be covered down below.

Getting the Google Drive icon to show up

On the page where you have the Froala editor, your Froala initialization code may look something like this:

var froala_buttons = ['bold', 'italic', ...];
var froala_options = {
...
toolbarButtons: froala_buttons
};

$('#froala_editor_container').froalaEditor(froala_options);

To get the Google Drive icon to show up, add its command name to the buttons array. The command name is whatever name you used as the first argument to the RegisterCommand() function above.

var froala_buttons = ['bold', 'italic', ... , 'googleDriveUpload', ...];

A new way to initialize Froala

Above, I showed the usual way of initializing Froala:

$('#froala_editor_container').froalaEditor(froala_options);

That will have to be changed to this:

$('#froala_editor_container').on('froalaEditor.initialized', function (e, editor) {
    util.initFroalaGoogleDriveUpload(editor);
}).froalaEditor(froala_options);

Here we attach an event listener to the Froala container that is called as soon as Froala is done initializing. The event listener calls a custom function util.initFroalaGoogleDriveUpload(editor) that will set up the Google Drive buttons functionality. We pass the function the editor object. This is the Froala object, giving us access to the editor and its options, which we will use for various purposes. By using the editor object, we are able to handle having multiple Froala editors on the same page without issue, being able to insert files and images into the correct editor.

The Google Drive initialization function

Below is the function that is called when Froala loads, it binds a bunch of functionality to the Google Drive button.

window.util = {
    initFroalaGoogleDriveUpload: function (editor) {
        // get the icon object from the editor using jQuery find()
        var icon_el = editor.$box.find('[id^=googleDrive]')[0];

        // add a class to the button, to use for styling
        $(icon_el).addClass('google-drive-icon');

        // get the URL to use to handle the upload, here we use the same URL
        // as the one used by the file upload plugin
        var upload_handler_url = editor.opts.fileUploadURL;

        // The function that is called right after a user selects a file in the Google Drive picker
        var pick_callback = function (file) {
            util.storeGoogleDriveFileOnServer(file, upload_handler_url, util.froalaAjaxCallback, editor); // covered down below
        };


        util.initGoogleDrivePicker(icon_el, pick_callback); // covered down below
    },
    ...
}

Handling the Google Client

Please see my blog post A guide to using PHP to download Google Drive files selected by users in the Google Drive Picker for an overview of how the Google Drive picker works. Here I will use the same methods with some changes.

Since the binding of the Google Drive icon to the Google library has to be done after the library has loaded, the library is included in this way:


function googleClientHasLoaded() {
    util.google_client_loaded = true;
}
//I  have added slashes to the HTML tags in the code snippets here
// as this article was appearing 
//broken due to the browser trying to interpret the code
<\script src="https://apis.google.com/js/client.js?onload=googleClientHasLoaded">

The util.initGoogleDrivePicker() function

This function is called once, soon after page load, to bind the Google Drive picker library to the Froala icon. It uses a timeout to detect if the Google library has loaded. If not, it waits 500 milliseconds and tries again.

The callback is the pick_callback() function that was defined in util.initFroalaGoogleDriveUpload() above. When a user selects a file in the Google Drive picker, the onSelect() function is called, which extracts information from the file object, creates a new object from it, and passes that object to pick_callback().

window.util = {
...,
google_client_loaded = false,

// I use the library at https://gist.github.com/Daniel15/5994054
// to interface with the Google Drive Picker.
initGoogleDrivePicker: function (button_el, callback) {
        if (!util.google_client_loaded) {
            setTimeout(function () {
                util.initGoogleDrivePicker(button_el, callback);
            }, 500);
            return;
        }
        var picker = new FilePicker({
            apiKey: api_key,
            clientId: client_id,
            buttonEl: button_el,
            onSelect: function (file) {
                    callback({
                        id: file.id,
                        name: file.title,
                        extension: file.fileExtension,
                        mime_type: file.mimeType,
                        access_token: gapi.auth.getToken().access_token,
                    });
            }
        });
    },

Storing the file on the server

As you remember, or perhaps don’t, the pick_callback() function is as below:

var pick_callback = function (file) {
    util.storeGoogleDriveFileOnServer(file, upload_handler_url, util.froalaAjaxCallback, editor); 
};

The util.storeGoogleDriveFileOnServer() function is as below. It sends the file’s information to the server, the server stores the file (see the blog post I linked above for the details of storing the file). The server echoes out the download URL of the file, the link that users can go to to download the file. That download url, along with the file object and the editor, are passed to the callback. The callback is util.froalaAjaxCallback(), mentioned above in the pick_callback() function and covered down below.

    storeGoogleDriveFileOnServer: function (file, handler_url, callback, editor) {
        var data = {
            file: file,
            command: 'store-google-drive-file',
        }

        $.ajax({
            url: handler_url,
            type: 'post',
            data: data,
            error: function (data) {
            },
            success: function (download_url) {
                    callback(file, download_url, editor);
            }
        });
    },

Inserting the image or link into Froala with util.froalaAjaxCallback()

At this point, the Google Drive file is stored on our local server and we have a link to it that users can go to download the file. Now we need to insert that link into the editor.

   ...,
    froalaAjaxCallback: function (file, path, editor) {
        // restore the user's place in the editor, covered down below
        util.restoreFroalaUserPlace();


        // if the user has selected some text in the editor, insert a link to the file
        // and make the selected text the link text
        if (editor.selection.text().length) {
            var link_text = editor.selection.text();
        }
        else {
            var link_text = file.name;
        }

        // if the file has an image extension in its link, insert the file as an image
        if (/[.](png|jpg|gif|jpeg|svg)/.test(path)) {
            // if user has selected text in the editor, preserve the text, otherwise it will be
            // overwritten by the image
            if (editor.selection.text().length) {
                editor.html.insert(editor.selection.text() + '<\img id="fr-inserted-file" class="fr-image" src="' + path + '" />');
            }
            else {
                editor.html.insert('<\img id="fr-inserted-file" class="fr-image" src="' + path + '" />');
            }
        }
        else { // if not an image, insert a link to the file
            editor.html.insert('<\a id="fr-inserted-file" class="fr-file" href="' + path + '">' + link_text + '');
        }

        // Get the file.
        var $file = editor.$el.find('#fr-inserted-file');

        $file.removeAttr('id');

        editor.undo.saveStep();
    },

On saving and restoring the user’s place in the editor

Below is the code used to save and restore a user’s place in the editor, and any text they may have selected, as the Google Drive picker will make them lose their place/selection. The getSelection() and restoreSelection() functions are from a StackOverflow answer.

window.util {
        ...,
        froala_user_place = false;
        saveFroalaUserPlace() {
            util.froala_user_place = util.getSelection();
        },

        restoreFroalaUserPlace() {
            util.restoreSelection(util.froala_user_place);
        },

        getSelection: function () {
            if (window.getSelection) {
                sel = window.getSelection();
                if (sel.getRangeAt && sel.rangeCount) {
                    return sel.getRangeAt(0);
                }
            } else if (document.selection && document.selection.createRange) {
                return document.selection.createRange();
            }
            return null;
        },

        restoreSelection: function (range) {
            if (range) {
                if (window.getSelection) {
                    sel = window.getSelection();
                    sel.removeAllRanges();
                    sel.addRange(range);
                } else if (document.selection && range.select) {
                    range.select();
                }
            }
        },
}

OneDrive

The above solution should be easy to extend to support OneDrive as well. See these two guides of mine if you need help with the OneDrive picker: How to get a demo of the OneDrive File Picker JavaScript SDK to work on a local development server, A guide to using PHP to download OneDrive files selected by users in the OneDrive Picker.

Conclusion

I think that’s it. Some of the code above is from memory, so it may not compile. I throw everything into the util object for demo purposes, in my actual setup things are separated out into different objects and files.

The Point

The point is that there is no point.
The stars will burn out.
Our deeds will turn to dust.
Our names will be forgotten.
And the names of our children.
And the names of their children.
And the names of all humans that ever lived.

And Earth will join the Sun.
Joined in the dark, in a darkening galaxy.

All will be darkness.
There will be no sound. 
No movement. No light.
Darkness everywhere.
Darkness all around.

The point is that there is no point.
There is no need to worry about success.
There is no need to worry about where your life is going.
It is not going anywhere.

Soon, there will be no “where” for it to go to.

The point is that there is no point.
Empty are our words,
Empty are our deeds.
Our lives are going nowhere.


This is what life feels like to me without God—if there is no God to preserve our genes and deeds and resurrect us at some point in the future. Written on May 27, 2016. Also a reminder of the emptiness of all deeds and accomplishments other than those that benefit the afterlife.

A guide to using PHP to download OneDrive files selected by users in the OneDrive Picker

In my previous blog post  I described how to get the OneDrive picker to work on a local development server. In this post I will describe the second piece of the puzzle, downloading the file to a local server using PHP after the user selects it:

First, below is the JavaScript/jQuery used to open the file picker:

$(function() {
    $('.onedrive-button').click(function() {
        openOneDrivePicker();
    });
});

function openOneDrivePicker() {
    var odOptions = {
        clientId: client_id,
        action: "download",
        advanced: {
            redirectUri: redirect_uri,
        },
        multiSelect: true,
        openInNewWindow: true,
        success: function (files) { /* success handler */
            var files_array = files.value;
            for(var i in files_array) {
                window.processOneDriveFile(files_array[i]);
            }
        },
        cancel: function () { /* cancel handler */
        },
        error: function (e) { /* error handler */
        }
    }
    OneDrive.open(odOptions);
}

The success method goes through the file or files selected and calls a function called processOneDriveFile() on each one of the file objects.

Below is the code to the processOneDriveFile() function, which submits the file to a PHP handler file called file_handler.php:

// this function automatically submits the file to the server as soon
// as the user picks a file from the OneDrive picker. You may
// instead want to store the files in a variable and only submit when
// the user clicks some "Submit" button somewhere in your app.
function processOneDriveFile(file) {
    var file_name = file.name;
    var file_size = file.size;
    var download_url = file['@microsoft.graph.downloadUrl'];

    var data = {
        file_name : file_name,
        file_size : file_size,
        download_url : download_url,
        command : 'handle-onedrive-file',
    };
    
    $.ajax({
        url: '/path/to/file_handler.php',
        type: 'post',
        data: data,
        error: function (data) {
            console.debug(data);
        },
        success: function (data) {
            // success message
        }
    });
}

And here is the code for file_handler.php:

// bootstrap code

$command = $_POST['command'];

if('handle-onedrive-file' === $command) {
 $file_name = $_POST['file_name'];
 $file_size = $_POST['file_size'];
 $download_url = $_POST['download_url'];

 $ch = curl_init($download_url);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);

 $data = curl_exec($ch);
 $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
 $content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
 $error = curl_errno($ch);
 curl_close($ch);
 
 // A file with the same name may exist, that must be handled.
 $file_save_path = '/some/path/' . $file_name;

 file_put_contents($file_save_path, $data);
 
 echo 'File successfully retrieved and stored!';
}

That’s all. Make sure that the curl PHP library is installed and enabled (it is not sufficient to have the Linux curl utility, the code above uses the PHP library for it).

A guide to using PHP to download Google Drive files selected by users in the Google Drive Picker

Let’s say you’ve managed to get the Google Drive JavaScript Picker API to work, and have also managed to coerce your users into logging into the Picker and selecting one of their files:

And you have verified that the onSelect function works properly:

function initGoogleDrivePicker() {
    var picker = new FilePicker({
        apiKey: api_key,
        clientId: client_id,
        buttonEl: document.getElementsByClassName('google-drive-button')[0],
        onSelect: function (file) {
            console.debug(file);
        }
    });
}

Where to go from here to send the file to the server and have it saved there?

First, we’ll create a function called processGoogleDriveFile(file), which will be added to the onSelect function of the picker:

function initGoogleDrivePicker() {
    var picker = new FilePicker({
        apiKey: api_key,
        clientId: client_id,
        buttonEl: document.getElementsByClassName('google-drive-button')[0],
        onSelect: function (file) {
            processGoogleDriveFile(file);
        }
    });
}

The function will be as follows. It will extract the file’s information, then use a jQuery AJAX request to send it to a PHP file called file_handler.php:

// this function automatically submits the file to the server as soon
// as the user picks a file from the Google Drive picker. You may
// instead want to store the files in a variable and only submit when
// the user clicks some "Submit" button somewhere in your app.
function processGoogleDriveFile(file) {
    var data = {
        file_id : file.id,
        file_name : file.title,
        extension: file.fileExtension,
        mime_type : file.mimeType,
        // the function below is provided by the library
        // from https://gist.github.com/Daniel15/5994054
        access_token : gapi.auth.getToken().access_token,
        command : 'handle-google-drive-file',
    };
    
    $.ajax({
        url: '/path/to/file_handler.php',
        type: 'post',
        data: data,
        error: function (data) {
            console.debug(data);
        },
        success: function (data) {
            // success message
        }
    });
}

On the back-end side, in file_handler.php, we have the following code:

// bootstrap code

$command = $_POST['command'];

if('handle-google-drive-file' === $command) {
    $file_id = $_POST['file_id'];
    $file_name = $_POST['file_name'];
    $extension = $_POST['extension'];
    $mime_type = $_POST['mime_type'];
    $access_token = $_POST['access_token'];
    
    // if this is a Google Docs file type (Google Docs, 
    // Spreadsheets, Presentations, etc.) we convert it
    // to a PDF using the export function of the API before saving it.
    // we could convert it to other file types that are also supported
    // by the API.
    if (stripos($mime_type, 'google')) {
        $getUrl = 'https://www.googleapis.com/drive/v2/files/' . $file_id .
        '/export?mimeType=application/pdf';
        $authHeader = 'Authorization: Bearer ' . $access_token;
        $file_name = $file_name . " (converted)";
        $extension = 'pdf';
        $file_mime_type = 'application/pdf';
    }
    else { // otherwise we download it the normal way
        $getUrl = 'https://www.googleapis.com/drive/v2/files/' . $file_id . 
        '?alt=media';
        $authHeader = 'Authorization: Bearer ' . $access_token;
    }

    $ch = curl_init($getUrl);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [$authHeader]);


    $data = curl_exec($ch);
    $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    $error = curl_errno($ch);
    curl_close($ch);

    // 1. the file name could already have an extension in some cases,
    // that must be handled if needed.
    // 2. A file with the same name may exist, that must be handled.
    $file_save_path = '/some/path/' . $file_name . '.' . $extension;

    file_put_contents($file_save_path, $data);
    
    echo 'File successfully retrieved and stored!';
}

That’s all that is needed. Not all of Google’s proprietary MIME types can be converted to PDF. You must add a check to the onSelect or processGoogleDriveFile() JavaScript functions to check whether this is a MIME type you want to support. If it not, you can alert the user to choose another file.

Make sure that the curl PHP library is installed and enabled (it is not sufficient to have the Linux curl utility, the code above uses the PHP library for it).

How to get a demo of the OneDrive File Picker JavaScript SDK to work on a local development server

After getting the Google Drive file picker working on the page of a project I’m working on within just a few hours, I was faced with the task of getting the OneDrive JavaScript Picker to work, which I almost abandoned because of Microsoft’s brain-dead documentation. After hours of watching Microsoft videos and piecing together documentation, I finally got it to work.

Through it all, I was often reminded of this good old joke:

A helicopter was flying around above Seattle when an electrical malfunction disabled all of the aircraft's electronic navigation and communications qquipment. Due to the clouds and haze, the pilot could not determine the helicopter's position and course to fly to the airport. The pilot saw a tall building, flew toward it, circled, drew a handwritten sign, and held it in the helicopter's window. The pilot's sign said "WHERE AM I?" in large letters. People in the tall building quickly responded to the aircraft, drew a large sign and held it in a building window. Their sign read: "YOU ARE IN A HELICOPTER." The pilot smiled, waved, looked at her map, determined the course to steer to SEATAC airport, and landed safely. After they were on the ground, the co-pilot asked the pilot how the "YOU ARE IN A HELICOPTER" sign helped determine their position. The pilot responded "I knew that had to be the Microsoft building because, like their technical support, online help and product documentation, the response they gave me was technically correct, but completely useless."

So here is how to actually get their amazing picker to work. I will assume you’ve already created your app in the App Portal.

1. Enabling SSL

You must first enable SSL on your demo server if you don’t have it. To do that quickly and for free, create a self-signed certificate and install it. Here is a guide on creating a self-signed SSL certificate.

When creating the certificate, don’t forget to use the Fully Qualified Domain Name for your local server. I use the fake domain myproject.dev as the domain name for my project, and put www.myproject.dev as the FQDN.

After you have generated your .key and .crt files, put them in /etc/ssl/crt/ or some such similar place.

With that done, create an SSL virtual host that uses the files you created, as follows (this is for a PHP website). The following code will have to be added wherever you have your VirtualHosts, it could be apache2.conf, or in a new file (such as ssl_vhost.conf) placed inside the sites-available directory (/etc/apache2/sites-available). If you put it in sites-available, you will have to run the command a2endsite /etc/apache2/sites-available/the_file_name_I_used.conf to enable the vhost.


ServerName default

## Vhost docroot
DocumentRoot "/var/www/html"
SSLEngine on
SSLCertificateFile /etc/ssl/crt/myproject.crt
SSLCertificateKeyFile /etc/ssl/crt/myproject.key

## Directories, there should at least be a declaration for /var/www/html

Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted


Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
## Logging
ErrorLog "/var/log/apache2/default_vhost_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/default_vhost_access.log" combined

## Custom fragment

2. Creating the URI Redirect File

Somewhere in your file structure, for example in /var/www/html, create a file called onedrive_picker_redirect.html (or any other name you choose). The file has to load the OneDrive JavaScript SDK, it doesn’t have to do anything else. Here is the contents of the file (note that I’m using version 7.0 of the SDK, use whichever one you want to use for your project):

3. Add a link to the redirect file in the Microsoft App Portal

Put the full SSL link to the redirect file (such as https://www.myproject.dev/onedrive_picker_redirect.html) in the App portal, as shown in the screenshot below. You can keep the Logout URL blank.

4. Add the redirect file to the OneDrive picker launcher using the “advanced” parameter

We now get to the easy part. On the file from which you want to launch the picker, add the following code to launch the picker, or modify your existing code to match below. Notice the redirectUri parameter, which has to exactly match the one you used in step 3.

5. Go to your demo page using the HTTPS URL

The picker will not work if you try to launch it from a non-https page. If you were doing your development on a non-https URL earlier, you will now have to go to the same page under https. If earlier the page was at www.myproject.dev/onedrive_picker_demo.php, now go to https://www.myproject.dev/onedrive_picker_demo.php.

6. Now try it out

Now click the button to launch the picker. You will get a login prompt. After logging in, you will get the picker. Click on any file you want and click “Open”.

7. Look at the console

To verify that everything is working properly, open the console, and if you used the picker code above that I used, you should see an object that contains the information for the file you picked:

8. Go back to square one

Now that we have gotten Microsoft’s limitless supply of self-absorbed ineptitude out of the way, we can get to do some actual coding to interface with their horrible products and discover entirely new and never-before-experienced ways of suffering.

If you want to send the file info to a server to store it there, see my blog post on using PHP to download OneDrive files picked from the picker.

Chronic fatigue update: Naps and the failure of vitamin D3 and zinc

This is an update that applies to my chronic fatigue treatment program.

A week ago I started having 2000 IU vitamin D3 and 25 mg zinc sulfate with my 3 PM meals. This helped my mind feel active and willing to learn in the evenings. I was finally able to finish Plato’s Republic and read through half of The Canterbury Tales.

Unfortunately, I experienced worsening fatigue during the day, which culminated in my not being able to get any work done at all for the past three days. Yesterday I realized that the new addition of the vitamin D3 / zinc supplements might be culprit, so I didn’t have any yesterday.

Today I feel like I’m recovering. I’m able to work again, but I have headache-like feeling in my head, like I’m recovering from brain damage, probably due to toxicity from high levels of calcium (caused by D3) and zinc sulfate.

Therefore I’m going back to my old solution for having a functioning brain in the evenings: To lie down for 45 minutes before I eat. Therefore I will be lying down from 3:00 PM to 3:45 PM, listening to an old audiobook (as new audiobooks require too much attention and will prevent proper rest).

This can be called a nap, but it is not necessary to fall asleep. I don’t like doing it since I don’t enjoy it, and I don’t feel good at the end of it, but it works. I am able to listen to new audiobooks in the evenings after doing this.

Napping after the meal doesn’t work for whatever reason.

Napping for less than 45 minutes doesn’t work. I have tried 30 minutes and didn’t get anything like the benefits of napping for 45 minutes.

Vitamin K2

It is possible that taking high doses of MK4 (a type of vitamin K2) will prevent the damaging effects of vitamin D3. 25 mg zinc is still too high and lower doses should be tried. I have run out of MK4, maybe I will try this out in a month or two.

My Chronic Fatigue Treatment Program

[August 28, 2017 Update: I have unpublished this book as the program, which seemed to work well for many months, has stopped working reliably. As I’m not certain of the value of the information presented in it, for now I will keep the book unpublished.]

In this essay I will summarize the treatment program I have developed over the past 9 years to treat my chronic fatigue, which used to completely overshadow my life for months at a time, preventing me from getting anything done or taking any joy in life.

This is not a cure but a treatment, as the fatigue comes back if the treatment is stopped. I will categorize my treatments into “essential” and “optional” treatments. The essential ones are necessary for the treatment to work and cannot be dispensed with. The optional ones improve the effectiveness of the treatment program but can probably be skipped.

Essentials

1. Meal Time Management

The foundation of my program is to take in zero carbohydrate or protein calories until 3 PM (8 hours after my wakeup time). I spend the day drinking unsweetened black coffee with matcha (green tea powder) added to it as a creamer and as a source for l-theanine, the amino acid that prevents coffee jitters.

I only use organic coffee that I grind right before I make the cup of coffee. I cannot stand pre-ground store-bought coffees.

Oils are an exception. I drink tablespoons of MCT oil and walnut oil in the morning (and some people put coconut oil in their coffee), this will not affect the program.

2. The Feeding Window

I only eat between 3 PM and 5 PM, a two-hour feeding window. If I eat later than that, it affects my sleep quality and brings back my fatigue the next day.

3. Avoiding Sugar, Fruit Juice, Grains and other Simple Carbohydrates

I do not eat bread, anything made with wheat flour, rice or potatoes, fruit juice, sweet fruits or sugary things. In short, I avoid eating/drinking large amounts of high-glycemic foods. These foods keep my blood sugar high throughout the night, reducing my sleep quality and giving me fatigue the next day.

I do not avoid them religiously. I still have small amounts of fruit (such as an occasional apple). But I make sure to never have significant amounts of simple carbohydrates except on special occasions.

3. Carotenall

Carotenall is a source of carotenoid anti-oxidants (vitamin A-like substances). I have one upon wake-up. Without this, nothing else works.

Beta-carotene (which is commonly called “plant-based vitamin a” doesn’t work. Retinol (animal-based vitamin A) works, but I need extremely high doses of it (100,000 iu the night before to feel the benefits the next day), which is toxic to the liver.

Spirulina (a tiny sea creature high in vitamin A) also works, but it is toxic to the liver because it is always contaminated with other creatures that produce liver toxins. I received severe liver pain from spirulina, even though the brand I tried was a highly-rated organic one from Amazon.com. I tried a different brand (the Health Ranger) which prides itself on having clean and high-quality supplements, but even that gave me liver pain.

4. Nettle Root Extract

I have one capsule of Now brand nettle root extract (250 mg) in the morning upon wake-up. Nettle root extract is a powerful anti-inflammatory supplement. I do not know the specific reasons why it works, but it does, and my chronic fatigue treatment cannot work without it.

Do not confuse with nettle leaf extract. Do not use non-extracts, the supplement should say “extract”. I have tried multiple brands, only Now brand and Solaray brand have worked for me.

5. Perika

I take 3 Perika tablets upon wakeup. Perika is a high-quality extract of St. John’s Wort, it is what St. John’s Wort should be. I have taken St. John’s Wort but it doesn’t work for me, Perika does.

Perika is necessary to create a form of mild optimism / happiness that is conducive toward feeling motivated.

6. Caffeine With Proper Timing (Probably Essential)

I stop drinking caffeine 15 minutes before my meal time (i.e. at 2:45 PM). If I have caffeine with my meal or after it, this brings back some of my fatigue the next day.

Caffeine is an important part of my day. It might be possible to use the rest of the treatments mentioned while being caffeine-free. I haven’t tried it, so I cannot say whether it will work.

7. Berberine and Banaba (not Banana) Extract (Essential for Me)

These two herbal extracts together are essential for managing my insulin resistance, and without doing that, the worst of my chronic fatigue comes back. If you sweat an hour or two after eating and the sweat smells somewhat sweet, or you carry amount significant amounts of belly fat or cellulite, or your eyes get very dry after eating, you probably have insulin resistance (or some other insulin-related condition).

I spent four months of zero motivation and productivity from March 2014 to July 2014 until I discovered this combination. I take a supplement called GlycoX which contains 500 mg berberine and 25 mg banaba extract  per capsule. I take 2 with my 3 PM meal, and 2 more at 5 PM. Different people will need different amounts.

8. Copper and Magnesium (Possibly Essential)

I take 2.5 mg copper glycinate and 130 mg elemental magnesium (from magnesium citrate) in the mornings. Copper helps with will power (the ability to focus on whatever one wants to focus on at will), while magnesium helps promote calmness and reduce eye dryness.

Copper is pro-excitatory for neurons (makes them more likely to fire), meaning that if it is missing, one feels fatigue in the brain, while if there is too much, neurons fire too often (known as excitotoxicity), causing a feeling of being scatterbrained and unable to focus. I recommend being careful with dosages of copper, more is not necessarily better.

9. Vitamin D3, Zinc Sulfate and Vitamin K (Essential for Evening Productivity)

I take 2000 IU vitamin D3, 25 mg zinc sulfate and 5-15 mg MK4 (a form of vitamin K) with my 3 PM meal. In this way my mind feels active and desirous of learning throughout the night, enabling me to listen to new audiobooks (my eyes are too dry at night to use them to read). If I don’t take these, I lack the motivation and the ability to focus necessary for being interested in learning.

Zinc, like copper, helps with the ability for neurons to fire. Zinc also reduces oxidative damage and inflammation. 25 mg might be too much, I plan to test lower amounts. Too much zinc, like copper, causes excitotoxicity.

The MK4 is not essential for these benefits, but it is necessary to prevent organ damage that is caused by vitamin D3, due to the fact that it increases calcium levels in the blood. MK4 also has the additional benefit of reducing inflammation and helping with insulin sensitivity, in this way improving sleep quality.

There is a fad where people take very high doses of vitamin D3. Taking 5000 IU gives me kidney pain, therefore I recommend not taking more than 2000 IU. I took 5000 IU vitamin D3 for years seemingly without issue, perhaps the reason my kidneys hurt now if I have this much is kidney damage caused by it.

Optionals

1. Piracetam (Possibly Essential, Possibly Not)

Piracetam helps reduce inflammation in the brain and improves memory and processing speed. I take 290 mg upon wakeup and 290mg around 11 AM. This is a relatively low dose, as some people take many grams of it per day, but it seems sufficient.

After the liver damage I got form spirulina, piracetam would bring back some liver pain, therefore I reduced the dosage to 290 mg.

2. Tianeptine Sulfate

Tianeptine sulfate is an anti-depressant and brain enhancer. It has amazing powers of reducing feelings of stress, promoting calmness and reducing social anxiety. It gives me a sort of calmness that makes it easy for me to spend hours on a single task without getting bored. I take 25 mg in the morning and 25 mg around 11 AM.

3. Oils

I take a tablespoon of walnut oil (which is high in the Omega 3 oil alpha-linolenic acid) in the mornings, which helps with motivation and brain function, and also helps with my eye dryness. I also take MCT oil, avocado oil, hazelnut oil and grape seed oil occasionally to experiment with them.

4. Melatonin

I take 250 mcg (0.25 mg) melatonin at bedtime, it helps improve sleep quality and reduce fatigue the next day. More is not better, taking 1 gram or 5 gram makes me wake up many times during the night and makes it difficult for me to fall back asleep.

The Social Factor in Chronic Fatigue

As I explain in detail in my book, I have discovered that social settings matter in chronic fatigue. If I don’t feel motivated, going to a coffee shop to work often brings back my motivation. Being surrounded by loved ones also reduces fatigue and increases motivation

There is a new theory of depression known as the Immune-Cytokine Model, which says that loneliness causes inflammation, designed to make us feel bad, to motivate us to go back to our loved ones, in this way ensuring that we do not spend time away from the safety of our families and tribes.

Ways of benefiting from these observations is to move in with your parents or another loved one if you can, to join meet ups and clubs (such as a martial arts club), to work outside (for this to work, you must be somewhere where you feel watched, if you feel entirely ignored by everyone, it doesn’t help, this is just how the brain works). Even getting a pet may help.

Things to Avoid

ALCAR

ALCAR (acetyl-L-carnitine) is a great supplement for managing blood sugar. Unfortunately, it causes a (pleasurable) feeling of laziness, where lying down and doing nothing is all I want to do. Taking any ALCAR today also seems to reduce my motivation the next day.

ALA

Alpha-lipoic acid (not to be confused with the omega 3 oil alpha-linolenic acid) is an anti-oxidant supplement that helps with blood sugar. It gives me neuropathy (pain in my fingers and toes), probably due to the fact that it removes minerals from the body, and it also gives me extreme depression and fatigue if I have too much of it, or if I have it on an empty stomach.

A bash script for automatically restarting an unresponsive Apache server only when needed

One of my servers responds to about 100,000 requests per day. Apache would randomly hang a few times a day, taking all of the websites down. I tried every solution I could find online to prevent Apache from hanging, but nothing helped, so I decided to stop wasting time on it and simply develop a good bandage for the problem.

At first I used a script to automatically restart Apache once every two hours. This wasn’t good enough because sometimes Apache would hang multiple times within one hour, other times it would keep running for 12 hours without issue (probably having to do with traffic spikes and waves of spider bots).

Eventually I developed the following script, which restarts Apache only when needed. The script tries to download a page from the website, and if the server fails to respond within 15 seconds, the script assumes Apache is down and restarts it. The script should be run once every minute for eternity.

The script

#!/bin/bash

now="$(date)"

# prevent multiple instances of this script from running
# at the same time. Note that the script's file name is
# auto_restart_unresponsive_apache, update it to match
# whatever file name you use for this script
for pid in $(pidof -x auto_restart_unresponsive_apache); do
    if [ $pid != $$ ]; then
        #Process is already running with PID $pid"
        exit 1
    fi
done

# try to download a webpage from one of the sites on the server.
# we use --head to only download its header, we don't need the page's contents
# we pass a ?t=some_number parameter to the web page, this allows the script
# to bypass web caches like varnish, otherwise Apache could be down but a caching
# mechanism could still return a functional web page for hours

if curl -s --max-time 15 --head http://example.com/?t=`date +%s` | grep "200 OK" > /dev/null
    then
        echo "$now:The HTTP server is up!" > /dev/null
    else
        service apache2 restart
        echo "$now: Restarting apache" >> /var/log/apache_restart_log
fi

The cron job

Below is the cron job I use to run the script once every minute. The output is sent to /dev/null, and any errors are also sent there. Otherwise you could receive emails on the server every time the script runs.

* * * * *  /some_path/auto_restart_unresponsive_apache >/dev/null 2>&1

“The Footsteps of Water” by Sohrab Sepehri (1964)

Sohrab Sepehri

I am a native of Kashan1 My days are not so bad.
I own a loaf of bread, a bit of intelligence, a tiny bit of taste.
I possess a mother better than the leaves of trees.
Friends, better than the water of a running brook.

And a God who is this near:
Within these gillyflowers, beneath that tall pine tree,
Hovering above the awareness of water, above the Law of Foliage.

I am Muslim.
My qiblah2 is a red rose.
My praying spot is a spring, my prayer stone is light.
Plains are my praying mat.
I make ablution with the heartbeat of windows.
In my prayer flows the Moon, flow the colors of the spectrum.
Stones are visible from behind my prayer:
Crystallized are all the particles of my prayer.
I do my prayer when,
Its athan3 wind, from a cypress tree’s minaret, has sung.
I do my prayer to grass’s saying “God is the Greatest”
To the iqama4 of waves.

My Kabaa5 is by the lip of the brook,
My Kabaa is under the acacias.
My Kabaa like the breeze, blows from garden to garden, from town to town.

My Black Stone6 is the brilliance of the garden.

I’m a native of Kashan.
My craft is painting:
Now and then I build a cage with paint, sell it to you
So that with the song of poppies that is imprisoned in it
The heart of your loneliness may cheer up.
What a dream, what a dream…I know
My canvas is lifeless.
I know well, my painting basin contains no fishes.

I’m a native of Kashan.
My descent perhaps goes back
To a plant in India, to an earthen vase from the soil of Sialk7 My descent perhaps goes back to a prostitute in the city of Bukhara8.

My father behind two migrations of swallows, behind two snowfalls,
My father behind twice sleeping in the veranda,
My father behind eras has died.
My father died when the sky was blue,
My mother jumped from sleep unaware, my sister became beautiful.
My father died when the policemen were all poets.
The grocer asked me, “How many melons do you want?”
I asked him, “How much is a happy heart?”

My father used to paint.
He used to make tars9, played the tar too.
He also had a nice handwriting.

Our garden stood on the side of the shadow of wisdom.
Our garden was the interweaving place of feeling and plants,
Our garden was the meeting point of a glance, a cage and a mirror .
Our garden was perhaps, an arc of the green circle of happiness.
The unripe fruit of God on that day, I used to chew in sleep.
Water I used to drink without philosophy
Berries, I used to pick without knowledge.
As soon as a pomegranate used to crack, hands turned to fountains of desire.
As soon as a cello used to sing, the chest burnt from a longing to hear.
Sometimes loneliness used to stick its face to the windowpane.
Passion used to come, and put its arms around the neck of sense.
The mind, used to play.
Life was something, like a rainfall during Eid, like a plane tree full of starlings.
Life at that time, was a line up of light and dolls,
It was an armful of liberty.
Life at that time, was a music basin.

The child, slowly, walked away along the alley of dragonflies.
I packed my things, went out of the city of carefree fancies
With my heart filled with homesickness for dragonflies.

I went to the party thrown by the world:
I, to the field of grief,
I, to the garden of mysticism,
I, to the illuminated veranda of knowledge, went.
I climbed up the stairs of religion.
To the end of the alleyway of doubt,
To the cool air of self-sufficiency,
To the wet night of love and affection.
I went to see someone who was at the other side of love.
I went, I went until women,
Until the lantern of pleasure,
Until the silence of desire,
Until the flapping sound of the wings of loneliness.

I saw things on the face of the Earth:
I saw a child who was smelling the Moon.
I saw a door-less cage in which brilliance was flapping its wings.
I saw a ladder on which love ascended to the roof of heaven.
I saw a woman who was pounding light in a mortar.
Lunch on their table was bread, was vegetables, was the distance of dew, was the hot bowl of affection.

I saw a beggar who was walking door to door begging for the song of a lark
And a sweeper who was praying to the rind of a melon.

I saw a lamb that was eating a kite.
I saw a donkey who understood hay.
In the meadow of Advice I saw a cow, satiated.

I saw a poet who, when he talked, he addressed a lily as “Your Highness.”

I saw a book, its words all of the make of crystal.
I saw a sheet of paper, of the make of spring,
I saw a museum far away from grass,
A mosque far away from water.
Above the bed of a hopeless scholar, I saw a vase, overflowing with questions.

I saw a mule whose burden was Essays.
I saw a camel whose burden was the empty basket of Proverbs.
I saw a mystic whose burden was tanana ha ya hoo10

I saw a train that was carrying brilliance.
I saw a train that was carrying knowledge and so torrentially it went.
I saw a train that was carrying politics (and so emptily it went.)
I saw a train that was carrying seeds of lotus and the song of canaries.
And an airplane, which on that height of thousands of feet,
through its windows the soil was visible:
the topknot of hoopoes,
The spots of a butterfly’s wings,
A frog’s reflection in a pond,
And the passage of a fly from the alleyway of loneliness.
The clear desire of a sparrow, when from a plane tree it comes toward the ground.
And the maturation of the Sun.
And the beautiful love making of a doll with the morning.

Stairs that ascended to the greenhouse of lust.
Stairs that descended to the cellar of alcohol.
Stairs that ran to the Law of Corruption of Red Roses
And toward the understanding of Mathematics of Life,
Stairs that ran to the roof of enlightenment,
Stairs that ran to the platform of manifestation.

My mother down there,
Was washing the cups in the stream’s memory.

The city was visible:
The geometrical growth of cement, steel, stones.
The pigeonless roofs of hundreds of buses.
A florist was putting up his flowers for sale.
Between two jasmine trees a poet was hanging a swing.
A boy was throwing stones at the wall of School.
A child was spitting plum stones upon dad’s faded praying mat.
And a goat was drinking water from the Caspian Sea of a map.

A laundry-line was visible, a restless brassiere.

The wheel of a cart longing for the horse to become weary,
The horse longing for the carter to sleep,
The carter longing for death.

Love was visible, waves were visible,
Snow was visible, friendship was visible.
Words were visible.
Water was visible, and the reflection of things in water.
The cool shade of cells in the heat of blood.
The moist side of life,
The east of sorrow in the human heart.
The season of drifting in the alley of women.
The scent of solitude in the alley of seasons.

A fan was visible in the hand of summer.

The seed’s journey to flowering.
The ivy’s journey from this house to that house.
The moon’s journey into the pond.
The eruption of flowers of regret from the soil.
The falling of young vine from the wall.
The raining of dewdrops on the bridge of sleep.
The leaping of joy from the ditch of death.
The passing of events behind words.

The battle of a pit with the light’s desire.
The battle of a stair with the long leg of the Sun.
The battle of solitude with a melody.
The beautiful battle of pears with the emptiness of a basket.
The bloody battle of pomegranates with the jaws.
The battle of Nazis with branches of delicacy.
The battle of a parrot and eloquence.
The battle of the forehead with the coldness of prayer-stones.

The attack of the mosque tiles on prostration.
The attack of wind on the ascension of soap bubbles.
The attack of the army of butterflies on the program of Pest Control.
The attack of dragonflies on the class of pipelayers.
The attack of reed pens on leaden letters.
The attack of a word on a poet’s jaw.

The opening of a century by a poem.
The opening of a garden by a starling.
The opening of an alley by an exchange of greetings.
The opening of a town on the hands of three or four wooden horsemen.
The opening of a New Year by two dolls, one ball.

The murder of a ratchet on the mattress in the afternoon.
The murder of a story at the entrance of the alley of sleep.
The murder of a worry by the instruction of songs.
The murder of moonlight by the command of neon lights.
The murder of an oak tree by the hands of government.
The murder of a depressed poet by a chimonanthus11.

All was visible on the surface of the earth:
Order was walking in the alley of Greece.
An owl was howling in the Hanging Gardens12.
The wind was blowing a sheaf of history’s straws on Khyber Pass13 towards the east
On the serene lake of Neghin, a boat was carrying flowers.
In Banares14, at the entrance of each alley an eternal lamp was burning.

Peoples I saw.
Towns I saw.
Plains, mountains I saw.
Water I saw, soil I saw.
Light and darkness I saw.
And plants in light and plants in darkness I saw.
Creatures in light, creatures in darkness I saw.
And humans in light, and humans in darkness I saw.

I’m a native of Kashan, but
My city is not Kashan.
My city is lost.
I, with endurance. I, with fever,
Have built a house on the other side of nighttime.
In this home I am close to the humid anonymity of grass.
I hear the sound of the breathing of the garden.
And the sound of darkness, when it drops from a leaf.
And the sound of brightness, coughing from behind a tree,
The sneezing of water from every crack of rock,
The dripping of swallows from the ceiling of spring.
And the clear sound of opening and closing of the window of loneliness.
And the pure sound of the mysterious moulting of love,
The concentration of the passion for soaring in wings
And the cracking of the soul’s self-restraint.
I hear the footsteps of longing,
And the methodical footsteps of blood in the veins,
The pulsing of the dawn of the pigeons’ well,
The beating of the heart of Friday night,

The flowing of carnations through thoughts,
The pure neighing of truth from afar.
I can hear the sound of the blowing of matter,
And the sound of the shoe of faith in the alley of excitement.
And the sound of rainfall on the wet eyelids of love,
On the sad music of adolescence,
On the song of pomegranate orchards.
And the sound of the shattering of the bottle of joy at night,
The tearing of the paper of beauty,
And the wind filling and emptying the cup of nostalgia.

I am near to the start of the Earth.
I take the pulse of flowers.
I am familiar with the wet fate of water, the green habit of trees.

My soul is flowing in the new direction of things.
My soul is young.
My soul sometimes, from excitement, gets a cough.
My soul is jobless:
Raindrops, the cracks in bricks, it counts.
My soul sometimes is as real as a stone on the road.

I didn’t see two poplars in enmity.
I didn’t see a willow selling its shade to the ground.
For free it offers, the willow its branch to the crow.
My passion blossoms wherever a leaf exists.
A poppy bush has bathed me in the surge of being.

Like the wings of insects I know the weight of dawn.
Like a vase, I listen to the music of growth.
Like a basketful of fruit, I have strong fever for ripening.
Like a tavern, I stand on the border of languor.
Like a building at the lip of the sea I am anxious about the high eternal waves.

Sunshine as much as you want, union as much as you want, increase as much as you want.

I am content with an apple
And with smelling a chamomile bush.
I with a mirror—a pure connection—am content.
I will not laugh if a balloon bursts,
And I will not laugh if a philosophy halves the Moon.
I know the sound of the flapping of a quail’s wings,
The colors of a bustard’s belly, the footprints of a mountain goat.
I know well where rhubarbs grow,
When starlings come, when partridges sing, when falcons die,
What the Moon is in the dream of a desert,
Death in the stem of desire,
And the raspberries of pleasure, in the jaws of love-making.

Life is a lovely ritual.
Life has wings as vast as death,
It has a leap the size of love.
Life is not something that, on the windowsill of habit, to be left forgotten by you and me.
Life is the rapture of a hand that reaps.
Life is the first black fig in the acrid mouth of summer.
Life is the dimensions of a tree from the eyes of an insect.
Life is the experience that a bat has in the dark.
Life is the homesickness that a migrating bird feels.
Life is the whistle of a train that turns through the dream of a bridge.
Life is observing a garden from the obstructed windows of an airplane.
It is the news of the launch of a rocket into space,
Touching the loneliness of the Moon,
The notion of smelling a flower on another planet.

Life is the washing of a plate.

Life is finding a penny in the brook of the street.
Life is the square root of a mirror.
Life is a flower to the power of eternity.
Life is the Earth multiplied by our heartbeats.
Life is the simple and monotonous geometry of breaths.

Wherever I am, so let me be,
The sky is mine.
The window, thinking, air, love, the Earth are mine.
What importance does it have then,
Sometimes if they grow,
Mushrooms of nostalgia?

I, don’t know,
Why some say, “Horses are noble animals, pigeons are beautiful.”
And why there is no vulture in any person’s birdcage.
What do clovers lack that red tulips have?
Eyes should be washed, in another way we should see.
Words should be washed.
A word in itself should be the wind, a word in itself should be the rain.

Umbrellas we should shut.
In the rain we should walk.
Thoughts, and recollections, should be carried in the rain.
With all the people of the town, in the rain we should walk.
A friend, in the rain we should call on.
Love, we should seek in the rain.
In the rain we should sleep with women.
In the rain we should play.
In the rain we should write things, speak, plant lotuses.
Getting drenched from time to time,
Swimming in the pond of right now, is what life is.

Let us undress:
Water is one foot away.

Let us taste brilliance.
Weigh the night of a village, the sleep of a deer.
Let us feel the warmth of a stork’s nest,
Tread not on the Law of Lawn,
Loosen the knot of tasting in the vineyard.
And open our mouthes if the Moon emerges.
And not say that night is a bad thing.
And not say that the shining moon is unaware of a garden’s eyesight.

And Let us bring baskets.
Take all this red, all this green.

Let us have bread and cheese in the mornings.
And plant a sapling at every turn of a sentence.
And pour the seed of silence between two syllables.
Let us not read a book in which the wind doesn’t blow,
And a book in which the surface of dew is not wet,
And a book in which cells don’t have dimensions.
Let us not wish the mosquito would fly off the fingertip of nature.
And not wish that the leopard would go out of the door of creation.
And let us understand that if worms didn’t exist, life would have lacked something.
And if caterpillars didn’t exist, the Law of Trees would have suffered a blow.
And if death didn’t exist, our hands would have sought something.
And let us know if light didn’t exist, the living logic of flying would have gone astray.
And let us know that before corals, a void was being felt in the thoughts of the seas.

And let us not ask where we are,
Let us smell the fresh petunias of the hospital.

And let us not ask where the fountain of luck is.
And let us not ask why the heart of truth is blue.
And let us not ask what breezes, what nights the fathers of our fathers enjoyed.

Behind our backs there isn’t a thriving space.
Behind our backs no bird sings.
Behind our backs no wind blows.
Behind our backs the green window of poplars is closed.
Behind our backs dust has settled over the whirligigs.
Behind our backs what there is is the weariness of history.
Behind our backs the memory of waves throws cold shells of silence on the coast.

Let us go to the lip of the sea,
Cast nets,
And catch freshness from the water.

Let us pick up a pebble from the ground,
And feel the weight of existence.

Let us curse not the Moonlight if we have fever,
(Sometimes I have seen in fever, the moon descends,
The hand can touch the ceiling of heaven.
I have noticed that the goldfinch sings better.
Sometimes a wound that I have had under my food,
Has taught me the ups and downs of the ground.
Sometimes in my sickbed the size of a flower has multiplied,
And increased it has, the diameter of an orange, the radius of a lantern.)
And let us not fear death.
(Death is not the end of the pigeon.
Death is not a cricket’s inversion.
Death flows in the soul of acacias.
Death has a seat in the pleasant climate of thinking.
Death in the spirit of the village’s night speaks of morning.
Death with a bunch of grapes comes into the mouth.
Death sings in the red larynx of the throat.
Death is responsible for the beauty of a butterfly’s wings.
Death sometimes picks basil.
Death sometimes drinks vodka.
Sometimes it is in the shade watching us.
And we all know,
The lungs of pleasure, are full of the oxygen of death.)

Let us not shut the door on the alive speech of appreciation which we hear from behind the wattled twigs of sound.

Let us remove the curtain:
Let us allow feeling to get some fresh air.
Let us allow adolescence to dwell under any bush it wishes.
Let us allow instinct to play.
To take off its shoes and following the seasons, leap on the flowers.
Let us allow solitude to sing.
To write things.
To go to the street.

Let us be simple.
Let us be simple whether at a teller’s window or under a tree.

It is not our job, discovering the secret of the red rose,
Our job maybe is
To, in the charm of the red rose, become swimmers.
To camp behind wisdom.
To wash hands in the rapture of a tree leaf before sitting at the dining table.
In the mornings when the sun, rises let us get born again.
Let us let our excitements fly.
Let us upon the perception of space, color, sound and the window sprinkle water .
Let the sky settle between two syllables of existence.
Let us fill and empty our lungs with eternity.
Take the load of knowledge off the shoulders of the swallow.
Let us reclaim the name from clouds,
From plane trees, from mosquitos, from summer.
On the wet feet of rain let us climb to the heights of compassion.
Let us open the door on mankind, light, plants and insects.

Our job maybe is
Between the lotus flower and the century
To run after the song of truth.

Kashan, village of Chenar (plane tree), summer of 1343 (1964)
Translated from Persian by Ikram Hawramani, Slêmanî, Iraq, 2008.

Please note that some of the translations might be too literal and may fail to transmit the poetic significance of the poet’s word and phrase choices.

“So Intoxicated I Am” by Jalal al-Deen Rumi

So intoxicated I am, so intoxicated I am today,
That out of my hoop I have leapt today!

Such a thing that cannot be imagined,
That’s how I am, that’s how I am today!

In spirit out to the Heaven of Love I went,
Though in body still in this world I am today!

I took reason by the ear and said, “Out!
Get out of here! Free of you I am today!

“O reason, wash your hands of me!
For one with the Madness of Love I am today!”

That beautiful Yusuf has given me an orange,
For both of my hands I have cut today!

To such a state it has brought me that cup of wine,
That so many vats of wine I have smashed today!

I know not where I am, but surely,
In a station of blessedness I am today!

Good fortune came coyly to my door and I,
Out of intoxication closed my door on him today!

When he returned, after him I ran,
Not for one minute did I sit down today!

Now that my “We Are Nearer” has concluded,
No more will I worship myself today!

Do not tie up that tress, Shams al-Din-e-Tabriz,
For like a fish in that net of yours I am today!

Translated from Persian by Ikram Hawramani, March 2017.

Below is this poem as sung by Shajarian. The word “today” has been replaced with “tonight” in the song, and some of the verses are omitted:

87 to Socrates

If you had a list of your ancestors and went back through them to your 87th ancestor, you will reach a man and woman who lived around the time Socrates was born.1

This chart below shows how unimportant we are. In 1000 years we will be just another number on someone else’s timeline. It also shows how important we are. If any of these men and women had failed to reproduce, the chain would have been broken and we wouldn’t exist today.

Why pupil size is associated with intelligence

People of higher intelligence have wider pupils than people of lower intelligence. A possible reason for this is that a wider pupil allows more photons to enter the retina. A person of higher cognitive capacity will be able to make good use of these photons, as they have the hardware to analyze the added photons, meaning the increase in the amount of photons entering the retina provides a selective advantage for these people.

In other words, when high intelligence is paired with wider pupils, human vision becomes more powerful, as there is more visual data received, and there is the power to process these data. By taking in more photons, these people are able to have better distant vision (as their pupils offer a wider surface area for distant photos to be captured) and better peripheral vision, giving them an advantage in hunting, warfare, and perhaps most importantly, social learning. If Kevin Laland’s theory is true that teaching and social learning are the reason our big brains developed, then better vision would have been crucial to this process and would have been selected for. Better visual fidelity would have enabled better ability to learn from the facial expressions of other humans and see their fine hand movements in things like tool-making. It would have also enabled better learning and data-gathering at a distance, so that a person could learn important information even from unfriendly individuals by watching them from a distance.

The theory, therefore, is that higher intelligence and wider pupils together enable humans to have higher visual fidelity compared to other humans. Add this to the much faster reaction times of a high IQ person and you have a person who is better than others at social learning and data-gathering and better at hunting as well.

Failing empire barks

How dare a sovereign state develop weapons technology that could prevent the American Empire from subjugating them and turning them into a client state?

For China the cat is out of the bag, so the US has to bark at North Korea and Iran and ask for China’s help in intimidating these countries.

And of course, something has to be done about the Iranian threat. Look how close to our military bases they have put their country:

Why God Allows Evil to Exist, and Why Bad Things Happen to Good People

Introduction

There is a surprising amount of confusion among the religious, even among clerics and scholars, when it comes to understanding why evil exists and why God stands aside when so much suffering happens throughout the world. Most of us express wonder when we see some horrible catastrophe happen, or when we see evil individuals, companies and institutions wield so much power. Some people even go so far as to blame God for the evil things that exist in this world, since if God had desired, He could have prevented such things from existing or happening in the first place. Others take this even further, using the existence of evil as proof of God’s non-existence. How can a good and supposedly all-powerful God stand by while so much evil happens? Where is our God?

There are good, perfectly logical explanations for these things, deep explanations that elucidate the purpose of this universe, our place in it, and our relationship with God, and through this give us perfectly good reasons for the existence of evil.

Why Evil Exists

What is the point of the existence of this world anyway? Many mistakenly think that the purpose of this world is to be a permanent residence where people judge whether God exists or not. They think that they can gauge God’s “level” of existence by the things that happen around them, so that given the right set of events, they will decide He is alive and active, and given others, they will decide He doesn’t exist, because if He existed, the world wouldn’t be the way it is.

A friend said that he once went on a trip abroad, and before he left, he asked God to protect three things that were most important to him in his life. During his trip, he lost all three, which included the dying of loved ones, and this made him decide that God doesn’t exist. He is a Buddhist now.

The above case is an example of earth-centric thinking, that considers this world a goal in itself. This is the core mistake that leads to millions of people misunderstanding, even disliking, God. That is a mistake because this world is nothing besides a testing hall where humans can freely choose to do as they like, to prove their worthiness of God’s approval or wrath. This world is not meant to be a permanent residence.

Most religions teach that an end of the world is coming. Regardless of religion, the universe is on track to become a dark, lifeless mass as the stars and galaxies die out. Everything is going to end, and what remains is the record of our deeds, kept by God. Even if we manage to create the greatest empire on earth, or write the most wonderful novel, none of our accomplishments will last.

One day the universe will shut down as if it never existed, and on that day what significance can our achievements have? This world is not meant as a permanent home of peace, but as a test. And a test requires that the possibility of failure should exist. If all humans acted according to God’s wishes, evil would not exist. But since God has given humans the freedom to disobey Him, they have the ability to do evil.

God is good, and evil is the absence of goodness, the same way that darkness is the absence of light. If God is Light, we cannot blame Him for the darkness we encounter when we turn away from Him, distance ourselves from Him, and act against His wishes.

Why didn’t God make the universe a place of wholesome goodness lacking in the possibility for evil? Because if evil could not exist, humans wouldn’t truly be free beings.

To be free, humans require the freedom to act against God along with the freedom to act for His sake. God wants to give humans perfect freedom to act and grow, so that they can be the best or the worst they want to be. Since humans have the freedom to act against God, and since to act against God is to create evil, humans have been given the freedom to create evil.

God did not make this world a perfect place because that is not its purpose. Imagine if you were a maker of creatures. If the creatures you made were controlled by their nature to do exactly what you put in them to do, they could never be truly your friends. They would be subservient robot-like machines that cannot help doing whatever you put in them to do.

But imagine if one day you wanted something more. You wanted to make creatures that could truly be your friends. The only way to have a true friend is to create a creature that can choose whether to be your friend or not. And so, you make creatures with free will, who can act according to whatever they wish, rather than according to your programming. Some of these creatures will choose to be your friends, others will ignore you, others will choose to be your enemies. They may fight among themselves, doing much evil to one another, and blaming you, their creator, for the evil they do, when in truth they should blame themselves, for they are the ones choosing to act the way they do. They have the freedom to be good, and many of them choose to be good, but some of them  choose to be evil instead.

The only thing we can blame God for is His creating us and giving us the freedom to be evil. This is a pointless blame. This is our reality and our fate, we cannot escape it. We have been thrown into this game regardless of our wishes, a game that forces us to choose to be either good or evil. We can debate the ethics of forcing people to choose between good and evil. But at the end of the day, we are forced to play this game. There is no dropping out.

Our Creator has done this to us, possibly against our will1, but we cannot get hung up over this fact, because our future holds something very important: Either eternal reward, or eternal punishment. Blaming God will not help our future. It may make us feel better now to hate God as so many do, but by making us think badly of God, this will reduce our chances of future success. The future is coming whether we want it to or not, and we have the power to make it a good or a bad future.2

Not all evil is done by humans. Droughts, floods and other natural disasters can cause much evil and suffering, and we can lose loved ones through car accidents and illnesses. Why doesn’t God prevent these things from happening if He loves us? Because, in order for the testing hall that is this world to be a true and consistent place of testing, God shouldn’t interfere with the functioning of nature3. The laws of nature should behave in such a way that makes sense even without reference to God. If we were as intelligent as we are, and yet we saw that nothing bad ever happened on earth, no car accidents, to illnesses, nothing, that everyone died in old age of natural causes, then this would be undeniable evidence of the existence of a higher power that protects humans.

God wants us to have the possibility of being atheists. It is one of God’s self-imposed rules that it should be impossible to directly detect His existence. And that requires that the functioning of this world should make perfect sense according to predictable scientific laws.

God wants us to believe in Him without seeing Him or knowing that He truly exists, because if it were possible to prove His existence, it would reduce our freedom to act against Him. God wants our universe to seem to make perfect sense without any necessity for His existence. This way we are given the freedom to discover Him and His Scriptures, and through our knowledge and conscience, we gain the ability to either follow His way or disbelieve in Him. Once we are given this knowledge, there is no turning away from the choice between good and evil.4

God wants our test to be a perfect test, in which we have perfect freedom to be good or evil. This would allow us to take credit for our actions. If God’s existence were proven, we’d be turned into slaves who cannot help but do as He says. We’d become merchants who act in our best interests by following God’s commandments. This is not what God wants. God wants us to be honored creatures who befriend Him not because we are forced to, but because we choose to. This is what gives worth to our friendship.

There is little honor in an employee acting according to his or her boss’s wishes, this is the expected behavior. While even this amount of obedience to a boss justifies reward, so that even if we had proof of God’s existence, we could still be rewarded for obeying Him5, God wants to take us beyond this boss-employee relationship. He wants to raise us to the status of honored friends, who act out of love and friendship, and out of our own efforts toward remembrance of God, rather than acting out of practical compulsion.

God wants us to be the servant who continues to love and serve his master, even though the master goes away for years, decades. What incredible honor and reward can await such a servant who faithfully loves and serves his absent master for 50 or 60 years, until he dies, even though the master never returns?6

God, by creating the possibility for the existence of true friendship between Himself and the humans He created, had to also create the possibility for the existence of true enmity between Himself and them. He wanted friends, but He knew that they couldn’t truly be called friends unless they had the option to be His enemies.

The evil done by humans on Earth is a doing of humans when they act against God, it is not a doing of God, therefore humans should be blamed, not God. And the evil done by nature is nature’s own doing, caused by the rules of physics, and God does not want to interfere with it because constant interference with nature would cause His existence to become apparent. It is necessary for disasters and accidents to be possible, as these prove to us the validity of nature’s rules, and allows the atheist the freedom to use these to prove that God doesn’t exist.

God and Nature shall always be apart, or seem to be apart, so that each one appears to function without the other. This is necessary, as this is what enables humans the freedom to choose between faith and disbelief, between good and evil. The world needs to make perfect, logical sense without having to refer to God in our thinking. It should be possible for us to believe that the world functions on its own without anything supernatural existing, this is what gives us the freedom to believe and disbelieve in God.

We need to be able to believe that the Master is absent. This is when the true nature of the servant comes through. Bad servants start to misbehave as soon as the Master looks away, and if the Master is away long enough, they entirely give up serving Him. They will start to loot His property and defile His name. But the good and honorable servant, even as he sees all of this happen, continues to have love and loyalty toward his Master. It makes no difference to him even if the Master never comes back. He keeps the remembrance of his Master in his heart, and he admonishes and encourages himself to continue to be the best servant he can be.

The world, the way it is, gives us the perfect opportunity to be this honorable and admirable servant. If evil did not exist, and if bad things did not happen, then there would have been no way for such servants of God to exist. We’d instead all be lowly and menial servants who never had a chance to disobey, and thus never had a chance to prove our loyalty toward God.

A world without evil and disaster would be a dysfunctional testing hall that cannot differentiate between the best and the worst of us. Without evil and disaster, God’s existence would be so clearly visible to us that most of us would cower in front of Him. A few people might be found who are daring enough to disobey God even in such circumstances, but the majority of people would kneel before God as they would before a great emperor, regardless of whether they had any loyalty toward Him.

A world that seems to be ruled by the cold, harsh laws of nature, and that completely hides the existence of God from our eyes, gives us the perfect opportunity to prove our loyalty to God. This world, with all of its problems, is the perfect testing hall, because of the problems it has.

Why Bad Things Happen to Good People

I will get around the metaphysical complexity of defining good and bad people by saying that a good person is anyone the reader thinks does not deserve to suffer, while a bad person is someone who does not deserve God’s protection.

Why good people suffer has already been mostly answered. If bad things never happened to good people, this would act as a proof of God’s existence and the invalidity of nature’s laws. If all good people lived to old age and died of natural causes, this would be easily detectable by even the simplest analysis.

There are religious people who wrongly think that if you are truly faithful, you will never suffer anything bad. When they see bad things happen to people, they try to find the reasons why the sufferers themselves are responsible for the suffering that has come upon them.

But disasters are a natural part of life, and it should affect good and bad people equally, or at least it should seem to do so. God does not want to be seen, so it should be impossible to detect miracles happening to save good people.

The suffering of good people proves that nature’s laws are real. If nothing bad ever happened to good people, but only happened to bad people, the fact would act as a proof of God’s existence, and this is what God does not want in this world. God wants us to follow Him and serve Him of our own free will, without any compulsion or strong inducement.

There would be millions, maybe billions, more believers if avoiding suffering was as simple as believing in God and serving Him. But these believers would be tantamount to fair-weather friends, who are on the bandwagon of faith only for their own immediate, short-term interest. They wouldn’t be loyal friends of God.

The world should occasionally give the faithful the impression that God has abandoned them. This is the true test of faith. Once all blessing seems to have gone from our lives, that’s when we look inside our hearts to find God again. If we weren’t true believers, if we only believed in God to ensure our own worldly good, then there would be no God in our hearts. We’d lose faith and abandon religion once we had the impression that God has abandoned us, like millions do.

But as for the truly faithful, when life gives us the impression that God has abandoned us, we continue to believe in God and to do our best to protect our faith. If our Master seems absent, it does not mean He has gone away forever. Only a dishonorable servant would start to act as if the Master is dead once He is gone away for a month or two. Those of us who truly believe in God, who love Him and want His friendship, and who have accepted to be His servants for eternity, will not abandon serving Him, regardless of what hardship and loneliness comes our way.

By the morning brightness

And [by] the night when it covers with darkness,

Your Lord has not taken leave of you, nor has He detested [you].

And the Hereafter is better for you than the first [life].

And your Lord is going to give to you, and you will be satisfied.

Did He not find you an orphan and give [you] refuge?

And He found you lost and guided [you],

And He found you poor and made [you] self-sufficient.
[Quran 93:1-8]

The possibility of good people suffering something horrible is nothing but an extension of these facts of life; the need for a proof of nature’s laws, the necessity for some suffering to prove one’s faith and virtue. God can inflict the greatest suffering on His most beloved servants, as He did with Abraham when He asked him to slaughter his beloved son, and as He did was Jacob in allowing him to believe, for years on end, that his most beloved son was dead, as this is how the greatest friends of God are raised to the highest ranks.

There can never be virtue without suffering. A virtuous act is one where we overcome our natural tendencies for the sake of God, and attaining virtue always has an element of suffering in it, small or great. A rich person who, out of love for God, refuses to practice usury to further enrich himself or herself, is doing a virtuous thing. Their suffering is that they watch their fellow rich men and women practice usury and see their wealth increase exponentially, while their own wealth increases slowly and is subject to far more risk.

And someone who attains virtue by working for a charitable cause, or by giving money to the poor, is also subject to a mild form of suffering (what economists would call “opportunity cost”), as they lose time and money that could have been used for something pleasurable.7

The possibility of good people suffering does not mean that blessedness in this world does not exist. As in the story of Joseph, God will allow suffering to happen, followed by periods of ease and enjoyment, followed by more suffering, until His servant is raised to the highest possible status. God will not leave his faithful servants abandoned alone to be entirely subject to the cold, harsh laws of nature, though it is necessary that it should appear so, so that God’s existence will not become apparent. The Quran says:

Whoever does righteousness, whether male or female, and who is a believer - We will surely cause him to live a good life, and We will surely give them their reward [in the Hereafter] according to the best of what they used to do.
[Quran 16:97]

Besides reward in the afterlife, the verse promises a good worldly life. The word used in the verse to mean “good” is tayyib, which can also be translated as “wholesome”. God will have a hand in the lives of good people, ensuring that despite the disasters they suffer, they will end up having wholesome, blessed lives. This, of course, cannot be proven, in accordance with God’s plan. But it can be seen in little things for those of us who have faith. The lives of believers seem to have more purpose. Their life stories seem better arranged and guided. This of course cannot be proven to an atheist, and it doesn’t have to be.

On the other hand, for disbelievers, people who knowingly rebel against God even though they believe in Him in their hearts, the Quran has this to say:

But whosoever turns away from My Remembrance, verily for him is a life narrowed down, and We shall raise him up blind on the Day of Judgment. He will say: "My Lord, why have you summoned me as a blind person when I was sighted?" He will say: "Thus did Our signs come to you, and you forgot them; that is why you have been forgotten this Day."
[Quran 20:124-126]

This verse, similar to the previous one, implies that there are worldly consequences for having (and in this case, not having) faith. Those who knowingly reject God will have a “narrowed down” life, also translated as “straitened” and “constricted”. Similar to how the lives of good people are blessed despite their hardships, the lives of evil people are constricted despite their joys and pleasures.

To put it another way, the general theme of a believer’s life is blessedness, while the general theme of a disbeliever’s life is constrictedness, a feeling of being oppressed by life. Both will enjoy periods of joy and periods of suffering, but through submitting to God, believers are blessed by God and are freed from many of the constraints of life, while disbelievers are, in general, and not very detectably, made to submit to the harshness and coldness of nature.

There will be a hidden hand of God that shields and guides the believer, while there is no such shield and guide for the disbeliever, and the world, itself a servant of God, treats them the way they like to be treated, as if God does not exist.

God could inspire us to always make the right choices in order to avoid all that is bad and to always gain what is good. But, besides making God’s existence apparent, this would reduce the value of our friendship with Him. A true friend of God is the one who keeps his faith in Him during difficulties, while a fair-weather friend of God is the one who only loves and worships God during times of peace and plenty, and whose faith is shaken whenever something bad happens to them (and plenty of such believers do exist).

The matter of ranks of God’s chosen friends in the afterlife is important, because it decides a person’s status in the afterlife for all of eternity. God does not want most of us to leave this world without having proven how good of a friend of God we are. That, in fact, is the main purpose of this world: To distinguish our ranks, from the very best of us to the very worst.

Some people die before they can prove themselves to God, for example infants. God allows this to happen because infant deaths are required by the laws of nature. And as for the poor infant, while their death is a tragedy in this life, in the afterlife God can choose to give them great reward without them having worked for it, since God’s generosity is not limited. He may also give them a higher status in the ranks of His friends than their parents as a reward for the parents, while also raising the status of the parents who kept their faith during the ordeal. A truly just God will not let an infant’s death go to waste.8

There are a thousand ways in which God can preserve eternal justice while allowing tragedies like infant deaths to happen, since this life is no more than a mere flicker compared to the eternity of the afterlife, and everything that happens here will one day be nothing more than a pale memory when a person has spent millions of years enjoying the rewards of the afterlife, close to family and friends and close to God.

Suffering is a natural part of a believer’s life. God does not ask us to stoically control our emotions, never letting any suffering show, to prove that we are faithful. Jacob was a prophet of God, and yet he cried so much after his son was believed dead that his eyes turned blind. There is no shame in sadness. God does not ask us to be super-human, but to keep faith alive in our hearts as we are subjected to life’s joys and sorrows.

Isn’t it Unkind for God to Punish His Creatures?

Think of God as Light. By staying close to Him, by following His commandments, we ensure our eternal good. No one is perfectly close to Him, each person is at some degree of distance. Eternal punishment is only for those who knowingly stray so far away from the Light that they knowingly wallow in complete darkness. Anyone who stays within the merest flicker of Light may gain God’s forgiveness and eternal reward.

Eternal punishment is necessary because that is the only way of ensuring that evil-doers don’t get away with their evil deeds. Many Jews (and Christians too) have become corrupted by the idea that they are God’s chosen children and that no matter what they do, they will eventually be forgiven. This is a highly dangerous thing to believe, because once you believe that you will never be punished eternally, then you can get away with anything. If you are an Israeli settler, who cares if you take over other people’s lands with violence. You are God’s Chosen, and you will be forgiven.

Once the idea of eternal justice is corrupted, then from that all evil follows. Even if people believe in an afterlife, if they think that there will be a limit on their punishment term, that they will burn for a thousand years and then will be freed to enjoy life for the rest of eternity, then many of them will not find it so bad to devolve utterly into sin, since they will eventually get away with it.

To preserve justice, people should not be able to get away with their crimes. During their lifetimes God gives them thousands of opportunities to repent and become better people. God believes that a human lifetime is sufficient to distinguish good people from bad, that it contains enough opportunities for humans to prove whether they deserve eternal good or eternal punishment. Every hour of every day contains opportunities for us to change, for better or for worse, and these small changes mount. There is a Light in this world and we can choose to either walk toward it or away from it every hour of every day. Every time we take a step away from it, we do it in the full knowledge that we have the chance to take a step toward it instead.

If we spend all of our lifetimes walking away from the Light by knowingly doing evil, we shouldn’t be surprised when one day we find ourselves in total darkness, hopeless of ever finding the Light again. It was our own choices that brought us here. For years and decades we had the option to turn back and walk toward the Light again, our consciences kept reminding us that we still had a chance to return to God, that God’s door was wide open to us, but instead we decided to keep walking away, chasing our shadow instead of chasing the Light.

Once a person falls into total darkness through their own choices, there will no longer be a point to extending their lives to let them come back. This is what Scripture claims, that once a person is totally surrounded by their evil deeds, they will never come back toward the Light. There is a point of no return, meaning that a person who crosses this point, even if given a lifetime of a hundred thousand years, it will not make a difference in their fate.

In fact, the Quran claims that such evil people, even if taken to the afterlife and shown all of the signs of God’s greatness, then brought back to earth, they will continue to be evil. Among some Christians there is the belief that people, no matter how bad, can be made to become good through education and reformation. The Quran, always unabashedly realistic, has a more satisfactory view, that guidance can only be had with God’s blessing, that even if someone fully understands God and believes in Him, they can still choose to be evil. The Quran goes beyond this, saying that once a person fully devolves into evil, not only will they become unreformable, but that God will actively prevent any reform, because they’ve done sufficient evil to seal their fate (as in the case of the Pharaoh of Egypt in the story of Moses).

If you could but see when they are made to stand before the Fire and will say, "Oh, would that we could be returned [to life on earth] and not deny the signs of our Lord and be among the believers."

But what they concealed before has [now] appeared to them. And even if they were returned, they would return to that which they were forbidden; and indeed, they are liars.

And they say, "There is none but our worldly life, and we will not be resurrected."

If you could but see when they will be made to stand before their Lord. He will say, "Is this not the truth?" They will say, "Yes, by our Lord." He will [then] say, "So taste the punishment because you used to disbelieve."

Truly, they have lost, those who deny the meeting with God , until when the Hour [of resurrection] comes upon them unexpectedly, they will say, "Oh, [how great is] our regret over what we neglected concerning it," while they bear their burdens on their backs. Unquestionably, evil is that which they bear.

And the worldly life is nothing but amusement and diversion; but the home of the Hereafter is best for those who fear God, so will you not reason?
[Quran 6:27-32]

The average person might be a sinner, but they do not fight against God every chance they get, and at the time of death they will likely possess enough light to be eligible for God’s forgiveness.

What are some examples of people who deserve eternal punishment? Usurers and their central bankers, who knowingly enslave millions to an evil, unnatural type of debt to enrich themselves, who orchestrate economic bubbles and bursts to reap trillions of dollars in profit while destroying the livelihoods of millions of families, and who plunge countries like the US into war after war, knowing that hundreds of thousands of innocent people will be killed, just so that they can earn their trillions financing these wars. A just God will not let these people go unpunished, and their punishment will not be something they can laugh at, it will not be a slap on the wrist like the US government gives to the usurers at Goldman Sachs every year when they are caught manipulating markets and destroying parts of the economy to enrich themselves. It will be something that will make them cry every single day for eternity.

I will not believe in a God who lets these people get away with the immense evil they do.

Conclusion

People make the mistake of considering this world their permanent home. They become attached to its blessings and disasters, and they think they can judge God based on what happens in their lives. But this world is nothing more than a tool for distinguishing God’s true friends from His fair-weather friends, and distinguishing these from His true enemies.

This world is nothing more than a preparation for the eternity of the afterlife. We would be wise not to become attached to its ups and downs, and to know that these are the days given to us by God in which we can prove ourselves to Him.

***

I originally published this essay as a short ebook on Amazon in 2015. I’ve decided to publish it for free here on my website, after thoroughly rewriting it, so that more people may (hopefully) benefit from it.

Why you should ditch Intel if you want a competitive PC market

Intel is famous for its various efforts to destroy AMD over the past 20 years, and it is so powerful and too-big-to-fail that legal action against it has never amounted to more than slaps on the wrist.

If you believe in the importance of ethics and morality in corporate actions, avoid Intel as a matter of principle. They don’t deserve your money. They deserve to die and to be forgotten. If you keep buying their stuff, you are telling them it is OK to keep on their evil and malicious practices, because they are being rewarded by you for it rather than being punished.

Here is the latest example of Intel being an example to us all:

Why the Banks are So Powerful and Why the Bible and the Quran Forbid Usury: Charting How Interest Creates Obscene Wealth Inequality

Imagine if in 1913 the real economy of the US had $100 billion in capital, while the banks and money-lenders had only $1 billion. Given everyday economic circumstances, by 2017, the wealth of the real economy would have grown to $2163 billion (with a 3% economic growth rate). Meanwhile, the wealth of the banks and money-lenders during the same period would have grown from $1 billion to $3806 billion. Starting at only 1% of the wealth of the real economy, within just over 100 years, the financial sector grows to 175% the size of the real economy.

This is the heart and soul of usury; the reason why banks are so powerful, and the reason why usurers have been hated with visceral hatred throughout history. The usury sector uses the law to enforce an alternate reality where their profits grow faster than the real economy. If they were honest investors, their money would be directly invested into the economy, so that their wealth would grow (and shrink) with the real economy. But through the hateful invention of usury, they create an alternate reality where their wealth always grows faster than the real economy.

The chart assumes a relatively low business loan interest rate of 5%, and a high delinquency rate of 6.75% (the highest recorded by the St. Louis Fed between 1987 and 2016), and a high (usurer-unfriendly) reserve ratio of 33% (the lower the reserve ratio, the faster the wealth of money-lenders grows, as they earn more interest on their capital).

Usury is evil because, on a macro scale, it passes off most risks to the borrower, and most profits to the lender. In the world of business, businesses sometimes make a profit, sometimes make a loss. But in the world of usury, usurers always make a profit. They lend money at 5% to a business and demand 5% profit after the year with complete disregard for whether the business profited or made a loss.

In this way, usury turns the whole economy into a casino where the usurers win most of the time. They happily lend money to everyone they can burden with debt then demand profits (interest) at a fixed rate without regard for the fact that in the real world people sometimes profit, sometimes make losses. The usurers live in a parallel reality where they always profit.

In this way, the wealth of usurers grows faster than the wealth of the rest of society, enabling them to slowly but surely take control of the whole economy by buying up its lands and businesses. Below is a chart of this process over 20 years in a small town, assuming both the money-lender and the townsfolk have $10 million at the beginning.

A wealthy usurer looks at a fellow human and thinks, “How can I turn this person into a profit-making tool for myself?” They want to give him $10,000 to take risks with, but they want to charge him 5% annual profit regardless of whether he profits or loses. In this way they drive a wedge through reality; most profits to the usurer, all losses to the borrower. They do not want to honestly invest their wealth (such as by starting businesses), because they may lose. Instead, they give their money to you so that you will lose if things go badly, while enjoying the power of the law in extracting their profits from you year after year regardless of your loss.

The usurers at the Federal Reserve, Wall Street and the Chicago School of Economics would have you believe that the above situation is unavoidable, that it is just a fact of life, and that if you dislike money-lenders for their profiteering and rent-seeking, you are just hating them for their wealth.

What is not mentioned is that there is a way for the wealthy to invest their wealth without creating wealth inequality and giving themselves such an obscene advantage over the population, and that method is simply honest investment, what I call Socratic Finance, as Socrates mentions it in Plato’s Republic. It is to make the lender and the borrower share in their fair portion of risk and gain.

How is this magic performed? By prohibiting the charging of interest. When the charging of interest is prohibited, money-lenders are made to invest in the real economy, and to share in its profits and losses. If the town’s money-lender cannot practice usury, and has $10 million in wealth compared to the town’s $10 million, he would be forced to spend his money investing in the real economy by buying businesses or starting new businesses, creating jobs in the process, and raising wages, as he has to compete with other business for available talent. In this way he shares in the town’s profits and losses, instead of enjoying a 5% guaranteed annual profit rate that has nothing to do with reality, that is just a legal fiction designed to enrich him at the expense of his borrowers.

If he wants to invest his money to finance housing, instead of using the corrupt practice of mortgaging, he would offer up houses on a rent-to-own basis. In a normal mortgage, a person is made to carry the burden of a $300,000 loan while the money-lender continues to own the house. In the case of default, the money-lender gets the house back, sells it, and if it sells for less than the outstanding loan amount, he goes after the borrower for the rest of the principal. Most mortgage defaults happen during times of financial crises, when people lose jobs, and when houses lose value. If the home was mortgaged at $300,000, during a crisis it would sell for only $200,000. If the buyer had paid $20,000 of the principal off, they would lose the house, and still owe $80,000 to the usurer.

But Socratic home financing is a world apart from this. If a person gets a Socratically-financed home, and then is unable to make payments, the investor gets the house back and sells it, and the home-buyer gets his principal share of the house back. If he had paid off 20% of the principal, he would get 20% of the house’s sale price. In a Socratically-financed home, the buyer always gets some money back in the case of default, as there is no loan involved, it is real ownership transfer of the house. In the previously mentioned case of the $300,000 house, the buyer would get $40,000 back after foreclosure, instead owing $80,000.

Over the past 400 years, most Christians have continued the tradition of being utter disgraces to the name of Christ, so that today even the Vatican funds its operations through usurious lending. Even the Amish practice usury.

If but a probable suspicion arose
of a man to occupy that filthy trade
He was taken for a devil in the likeness of a man.
But good Lord, how is the world changed?

That which infidels cannot abide, Gospellers allow,
That which Jews take only of strangers
and will not take of their countrymen for shame,
That do Christians take of their dear friends
and think for so doing they deserve great thanks.

Thomas Rogers (Anglican theologian, ca. 1555-1616)

Today’s usurers try to absolve themselves from their sins, and whitewash their actions, through the practice of philanthropy. Almost every wealthy usurer is described as a “philanthropist” on Wikipedia. They gain billions of dollars by squeezing the life out of the economies that play host to them, using usury to drive a wedge into the economy and extract rent from it, then spend a few hundred million dollars funding hospitals, museums and universities, and lo and behold! They are philanthropists. It is to this usurer trick of philanthropy that Rabbi Hermann Adler, Chief Rabbi of the British Empire from 1891 to 1911, refers when he says:

No amount of money given in charity, nothing but the abandonment of this hateful trade, can atone for this great sin against God, Israel and Humanity.

The Risk-Profit Differential

The evils of usury, and the immense urge that usurers feel to practice it, can all be summed up into one phrase: the risk-profit differential.

Whatever reasons usurers bring up to defend usury can be defeated by mentioning this phrase. The risk-profit differential is the core of usury, the reason why usurers prefer usury over productive investment, as was recognized by Jesus in his Parable of the Talents.

The risk-profit differential refers to the fact that, at its core, every usurious contract is about passing off more risk to the borrower than to the lender, and passing off more profit to the lender than to the borrower. This differential, this unbalanced arrangement that constantly pushes risk away from the usurer while also constantly pushing profit toward him, is where the attraction of usury lies.

It is the desire of every human to want to increase profits while also wanting to decrease risks. A usurer is simply someone selfish enough to create an arrangement that puts this unchecked, selfish animal desire into law through a contract that ensures him more profit and less risk, while also ensuring less profit and more risk to the borrower.

Usury is about enforcing a contract that enslaves the borrower to the usurer’s interests. The usurer class ensures itself a constant rate of profit (the class as a whole always profits, never loses), while the borrower class profits and loses randomly as economic conditions demand. The usurer class gets guaranteed profits. The borrower class is forced to share its profits with the usurers, while also being made to keep its losses to itself.

Through this unbalanced arrangement, the wealth of the usurer class balloons. They build skyscrapers to house their banks and insurance companies. The rest of society’s prosperity grows fast at first, then stagnates, and then starts to decline as the debt load grows, until a situation is reached, like that in the US, where bankers and their friends are the richest and most powerful people in the country, almost living in alternate reality, with lavish lifestyles and massive mansions subsidized by the interest payments of the millions of peasants.

Casinos make profits by having machines that win very slightly more often than they lose. Perhaps winning 52% of the time and losing 48% of the time. Usury, through the risk-profit differential, turns the entire economy into a casino where the usurers win 80% of the time, and lose 20% of the time (through defaults and bankruptcies). While a large casino makes a few billion dollars a year for its owners through its rigged nature, the economy, due to the rigged usury, makes trillions every year for the usurer class.

Usury is an unbalanced arrangement, otherwise it wouldn’t be usury. There is no way to make usury fair, to make it harmless, to make it add positive value to society. The only solution to usury is to ban it, as the English Kings Edward I and Edward VI did.

No matter how many clever arguments the usurers and their economists come up with in defense of their usury, they can never make this fact go away, as this is the only reason a usurer practices usury: he wants nearly all profits to come to himself, and nearly all losses to go to his borrowers. He wants to give his money to a peasant who is legally forced to share his profits with the usurer while bearing the full burden of any losses.

Debt slavery

The problem with usury is that the profits of lenders always grows faster than the profits of borrowers. When you borrow $10,000 at 5% interest, within this transaction is the embedded assumption that your prosperity will grow by at least 5% in the next year. This is why Aristotle and many other philosophers and intellectuals call usury “unnatural.” The profits of usury are separate from the profits of the actual economy in which it exists. When usurers lend at 5%, they are maintaining a parallel alternate reality in which the economy profits at 5% in the next year, regardless of whether the actual economy profits at 5% or not.

While some borrowers make good use of the money they have borrowed and make more than 5%, so that they can pay off the usurers and still make a profit, others, because of the millions of chances that operate in the reality of an economy, make a loss on the money they have borrowed. They may have borrowed $10,000, and a year later they only have $8,000 left, because their business dealing didn’t work out as they expected. But the usurer, in his alternate reality, continues to pretend not only that the $10,000 still exists, but that the $10,000 made a 5% profit. He collects $500 from the borrower at the end of the year, leaving the borrower with $7500 in cash, and a $10,000 debt to pay off. If the borrower continues to be unlucky the next year, he loses another $2,000 of his cash, but he still has to pay about $500 to the usurer, so now he has $5,000 left in cash, and a $10,000 debt to pay off.

Meanwhile, during these two years, the usurer has earned $1,000 in profit, without losing any of the $10,000 he gave to the borrower, since the borrower is required to pay it back regardless of his or her profits or losses.

Usury is a way of earning money by the virtue of having money, while making others carry the burden of any risk that comes out of using the money. It is an amazing deal—for the usurer. For the borrower, sometimes it is a good deal, sometimes it breaks even, and sometimes it is pure slavery.

A modern, poignant form of debt slavery today is student debt. A usurer lends a student $100,000 at, let’s say, 5% interest. Within this debt is the assumption that not only will the student be able to use their $100,000 degree to earn that much back over their career, but that they will also make a 5% profit, every year, over and above the cost of the degree.

As it happens, some students graduate and succeed in the business world, so that they pay off the loan in 10 or 15 years while enjoying a good, or at least an acceptable, standard of living.

But for many students, this is only something that they can dream of. They borrow tens of thousands of dollars, only to spend the rest of their lives barely being able to make the monthly payments on their loans. And ten years after graduation, due to changing economic, political or technological conditions, their degrees may be completely worthless, meaning that they racked up $100,000 or more in debt for something completely useless. This $100,000 will hover over them like a dark cloud for the rest of their lives.

Meanwhile, the usurer in his or her high tower, continues to extract a 5% interest, or $10,000 a year, from the student, with the law enabling them to maintain an alternate reality in which that completely useless degree is actually worth $100,000, and also that that useless degree is enabling the student to earn a 5% yearly profit over the value of the degree.

In 2015, there were 2.8 million Americans over the age of 60 who were still living with student debt. US law, authored by usurers and their lobbyists, prohibits these people from declaring bankruptcy so that they can get rid of this cloud that has been giving them constant stress since their early adulthood. The law forces them to pay it off, and empowers usurers to seize these people’s wages and properties to get not only the original $100,000, but an additional $10,000 yearly profit over and above that for every year these people have had their debt, which, for a person of 60, means for their entire adult lives. Student debt has turned these people into money-making machines for the usurers.

Usury is about creating an alternate reality in which the economy profits at 5%, or 20%, or whatever the usurers are currently lending their money at, and using the law to force this reality on the population, regardless of the actual economy.

In the real economy, each year and each month’s profits are different from the previous ones’. One year the economy may make a 5% profit, another a 2.5% profit. A war may break out, or natural disaster may strike, causing the economy to make a loss. Political conditions can change. Trade wars, currency speculation and terrorism can severely damage an economy’s profits.

But in the blissful alternate reality of the usurer, none of this happens. Each year is full of sunshine and great harvests, and the population will have to subsidize this alternate reality for them.

Forecasting the World’s Top 50 Most Powerful Countries in 2035 Using the HQI

The following table is a list of 50 countries that are predicted to have the most economic, technological and military power in the world by the year 2035, according to HQI theory. The projected power of the United States is set to 100 to make it easy to compare other countries with it. China’s projected power is 251.6, meaning it will be more than double as powerful as the United States in 2035.

The 2035 populations are projected based on the average of a linear regression of population growth rates between 1995 and 2015. If a country’s population growth rate was 3% in 1995 and 2% 2015, it is assumed that in 2035 the population growth rate will be 1%. The average of the 2015 and 2035 growth rate is taken (1.5%), and this is recursively applied 20 times to arrive at the 2035 population. This is somewhat crude but good enough for our purposes.

The HQI is the Human Genetic-Cultural Quality Index, a measure of a population’s capacity for intellectual achievement and technological innovation, by taking into account a country’s scientific output and real (Smithian) economic growth. China’s HQI is 856 while the HQI of the United States is 1372, meaning each Chinese citizen adds a relative value of 856 to China’s economy, while each American citizen adds a value of 1372. The HQI indicates the “quality” (as opposed to quantity) of the human capital of a country.

By multiplying a population’s count by its HQI, we arrive at a number that indicates the total power for innovation in the population as a whole. In 2035, India will have more people than China (1.52 billion versus 1.46 billion), but since China’s HQI is higher (i.e. since its population is of higher genetic-cultural quality), its power and might will be consequently larger. In fact, China will be five times more powerful than India in 2035, and 2.5 times more powerful than the United States. It will be the most powerful country in the world by a wide margin.

Iran gets an advantage over Russia due to its higher economic growth, fast growing population, and its higher scientific output per capita (25% higher than that of Russia). However, many of Russia’s recent troubles have been due to economic warfare from Wall Street, therefore it is highly unlikely that it will ever be less powerful than Iran. As the HQI is updated over the next few years, Russia’s numbers should improve significantly.

Qatar and Saudi’s high HQI numbers are largely due to their importation of foreign scientists to carry out research in their universities and are not indicative of native capabilities.

It is unlikely that Germany will be less powerful than the United Kingdom in 2035. The HQI of the UK is inflated by the UK’s higher output in the “soft” sciences. Germany actually outdoes the UK in many important scientific fields, such as energy, engineering, physics, astronomy, mathematics and chemical engineering. The UK is superior in medical research.

South Korea produces far more science per capita than Japan, and its economy is growing fast. Both of these factors go toward its much higher HQI compared to Japan (1627 vs. 605). South Korea’s actual advantage may be smaller, and it seems unlikely that it will actually be more powerful than Japan.

How it Works

A country’s HQI shows its potential for growth. It says that after decades of infrastructure-building, urbanization and everything else that goes into producing a developed economy, that country can reach the level of output and innovation that another, fully developed nation of similar HQI has. What this means is that multiplying a non-fully-developed nation’s HQI will give us a number that reflects its power in a few decades, when it has finished developing.

The Chinese population’s HQI of 856 is close to that of Italy’s (945). What this means is that 20 years from now, once China has fully developed, it will have the same economic, military and technological power of an imaginary Italy that has 1.46 billion people. This thought alone should be sufficient to keep those Americans awake at night who think they will forever be the world’s biggest power. Can an America with 364 million people stand up to an Italy with 1.46 billion people? Italy’s 60 million people published 106000 scientific papers in 2015. If that population grows to 1.46 billion, an increase by a factor 24, that means they would likely be able to publish 2.5 million scientific papers per year, dwarfing America’s scientific output of 600,000 papers per year, and with that, dwarfing America’s ability at innovation and technological progress, and its economic and ultimately military power.

That imaginary Italy is very much what China is going to be in 20 years. The HQI of Italy and China are similar. All that remains for China to do to become an Italy with 1.46 billion people is to finish building its economic and scientific infrastructure, and this will probably be done in the 20 years, as the example of South Korea’s development shows.

As for already developed nations, their HQI can be multiplied by the present population to get its present level of power, and it can be multiplied by its projected future population to get its future power. This only makes sense for developed nations. For developing nations like China (and South Korea until recently), the population is high quality, but everything else isn’t, therefore the population is being held back by various factors from achieving what their HQI suggests. For this reason we give these fast-developing nations 20 years to reach their full potential.

Country Projected 2035 Population HQI Relative Economic, Technological and Military Power in 2035
1 China 1,464,562,493 856 250.46
2 United States 364,631,940 1372 100.00
3 India 1,520,438,646 162 49.24
4 United Kingdom 79,223,389 1818 28.79
5 Germany 93,984,408 1218 22.88
6 Australia 31,623,131 3561 22.51
7 France 72,157,368 1165 16.80
8 South Korea 50,400,996 1627 16.39
9 Canada 42,699,016 1859 15.87
10 Brazil 225,917,248 332 14.99
11 Japan 117,049,007 605 14.15
12 Iran 100,194,389 626 12.53
13 Italy 61,510,122 945 11.62
14 Spain 44,357,325 1277 11.33
15 Turkey 101,374,566 479 9.70
16 Russian Federation 149,971,486 312 9.35
17 Switzerland 10,987,401 3910 8.59
18 Poland 37,352,026 1120 8.37
19 Netherlands 18,189,750 2238 8.14
20 Taiwan 22,039,541 1717 7.56
21 Sweden 12,588,464 2775 6.98
22 Saudi Arabia 43,095,570 768 6.61
23 Nigeria 312,375,890 97 6.05
24 Singapore 5,924,284 4823 5.71
25 Malaysia 36,376,961 756 5.50
26 Israel 10,953,808 2410 5.28
27 Egypt 132,313,330 198 5.23
28 Belgium 12,642,382 2058 5.20
29 South Africa 70,569,040 292 4.12
30 Iraq 68,203,001 295 4.03
31 Norway 6,858,738 2925 4.01
32 Austria 10,735,422 1859 3.99
33 Czech Republic 11,684,419 1569 3.66
34 Pakistan 272,264,022 66 3.59
35 Denmark 6,374,946 2812 3.58
36 Mexico 152,508,904 110 3.37
37 New Zealand 6,972,004 2352 3.28
38 Hong Kong 7,811,688 1997 3.12
39 Qatar 4,879,996 2815 2.75
40 Argentina 50,278,252 253 2.54
41 Finland 5,873,345 2034 2.39
42 Portugal 8,783,800 1359 2.39
43 Thailand 68,077,965 174 2.37
44 Chile 21,146,173 535 2.26
45 Ireland 5,233,086 1959 2.05
46 Indonesia 314,805,429 29 1.84
47 Romania 19,228,586 475 1.83
48 Colombia 55,052,245 163 1.80
49 Greece 8,774,644 934 1.64
50 Algeria 58,570,388 129 1.51

Please see my essays on the HQI and the 12-Year Min-Max Average for the fine print regarding how the above numbers were calculated. Most of the data is from the World Bank. Taiwan’s population growth rate was taken from Worldometers.com as it is missing from the World Bank data.

Below is the same table with the nitty-gritty details exposed, and with seven bonus countries at the end. Download it as an Excel file or PDF.

Country 2015 Citable Scientific Documents 2015 Population 1995 Population Growth Rate 2015 Population Growth Rate 2035 Projected Population Growth Rate Projected Annual Population Growth Rate (Mean of 2015 & 2035 Rates) Projected 2035 Population Average Real Annual Economic Growth (2004-2015) [12-Year Min-Max Method] HQI Relative Power in 2035
1 China 416,409 1,401,586,609 1.1 0.5 -0.1 0.2 1,464,562,493 10.5 856 250.46
2 United States 567,007 325,127,634 1.2 0.8 0.4 0.6 364,631,940 0.5 1372 100.00
3 India 123,206 1,282,390,303 1.9 1.2 0.5 0.9 1,520,438,646 7.1 162 49.24
4 United Kingdom 169,483 63,843,856 0.3 0.8 1.4 1.1 79,223,389 -0.6 1818 28.79
5 Germany 149,773 82,562,004 0.3 0.5 0.8 0.7 93,984,408 -0.8 1218 22.88
6 Australia 82,567 23,923,101 1.2 1.3 1.5 1.4 31,623,131 3.0 3561 22.51
7 France 103,733 64,982,894 0.4 0.5 0.6 0.5 72,157,368 -0.1 1165 16.80
8 South Korea 73,433 49,750,234 1.0 0.4 -0.3 0.1 50,400,996 3.6 1627 16.39
9 Canada 89,312 35,871,283 0.8 0.9 0.9 0.9 42,699,016 0.1 1859 15.87
10 Brazil 61,122 203,657,210 1.5 0.9 0.2 0.5 225,917,248 3.7 332 14.99
11 Japan 109,305 126,818,019 0.4 -0.1 -0.7 -0.4 117,049,007 -0.4 605 14.15
12 Iran 39,727 79,476,308 1.4 1.2 1.1 1.2 100,194,389 5.0 626 12.53
13 Italy 95,836 61,142,221 0.0 0.0 0.0 0.0 61,510,122 -1.7 945 11.62
14 Spain 79,209 47,199,069 0.2 -0.1 -0.5 -0.3 44,357,325 0.3 1277 11.33
15 Turkey 39,275 76,690,509 1.6 1.5 1.4 1.4 101,374,566 2.3 479 9.70
16 Russian Federation 57,881 142,098,141 0.0 0.2 0.4 0.3 149,971,486 0.4 312 9.35
17 Switzerland 39,358 8,238,610 0.7 1.2 1.7 1.5 10,987,401 1.0 3910 8.59
18 Poland 37,285 38,221,584 0.1 0.0 -0.2 -0.1 37,352,026 4.2 1120 8.37
19 Netherlands 51,434 16,844,195 0.5 0.4 0.4 0.4 18,189,750 0.0 2238 8.14
20 Taiwan 34,011 23,381,038 0.8 0.1 -0.7 -0.3 22,039,541 4.5 1717 7.56
21 Sweden 35,039 9,693,883 0.5 1.1 1.6 1.3 12,588,464 0.4 2775 6.98
22 Saudi Arabia 17,529 29,897,741 2.6 2.1 1.6 1.8 43,095,570 5.9 768 6.61
23 Nigeria 5,112 183,523,432 2.5 2.6 2.8 2.7 312,375,890 18.2 97 6.05
24 Singapore 17,976 5,618,866 3.0 1.2 -0.7 0.3 5,924,284 7.3 4823 5.71
25 Malaysia 23,414 30,651,176 2.5 1.4 0.3 0.9 36,376,961 3.0 756 5.50
26 Israel 18,040 7,919,528 2.7 2.0 1.3 1.6 10,953,808 3.7 2410 5.28
27 Egypt 14,800 84,705,681 1.9 2.1 2.4 2.3 132,313,330 4.5 198 5.23
28 Belgium 29,180 11,183,411 0.2 0.5 0.8 0.6 12,642,382 0.7 2058 5.20
29 South Africa 17,409 53,491,333 2.2 1.7 1.1 1.4 70,569,040 2.0 292 4.12
30 Iraq 1,793 35,766,702 3.1 3.2 3.4 3.3 68,203,001 27.8 295 4.03
31 Norway 18,228 5,142,842 0.5 1.1 1.8 1.5 6,858,738 1.2 2925 4.01
32 Austria 21,818 8,557,761 0.2 0.8 1.5 1.1 10,735,422 -0.1 1859 3.99
33 Czech Republic 20,759 10,777,060 -0.1 0.3 0.6 0.4 11,684,419 1.0 1569 3.66
34 Pakistan 10,962 188,144,040 2.5 2.1 1.7 1.9 272,264,022 4.6 66 3.59
35 Denmark 23,081 5,661,723 0.5 0.6 0.6 0.6 6,374,946 -0.6 2812 3.58
36 Mexico 18,417 125,235,587 1.9 1.3 0.7 1.0 152,508,904 0.2 110 3.37
37 New Zealand 13,052 4,596,396 1.5 1.9 2.3 2.1 6,972,004 1.3 2352 3.28
38 Hong Kong 14,710 7,313,557 2.0 0.9 -0.2 0.3 7,811,688 3.1 1997 3.12
39 Qatar 2,766 2,350,549 1.2 2.9 4.6 3.7 4,879,996 14.9 2815 2.75
40 Argentina 11,815 42,154,914 1.3 1.0 0.8 0.9 50,278,252 2.2 253 2.54
41 Finland 17,551 5,460,592 0.4 0.4 0.4 0.4 5,873,345 -1.5 2034 2.39
42 Portugal 21,159 10,610,014 0.4 -0.5 -1.4 -0.9 8,783,800 -0.8 1359 2.39
43 Thailand 11,632 67,400,746 0.9 0.3 -0.2 0.1 68,077,965 3.4 174 2.37
44 Chile 10,347 17,924,062 1.5 1.0 0.6 0.8 21,146,173 2.5 535 2.26
45 Ireland 11,370 4,726,856 0.5 0.5 0.5 0.5 5,233,086 1.1 1959 2.05
46 Indonesia 6,280 255,708,785 1.5 1.2 0.9 1.0 314,805,429 5.5 29 1.84
47 Romania 13,053 21,579,201 0.0 -0.4 -0.8 -0.6 19,228,586 0.7 475 1.83
48 Colombia 7,500 49,529,208 1.7 0.9 0.2 0.5 55,052,245 4.3 163 1.80
49 Greece 16,616 11,125,833 0.5 -0.6 -1.7 -1.2 8,774,644 -1.7 934 1.64
50 Algeria 5,171 40,633,464 1.9 1.9 1.8 1.8 58,570,388 3.8 129 1.51
51 Serbia 6,540 9,424,030 -1.4 -0.5 0.5 0.0 9,490,218 3.0 663 1.26
52 Tunisia 6,228 11,235,248 1.9 1.0 0.1 0.5 12,525,418 2.2 493 1.23
53 Hungary 9,478 9,911,396 -0.1 -0.2 -0.3 -0.3 9,408,537 -0.8 653 1.23
54 Viet Nam 4,092 93,386,630 1.6 1.1 0.5 0.8 109,194,988 6.4 55 1.20
55 Slovakia 6,271 5,457,889 0.3 0.1 -0.1 0.0 5,463,349 2.7 1068 1.17
56 Morocco 4,079 33,955,157 1.5 1.3 1.1 1.2 43,445,867 5.0 134 1.16
57 Ukraine 8,868 44,646,131 -0.8 -0.4 0.1 -0.1 43,369,074 -1.4 129 1.12