Thursday, April 14, 2011

Eclair to Froyo - Mission Accomplished!

With the craze to get hold of a new mobile and jump on to the Android band wagon, I got myself a Samsung Galaxy S I9000 few months ago. I bought this from Abu Dhabi on my way back from a US tour and since then I've been pretty much in love with the phone. The mobile came with the Android 'Eclair'  version of course with many awesome stuff running on top of it.


However, once I got word of the Android 'Froyo' upgrade being available for the Galaxy S, I was impatient to get hold of it, mainly due to the tempting reviews of Froyo being pretty faster compared to Eclair and also the new feature set it provided.


I have a buddy (Sandu) who also got down a Galaxy S from UK, and one fine weekend, he did the Froyo upgrade like a breeze. Now that the guinea pig was through, I wanted to do this too (No disrespect bro! :) ).


But, when I tried to get on with it, I came across all sorts of obstacles, probably due to the Middle Eastern version of the device (I could be wrong here). Samsung Kies is the application that is 'supposed to' connect my mobile to the PC. But, despite how many Kies distributions I tried, I could never get my device connected to the machine. Perpetually the software was trying to recognize a device. Also, I heard from Sandu that the Android version, build number etc were different on his mobile. With a heavy heart of having to stick with Eclair for longer, I started my research on reasons for this and possible solutions.


Thanks to the power of Google, I managed to come across the second way of doing the upgrade using the simple flasher software - also release by Samsung called Odin. This looked like a very elegant way of doing it compared to Kies because i could use the downloaded firmware file and use it offline in contrast to Kies which performs a long download.


The tutorial by Neal Pradeep is what I referred to and this had the clear guidelines on how to perform the upgrade. If you are someone waiting to do the Froyo upgrade, do follow this tutorial. He also has many other Android tutorials which are really handy.


So, once I got hold of the pre-requisites specified in the guide, I backed up all my data (sms, call history, contacts etc) and applications using a neat backup tool called My Backup. Then I started to perform the upgrade step by step as specified with my fingers crossed becasue I had no idea if I was about to throw hundreds of dollars away.


It was a matter of less than 20 mins, and voila!!! My Galaxy S was upgraded to Froyo!


Few things I noticed when I did the upgrade:


  • In my case, Odin connected my mobile on 2 ID:COM ports. This is ok. If this happens to you just continue.
  •  The PIT file we should download did not have the valid .pit extension. Add this manually in case you are not able to navigate to the file via Odin (should be trivial)
  • Be patient once the phone gets restarted. The long first time boot up is really long! I had to wait for about 10 minutes.
  • based on my experience, if it about flashing the phone, Odin seems to be a very elegant way of doing it.

Previous Current
Firmware version 2.1-update1 2.2.1
Baseband version i9000XXJF3 I9000XXJPY
Kernel version 2.6.29 umts_scm@S1-BUILD05 #2 2.6.32.9 root@SE-S608 #1
Build number ECLAIR FROYO.XWJS7



Now if you'd excuse me, I have to attend to my Frozen Yogurt! :)


Sunday, February 20, 2011

R.I.P Timmy

They say that a dog is man’s faithful friend, and my pet dog Timmy was someone who really proved me that, being with me for 13 long years. It was quite feeble for a while and today around 10.00 a.m. it had died a silent death bringing sorrow to everyone at home. This post is a small tribute to Timmy and I would like to recap some of the memories I have.

Timmy came in to my life in 1998 when I was in year 8. This was a time when we were taken from the school for the Junior National Badminton Championships. On the way back we stopped at our master in charge’s wife’s house and there were the cutest Lion Pomenarians I’ve ever seen. Having the need to own a puppy, I immediately decided to take one of them and I noticed this brownish pup that had a unique color. When I picked it up, I got to see the mother’s love in the dog world too. I remember how Timmy’s mum growled at the rest without letting anyone else come closer to me when I was holding Timmy, and when we got in to the van, she came closer looked me in the eyes as if to say “take good care of my kid” and then left. So, Timmy had the longest journey of his life on that day, from Homagama to Bandarawela which is close to 200km. Tough puppy, eh? :)

