Asim’s Blog

March 15, 2011

Gold Driver’s License Japan

Filed under: Personal — asimmunawar @ 12:58 pm

Today I got Gold Drivers License. I think if you don’t do any traffic violation in 5 years you are eligible for a Gold license. The card looks like a normal driving license and instead of green or blue stripe in the middle it has a gold color strip.

In Japan, a gold license is given to the drivers who don’t have any points accumulated on their current driving license. Many people who get Gold license are drivers who have made a license but never actually drive a car. Such drivers are also known as “Paper Drivers”. I am happy that even after driving a car for last 6 years and over 80,000 Km I did not have any traffic violation. With the frustratingly low allowed speeds on highways and expressways in Japan, this is a big achievement.

I am planning to get a Safe Driver card (also known as SD card here in Japan). Hotels, Onsens, Shopping centers that provide discounts for SD card holders are growing at a very fast pace in Japan. It would be good to have 5%-10% off on hotel packages.

2011 Sendai Earthquake and Tsunami

Filed under: Personal — asimmunawar @ 12:34 pm

I think this was an event that will change Japan

January 16, 2011

How to travel light?

Filed under: Personal — Tags: — asimmunawar @ 12:08 pm

Hmmm this seems to be an easy task however, I learned it over a long period of time after many trips to different countries.  Today for the first time I am going somewhere for 8 days with a very small bag. Here are some of the tips that might help you to travel light.

  1. Try to fit everything in carry on lugage. Checkin lugage is a headache. It takes time to check it in and pick it up. Some airlines (notably some american airlines) are good at loosing checkin lugage.
  2. Netbooks are cheaper and easy to carry than notebooks. They may not be very powerful but they are certainly good for carrying. When buying a laptop, always check the weight and size of the power adapter. Sometimes power adapters alone can weigh over 700 grams.
  3. If you can manage internet browsing on a mobile phone you may not need to carry a laptop at all. For me, I have to carry a laptop.
  4. Carry 2 pair of pants (preferably one jeans) and three shirts. You can always use the laundry service in the destination hotel to wash them. Its better to carry shirts that does not need ironing.
  5. Don’t carry extra shoes. The pair you are wearing is more than enough.
  6. If you are traveling to a place that has very different weather than your city. Then prepare for the destination and don’t put extra things just because it is cold in your city.
  7. Just buy one of these bags with wheels. Lighter bags are little expensive but they are worth it.
  8. If you want you can take some food and snacks with you. As you will eat them on your trip so you can use the space for some shopping that you might want to do.
  9. Buy compact soveneirs like keychains, pens, jewlerry etc. Buying outerwear, shoes and stuff like that is a very bad idea in my opinion.
  10. As for the toiletries, you can buy things from a dollar shop or 100 yen shop in case of Japan. Disposable stuff would be great. Just throw them on you trip back.
  11. If you are going for business don’t carry SLR cameras. Just buy a smart camera that can fit in your pocket. Buying a mobile phone with a good camera is a great idea.

If you have more tips please add them in the comments. Have a safe journey !!!

January 12, 2011

Sold my HTC Desire

Filed under: Personal — Tags: — asimmunawar @ 2:22 pm

Finally I decided to sell my HTC desire for $360. I tried to fix the battery problem by doing everything possible. I tried to reflash it, installed different kinds of monitoring software’s, also performed the famous HTC plane mode trip, and another trick to calibrate the battery. However, none of these worked. The most frustrating thing was the customer service representative response from HTC and also from my service provider SoftBank.

First, I called SoftBank and told them about the problem that I am having. They gave a very lame excuse and I am sure they did not know what they were talking about. After talking to me for around 30 min the representative said that there is a big difference how the SIM unlocked and SIM locked phones connect with the network. And because my phone is SIM unlocked therefore I don’t get good battery life. They claim that even if I see full bars on my mobile phone that does not necessarily means a good signal strength.

Then I planned to call HTC Japan. I called them and they forwarded my call to someone very non technical. All his discussion was simply out of the context. However, he recommended me to call HTC Taiwan where they have the biggest repair center of HTC phones. I called them and all they said is that uninstall useless applications and you will get a good battery time. I told him my situation in detail but he had nothing to say. Finally, I became kind of angry and decided to claim the warranty.  But again the guy in Taiwan said that there is nothing that we can do. This is perfectly normal and we will not be able to make any repairs or give you a replacement. So, it is useless to send you phone to Taiwan. There is some serious problem with some HTC desire sets. Google the problem and you will find quite a few people having the same problem with their battery. HTC does know the problem but they don’t want to replace the defected sets.

I don’t have anything against HTC phones. They make great phones but they should improve their customer’s service quality. As for me, after fulfilling my desires 😎 , I am back to the good old HTC Hermes.

January 4, 2011

HTC Desire strange battery problem !!!

Filed under: Personal — Tags: — asimmunawar @ 10:50 am

