When will the average flagship smartphone have a 5000 mAh battery? Probably around 2029

From 2007 to 2016, the iPhone’s battery grew from 1400 mAh in the first iPhone to 1960 mAh in the iPhone 7 (ignoring the new plus size iPhones). The energy density of lithium ion batteries grows at an exponential rate (5-8% a year), doubling every ten years, according to Tesla’s J.B. Straubel. The iPhone’s battery density growth is lagging this trend probably due to the continuous push for thinner phones.

Using Microsoft Excel’s exponential regression functionality, the following chart forecasts future iPhone battery sizes based on the available historical data, predicting that the small (non-plus) iPhone’s battery capacity will reach 5000 mAh around the year 2036:

Moving on to the more interesting new plus-sized iPhones, Excel cannot do an accurate automatic exponential regression due to the fact that there isn’t enough historical data available on the plus-sized iPhones. By examining the above chart and manually doing the regression using a second series, I found that Excel assumed an approximate rate of growth of 3.81%, and an approximate rate of growth of the rate of growth of 0.09%. Using these same rates on current iPhone Plus battery sizes, we get the following chart:

As it can be seen, around 2024 the iPhone Plus battery size reaches 4000 mAh, and around 2029 it reaches 5000 mAh. If the trend toward ever thinner phones slows, then the 5000 mAh smartphone battery might be achieved at an earlier date. I am hopeful that at least one large manufacturer is brave enough to bet on much larger batteries as a selling point, instead of following Apple’s lead in making things thinner and thinner.

When will smartphones have 1 terabyte of storage? Probably around 2021

While I’m no fan of Apple, the iPhone has so far been the leader in performance and storage. The internal storage of Apple’s latest and greatest iPhone provides a good benchmark for the current level of storage of the entire smartphone industry. When an iPhone with a new level of storage comes out, every manufacturer plays catch-up with Apple releases a flagship phone of similar storage.

Here is a chart that shows the trend in iPhone in internal storage. It extrapolates the trend into the future to predict when the iPhone will likely have one terabyte of internal storage (blue is historical storage levels, orange is predicted, and the dotted line is the trendline):

The chart assumes an exponential trend, since storage density and prices have followed an exponential increase and reduction trend.

I assumed that from 2018 through 2020, the iPhone will stay at 512 GB, similar to how it remained at 64 GB from 2011 through 2013. It is possible that instead of this, the iPhone will stay at 256 GB from 2017 through 2019. This will not significantly affect the historical trend.

Here is the same chart with the forecast extended to 2030. The trendline predicts an internal storage of 5 terabytes in 2027 and 10 terabytes in 2029.

I know that 10 terabytes in a smartphone may seem unnecessarily high. But historical trends show that every age can find good (and frivolous) uses for all the storage it can get.

Below is a table of every iPhone release date, device name, highest offered storage and battery capacity:

Release Date
Device Storage (GB)
Battery (mAh)
June 29, 2007 iPhone 1 16 1400
July 11, 2008 iPhone 3G 16 1150
June 19 2009 iPhone 3GS 32 1219
June 24, 2010 iPhone 4 32 1420
October 14, 2011 iPhone 4S 64 1432
September 21, 2012 iPhone 5 64 1440
September 20, 2013 iPhone 5S 64 1560
September 19, 2014 iPhone 6 128 1810
September 25, 2015 iPhone 6S 128 1715
September 16, 2016 iPhone 7 256 1960

How to search a document on Linux while ignoring diacritics (harakat/accents)

The Problem

Most applications are not smart enough to ignore accents when searching through the text of a document. Here is a screenshot of LibreOffice 5.2 failing at finding the word Arabic word “bsm” because I didn’t type in every single diacritic:

This is an especially serious problem when searching through Arabic text because the usage of diacritics is totally inconsistent as they are not strictly necessary. Different levels of diacritics are added according to the level of user-friendliness that is desired by the document creator.

Firefox is equally miserable at searching Arabic text:

The Solution

The solution is to open the document in a WebKit-based web browser, which has sensible handling of diacritics. Below is a screenshot of the open source Midori browser succeeding at finding and highlighting the Arabic word I was searching for even though I didn’t type in the diacritics:

Other WebKit browsers include Chromium and Chrome, both by Google. I would rather use a non-Google browser personally, so Midori is my preferred option.