The first few weeks were not so exciting coz you know, I had to clean up half of the house each morning. Ah before I forget, there is a reason why I named him Timmy – I once had another dog named Timmy, and after a while we lost him. Maybe it was stolen or it wandered off. So, I named this pup Timmy to remember the previous dog.

Slowly time passed away, and Timmy grew to be a playful puppy, and my evenings were filled with playful moments with him. When teeth started coming out it was quite hard to keep the slippers coz Timmy bit in to each of them. However, after few months, it got quite sick and apparently it had got a phlegm problem. So, for few days we had to feed it milk and porridge along with the medicine. I remember how Manjula - my classmate back then – came and helped me do this drill after school. Fortunately Timmy made it through and from then grew to be a healthy dog.

After I taught him fetch we had a different consequence. He started thinking that it needs to bring back everything we throw away. So, every morning we used to have a pile of garbage at our doorstep coz Timmy used to fetch everything from the garbage pit. Anyway later on he got to know what exactly we needed, and became a very good fielder when my dad and I played Cricket at home.


Timmy was very intelligent. He is always the first to greet when any family member comes back after a journey. Even when my father came home in a different vehicle he had the instincts to run up and greet. Also, he was very particular about the meals he got. If he didn’t like it he used to topple the food over with his paw and fill the plate with sand using its snout. It wasn’t very fond of the bath and we had a tough time when he started understanding the Sinhala word for having a bath. Whenever he heard the word, he used to either run in to the kennel or go and hide under the car. So we used to set the bathing environment and lure it in to it by placing a biscuit trail like Hansel and Gretel found their way back :) . Anyway once it got the first splash of water it used to become cooperative.

Timmy has bit me twice. The first was during a vaccination. The needle might have hurt him, and it kept on gripping to my hand while the vaccine was injected. The second was actually my fault where I went and pulled the bone it was gnawing on.



Time went by, and once I left school and went to Colombo for studies and work, I missed the companionship. But whenever I got home Timmy was always there to welcome no matter at what time I got back. I remember how it runs up to the three wheeler to greet me, even when I reach home around 2.00-3.00 in the morning, and kept jumping up to me while someone opens the gate for me to get in. It is during these times that I was at home, it got a good brush to its coat and the occasional hair trim. We never had to chain him or prison him in the kennel for long hours because despite being a good watch dog he was extremely obedient and knew his boundaries very well.

The post can go for on and on with so many memories I have which keep flowing in to my mind on this sad day. Timmy wasn’t just the guard dog or our pet. He was like a family member to us, and in the alms giving we had in our house couple of months back we wished him good health and got the blessings too. I am sure that will have an effect and result in a pleasant afterlife for Timmy.

I wish I’d meet him one day as a friend – only if I could know it is him!

A true friend is tough to lose... 
Specially when they leave a paw print in your heart forever..!






Saturday, January 22, 2011

QR Codes - Embrace!

Being away from my blog for some time (around 5 months) I felt like giving it some new life. Even I was bored with the old template which was filled with graphics and thought of going to a simpler standard one – and hence this dark theme which will load faster and... oh well, will at least save some power :)

Anyway getting back to the topic, seeing these 2D bar code around, I was enthusiastic to investigate more on them. Among the types like CM , PDF417, MaxiCode , DataGlyphs etc I was really interested in one category I have been seeing around quite often which encodes data in the form of squares.

This type I am talking about is officially known as QR Code (Quick Response). A code can store up to 4,296 alphanumeric characters of arbitrary text. Since it stores a bunch of characters, this text can be anything, ranging from a name, URL, contact information, or even a geeky way to represent of a short romantic poem! This has been mainly used in the Japanese automobile industry to track production line elements. But, today its utility has expanded to a broader scope and is being used to store different types of information in different domains - specially marketing.

Here’s my contact info in QR Code (basically ‘MY’ QR Code) :




As you would have already seen, my blog already has its own QR Code.

ZXing’s neat online utility to generate your own QR Code can be found at http://zxing.appspot.com/generator/

The google visualization API has all what you need to embed QR Codes in your web content. The chart API will show you all the options available. The following is the simplest form of getting what you need embedded.

<img src="http://chart.apis.google.com/chart?cht=qr&chs=WIDTHxHEIGHT&chl=YOUR DATA STRING" />

