Friday, 20 September 2019

Why songs repeat on your phone when played on shuffle?

When you have your favourite radio station playing songs that are not so favourite of yours the greatest thrill is to finally hear the intro of the one that you’ve been waiting for… for last three hours.

Well, those days are gone into the abyss of the past. We can have hundreds upon hundreds of our favourite songs right in our palm, literally. Our mobile phones have enormous capacities nowadays and it is easy to collect overwhelmingly large numbers of songs.

Many of these tunes are mildly amusing to us but we still keep them just because we can or we liked them initially, paid for them and now they’ve gotten old and we have moved on, yet we keep them for old time’s sake. Many a times, we just want to possess them but not really play them. But when you have over 500 tracks in your phone and you’re playing them on shuffle, somehow same songs keep repeating and the ones that you’re really waiting for never seem to play, just like old times when all you had was your trusty old radio.

I have suffered from the same first-world problem for a while now. I have recently bought and downloaded about half a dozen new tracks and dutifully included them in my 800 plus tracks long playlist. However, my phone seems to hate these tracks. They have yet to come on. I have played over 600 songs including all the repeats.

One afternoon, I had some time to kill and Microsoft Office handy. I decided to do some research as to why some songs play more often than others.

First of all, you must understand that the shuffle feature uses a randomization function included in every programming language that I have come across. It has different names in different programming languages but has the same purpose – to generate a random fraction between 0.000 and 0.999 inclusively. Once a random fraction has been generated any number can be returned by using simple arithmetic. This randomization can be used for electronic toss, generate lottery results or pick items from a list randomly. Our phones use the same randomization to randomly pick songs to play for us. However, turns out there is a caveat.

Randomization is not hundred percent random in a manner of speaking. Some numbers come up more often than others. Why? I don’t know. I did not dig that deep. What I did was run a hypothetical scenario with the help of randomization feature in Microsoft Excel and then analyzed it with Microsoft Access.

I created a list of integers, 1 to 850, each number representing a unique song in my phone. Then I asked Excel to randomly pick a number 850 times out of these 850 numbers. I repeated the process 5 times. In this hypothetical scenario, I have 850 songs. My phone played 4,250 songs – each song is counted each time it’s played, for example if Gangnam Style is played 5 times it’s counted as 5 songs. I wanted to see after 4,250 playbacks, going through 850 playbacks (total number of my songs) 5 times over, which songs were repeated and which ones were skipped altogether by the randomization system employed by the shuffle feature of music player application.
I gathered all the numbers and analyzed them. The result was surprising, if not shocking. In 4,250 hypothetical playbacks, 3 songs were never played and 29 songs were played 10 or more times. 161 songs were played 5 times. More than 96% of songs were repeated more than once.

37% of the songs were repeated more than 5 times when in 5 cycles of 850 playbacks, ideally no song should be repeated more than 5 times.

Interestingly, 30 songs were played only once and 44% songs were played less than 5 times.

This analysis reveals that using a simple randomization for shuffling songs in a playlist leaves much to be desired. Ideally, before the beginning of first song in any given playlist, the songs should be shuffled in a way that none repeat until all on them have been played at least once. It is not too difficult and might take a few milliseconds more than just randomly picking tracks from the list.

Sunday, 16 October 2016

The Muslim Burden

These days, if you look under any online article with any reference to Islam – direct or indirect – you will notice that the comment section is full of unbelievable hate, bigotry and xenophobic name calling against Muslims, provided that the host carrying that article allows comments in the first place. Based on writing style, references and demands made of governments, society in general and Muslims, you can easily deduce that almost all these posters of anti-Muslim vitriol are whites for whom white is the new black.

The targets of this hate are varied and singular at the same time. the common element in these hateful literary gems is Islam and their targets are Muslims in general, Muslim women, Muslim men, Muslims who immigrate to west, Muslims who never immigrated, Islam, Allah, Makkah, Medina, Arab Culture, attires associated to Muslims, Muhammad, Muhammad’s married life and last but not least Quran.

Here are some summaries of how hatred is thrown at some elements related to Islam and my responses:

Hateful Claim 1:

Muslims are always violent and every Muslim is out to kill non-Muslims.

My Response 1:

When was the last time you were killed by a Muslim just because you were not a Muslim?

Almost all highly publicised terrorist activities that are done in the name of Islam are perpetrated by the people who are influenced by Salafi school of thought or Salafism. It is a rather extremist branch or sub-sect of Sunnism, which itself is a major and extremely diverse sect of Islam. Many Arab states, including America’s overt and Israel’s covert ally Saudi Arabia, are politically dominated by Salafism. These states secretly facilitated the rise of ISIS or ISIL in Syria and Iraq. Before that, they heavily funded Arab and Afghan Mujahedeen in Soviet-Afghan war. After the end of the conflict and demise of Soviet Union, these Mujahedeen became unemployed and turned towards infighting and terrorism out of which Taliban and Al-Qaeda were born.

The problem is that the money talks. Salafis in Middle East have tons of it and they are still pumping it to spread their own extremist worldview. I do not know if they anticipated ISIS to get this out of control as it is threatening the same Arab countries that helped establish it, however, the fact remains that Arab money is not just talking. It is shouting its hatred in all venues available and accessible to the vulnerable young generations of Muslims. In today’s anti-religion society, most young Muslims have no idea what Islam is. Many, as a result, are exposed to Salafi propaganda machine which presents itself one and only real Islam and appeals to the thrill seekers amongst them. For many such young people, violence is extremely attractive way of getting noticed. A young Muslim kills a bunch of innocent people out in a street and gets killed alongside for the same reason as a young white man enters a schools and murders innocent students in cold blood and in the end gets shot, mostly by his own hand. In both instances, perpetrators might proclaim two very distinct reasons, however, the fundamental reason and motivation for such horrific acts are the same; untapped energy and lack of direction and narcissism.

Hateful Claim 2:

Muslim women cover their bodies because they are oppressed by men or they have been brainwashed.

My Response 2:

Western women like to exhibit their half or even fully naked bodies because they are oppressed by mass media run by men or they have been brainwashed into believing that they aren’t beautiful unless they show-off their goods in public or on warm beaches. Well that was a cheap shot. I apologise.