If your document is not in the HTML format (the format that browsers use), you can use LibreOffice or Microsoft Word (etc.) to save it as HTML.

Fixing washed out colors in Ubuntu 16.10

How I improved the colors and brightness/contrast and the appearance of fonts on my Ubuntu 16.10 PC monitor

After moving to Ubuntu from Windows, one thing that has been constantly annoying me was the washed out/stark colors on my monitor and ugly-looking fonts in Firefox. I have spent hours fiddling with my monitor’s settings, color profiles on the Color tool, and various random font-related hacks using the terminal to no benefit.

Today I finally found the solution. It was to connect my monitor to my PC using a DVI cable instead of HDMI. Apparently there is an issue with communication between the Linux Kernel and most (if not all) monitors when they use HDMI and DisplayPort, at least this is what I understood from this discussion on Kernel.org.

One other possible solution is using this command (replace HDMI1 with the name of your display as given by the command /usr/bin/xrandr -q --prop | grep ' connected'):

xrandr --output HDMI1 --set "Broadcast RGB" "Full"

When trying the above, I kept getting this error:

BadName (named color or font does not exist)

Not wanting to spend the rest of my day troubleshooting this error, I took the brute-force approach of using a DVI cable that I fortunately had lying around in a closet.

How I solved “jQuery Ajax Uncaught TypeError: Cannot read property ‘type’ of undefined”

A solution for an error occurring during a jQuery $.ajax request.