I already added the ‘QR Droid’ android app to my mobile and I am loving it already. This allows me to embed all sorts of info in QR Codes and also retrieve them pretty effectively.

Happy QR Coding!




Monday, July 19, 2010

Going LED!!!


This weekend was a rather industrious one for me since I was in a mood to fix stuff at home. It started off with fixing a damaged component of the car which would have cost over 15k LKR if went for a replacement. After this, I was eager to fix something else. Then I remembered that the fluorescent light based emergency lamps at home were giving trouble all the time, without serving the purpose. Their light was so dull and the emergency lamp was gradually becoming a decoration.

Then I thought, “hey, why not replace the dull tube with LEDs?!” Without a second thought, I got to work and formulated a quick and dirty plan. The lamp already has a chargeable 6V 4.5 Ah battery. So, my job is going to be really easy if I connect the LEDs properly without drawing out too much current from the battery and also without letting a high current flow through the LEDs which would bust them off instantly.

So, it was shopping time! Well, there’s nothing to exaggerate here. I simply bought 40 white LEDs, some circuit wire, soldering lead and a switch.

The light panel was the crucial element of the project. So, I took a thick cardboard and marked where the bulbs would go. My plan was to have two arrays of LEDs 20 on each array. 6V across two series LEDs seemed fine. Therefore, the entire light panel became a set of parallel connected two series LED units.

In this entire endeavor, I had an assistant who was very eager to help – my little sister :) . Since she also wanted to help, she was given the task of testing all LEDs to see whether they were working and she also helped to hold things in place while I soldered.

Once the light panel was made, I had to open up the lamp and make the connections to the power source. Since I had a rep to maintain, I needed to have something up and running before I left back to Colombo. So, my plan was to have the basic functionality up and running. Without any fancy stuff, I gave a direct connection to the battery and attached a new switch on the side of the lamp since the original switch was acting more like an insulator :P

And Voila!!! There’s my simply DIY project to make the emergency lamp LED powered!

This is not yet complete. I am yet to make the surface of the panel reflective and also need to run some tests to see if I can improve the power utilization. Let that be phase 2.

I know, this is not rocket science, but it was fun to get my hands on something ‘non-binary’ after a long time :)

Here are some snaps of the intermediate stages.







Monday, July 12, 2010

Watching a Java app die!


When you start living with Java, and extend that to eating and drinking java you start realizing amazing similarities between the language/paradigm and life. You start seeing java as a living organism which breaths and eats.

Once you hook up a java application for a monitoring tool like JConsole, you start seeing wondrous things. Analogically speaking this is similar to hooking up a person to an ECG machine. Once you get to analyze how the heap space keeps on increasing and how the garbage cleaner frees up memory from time to time it really starts looking like the ECG output. As a part of my geeky investigations, I felt like checking out whether I could recreate the ECG representation of a dying person on the JConsole using a dying Java program.

So, I chose one app which was throwing out of memory exceptions randomly, and decided to crank up the environment to the max and let the app run with probably the most resourceful environment. So, I turned on the –XX:+AggressiveHeap option which greedily expands the heap space and sets other relevant parameters. Then I also turned off the overload detection for the garbage collector. This latter was done by setting the -XX:+UseGCOverheadLimit option. This evaluates the proportion of time spent on GC and if it is significantly high, throws an out of memory error since it is very likely that it will run out of memory anyway.

After firing up the application, the awesome started to happen. I could see how the application started choking for life, until the heap space could not be expanded anymore, and the GC could not clean up anything further. After a tough battle, the application just died…!

Have a look at the JConsole output below.

Isn’t it fascinating? :)

FYI, here’s a list of VM options which you might not try out everyday.

Long live Java!!!




Friday, July 9, 2010

The UNnecessary intervention and our response...

Every Sri Lankan knows by now, or should know what this country went through over the last 30 years and how we got over that curse, despite the stereotype that the fallen villain has put on us saying that we remember something only for 2 weeks. When we are trying to remove the ‘developing country’ tag and move forward, it hurts the Western powers who were eyeing on SL’s bad times to hook in and take advantage of the extremely strategic location in the Indian Ocean. They would love it very much if we as a nation become a debtor to them eternally and cry and suck up for them to survive.