For many Muslim women, covering up in public is as normal as bikini on a beach for western women. Many highly educated strong Muslim women, who are extremely independent in their life choices, are choosing to follow the dress code known as Hijab as a personal choice. For them, it is not just a question of what their religion requires of them but also it is a principle of independence and personal identity. If you force a woman into what she might consider nudity, it would not only be misogynistic but also assault on her life, liberty and happiness. In your hate, do not forget that not all independent women are asking for freedom to go topless in public, some are asking for freedom to be covered-up and freedom to not put their most intimate parts on display in tight, minimal or no clothing at all.

Hateful Claim 3:

Arabs wear robes, which is somehow a bad thing, and they are towelheads.

My Response 3:

Not all Muslims are Arabs. In fact, only roughly 13% of Muslims are Arabs. However, I feel that it would be a disservice to my Arab ancestors if I didn’t explain the Arab attire to my fellow human beings with less skin pigmentation.

Just like in winters of Europe and North America when the temperatures dip below 0°C (32°F) bundling up doesn’t remain optional but a necessity, lack of which could have deadly results, in the summers of Middle East when temperatures soar above 40°C (104°F) baring it all to beat the heat does not remain an option and such an attempt quickly turns into a misadventure – even stupidity, if you will, and a deadly one at that. Arab clothing and headgear is the result of warmer climate and very hot summers of Middle East.

Before the advent of modern technology, Arabs had to work and travel in temperatures that were well above 40°C (104°F) on regular basis. In vast deserts of Middle East, it is not uncommon to find no sign of vegetation or trees, hence no respite from scorching sun, for hundreds of kilometers. In this kind of heat, if temperatures don’t kill you sunburn will. Arabs, over more than past two millennia, have developed their traditional garb not because of tradition or even religion but because of necessity and practicality. The Middle Eastern outfits are simple, practical and easy to maintain. They protect you from scorching sun and blowing sand and, at the same time, let breeze in and provide enough ventilation to help a human body keep a bearable, if not comfortable, temperature. In North America, many people, from various backgrounds, who work outside in summer, on really hot days often put a towel, handkerchief or some other piece of cloth under their baseball cap or hard hat to cover the backsides of their heads and necks from sun. Does this way of protection from heat remind you of something? It serves the same purpose as traditional headgear, called keffiyeh, worn by Arabs.

In conclusion, traditional clothing of Arabs was born out of practicality rather than religion and if someone from Middle East insists on wearing it in cold winters of North America it is not because of religious obligation but out of sheer pride on traditions and also because modern indoor climate control technology lets them do so. Some North American Muslims of mostly Indian background tend to wear Arab clothing with a belief that this garb is somehow Islamic, which is another sign of religious ignorance of modern Muslims.

Hateful Claim 4:

Muslims do not condemn terrorism and even tacitly support it.

My Response 4:

Imagine a scenario. Forget about scenario. Remember all those attacks on Americans on foreign soils where many US citizens were killed and injured and the attackers claimed that the attacks were in retaliation to US foreign policy? Since the end of Second World War, US has always been involved in one armed conflict or another with its boots on the ground on foreign soils. All those soldiers, while serving their country, end up dying for dubious reasons which are often extracted from the whimsical ideologies and beliefs of some hawkish politicians who managed to get elected with empty promises of better lives for average Americans.

How would an average American feel if someone came up to them and asked them to condemn and apologise for the actions of their government? An average American has nothing to do with the actions of US government and the reactions to those actions. No one is justified in asking any average American, who is not on a powerful position in government, to condemn unjust violence brought upon peoples of other countries by successive US governments.

All of the terrorism committed in the name of Islam is result of actions of different governments or reactions to those actions. US government is always one of those bungling administrations.

Just because US governments are killing people in the name of US, why should an average American be asked to vocally condemn such atrocities?

Just because terrorists are killing people in the name of Islam, why should an average Muslim be asked to vocally condemn such atrocities?

Hateful Claim 5:

Muhammad was a pedophile because he married a 6-years-old.

My Response 5:

First of all, the concept of pedophilia is very new and modern, and is not applicable to something that took place more than 1400 hundred years ago. People, in their raging hatred of Muslims, forget that marriage at much younger ages, especially for women, was common throughout the entire world. Even today, in many US states, even though a woman is considered officially adult at the age of 18, she can get married at the age of 16 with parental consent – a legal paradox which will make her husband technically a pedophile.

The most commonly cited source about the age of Ayesha, the supposed child-bride of Muhammad, is herself. Her claim that she was 9 at the time of consummation of her marriage cannot be historically verified. Some historians have refuted the claims about her being so young at the time of her marriage and have put her age between 16 and 19 at the minimum.

One explanation for Ayesha’s age is that like many Arabs of her time, Ayesha had a habit of using short forms of words in her conversation. This practice of diminution of words was not let down even for the numbers. Therefore, 16 became 6 and 19 became 9. This practice can be seen in North America during the conversations about motor vehicles and residential units. Price of a car can be 37 (meaning $37,000) or 14 (meaning $14,000). A new condo could cost you in low 200’s (meaning above $200,000 and below $250,000).

Muslim clerics, throughout varied cultures where Islam eventually became primary religion, have been promoting Ayesha’s supposed young age as a way of allowing for child marriages and to provide a religious cover to a cultural practice which eventually became first a transgression in the eyes of the society then a crime in the eyes of the law.

Conclusion:

Muslims don’t believe in Jesus’ crucifixion, however, he, being a prophet of Islam, provides them a guiding beacon with his patience and resilience against all the opposition and oppression which he endured. Those terrorists, who claim to be Muslims and followers of Muhammad and yet kill innocent non-combatant non-Muslims in the name of Islam, have forgotten that Muhammad’s charity didn’t ask the religion when he gave up his only meal in several days to feed a hungry, when his shoes were full of blood and he refused to wish ill of those people who made him bleed, when he tended to a sick old woman who used to throw garbage at him from her roof as he walked past her house.

Muhammad’s charity, Jesus’ suffering, Job’s patience, Abraham’s sacrifice, Moses’ strength, each and every one of these historical figures is a guiding beacon of Islam. All these prophets were sent by the same God to many different people to guide them to the same path of piety and care for fellow human beings. Some modern Muslims, in their quest for an Islamic Utopia, which never existed and they falsely believe that it did right after the time of Prophet Muhammad, have gone overboard and have brought destruction upon all those that they deem obstacles – including other Muslims – leaving a trail of dystopian carnage behind them. These so-called Islamists will never be able to realize the utopia that they seek for nothing of this sort is possible, and also because those who seemingly peruse a dream of caliphate are in this struggle not to achieve a goal but the violence that is supposed to achieve that goal. It’s not the destination but the journey that matters.

