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!