But when the ball starts rolling the other way, they panic. The UN is supposed to be an elite organization which is aimed at “facilitating cooperation in international law, international security, economic development, social progress, human rights, and the achieving of world peace” – at least that is what has been coined as its objectives. I agree that it has helped the member states significantly. But, again that is why it was created. How good the intentions might be, it seems to be in evil hands right now, and I have no hesitation is saying that the current secretary is tarnishing the UN’s reputation and obscuring our country’s rights as a nation.

The last few years in which the war came to an end thanks to the gallant efforts of the forces and associated leadership, it was visible in black and white how the so called saints tried to rejuvenate the terrorists who were falling day by day. There are so many atrocities taking place throughout the world by their own leading member countries, and yet they are ignored and these guys are chasing after our country with all sorts of awful charges. I need not go in to details.

So, how do we respond? At the end of the war, every one of us joined hands and hailed as one nation. It was a treat to see the national flag flying high in all corners of the country and how festivities took place in the island. A question is to be asked as to whether we still have that unity. The default answer would be ‘politicians are to be blamed’! I agree to a greater part of it. But, we are not idiots. We have brains to think and figure out who the bad guy is. When Mr. Ki-moon and his committee is trying to trample down our country, what are we doing? I know we all can’t go and declare war with those guys. But, at we should have a heart to backup the efforts taken by the government to defend us. Afterall, who has to go and face this in the end? It is not you and me. It is the government of the country who will be the interface. So, no matter whether you like the people in it or not, at a point like this everyone should ‘back em up’. Everyone can give their opinions on stages and thorough media. But, it is just a small set of people which has the ability and most importantly the spine to do something for it.

One person had the spine to walk up to the UN office and start a death fast. How realistic or not that might be, at least he had the guts to do it for the country. And it is extremely heartbreaking to see how he has become a joker on the face of many. Some guy who is excreting in cyberspace has even started a competition to predict the day that this person dies. Should we look at these and have a hearty laugh? Or should we condemn such treachery?

Think about it… This is not Iraq or Afghanistan! This is Sri Lanka!

We have only one country and the choice of everyone matters...

Disclaimer : This is a generic thought of mine as someone who loves the country which has nurtured him up to now, and is not aimed at promoting the government, a person or anything like that :)



Sunday, May 2, 2010

Reminiscence of beautiful Colorado


Thanks to the awesome company I work for, I got an opportunity to visit the United States for the first time in my life. And where was it all set to start? The beautiful Colorado! Now, that is one cool place to start it off!

First things first! Well, the flight to the US was itself a totally ‘unique’ experience. Having the route set up as Colombo – Dubai – Houston – Denver that was one long journey! Specially Dubai to Houston it was over 17 hours and the entire journey went on for about 30 hours! Yeah. That’s right! The cycle of eating, watching movies and sleeping continued for hours and hours until I finally reached Houston – the entry point to the country. Now that was one huge airport I must say! Being in this 6th largest airport in the world, I really felt its size when I had to go on a train, a bus and walk for like another 15 mins to catch my plane to Denver. Anyway, after all the plane travel, I finally got in to Colorado once I came out of the Denver airport, and that is where the entire Colorado/US experience begins.


Colorado itself is a big state which is the 8th largest state in the US. It has an area of 269,837 sq km (Sri Lanka’s area is 65,610 sq km). So, although I say I was in Colorado, I really was in a city called Broomfield which is home to the client I was visiting – one of the largest Communications companies in the world, being a Tier 1 network and operating one of the largest backbone networks of any Internet service provider. I settled down in a cozy place called Towne Place Suites operated by Marriott Hotels, and I must say that I really loved the 2 weeks I spent there.

So, how did being in Colorado/US feel? Let me summarize;

Friendly atmosphere

I was really impressed by the friendliness of the people I met on and off. Probably it might be partly because Broomfield being kind of a laid back area opposed to a big city with hustle and bustle. A good natured ‘hi, how are you doing’ is something that is built in to the DNA of the people here. I am not saying that people in my country are not courteous. But, being a complete alien in a new environment, I noticed this to be far beyond my expectations.


Huge roads and landmass