The ordinary Muslims, who have nothing to do with terrorism, who don’t even understand the reasons behind terrorists attacks and are even victims of majority of terrorism, should not be expected to apologise for things that did not do. However, an ordinary Muslim who is working hard to provide for his or her family is expected to constantly show remorse and be contrite for things he or she has nothing to do with. That’s the Muslim burden. A clown wears ridiculous makeup to show that he is funny, regardless of whether or not he is able to get any laughs. Sometimes it feels like ordinary Muslims are expected to constantly wear some kind of apology makeup to show others how embarrassed and sorry they are for the actions of what some other people did in the name of Islam. This burden is getting too much to bear.

Sunday, 19 June 2016

Microsoft Excel: Calculating Aspect Ratios

You have downloaded a video file from internet (hopefully legally) and when you play it, something just doesn’t feel right; the picture looks squished (basketball athletes look short) or stretched (supermodels look plus-sized models). You want to know the video’s aspect ratio and compare to what it should be from the looks of it. Most players will readily tell you the resolution of a video but finding its aspect ratio can be tricky if not impossible. Sometimes the information given is just not reliable.

You can reliably calculate any video’s aspect ratio – provided that you already know its resolution – by using following formula in Microsoft Excel:

=A2/GCD($A$2,$B$2)

Or

=A2/GCD($A$2:$B$2)

The only difference between these two formulas is that the first one uses references to individual cells as indicated by comma and the second one uses a range of cells as indicated by the colon character. In each case, refernces include only two cells, A2 and B2. A2 contains width of the video and B2 contains its height.

How to Use

Let us say you have a small video with a resolution of 320x240 which means its height is 320 pixels and height is 240 pixels. You want to calculate aspect ration of this video. First look at following screen capture:


Start a new work sheet. Just like in the picture above, type 320 in A2 and 240 in B2.

In A3, type =A2/GCD($A$2,$B$2) and press Enter. Click on A3, copy this cell in B3. In formula bar, the formula will look like =B2/GCD($A$2,$B$2). If you notice only one reference was updated in the formula, that is B2. It is because $ sign in a reference makes it absolute and tells Excel not to change it when the formula containing it is copied.

In above example, aspect ratio of your video is 4:3 or 1.33:1 if you divide both numbers by 3.

Here is another example:


Try doing it yourself and use =A2/GCD($A$2:$B$2) for this example. Here, too, the aspect ratio is 4:3.

Non-standard Aspect Ratio

Poorly processed videos, and most pictures and photographs available online have non-standard aspect ratios like in following example:


As per above calculation a video or a picture with resolution of 854x480 has an aspect ratio of 427:240 or 1.78:1 if you divide both numbers by 240.

Desktop Wallpapers

Sometimes you download or take a really nice picture and you want to use it as your desktop wallpaper. You know that your operating system will stretch or shrink the image to fit it on your desktop, however, if the aspect ratio of the picture is not same as your monitor, it will look squished or stretched. To find out beforehand if the photograph that you want to use is appropriate for your monitor you can use same techniques in Excel described above. Let us look at an example:



In this hypothetical scenario, we have photograph with resolution 5312x2988. Such resolutions are common in modern digital photography. In this example, the computer user still has an old CRT monitor with 1024x768 resolution. Using above formulas, the user finds out that the picture has modern wide-screen aspect ratio of 16:9 and his monitor is 4:3, which means he must crop the photograph to make it look decent on his desktop. In other words, before using a picture as a wallpaper for your desktop, make sure that its aspect ratio is exactly the same as your monitor. Pictures of equal and larger resolution than that of your monitor make better wallpapers with crisper edges and tones, however, if their aspect ratios do not match your monitor the results can be a bit unsightly.

Simpler Calculation: Ratios with Decimals

There is a much simpler way of calculating aspect ratios which can be done with any hand-held electronic calculator as well as Microsoft Excel. Let us take two resolutions from last example above. In each of 5312x2988 and 1024x768 divide each number on both sides of x with smaller of the two. For example, in 5312x2988 divide both 5312 and 2988 by 2988 – smaller of the two – to get 1.78:1. You can get same result by dividing both sides of 16:9 by 9. Similarly, with 1024x768 and 4:3, you get 1.33:1.

Despite these ratios with decimals are easier to calculate and more readily referred to in many technical literatures, they are not easily understood by most people as decimal numbers are not strong suite for them, or these numbers are not as straight-forward as ratios involving integers only. Personally, I prefer non-decimal (integer) ratios over decimal ratios.

Tuesday, 24 November 2015

Canada Post FlexDelivery: Review Appendant

This is second installment of (or shall we say a supplementary to) my earlier blog about Canada Post’s FlexDelivery feature.

After experimenting with some packages, delivered to my local post office, from different sellers I have come to the conclusion that unless a package is trackable with a tracking number, FlexDelivery system will not email you to notify that your package is ready for pick up at the post office.

Someone has mentioned in one of the comments under my previous blog on this topic that the packages ordered from abroad are not being notified about via email when they are at the chosen post office. In my experience, most sellers who send packages overseas – across the border in case of most of the US – they use the cheapest modes of shipping, which, in most cases, do not offer a tracking number; even if they do it is useful only within the country of origin of the shipment. The barcodes from other countries are not scanned by Canada Post.

My guess would be that if an overseas seller uses an expensive or more reliable shipping method, there is a good chance that FlexDelivery will notify the buyer about the arrival of his or her packages.

In my observation, when a good (read expensive) shipping method is used by a seller abroad, the parcels sent so, once they enter Canada, are given Canada Post’s own tracking number barcodes which will be scanned, unlike those issued outside Canada, at the time of delivery to the post office of buyer’s choice.

To put it simply, if your package is trackable in Canada, FlexDelivery will notify you by email about its arrival at your PO Box address. Otherwise you are liable to potentially lose your long awaited parcel if you do not obsessively keep checking with your post office either in person or by phone.

Sunday, 28 June 2015

Microsoft Excel: Cricket: Convert Balls into Overs