Ever since I got my first mobile back in 2000, this is by far the strangest problem I have ever faced. My HTC desire’s battery behaves very different in different cities of Japan. I am living in Sapporo, a city in the northern Island of Japan. On one full charge the standby time that I get is around 11 hours maximum. If I use the WiFi or Blue Tooth the time reduces further.

Same mobile in Tokyo gives me more then 60 hours of standby time. I don’t know what is the problem. I have searched a lot and many people blame this on the signal strength and environment temperature. In my case both are constant. I contacted HTC customer service and their reply was confusing and kind of useless. I also went to my service provider (SoftBank) in Sapporo. They are also confused over the strange behavior of the phone.

I think this is a software flaw. I think my mobile keeps on searching for new signals even if it has good signal strength. I reached this conclusions because the mobile gives similar standby time if placed at a location without any signals.

Still the thing that confuses me is why so much difference in standby times between Sapporo & Tokyo.

January 3, 2011

Interview with Amazon

Filed under: Personal — Tags: , , , — asimmunawar @ 12:34 pm

I applied for a mid-career job at Amazon Japan. My interview went fine but I was not selected for some reason. The interview lasts for 45 minutes and they ask three simple but conceptual programming problems. Then they have around 10 minutes time for any questions that you might want to ask them. Here are the solutions of the problems that were asked during the interview:

1. Fibonacci Numbers:

Write a code that can returns nth member of  Fibonacci series. For those who don’t know, Fibonacci series start with 1 ,1 and next member is calculated by taking the sum of previous two members in the series. So it goes like: 1,1,2,3,5,8,13,21,34,55,….

Solution:

It a very easy problem and can be solved by recursion or simple looping. Given below are both the functions:

Recursive approach:

int fib(int n)
{
	if(n <=2)
		return 1;
	else
		return fib(n-1)+fib(n-2);
}

Looping:

int fib(int n)
{
	int i=0;
	int x=1,y=1,z;

	for(i=0;i<n-2;i++){
		z = x+y;
		x=y;
		y=z;
	}
	return z;
}

2. Random Numbers Generator

Given a function ” rand5()” that returns random integers from 1 to 5 with uniform probability. We have to make a function “rand7()” that produces integers between 1-7 with uniform probability.

Solution:

This was a very interesting question. I was confused in the beginning but then I sorted out the solution. The interviewer didn’t ask for the code, he asked me to explain my strategy for the solution. My solution to this problem would be as follows:

1. Convert rand5() to rand4(). rand4() will return integers 1-4 with uniform probability. rand4() is simply a rand5() function that ignores the value 5.

int rand4()
{
	do{
		r=rand5();
	}while(r==5);
	return r;
}

We need 3 bits to represent numbers from 1 to 7. Therefore, we will call rand4() function three times. If we get 1 or 2 we change it to “0” and if we get 3 or 4 we change it to “1”. In this way we will get three bits required to create the random numbers from 1 to 7. However, three bits can represent 8 integers from 0 to 7. We will simple ignore the case when we get 0,0,0. In this way we can get a uniform distribution of integers from 1-7.

3. Class Design:

Design a class for public garage system.

Solution:

This problem can have infinite solutions depending on the requirements of the customer. However, a garage class can look something like:

class Garage
{
//attributes
private:
   int numberOfGarages;
   float maxHeight;
   float maxWidth;
   float pricePerHour;
   ...
//methods
public:
   int carEnter();
   int carExit();
   int garageClose();
   ...
}

January 1, 2011

iPhone 4 vs. HTC Desire

Filed under: Personal — Tags: , — asimmunawar @ 11:19 am

I was planning to change my mobile since mid 2010. Finally, in October I decided to go for HTC desire. It was expensive at around 450$ but it was partially sponsored by my mother-in-law as my wedding anniversary present. I have always been a fan of android OS. But, I had a tough time choosing between iPhone 4 and HTC desire. From my experience both are comparable to each other and it is very difficult to choose between the two. Some of the things that helped me decide are as follows:

  • Replaceable battery: As we all know iPhone doesn’t have a replaceable battery. There are many external rechargeable batteries available for the iPhone but i just prefer to carry an extra battery instead of buying an extra accessory.
  • I prefer the simple micro USB interface of HTC Desire. Not a big fan of iPhone’s and iPod’s custom built interfaces. The custom interfaces are designed to create a monopoly of Apple in the market. Recently, I wanted to buy and AV cable for my wife’s iPhone 3G. I bought an AV cable designed for iPod classic for just 10$. It didn’t work with iPhone. They have included some kind of anti piracy chip in the AV cable that stops other makers from making cheap AV cables for iPhones. The cheapest I could find was over 50$. This is too much. Come on Apple …
  • Micro SD slot. Being able to increase the memory as you please is a great thing.
  • Flash doesn’t play on iPhone.
  • I wanted to learn iPhone OS or android without moving to Mac.

You may not agree with the things mentioned above but these things really helped me to make a decision. Anyways, now I feel that Desire have its own problems. I will talk about these problems in my next post.

Create a free website or blog at WordPress.com.