The highway system here is really impressive. The combination of freeways, arterials, collectors, and local roads seem to have been put together with a lot of thought. In a way, this can be expected owing to the vast land mass they have. With all these roads and buildings, they still the mount of free land space is more than the occupied space!

Where did all the buses go?

Well, I was asked to get ready for the travel in a hurry, and therefore the amount of research I could do before my travel was bit limited. I realized this when I started noticing that there is no means of public transport in the area. Why is that? Simple answer - everyone has a vehicle! Luckily my colleague from India knew what was coming through experience, and had reserved a rental car and that made our lives easier. Being used to roads filled with buses and trishaws, it was pretty weird at first to see just personal vehicles on the streets. Thinking about it, I just felt the implied message of this observation is, ‘if you can’t afford a vehicle, keep out of Broomfield’ :)

Remarkable discipline on the road

Now, this is the most important thing I noticed as someone who has been battling with the rest of the vehicles on the way to work using the weapon called ‘the horn’. Everyone was extremely concerned about road rules and the discipline shown on the road was really striking. Here, priority is given to the pedestrian. If a person is crossing the road anywhere, vehicles stop a good 50 yards away to let the person cross the road. I was finding this too good to be true. The usage of the horn is virtually zero, and if one is to blow the horn at some point, it is considered to be a sign of extreme irritation.

No policemen?

I’m sure they might be around at least for the sake of having them. But, I didn’t see a single police officer within the city. I just saw a police car parked outside a McDonalds, and that was it! But, I am sure this doesn’t apply to the entire US. Looks like citizens of this area are ‘self disciplined’ enough :)

Never step out without your maps

When you are on the road, you are on your own! That is a disadvantage we have here. Back in my country I could just pull down the shutter and ask someone the direction to get to any part of the island. But, not here! If you get on to a freeway by mistake, there’s no turning back until you catch the next exit. Even if you manage to get out of the freeway, you need to figure out how to get on to the freeway again on the other side of it. Now I get the point of features like the compass appearing on the iphone and why integrating GPS for mobiles was so much sought after. Anyway, when you drive here you need to know where you are going, and ‘when’ you get lost (like it happened to us few times) you also need to know where you have ended up. So, maps are a ‘must have’ here. After all, it is good to get used to that structured way of navigating :)

The never ending natural beauty

I really loved starting my US experience in the state of Colorado, since this is one of the most beautiful states in the US. It was a treat for the eye to see snow capped mountains every morning as soon as I wake up and gaze out of my window. During the two week’s stay I was fortunate to get the chance to see two highlights of the state – Eldorado Canyon State Park and Pikes Peak.

The Eldorado Canyon state park was an amazing creation of nature which was made up of thousands of rocks. This is said to be one of best location for climbing, and it showed! It was bloodcurdling to see so many climbers clinging on to vertical rock faces 100s of feet above the ground. I simply enjoyed the natural beauty of the area and headed back :)



More pics >>

Pikes peak was a different experience. As a matter of fact Pike Peak region itself has so many attractions like the Garden of Gods, Cave of Winds and so on. But, due to the time limitation we chose the Pikes Peak Cog Railway. This is a unique ride on a rain which goes to the peak which is 14,000 feet above sea level. Unfortunately we traveled only about 70% of the journey since the train could not go further due to the heavy snow on the top. But that partial trip alone was so great. The views were magnificent and traveling in a train which sometimes climbs gradients as much as 25% (possible due to the drive mechanism involving cog wheels meshing in to a toothed line on the track) was pretty exhilarating.

More pics >>


Rapidly varying climate

All these days I thought the climate in my hometown had a fast changing climate. But in the area I was, the changes were pretty dramatic. During the two weeks stay, there were sunny days, rainy days, gloomy days and to top it all, a day with a pretty heavy snowfall out of nowhere! Walking in a snowfall was awesome for me for the first few minutes. But, the fact that it is still heavy, frozen chunks of water makes all the difference in a while :).

- Finale -

Although I was supposed to fly back to my lovely country Sri Lanka, my stay got extended by 3 more weeks where I was to fly to the state of Ohio. The start I got at Colorado was extremely pleasant and I would love to explore the rest of it someday.

Anyway, let’s see what Columbus, Ohio has in store for me!!!