In cricket, converting balls to overs is equally difficult as overs to balls when there are fractions of overs involved. If a given number of balls is a multiple of 6 (each over has 6 balls) a simple division is enough. If not, then you have to take the remainder and convert it into fraction part of resulting overs. For example, converting 19 balls to overs gives 3.1. Divide 19 by 6, answer is 3 and remainder is 1, hence, 3.1 overs.

Unfortunately, Microsoft Excel cannot handle this hybrid system of base 10 and base 6 mathematics that is the specialty of arithmetic of Cricket overs. To convert balls into overs in Excel use following formula:

=TRUNC(J17/6,0)+MOD(J17,6)/10

J17 is the address of cell containing balls. Following illustrates an example of this formula in action:





In above example, each yellow highlighted cell contains aforementioned formula. Turquoise highlighted cell contains formula explained here. Runs were added using a formula detailed here.

Wednesday, 24 June 2015

Microsoft Excel: Cricket: Convert Overs into Balls

In cricket, any digit after decimal point of a number representing overs is not fraction of overs but the balls of next incomplete over; for example: 3.2 overs means 3 overs and 2 balls. Converting 3 overs into balls with or without Microsoft Excel is simple. All you have to do is multiply 3 by 6 which would be 18 balls. To convert 3.2 overs into balls, first you multiply 3 by 6 to get 18, then add 2 to get 20. This can be a little challenging in Microsoft Excel too. To make it simple, use following formula:

=INT(J2)*6+(J2-INT(J2))*10

J2 is the address of cell containing overs with or without fraction. Following illustrates an example of this formula in action:



In above example, each yellow highlighted cell contains aforementioned formula. Turquoise highlighted cell contains formula explained here. Runs were added using a formula detailed here.

Thursday, 18 June 2015

Microsoft Excel: Convert Centimeters and Meters to Feet and Inches

Microsoft Excel does not have a built-in function to convert any measurement of length into inches and feet with single and double quote. Therefore, I have following formula that can convert any length specified in centimeters into feet and inches of x' x" format:

=TRUNC(B3/2.54/12)&"' "&TRUNC(MOD(B3/2.54,12))&""""

B3 is the address of cell containing centimeters.

Practical example:


Similarly, to convert meters into feet and inches of x' x" format use following formula:

=TRUNC(B8*100/2.54/12)&"' "&TRUNC(MOD(B8*100/2.54,12))&""""

B8 is the address of cell containing meters.

Practical example:



