Archive for January, 2009

The draft named Robust design techniques for C Programs by David Turner introduce a modern languages like approach for exception handling in C. It speaks about four approaches for error handling in C.

1. Being extremely paranoid.

2. Implementing transactions which in concept similer to commit/rollback approach in databases.

3. Structured Exception Handling(SEH)

4. Cleanup stack exception handling(CSEH)

Of the four he recommends 4 th approach as the best. He expect that this paper will stir interest in this technique and motivate enough people to introduce such features in the libraries and programs they write..

I recently wrote an article for WSO2 Oxygentank called “Using WSF/C extended error handling mechanism in your own modules and applications.” which basically explain how WSF/C stack handle errors. From the above four approaches what WSF/C has taken is paranoid approach like many popular libraries programmed in C. However I belive that WSF/C could also greatly benefit from CSEH approach if carefully adopted. Infact James Clerk hinted about this approach in the early days of Axis2/C design discussions.


Read Full Post »

This time we decided to go on a trip on jeeps. Sanjaya and I prepared our jeeps for the journey. The route was decided to be the well known jeep trek from Kalupahana(On Colombo-Haputale road) to Ohiya through Bambarakanda falls. Participants were Sanjaya, Janapriya, Amila, Nandika, Dumindu, Dushyantha and his wife, Diluka, Me and my wife.
We started from the office at about 11am in the morning and reached Kalupahana at about 3.30pm. From Kalupahana we did a sharp left turn towards Bambarakanda falls. We travelled upwards about 4 kilometers on a narrow road which has some 45 degree bends towards the end of that distance and then suddenly we were in the vicinity of the awe-inspiring view of the Bambarakanda falls.

Bambarakanda Waterfall

Bambarakanda falls as first seen when we travel from Kalupahana

We stayed the night at Bambarakanda Rest managed by a Lady called Sera. There are 3 peaks that surround the view from Bambarakanda Rest. One of them is Vangedigala Kanda and the one next to it is called Gobbelikanda. Gonamale Kanda is next to it. They are one moutain range. We were informed that if we trek to these mountains we can have a good view of the country. So we set out in the morning to climb Vangedigala and then Gobbelikanda. Vangedigala and Gobbelikanda peak are joined through a narrow path through the mountain range. For a serious trekker the climb from Rest house to Vangedigala is about two hour climb. But it took for our team about 4 hours to reach the Vangedigala. We traveled through the edge of a pine forest which extend from the root to the top. Just before the peak there was a very steep climb through the rock which posed to be very dangerous specially when it rains. Just as we reached there heavy downpour wahsed all of us making the climb extremely difficult. From Vangedigala to Gobbelikanda kanda it is only about 1/2 hour walk through the narrow gap I mentioned. The areas is covered with thick grass upto the Gobbelikanda. Once we reached the Gobbelikanda we could see that it strech further in a similar grass covered path towards Gonamale Kanda. However we could see that after some distance the grass path ends and there starts the thick jungle which could take another day to reach it. The view from GobbeliKanda is extremely beautiful and we were lucky to have clear surronding with sun shine which helped to view the vast country around. It is my advice that if you plan on climbing a mountain start it early in the morning in a sunny day. Because after the noon normally the mist would cover up the surrounding and it would be only mist nothing else you would see which is just the thing happened in our laster year journey to Namunukula Kanda. In a way it is also nice experience like in mid of a floating cloud.

View of Vangedigala kanda peak from Vangedigala

View of Gobbelikanda peak from Vangedigala peak

Towards one side of the moutain(in the direction of the Bambarakanda falls) we could see only big mountain which extends towards Worlds end. We could see the origins of Bambarakanda falls from there through which our path next day towards Horton plains could be seen as a long winding serpant. On the other side of the mountain there strecthed the vast country extending towards down south through Balangoda area. We found that certain posts like road side milestone posts which within a gap about 300 meters between any two of them stretched from the start of our path  to the top of the mountain and strectching even further. This coud indeed be used as a good way of finding the correct path for a new comer. Janapriya has a good panoramic view from the peak (soon to be published) in his blog. When you view this panorama you could experience the surrounding view from mountain as if you were really there.

The back journey through the pine forest was extremely difficult after the rain. Rubber slippers were extremely  unsuitable for such descends when it is rainy. Some kind of moutain boots are the best. We reached the rest at about 8pm.

Next day we set out for Ohiya through the well known jeep trek. The cllimb was extremely difficult for a non- 4*4 vehicle. But since both of us had vehicles best suited for the journey(Mitsubishi 4DR5 and Suzuki Jimney) it caused us no problem. The first half of the steep climb end at about 2 hours of climb at a pass called V-Cut. The road is strewn with various size/shape of stones which posed extreme danger for the tires. We stopped at V-Cut which is supposed to be in the area just on the top of Bambarakanda falls. The view from there towards the path we travelled so far could make the weaker heart tremble.

Path we travelled from Bambarakanda rest as seen from V-Cut pass

Path we travelled from Bambarakanda rest as seen from V-Cut pass

The v-cut pass is situated in the gap between two mountains. From now on it is a second mountain we start to climb. After few distance we crossed a ford which is the stream that feed water to Bambarakanda falls. After some more distance our way laid through a tea estate and some estate settlements. After yet another rigorous climb we reached the top of that mountain from which started a steep descent called Devils staircase. Devil’s staircase is some three hairpin bends descending down into the opposite side of the mountain. This path is concrete paved extremely easing the descent, which could otherwise be disasterous. When you look ahead from Devil’s staircase you can see some long distance in the to be travelled road where you can see a bend in the road from where the mountain you are currently in is separated from another mountain through which the road ahead lies. Just after this bend you can see that there is a sharp climb to the left in a sharp left bend from the main road to Ohiya. We learnt that this road leads to Horton Plains through some sharp bends and climbs. But we were also informed by the same people that it won’t be as difficult as the road we travelled so far. Howerver we choose to follow our original path to Ohiya.

Few distance from the above mentioned junction towards Ohiya we found a place in the road from which we had the best view so far in our journey. Lo and Behold. This is one of the best mountain scenes that I have ever experienced anywhere in our beautiful  hill country.

View after some distance passing Devil's staircase

View after some distance passing Devil’s staircase

From that point on we travelled some further distance through unmaintained difficult roads passing Estate Superintendent’s bungalow and Udaveriya tea estate factory. At some point we found concrete paved road the kind of which I have never seen anywhere else. The road is concreted only along the two wheel tracks. Middle is left unattended. I had to drive extremely carefully less the wheel fall off the cemented track and jolt uncomfortably. After some more drive we reached well paved narrow road which led us to the junction where it meet the Ohiya-Pattipola road through horton plains. When you travel from Ohiya to Horton plains you will find this junction just after you pass the villages and enter the wild life reserve.

From this point on we drove through Horton plains, Pattipola, Ambewela, Blackpool stopping just for tea and by the time we reached Colombo it was 12pm.


(1)This travel note from Lakdasun helped us in preparation for the journey

(2)Sanjaya and damitha have uploaed more photos on this journey

Read Full Post »