I was using this common jQuery Ajax pattern on a page I am working:

    $(function () {
        $(document).on('click', '.create-domain .submit', function (e) {
            e.preventDefault();

            var data = {
                domain_description: $('.create-domain .domain-description-textarea')
        }

            $.ajax({
                type: 'post',
                url: '/process/something.php',
                data: data,
                error: function (data) {
                    console.debug(data);
                },
                success: function (response) {
                   //stuff
                }
            });
        });

But on clicking the submit element, I kept getting this cryptic error:

Uncaught TypeError: Cannot read property 'type' of undefined
    at r.handle (jquery-2.2.4.min.js:3)
    at e (jquery-2.2.4.min.js:4)
    at Gb (jquery-2.2.4.min.js:4)
    at Gb (jquery-2.2.4.min.js:4)
    at Gb (jquery-2.2.4.min.js:4)
    at Gb (jquery-2.2.4.min.js:4)
    at Function.n.param (jquery-2.2.4.min.js:4)
    at Function.ajax (jquery-2.2.4.min.js:4)
    at HTMLButtonElement. (something.php:575)
    at HTMLDocument.dispatch (jquery-2.2.4.min.js:3)
    at HTMLDocument.r.handle (jquery-2.2.4.min.js:3)

The problem was that in the data variable, I was including an HTML element (a textarea) inside the data variable, instead of including the textarea‘s content. Thus the corrected code is (notice the .val() at the end):

            var data = {
                domain_description: $('.create-domain .domain-description-textarea').val(),
        }

Hopefully this will help a few people, helping making the world economy more efficient by 1*10-12% (saving the world economy $107 USD over the next year).

Fixing the kworker CPU usage / ACPI errors issue on a Skylake motherboard (ASRock Z170 Pro4)

In which ASRock bricks my motherboard and a random $10 Chinese device comes to the rescue, with the help of a German gentleman

Since I no longer trust the spyware that is Windows 10, I have wanted to move my main PC (6700K CPU, R9 290 graphic card, ASRock Z170 Pro4 motherboard) to Linux for months now and finally did it yesterday. Everything worked as expected until, while working inside Ubuntu, I started getting messages that the computer was low on disk space even though I had allocated 25 gigabytes to the root partition.

Using ncdu in the terminal, I found that the log folder was taking up all the space, and found that /var/log/kern.log and /var/log/syslog were being written to at what seemed to be a rate of 1 MB/second, with endless repetitions of:

ACPI Error: Method parse/execution failed [\_GPE._L6F] (Node ...), AE_NOT_FOUND (...)

Another issue was that the kworker process was using constantly 100% of one of the eight CPU cores.

Forums suggested this was a motherboard firmware issue. So I decided to do a firmware update. My firmware was a pretty early one, something like version 1.5, while the latest available firmware is 7.3. I went to the UEFI interface and tried using the “Internet Flash” utility provided by ASRock. It successfully retrieved the fact that there was a 7.5 version update available to the firmware, but when clicking on update, it would conveniently fail to connect to the internet. Somehow the geniuses at ASRock had created software that could connect to the internet to ask if an update was available, but on downloading the update it would fail to connect to the internet. Still, I am glad that we are light years ahead of the pain, anguish and days of wasted labor that we used to suffer in the 90’s to fix a simple hardware issue.

I downloaded the BIOS binary file from the ASRock website, put it on a USB flash drive, and went to UEFI interface again, this time using the “Instant Flash” utility. The first time I tried it, the computer instantly crashed and rebooted, and nothing else happened. I tried a second time. This time it seemed to work, until the firmware update got stuck at 10%. I waited for hours to see if it would finish, but it didn’t. I left my computer on overnight, thinking that there might still be a tiny chance it would eventually finish. In the morning it hadn’t. So I hard rebooted my PC, and then nothing. It would turn on, but it wouldn’t give any output, not even the ASRock logo that shows at the beginning.

Knowing that the BIOS chip had probably become corrupted from the update and that I had probably upgraded my motherboard from an ASRock to an ASBrick, I looked to see what could be done. After yanking on the BIOS chip on the motherboard for a while, I found that it was designed to come off, so I took it out. I then learned about devices that can reflash a corrupted BIOS chip. I found out about the the Chinese device CH341A  that sells for about $10. I ordered one made by a company called SMAKN on Amazon with overnight delivery. This morning it arrived.

At first I was dismayed to see that there were three unattached pieces, I thought they might need soldiering:

But after watching this video by UltraNSC, I found that I wouldn’t be needing those pieces. I installed the software provided in the description of the video on an old but working Windows 7 laptop that I have, inserted the device, tried installing all the drivers in the file, and still the software (CH341A.exe) wouldn’t detect the device. I unplugged the device and moved to another USB port, and this time the software detected it.

The software detected that the BIOS chip had a size of 16 megabytes, similar to the binary file provided by ASRock. This was a good sign. I erased the BIOS chip with the software, then tried to open the binary file with the software but it wouldn’t detect it because the file provided by ASRock doesn’t have a filetype extension. I renamed the file to have a .bin extension, and now the software could see it. I loaded the file and clicked “Program” to write it to the chip. Everything worked without a problem. I clicked “Verify” to make absolutely sure the data was copied without error and that came out positive.

I put the BIOS chip back into the motherboard and turned the computer on. A message by American Megatrends came up, and clicking F12, it took me to the UEFI interface. I rebooted and was immediately taken into Windows as the UEFI had forgotten my preferred boot device order. Windows tried to do some sort of automatic repair then restarted the computer, at which point I went into the UEFI interface and told it to use my main SSD as the boot device. Restarting, I was taken into grub, and from there went into Ubuntu. Logging in, I saw that kworker wasn’t acting up anymore, and that the logs weren’t being flooded.

Now it is time to install Windows 7 in a networking-disabled virtual machine inside Ubuntu so that I can continue using OneNote and Photoshop without sending all my data to Microsoft. I have also kept my Windows 10 installation on another partition just in case I ever need it, for example to play Battlefield 1, though it seems I’ve become enough of an adult that video games barely interest me anymore, though I still enjoy watching Stodeh on Twitch.

Islam, the Good Parts: Guaranteed Basic Income for Women

One thing that is rarely mentioned when speaking about Islam, even among Muslims, is that Muslim women don’t have to work. They can work if they want to, but they don’t have to if they don’t want to.

Islam makes it the duty of a woman’s male relatives to take care of her financially. Men have to provide for their sisters, mothers, wives and daughters. This is not merely an act of charity that men are encouraged to do. It is their legal duty. In a devout Muslim society, no woman can ever be homeless as long as she has a self-respecting male relative.

This provides a tremendous sense of freedom for women, including single women, who want to do creative work. They can focus on doing what they like, for example growing a small business or a writing career, while enjoying freedom from the stress of having to earn a living. Instead of having to work for potentially abusive employers or customers, they will have the option of only choosing jobs they like and leaving whenever they want.

In a country like the United States where two incomes are often necessary for a small family to maintain a dignified existence, it may seem unrealistic (and potentially unfair to men) for such a system to be implemented. How can a few men provide for so many people? The answer is Islam’s mechanisms for wealth-preservation and the encouragement of productive investment that ensure the super-wealthy can never get too financially powerful and collude to lower wages as has happened in the United States, and also ensures that a single stream of income is generally enough to feed a large family. These mechanisms, such as the ban on interest and the speculation tax, will  be discussed later on.

There is one flip side to the system that needs to be mentioned. When inheritance is distributed, women receive half as much as men. Since Islam puts all financial duties on men, it rewards them by giving them a larger share of inheritance, as men’s wealth is, after all, also partially women’s, as a man is obliged to take care of all of his close female relatives. Islam, however, doesn’t run away with the idea of a male-provider society by giving all inheritance to men, since not all men can be relied upon to be good and fair care-takers of women. It also doesn’t run away blindly with the idea of equality by giving men and women equal shares of inheritance when it has burdened men with heavier financial duties. It chooses a middle ground between the two extremes. It gives men more duties and a larger inheritance, while also providing a fall-back in case of unfair and undutiful male relatives by giving women a half-share of inheritance.

The virtues and evils of such a system can be debated. Why not give men and women equality in all things? Islam’s view is that men and women are not identical when it comes to all things. It assigns different rights and duties to each sex depending on their particular strengths and weaknesses.

The main issue at question here is this: Is a system that takes the differences between the sexes into account more likely or less likely to be fair, compared to a system that assumes men and women are exactly the same? Is it unimaginable that differentiating between the sexes can lead to a fairer system of rights and duties compared to turning a blind eye to all differences?

Feelings run high when this matter is discussed. The only way to resolve the matter is to undertake large-scale scientific studies to find out whether sex-aware systems lead to better societal outcomes compared to sex-blind systems.

Does it improve the mental health and happiness of women for them to know they will never have to work, and for them to know that there isn’t one chance in a million for them to ever be homeless (given the potentially dozens of male relatives eager and willing to take care of them if they lose their homes or jobs)?

Does it increase or decrease a woman’s chance of career advancement for her not to have to worry about making a living while she focuses on her studies or work? Or is it better to put her in debt and compel her to work as a waitress or bartender so that she can make ends meet while she studies or grows her small business as it is done in the United States?

If we cherry-pick facts and anecdotes, we can make either system look good or bad, but rigorous and empirical comparisons can be done. We can fully resolve the debate through decades of unbiased social research  that compares the outcomes of an Islamic system to competing systems.

Any comparison’s of an Islamic system compared to others will have to take account of IQ, as IQ is the most important factor in determining a population’s prosperity. India is much poorer than China, for example, not largely because of Hinduism versus Communism or Buddhism, but because India’s average IQ is in the mid-80’s, while China’s IQ is above 100. Populations of equal IQ tend to converge toward having the same level of prosperity. China is in the same league as South Korea and Japan when it comes to IQ, so it is practically certain that it will reach the same level of prosperity as these two countries within a decade or two. India, however, is in the same league as the Dominican Republic and Paraguay when it comes to IQ, so as it develops, it will converge toward the same level of prosperity as these two countries. Of course, different population sizes and natural resources will affect things, but not to a great degree, and the larger the populations of the countries that we are comparing, the smaller will the effect of natural resources become. To study this topic further, I recommend the book IQ and the Wealth of Nations by professors Richard Lynn and Tatu Vanhanen.

To have a fair comparison of an Islamic system compared to others, we can compare ethnic Japanese Muslims to ethnic Japanese non-Muslims in Japan (similar IQ, same country) and see how Islam’s system of rights and duties affects the Muslim population compared to the non-Muslim one. Are ethnic Japanese Muslim women happier, more productive, more mentally healthy compared ethnic Japanese non-Muslims, or not?

Unlike Communism, whose adherents can claim that it wasn’t properly implemented when it fails, the Islamic system can be scientifically tested. The requirement is to account for IQ and devoutness (a Muslim who uses credit cards, mortgages and for-profit insurance is not following Islam properly and should not be counted toward the Muslim side). Examples of devout Muslim populations that can be studied are the conservative Muslim middle classes of Egypt and Malaysia. Egypt’s conservative Muslim middle class can be compared to the middle classes of non-Muslim countries of similar IQ (low-80’s), such as Honduras, Nicaragua and the Dominican Republic. And as for Malaysia (IQ 92), we can compare the conservative Muslim middle class there with the middle classes of Greece, Ireland, Bulgaria and Lithuania.

Solve the invisible spaces problem in Word 2013

An annoying issue in Word 2013 is that sometimes the space key seems to stop working, until you press a non-space character, at which point Word deigns to show you both the space and non-space characters.

To solve the problem, press enter to create a new line, then go back to your line. The problem is caused by a bug in Word where having a page break or section break right after the line you are on prevents spaces from showing. Make sure there is a line (empty or not) below the line you are typing on, and the problem disappears.

How to export the entire sequence by default in Adobe Premiere Pro CS6

  1. Move the yellow playback marker far to the right, until it goes into the blank area and the preview window becomes black. If you are doing batch work, move the marker farther than any of your clips are going to be. For example, if you are exporting 1 minute videos, move the marker to the 2 minute mark.
  2. On the bar below the playback marker’s bar, find the right end of the selection bar and move it to the far left, so that there are 0 seconds selected. The left end of the selection marker should also be to the far left, obviously.
  3. That’s all. Now when exporting, Premiere will automatically select the entire sequence for export.

Why there are so few Christian terrorists

Color me curious. Raised Protestant, joined American Navy and saw the world, the Dome of the Rock is a supremely beautiful building. Such beauty, why NO COMPASSION! by radicals? I don't understand the mindset. .. Beauty and hate

The issue is not religion, but politics. Radical Muslims are no different from radical communists. They believe their countries are being controlled and oppressed by evil capitalist tyrants, and that superpowers like the US are supporting the most evil governments on earth (such as in Saudi and Egypt), and that the US is against freedom and democracy if tyrants fit its needs better, all of which are true. For example, the US orchestrated a coup that ended democracy in Iran in the 50′s.

Religion just happens to be a useful tool for these groups, as it gives their followers the courage to die for their cause.

You should also not forget that many terrorist groups are funded by intelligence agencies, both Western and otherwise. If you are an intelligence agency looking to create havoc anywhere in the world, Islamism provides a great tool for this, since Islamist soldiers are brave and do not require the payments needed for hiring non-religious mercenaries.

Many in the Middle East consider ISIS a US-Israeli creation made to perpetuate war in the Middle East and prevent any Muslim country in the area from getting too strong or stable. For all we know, this might be true.

Radical Muslims could just as easily have been Radical Christians. It just so happens that the political situation in the world today has made Muslims the underdogs controlled and stepped on by mostly Christian superpowers. Christians too have a long history of justifying mass violence and murder for their own ends, but since Christians acquired supremacy over the earth after the Middle Ages, and as Christian belief weakened, Christianity stopped being an effective tool for carrying out political goals. A hot-headed Muslim is easy to convince that he is being oppressed, while it is a lot more difficult to convince a Christian, since he knows Christians rule most of the world.

Terrorism is not common among Muslims. A few in 100,000 might condone violence. But everyone ignores the remaining 99999. Why aren’t they terrorists also? Because terrorism is based on political ideas that most Muslims do not support.

Christianity can just as easily be used to create terrorism. But since modern Islamic terrorism was created by Christians (such as in Afghanistan in the 80′s) to accomplish the goals of Christian countries like those of the US in the Middle East, it is Muslims who die for it and Muslims who are mostly killed by it.

Muslim countries do not have the intelligence capacities to organize and support Christian terrorist groups in Christian countries to weaken such countries and create markets for their defense and intelligence industries. It is extremely easy to use Christianity to create terror groups, it just so happens that there is not enough money and power to be gained by the world’s superpowers through Christian terrorism, therefore they are instead spending their billions organizing and supporting Muslim terrorist groups.

And if Islamic belief weakens in the Middle East and stops being an effective terrorist-recruitment tool, the superpowers will simply switch to another ideology, such as communism or a modern incarnation of it. They would then create and organize communist terror groups to perpetuate war inside the countries they want, and Fox News will start talking about the dangerous communists next door who hate you because of your freedom.

Page 30 of 32
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32