Warning: There are two disadvantages of above two formulas. First, results (6' 1" & 5' 3") are in text format rather than numerical format, therefore, they cannot be used in further calculations. Second, for simplicity sake, fractions of inches are simply dropped, not rounded off, but dropped.

Following formulas will round off inches to the nearest integer:

cm to ft' in"

=TRUNC(B3/2.54/12)&"' "&ROUND(MOD(B3/2.54,12),0)&""""

m to ft' in"

=TRUNC(B8*100/2.54/12)&"' "&ROUND(MOD(B8*100/2.54,12),0)&""""

Sunday, 14 June 2015

Microsoft Excel: Adding Overs in Cricket

Those of you who know the gentlemen's game are aware of the fact when talking about overs, the number after the decimal point always indicates balls that have been bowled. For example: 6.5 overs means 6 overs and 5 balls, 11.2 overs means 11 overs and 2 balls, and so on so forth.

Since each over has 6 balls, here is how mathematics of cricket overs works:

 
In first line, we are adding 1 ball to 6 overs and 5 balls resulting in 7 complete overs. In second line, we are adding 4 balls to 11 overs and 2 balls resulting in 12 complete overs. In third line - that's where things get a little interesting - we are adding 2 overs and 3 balls to 5 overs and 4 balls. Adding 3 and 4 gives us 7. Since an over cannot have more than 6 balls, we mentally subtract 6 from seven and get 1. We turn 6 balls - that we just subtracted - into 1 over and carry it over to other side of the decimal point and add it to 5 and 2. Using the example of elementary arithmetic we get:

This seems like a hybrid of base 10 and base 6 mathematics. Since base 6 is not built into Microsoft Excel, doing this kind of addition can be challenging, if not impossible, in a worksheet.

You can use following rather complex formula to add overs of multiple players in a score card:

=SUM(TRUNC(C2:C10,0))+TRUNC(SUM(C2:C10-TRUNC(C2:C10,0))*10/6)+MOD(SUM(C2:C10-TRUNC(C2:C10,0))*10,6)/10

C2:C10 is the range of cells that contains overs that you want to add. Here is this formula in action:


Another slightly modified example:


Remember: Above formula is of a special kind called array formula. After you have typed or copied this formula in your worksheet, press CTRL+SHIFT+ENTER to calculate. Every time you edit this formula, you will have to use same three keys to recalculate.

Thursday, 11 June 2015

Microsoft Excel: Sum of Cricket Runs with Not Out Asterisk

If you are trying to add runs of individual batsmen of a cricket team using Microsoft Excel, you soon realize that the software skips the score with asterisk (example: 32*) indicating not out. The reason behind this is that Excel treats the value of cell containing a number and asterisk as text, therefore, does not include it in SUM function.

Following formula can solve this problem:

=SUM(B2:B9)+LEFT(B10,LEN(B10)-1)

B2 is the cell containing runs of first batsman and B9 contains the score of second last batsman. B10 contains the score of last batsman who is not out. This cell has asterisk with a numeric value.

Here is an example of this formula in action:


The total of 174 was acquired by using above formula.

Warning: For a scorecard where all batsmen are out use following simple formula:

 =SUM(B2:B10)

Using this simple formula in above example will result in false total of 171.

Let us take a look at more complex situation on a score card. This is most common one. At the end of a match we usually have two batsmen who are not out, hence, have asterisks with their runs. For such a situation, use following formula to add runs of all batsmen:

=SUM(IF(RIGHT(B2:B10,1)="*",LEFT(B2:B10,LEN(B2:B10)-1)*1,B2:B10))

Remember, this is not a simple formula. It is a special kind of formula called array formula. Here is how you use it.

B2 is the first cell in the range containing list of scores and B10 is the last. As always, you'll have to change it to the range of cells that you are using. After you have typed or copied this formula in your worksheet press CTRL+SHIFT+ENTER to calculate. In the formula bar, the formula will look like this:

{=SUM(IF(RIGHT(B2:B10,1)="*",LEFT(B2:B10,LEN(B2:B10)-1)*1,B2:B10))}

Important: Every time you edit this formula, use CTRL+SHIFT+ENTER to update the results.

Here are two examples of this formula in action:

Example 1:

Notice that the positions of two not out batsmen don't affect the calculation.
Example 2:

Here B2:B10 was used as range. Notice that blank cells also don't affect the calculation.

Wednesday, 3 June 2015

Canada Post FlexDelivery: Early Review

In early May 2015, Canada Post introduced a new parcel delivery feature which has been dubbed FlexDelivery. It is simple enough and cheap enough – it’s free – that it can easily attract a huge following among online shoppers… IF it works.
Don’t get me wrong. It works but only 50%. At least that is the case in my experience.
FlexDelivery is very similar to buying a mailbox in your local post office but it’s free and it has better perks.
  • You sign up for FlexDelivery online at www.canadapost.ca.
  • You choose post offices that you would like to pick up your parcels at. You get a different address for you for each post office. Each address will have a P.O. Box in it.
  • Instead of your own address, you use one of your post office addresses for receiving parcels.
  • Once your parcel is at the post office ready to be picked up, you get an email alert.
I am of the view that for FlexDelivery to work two things have to happen.
  1. Your parcel has to get to your chosen post office. CHECK
  2. You should be able to pick up your package at that post office. MEH
To be able to pick up your package at the post office you should be notified first that it is there. You see, in my case, I never did get that notification that was supposed to be emailed to me.

I checked my email daily, kind of obsessively, to no avail. Called Canada Post a couple times. They gave me no reason FlexDelivery might be at fault.

Finally, one day, I walked into my local post office and poured my heart out. The little old lady at the counter looked at my ID, without saying anything, walked into the storage room behind her and came out with a parcel with my name on it. It was revealed to me that the much coveted package had been there for an entire week.

I called Canada Post and inquired as to why I had not received any emails as promised by their website. I have been told that I am the first person, who has had problem with email feature of FlexDelivery.

Now I am thinking I am probably the first person who has signed up for FlexDelivery. I never signed up to be a beta tester of a pilot project.

Did I mention you have to persuade your shipper to use regular mail and not one of the couriers like Purolator, UPS, FedEx or DHL?


See also:

Sunday, 24 May 2015

English-Urdu False Friends

For those of you who don't know, Urdu is national language of Pakistan. It is written right-to-left in modified Arabic script.

False Friends are pairs of words from two languages which have different meanings in each language but they sound almost or exactly the same. One example is the word die. In Dutch it means that one and in English - well you know what it means in English. I think you get the point.

There are several words in Urdu that have false friends in English with totally different meanings:

Following is a small list of English words and their totally different meanings in Urdu:


English Word Definition in Urdu
Ball Hair, Child
Bay 2nd letter of Urdu, (prefix) Without
Be (loosely) Ma'am
Bean A musical instrument
Bot Weights for scale
Bus Stop, End, Enough
Car Work, Action, Act
Cheese Thing, Object
Chore Thief
Coffee Enough
Façade Corruption, Riot, Infighting
Fay 26th letter of Urdu
Fuck Pale (usually with fear)
Gall Cheek
Gee Yes
Gill A clan of Jat people
Gnaw No
Hay 9th and 33rd letters of Urdu
Hey 9th and 33rd letters of Urdu
Late To lie down
Light Electricity
Mall Money, Wealth
Naw No
Noon 31st letter of Urdu
Now Boat
Or And
Ore And
Pawn A chewable stimulant made of Betel leaf and tobacco
Pit To lose a contest
Pore Part of Finger
Pull Bridge
Ray 14th letter of Urdu, (a rude way of addressing someone) hey, you
Seen 18th letter of Urdu
Shean 19th letter of Urdu
Wow 32nd letter of Urdu
Yay 35th and 36th letters of Urdu

I will update this list as new words come up. Please visit again.

Last Updated: September 12, 2017

Tuesday, 28 January 2014

Blueprint Films and Pakistan

Growing up in Pakistan, young boys, as they hit puberty and start getting curious, come to know of mythological existence of Blueprints or Blueprint Films (and pictures).

The legend is that in these Blueprints “films” or photographs naked people engage in open debauchery for your viewing pleasure. As an inevitable consequence, Blueprint is a dirty word and is not menat for a polite company. Its abbreviation, BP, is also not meant to be said unless it is in the context of medical health of a person in which case it simply refers to blood pressure.

My dear Pakistani men and boys, I have a bit of bad news for you. There is no such thing as Blueprint films, or pictures for that matter. In other words, Blueprint does not mean dirty films or photographs. Outside Pakistan, blueprint is not a dirty word. (I have been told that our favourite enemies in the east and frenemies across east are also suffering from same lingual incertitude.)

According to a dictionary1 following is the meaning of blueprint:
a photographic print in white on a bright blue ground or blue on a white ground used especially for copying maps, mechanical drawings, and architects' plans

In simple words, blueprint is a technical map or drawing of a building or machine drawn with white lines on a blue background.

Here are some examples of real blueprints:

Blueprint of an old airplane

Blueprint of spaceship from Star Trek

Blueprint of Batman's car

In normal conversation in English language, blueprint often means a plan or scheme.

In olden days, dirty movies were referred to as blue movies which somehow became blueprint movies in Pakistan. The terminology of blue movies still exists but is rarely used in English language.

Therefore, my dear Pakistanis, STOP using the word blueprint for dirty films.

References:

1. "Blueprint." Merriam-Webster.com. Merriam-Webster, n.d. Web. 28 Jan. 2014. .

Saturday, 27 April 2013

Spreading Islam: Why Taliban Kill Muslims

Spreading Islam. It’s a funny little phrase. Sounds a bit naughty. Believe me, it is. But Taliban of every sort would argue that it is better than spreading cheeks in public or spreading legs for every warm body.

It is not so nice of Taliban to kill so many Muslims like cockroaches and make silly excuses like Jews do claiming anti-Semitism: “They looked at us the wrong way.” “They talked about us, which we are sure was disparaging to us in some way.” You have to understand that behind their petty indiscretions like indiscriminate massacre of Muslims and innocent little excuses afterwards is hiding a purpose which is larger than all of us. “How could the killing of followers of Islam be is spreading Islam?” you might ask. Come on! Ask away! I have the answer ready.

You see, there are many Muslims in this world, over a billion or so. Obviously most of them are not good Muslims by any definition devised by Taliban. Islam is like a cake. A very delicious cake, all chocolate with chunks of dry cream sprinkled on top. With too many bad Muslims claiming a share in this cake – I mean Islam – there is not enough to go around among the Muslims whose names can fit in about 6% rows of an average computer spreadsheet. Good Muslims, for obvious reasons, should get bigger share than bad Muslims. Therefore, Taliban, by killing bad Muslims, who seem to be as many as cockroaches in the world, are dividing the cake of Islam over the population of a few good Muslims in bigger pieces. Then why would they kill non-Muslims, especially westerners? It is very easy to understand. By killing non-Muslims Taliban kill two cockroaches with one bullet (or bomb if they so choose). One less non-Muslim doesn’t just mean one less infidel. It also means one less potential Muslim or one less potential claimant of the cake known as Islam. Among the targets of Taliban, non-Muslim victims account for less than 20%.

Failure to kill an infidel is also a kind of success. Any attempt to kill infidels that is successfully thwarted instills a kind of fear and hate in the beating hearts of potential victims and their sinful society that they not only make life hell for bad Muslims living among them – latter almost renounce their Islamic faith (fewer Muslims, yes!) just to survive in that evil society – but also forswear any possibility of ever exploring murky waters of a savage cult and/or ever becoming Muslims.

For Taliban, it’s always win-win or, in some cases, win-win-win situation.

Happy Kaboom!

Sunday, 30 December 2012

Counterfeit Ink for Epson Printer: How Counterfeiters are Getting Better

If eBay is not a paradise for counterfeiters and fraudsters it isn't exactly a hell. I have to admit that eBay and its sister company, PayPal, are doing a phenomenal job in preventing fraud and helping fraud victims. However, there is caveat in their policies which helps perpetrators victimise unsuspecting customers.

That caveat is 90 days. Yes, 90 days. You have to report or file your dispute (an umbrella term for any suspicion of fraud or actual disputes used at eBay) within 90 days of purchase through PayPal and this is only valid if you paid using the same. That is why I did not file a dispute against the seller of Rock Mobile Disk. (see Review: Stay away from Rock Mobile Disk)

I have a printer which cost me $60 and I bought directly from its manufacturer and its ink – the whole set of four cartridges – costs me almost $100+ dollars. However, there is a solution which involves eBay. I can buy genuine – not generic – ink cartridges for my printer from sellers on eBay at a fraction of their original cost. I have been doing this quite successfully for a long time. Until recently.

I bought several cartridges of ink from a seller (eBay username: daily_office_supplies) in USA at almost 50% of original cost. The seller made it clear that he will be shipping them in plastic seals only without cardboard packaging to save shipping cost. Nothing suspicious there too. It had been done by other sellers too and cartridges turned out to be just fine.

After I received the cartridges, I kept them in a box for later use. Fortunately, my printer had to do some overtime on printing resulting in it demanding two cartridges be replaced. I replaced them. Immediately printer started skipping and missing and leaving big gaps in prints; a sure sign of clogged nozzles. I cleaned them to no avail. I cleaned them twice. I cleaned them thrice.

Incensed, I called Epson, my printer’s manufacturer. They patiently helped me. Helped me. And helped me again, until I got a clear, near perfect print out. I had to change several cartridges during the process. Here is a point to be noted. Every time I changed a cartridge, I replaced it with one bought from same seller, daily_office_supplies. After two agonizingly frustrating days, I decided to check and match the empty cartridges that I initially replace with new ones. The similarities and differences were uncanny.

It wasn't my printer's fault that the prints were coming out lousy. It was the ink cartridges all along.
First thing that made me believe that there could possibly be nothing wrong with the new cartridges was their plastic seal packaging. Look at the following photographs. These seals contained the faulty – or shall we say counterfeit – ink cartridges.
 
They are the typical plastic seals that most Epson cartridges come in. Until I threw them out I had been unable to find any infamous spelling mistakes which counterfeit products' packagings are supposed to have.

Note that my printer uses following epson ink cartidges: T069220, T069320, T069420, T069520

These are SKU codes. They also appear as T0692, T0693, T0694, T0695, i.e. with out trailing 20.

Now let us examin the differences between an original and a fake cartidge in some photographs. The cartridges that I am using in my comparison are T0692 or T069220 which is cyan colour.

First Picture

1

Original: Green electrical part is securely fixed in the cartridge. Also it is even and straight surface.

Counterfeit: Bottom end of green electrical part seems loose and not secure. It is bent near the metal parts.

2

Original: There is slit separate from green electrical part just blow its bottom end.

Counterfeit: There is a huge gab below the green electrical part.

3

Original: Design is complex and pinch clip is wide.

Counterfeit: Design is simple and pinch clip is narrower.

Second Picture

1

Original: Pinch clip is thick and smooth,

Counterfeit: Pinch clip is thin and and has holes in it.

2

Original: Word EPSON etched in the surface.

Counterfeit: Word EPSON is missing.

3

Original: Left side layer is thick.

Counterfeit: Left side layer is thin.

Third Picture

1

Original: Complex design and notice the letter H near top left corner.

Counterfeit: Simple design and the letter H is missing.

2

Original: More pronounced groves and no barrier on either side of the groves.

Counterfeit: Groves are less pronounced and there is barrier on their left side.

Fourth Picture

1

Original: Structures above and below ink hole are thicker and smoother.

Counterfeit: Structures above and below ink hole are thiner and uneven.

2

Original: Thin and thick horizontal lines and the hole is deep.

Counterfeit: Both lines of plastic are thick and the hole below them is shallow.

3

Original: Base is wide.

Counterfeit: Base is narrower.

Fifth Picture



1

Original: Smaller print is thinner and SKU code is underlined.

Counterfeit: Smaller print is thicker and SKU code is not underlined.

2

Original: If you enlarge the picture you can see the word EPSON etched into the plastic. Similarly there are some numbers etched near the bottom end, too below the company name. Overall structue is also more complex.

Counterfeit: Etched word and numbers are missing. Structure is simpler and smoother.

3

Original: Overall structure on left side is much more refined and there is circle on right side of the pinch clip.

Counterfeit: Overall structure on left side is crude and the circle from right side of the pinch clip is missing.

Sixth Picture


1

Original: SKU code is underlined. Words Cyan are thinner.

Counterfeit: SKU code is not underlined. Words Cyan are thicker or bolder.

2

Original: Matrix code is lighter with more gaps.

Counterfeit: Matrix code is darker with fewer gaps.

In conclusion, counterfeiter are becoming more and more sophisticated and unreasonably high prices of easily manufactured products give an open invitaion to such criminal minds to target the bargain hunters who are looking for more bang for their buck.

Although, it is a buyer's responsibility to do due diligence when purchasing any product online from an unknown seller, however, companies like Epson should give a chance to some reason and common sense when they charge $100+ dollars for a $60 printer.

Be safe and prevent fraud!

Saturday, 3 December 2011

Rolling Heads

Pakistan Army is invincible; except in wars against foreign aggression or local insurgents. In these two situations it is helpless. It acts like a wailing child who, in between his uncontrollable tears, threatens to tell mommy.

That’s what has been proved since Lal Masjid incident until now and before that in three and a half wars against India. Nevertheless, rest assured no matter what happens no general will ever lose his job because he blundered. He will lose his job only when he becomes a serious liability for other generals. Because it’s all business. Even then this general will enjoy full immunity from any legal proceedings. Point in case: Musharraf.

We quit 1948 war, left the task incomplete; we started and lost 1965 war and lied to the entire nation and perpetuated that lie by celebrating Defence Day on every September the 6th ever since. We lost half the country in 1971. We dug a hole ourselves in 1999 and got stoned in it; and stonewalled diplomatically. Tell me how many generals lost their jobs that can be historically acknowledged as a result of all these “little” incidents? Has any general ever been arrested or tried for any blunder causing thousands of civilian and military deaths?

After alleged killing of Osama bin Laden in Abbotabad – which was a clear military attack on country’s soil, a declaration of war by US against Pakistan – the first thing military wanted the public to know was that “no heads will role”. Translation: “Do not expect any general to lose his job for such serious failure of intelligence and inability of the military to defend the sovereignty of the country.” Many politicians would have been more than happy to try and hang Raymond Davis if it weren’t for Pakistan Army’s everlasting bittersweet love affair with USA that saved their illegitimate child that killed two Pakistanis on Pakistani soil at point blank in cold blood. Davis killed two Pakistanis like cattle and guards of his jail cell were not allowed to carry their duty weapons.

After the deliberate slaughter of 24 Pakistani soldiers by NATO air power I do not expect any positive steps from military brass. Sooner than later everything will be business as usual. This Army is Alzheimer’s patient when it comes to USA and its allies. I truly believe that those 24 Shuhadaa had neither the weapons nor orders to defend themselves from NATO’s murderous aerial fire power. At this point the least the Army could do is roll the heads of General Kiayni and General Pasha and start an inquiry against them for not acting against foreign aggression.

The Oasis of Democracy

When it comes to undeserving flattery, our bureaucrats and diplomats do it with the utter stupidity of a court jester without realizing the kind of embarrassing position that their naïve attempts to secure their seats are putting Pakistan in. After all their appointment letters did not designate them national clowns. The latest example of such epic foolishness comes from our High Commissioner to UK, Wajid Shamsul Hassan, and his interview with CNN correspondent under the shadow of yet another national embarrassment – death of 24 soldiers by the NATO forces and Pakistan’s helplessness in its face.

During the interview when asked to comment on NATO attack on Pakistani outposts, Mr. Hassan found it important for “broader national interest” to kiss the stinky behinds of the rulers of the ruling party. Instead of highlighting grave diplomatic and military implications of such open aggression and its effects on Pakistan’s ever so fragile democracy, which is already crippled by perpetual corruption, he went on to call Pakistan “the Oasis of Democracy in the region”. The utter shock and disgust mixed with disbelief on the face and in the voice of the interviewer is impossible to describe in words. In a typical sarcastic tone, which can be observed in a western born female only, she queried, “Pakistan is the Oasis of Democracy in the region?”

Despite living in the UK and supposedly working as Pakistan’s diplomat over there, Mr. Hassan seemed unaware of vocal and tonal expressions of the locals as he looked completely unaffected by the obvious and razor sharp sarcasm in the voice and the words of the interviewer. He kept on talking, shamelessly. This whole part of his mindless rambling can only be translated as following: “Pakistan is the Oasis of Democracy in the region because Mr. Zardari is in charge of this democracy.” I have never seen such poor choice of words even by the world famous lingual disaster former president of US George W. Bush. Pakistani politicians are famous for losing wars in table talks. Now you know why. Diplomacy is a war of words and with such commanders at the helms of our frigates we are doomed to failure.

Thursday, 9 June 2011

Don't Blame Rangers Only

Pakistan Rangers, a paramilitary force, has been accused of killing an "unarmed teenager" in Karachi. However, one should try to understand full context before quickly pointing fingers at Rangers. BBC Urdu has a 1:02 minutes long video which a close consideration reveals many clues that support Rangers' point view.

In the video, a young man is taken towards the paramilitary force personnel by an apparent civilian, who in a very frank manner waves something towards Rangers and says, "This is the gun and money". Upon close inspection one can clearly see that there is a hand gun wrapped in that piece of cloth - a standard practice in Pakistani law enforcement agencies to keep fingerprints safe. It appears that the young man is being accused of armed robbery, to which he seems to confess by saying, "It is a fake gun" and "I am forced (by circumstances)". Rangers clearly seem to be confused and a lack of proper training is apparent.

They, however, according to most reports, shot him on his limbs and he still succumbed to his injuries in the hospital. Did anyone ever stop to ask what kind of medical facilities were available in that hospital or how fast was he taken to the hospital or how many doctors were actually in the hospital.

When the whole system is broken, you cannot blame just one institution because it is easy to identify.

Saturday, 8 January 2011

Salman Taseer Murder Justified

Since I have heard the news about Salman Taseer’s brutal murder I have been incessantly reading news and articles from Pakistan’s English language news sources which have been shedding light on this incident from all imaginable angles but one.

These English language journals, which are reputed to be leaning towards educated westernized public with very liberal tendencies, seem to be deliberately ignoring the root cause of this murder, elimination of which, if done on time, could have saved not only Mr. Taseer’s life but also the lives of so many other so-called liberals who were not news-worthy enough.

During more peaceful years in our country, the nation was, for the most part, preoccupied by a host of problems which could be summarized as corruption; which along with the resulting government incompetence has been costing Pakistanis lives in more ways than we can imagine. From roads to hospitals, from government offices to police constables on the street, from nursery classes in a government school to the offices of the prime minister and the president, the infusion and perpetuation of corruption and ignoring the problem as an inevitable part of living in Pakistan has been costing us lives. Do we have stats about how many Pakistanis are killed in easily preventable violent crimes? Do we have stats about how many Pakistanis are killed by police under the pressure from mafia, feudal lords and politicians? Do we have stats about how many Pakistanis are killed by the lack of health care, lack of medicines or counterfeit medicines? Do we have stats about how many Pakistanis are killed by unqualified doctors? Do we have stats about how many Pakistanis are killed by unhygienic water and food? Do we have stats about how many Pakistanis are killed by the lack of food because they can’t afford any?

Admit it or not, to most Pakistanis, Salman Taseer was nothing more than another stooge of corrupt, Mr. 10 Percent Zardari. Revelations about his affluent lifestyle outraged so many Pakistanis who are on the verge of suicides because of their economic and financial direness. Apathy towards the general public and swiftness of efforts to appease western powers in order to perpetuate their reign has been a signature of virtually all of Pakistani governments including the current one.

For decades, mullahs have been blaming the lack of Islamization for all the problems facing the country and have been attempting to present themselves as the ones who are able to bring about a utopian Islamic society. Until such a society is established, murder of anyone and everyone, according to theses contractors of religion, is perfectly justified. What if innocents are killed along with the “guilty”? You get three answers depending on the religious school of thought of the responder. They are guilty otherwise they must have survived; they are shaheed because their death was accidental; or no one is innocent. Pick one that suits your sectarian leaning. These mullahs and maulanas conveniently ignore the fact that the West has been dominating the entire world for about half a millennium now without any Islamization.

We Pakistanis have a mob mentality and this mob is tired of looking at the governments for the relief. Far too many heads are turning towards the imams of religious fanaticism, who seem to have a very simplistic but brutal worldview which bodes well with the decades of frustration and resentment boiling in the hearts of the public. The lava oozing from this volcano of the public is being streamed by the will of the venomous ulamas; for whom punishment for any disagreement is nothing short of murder.

This mob of turning heads is suicidal. By killing Mr. Salman Taseer they have merely stabbed themselves once more. In a society, where corruption and nepotism is a norm, where ruling elites have no roots in the very nation they are supposed to lead, where short term benefits for selected few always get preference over wider interests of the public, no leader can safely say that he is not going to be hit by the same boomerang with which he has been victimizing so many.

Taseer’s murder was justified not by any secular or Sharia law but by the lawlessness resulting from the corruption and incompetence in every rank and file of government. The very fact that a fanatic like Mumtaz Qadri was able to slip through the gapping holes in government's security apparatus and approach such a VVIP justifies the murder of Salman Taseer, late Governor of the Punjab.

Thursday, 6 January 2011

No Pardon for Asia Bibi


In a quest to appease overly secularized western powers that still identify with Christianity more than ever, late Governor of the Province of Punjab Mr. Salman Taseer didn’t give much thought to the consequential possibilities emanating from what he said and how he said it. Son of a highly respected poet and intellectual did not seem to care for the highly reputable legacy his late father left for him. His worst mistake in the wake of Asia Bibi case was not what he said about the so-called blasphemy law but what he tried to do. His worst blunder was to seek presidential pardon for Asia Bibi.

Given the detailed accounts of Asia Bibi case, the events thereon and onwards, I am very much convinced Asia Bibi is innocent of blasphemy in the true sense of and spirit of Sharia. After the quarrel with her Muslim co-workers who deemed her unclean despite the contrary verdict from Islam about the People of the Book (i.e. Jews and Christians), in the heat of heightened emotions, Asia Bibi might have let something slip that could be contrived into a blasphemous statement and given her Muslim co-workers an idea as to how to go after her with a legal tool which is so easy to abuse.

Nevertheless, under the Sharia law, if she was guilty of slightest slip of tongue, a simple official apology from Bibi will suffice to let her go as a free citizen.

Despite all of my speculative analyses, I still think she never said or did anything criminal under blasphemy law. A fair trial in higher courts can easily prove that. Then why do I say “no pardon for Asia Bibi” you say. It is because a presidential pardon under any condition implies a guilty verdict from none other than the President. A presidential pardon will jeopardize her life even more and possibility of her murder by any members of the public convinced of her being guilty clearly implied by the pardon - not to mention, extra judicial, unethical, illegal maneuvers to please the foreign powers - will be closer to becoming reality.

Asia Bibi should go through a fair trial and best way to help her for any sympathizers would be to grant her legal and financial help in her judicial case. The details of court proceedings and statements of involved parties should be widely made public through print and electronic media in order to draw a clearer and unbiased picture of the facts in the minds of general public of Pakistan. All the accusers should be brought to court and should be punished for perjury and false accusations after the acquittal of Asia Bibi. If possible, Islamic punishments should be implemented on accusers if they are found guilty of laying false accusations.

Thursday, 26 August 2010

Black Rappers and Islam

I don't know if there are others out there who think like me but here it goes. I, sometimes, think, feel or even tend to believe things which I don't want to be true. That is true about my feelings about relationship of black celebrities, primarily rappers, with Islam.

As a Muslim, I feel immense happiness and delight when I hear about a western's and specially a celebrity’s conversion to Islam. However, I feel extremely wary and sceptic of the intentions and motives behind the conversion of black rappers to Islam. This feeling is not racist but is based on the culture of these celebrities. Most rappers - most of whom are black and very few white - build their image as rebels and base their personas on a sort of aggressive machismo. My stress here, however, is on the word "rebels". The hip-hop culture sounds to me a culture that prides itself as the rebellious against the society and the norms which bind it together.

With all this in view to me it seems like that the conversion to Islam is not a leap of faith but an act of rebellion against a primarily Christian society which is supposedly dominated by white Christians. It sounds like they are endorsing Islam just to tick off general American society which is lately being seen as more Islamophobic than ever before.

Can someone prove me wrong with a strong argument? I strongly wish that I am wrong.