Oops – Object Oriented Political System   4 comments

Hey friends please do not take this article seriously. Its just that, I was sitting idle, thinking about the current situation in our country. Being a Techie, Its quite natural for me to relate the various real life aspects of this political environment to Classes and entities in our Object oriented world.

I have tried to capture a part of my silly thought into our exciting world of Classes and Objects. The programming language used for this article is C# and the development environment is Visual Studio 2008.

Well then…… Lets get started…

Since Anna Hazare, has been the most talked about person these days, here is a class dedicated to “Anna”

Anna Hazare

Class Anna

The class name is “AnnaHazare“.

It inherits from MahatmaGandhi and implements two interfaces namely ILokmanyaTilak and IMahatmaPhule.

It indicates that our Anna has adopted the ideology of fasting from Mahatma Gandhi, his ability to garner nationwide support from Lokmanya Tilak where as his struggle to bring about social development has came from Mahatma Phule. The Methods “StartFast” and “NationWideProtest” take in one parameter which is “ReasonForProtest” emphasizing the reason for which Anna is protesting. The third method “SocialDevelopment” has no specific reason. The return type of all these methods/functions is “BetterIndia”.  Details of class BetterIndia could be found below.

Harvinder Singh

Class Harvinder singh

The above class is for Harvinder Singh. The guy who slapped Sharad Pawar and Sukhram. Well this person has no political or social stature when compared to Anna. He stands no where when compared to great people like Bhagat Singh, Rajguru and other revolutionaries. But today he represents the young generation of India, who do not get proper opportunity to prosper. Who are frustrated watching our political leaders in-activeness and are annoyed by daily news of huge sums being siphoned out of public coffers. He is just another common man whom we might forget in few days. But he sure was the hero of that moment. He did sent out a strong message to our political class that our patience is running out. In public we might not accept it, but the news did give many of us a reason to cheer.
The first method in this class “SlapPolitician” is for his slapping act. It takes the politicians name as an input parameter. This method is overridden from Bhagat Singh. Well, I know that Bhagat Singh has never performed such act. But as most of us might be aware, Bhagat Singh threw a crude bomb in parliament. His intention was never to kill anybody. His aim was to send out a strong message to the british  about our ability. Similarly Harvinder Singh had his knife with him during his slapping act. He could have used it easily, but that was not his intention.

The other method is “AbusePolitician” for his post slapping commentary. Even this method takes in a politician as a parameter. The return type for both these methods is “HappyIndia” :)

 Lokmanya Tilak, Mahatma Gandhi

Class and Interface representing the influence of our great leaders

Bhagat Singh, Rajguru

Class and Interface representing our young leaders during freedom struggle

Well the above screen shot depicts our great leaders with one of there prime functional behavior taking form of a method.

political leader

Class representing major part of our political class

I know, I am a bit unfair when it comes to the above class. I am sure not all our leaders are corrupt and goons. Few of them, like our current PM, Dr.Manmohan Singh and Pranab mukherjee are arguable the most safest hands to run a diverse country like ours. That too at a time when developed nations around the world are having a tough time to keep there house in order. So the above depiction is definitely not for them, its a kind of perception which has been created about these people because of few rotten eggs. Off course, no one has the courage to throw these rotten eggs out of the basket.:(
The class has properties like NameOfPolitician, IsCorrupt, IsInJail, NumberOfCriminalCases & SizeOfScams etc. which are quite self explanatory. The constructor takes in one parameter of politician, based on which it initializes the “PoliticalLeader” object. The constructor uses various methods like “CheckIfCorrupt”, “GetSizeOfScams”, “GetNumberOfCriminalCases” etc, from the Interfaces implemented, to initialize the object.

types of politicianThe above screenshot has classes like HappyIndia and BetterIndia which describes the mood and the state of the nation respectively. The classes represent the outcomes of the various protests and agitations. The two interfaces, ICorrupt and ICriminal are implemented in PoliticalLeader class. The Methods in these interfaces are implemented to find various related properties like if the politician is Corrupt, The size of his scams, whether he/she is currently in jail etc.

Two enums are used in this example, the first one is ReasonForProtest – It represents the reason for which protest was carried out like Lokpal, RightToReject etc. The second one is a small collection of politicians who are either controversial or are usually in the news for wrong reasons.

Recent protests in IndiaFinally, the above class “Protest”, is a small representation of the protests which were carried out in the recent past.

An object is created for both AnnaHazare and HarvinderSingh. Based on their protesting style,  two methods namely “PeacefullProtest” and “ViolentProtest” are being incorporated. Anna’s protest like his recent fast for Lokpal bill and the proposed nation wide agitation for Right to Reject form the functionality of the first method i.e. “PeacefullProtest”. Where as Harvinder Singhs slapping act to sukhram and Pawar followed by his free flowing abuses for politicians form the functionality of the other method i.e. “ViolentProtest”.

So friends, this is a small attempt by me to put my thoughts in the form of words, by using a popular programming language. Like I have already said, this article is created just for the sake of humor.  I enjoyed the thought and the efforts needed to put it into this blog. Hope you like it too. And if at all you do, please let me know your feedback.

Exploits at Kaas – Valley of flowers   1 comment

About Kaas

Located 26 km away from Satara, Kaas is a huge plateau stretching for more than 10 kms, with amazing variety of flowers and wildlife. This place is a paradise for photographers. The best time to visit Kaas is September to October.
The plateau lies on top of a huge mountain. It is surrounded by a huge water reservoir formed behind Kanher dam, on almost three sides. Sajjangad, abode of swami Ramdas, can be seen on the left side of the plateau. Kaas, because of its high altitude, appears to be the highest point in that area. surrounded by valley from all sides. The ghat leading to Kaas from Satara, is quite narrow and appears to be risky at times, because of its steep curves.
The reservoir and the forest surrounding it is a natural tranquil for nature lovers. The prominence of this place is increasing every passing season.
Kaas

Our visit to Kaas

We happened to visit this place on 2′Oct 2011. We were not very sure about the time of the visit. Most of us thought its quite late in the season, and we would be missing the peak time when the blossoming is at its maximum. But most of these speculations turned out to be incorrect. The plateau was huge, and covered entirely with lush green natural lawn. There is no sign of man made constructions anywhere around. The serene atmosphere of the dawn along with the fresh aroma of early morning dew was mesmerizing. Just saying ‘this place was beautiful’ would be an understatement. It was very very very very beautiful. It amazed us to no limit. It was our sheer luck that there was mild drizzling just a couple of days back which lent a new lease of life to the flowers. Well, some appreciation to our whole team ;) , we got up early at around 3.30 – 4.00 and were at the venue before 6.00 in the morning because of which we could capture the early morning dew on the flower petals.
There were quite a lot of people already at the venue. Most of them were photographers and nature enthusiasts. Its good to see how these people appreciate the nature. Their affection for nature was quite visible in the way the were moving around admiring the unending stretches of flowers. There were a few who were literally spending hours just to get one good shot of the flower. Well, even we were busy trying to capture as much as possible in our cameras. Never mind the quality of images, but we did our best. The place offers ample variety flowers and that too in huge numbers. When seen from a distance, these flowers give a distinct color to that place. A few variety of those flowers can be seen below.

Spherical Pipewort

Spherical Pipewort

Smithias

Micky Mouse (Smithias)

Butterfly

Jambhali Chirayat

Jambhali Chirayat

Jambhali Manjiri

Jambhali Manjiri

Cyanotis tuberosa

Cyanotis tuberosa

On our way to the plateau

Our team @ Kaas

Our entire team of eleven

For those who are planning to visit this place, September to mid October is the right time to visit. Satara is the nearest city to this place. You could find many hotels in Satara. With respect to the venue, try to reach there as early as possible. Primarily to experience the early morning freshness. But apart from that, parking cars is also a major issue at Kaas. We were lucky enough to find a place for our cars, but people coming later on had to walk a couple of kilometers from the parking lot.Local authorities have made provisions for a state transport bus from the parking lot upto the plateau. But those are too crowded to carry delicate items like cameras and lenses.
Apart from the above, please carry sufficient amount of water and please keep this place clean. There were quite a few people littering around throwing away chocolate wrappers etc. This place is quite huge and cannot be cleaned every now n then. Also try and avoid stamping over the flowers.

For more pics on Kaas, please visit my album Kaas- Valley of flowers

Posted November 9, 2011 by Yogi in Travel

Tagged with , , , , , , ,

Trek to Sudhagad   2 comments

Plan for the trek

After our Koraigad trek last month, we had decided that henceforth we will not be planning for treks well in advance. It should be done at the last moment or at the most a week in advance. Since the last time it was just four of us (Hems, Andy, Tara & me), this time we wanted more people with us. Swapnil(Swapya) and Prasad(Po2) were insisting on a trek for quite some time.

So we decided upon a date that is 25th June. The Destination was not to be decided till the very end. On Thursday, two days before the trek we had our conference call amongst the members. On the call were Hems, Sachin, Swapnil, Po2, Andy and me. I suggested Tikona or Naneghat as possible places for trek. Swapya suggested a waterfall somewhere near jawahar. Po2 suggested SudhaGad. Sudhagad, I had never heard of this fort before. Po2 said it is somewhere near Pali(A village near Khopoli, known for one of AshtVinayaks eight famous temples. Lord Ballareshwar is the reigning deity of this village). Po2 insisted about this place saying it is not a very big trek, and would be worth a visit. So we finalised on SudhaGad. The next day we spread the news in our group. By Friday evening we were fifteen of us including five of Po2’s office colleagues. So according to the plan, we were going to start from Vasai. Po2 started from his home. He picked Jayesh, Swapnil & Sachin en-route to Evershine gate. Meanwhile I picked Hemant and Anand from their place and returned to our meeting point at Evershine Gate.

Thane - Belapur road

On our way to Sudhagad

According to the plan, we set out from Vasai-Virar in two cars. We picked Nilesh at Airoli. Po2′s office colleagues were coming in the third car from Mumbai. We  met them at Belapur. Pranit, who works in night shift these days was going to meet us at belapur. But due to some personal issue, he could not join us.

We reached khopoli by 9:00 where Amit, the only member of todays team from Pune on his bike, had reached far earlier. We proceeded towards Pali, reaching the temple by in around an hour. After a quick darshan, we moved on towards our destination which was still 12 kms ahead. We lost some time in between coz, Casper, Po2′s colleague had lost his way in between. After a brief search operation by Amit and Swappy, we found them. :)   and reached a small hamlet named Pachapur.

Mission Sudhagad


The fort appeared to be huge from the base.  As we left the village behind on our way to the fort, the mud hutments of the villagers were getting replaced by trees. After a while we were actually in a very dense patch of the forest. Since the location of this fort is somewhat remote, and it is not known to many people, there were not many people around us.
This is in sharp contrast to other famous forts like Lohgad or Raigad which always have large number of visitors. Lonely though, but we were enjoying every moment of our trek. The pristine beauty of this place is still intact. After around 20 mins of climbing we reached the first amongst the four hillocks. Local authorities have built a ladder like structure to get over this obstacle. A local guy told us there is a small temple of Lord Shiva on the fort. Every year large number of people from the surrounding area visit this temple during Jatra. This ladder was built for their convenience.

Going ahead we crossed one hill after the other. Each one was different from the previous one. There were plains covered with lush green grass cover. Various types of seasonal flowers were adding to its beauty. The perimeter of the fort is very well fortified with its formidable walls still in reasonably good shape. The path which we had taken was actually the rear side of the fort. The main entrance is not very accessible. After about an hour or so, we came across steps which were leading to a huge Darwaza (Gate), covered by two bastions of the fort around 150-200 meters away. The bastion is built in such a strategic fashion that if enemy is trying to intrude inside, he can be fiercely  defended. There are vents to pour  boiling oil on the enemy, places from where archers can hit enemy troops. Standing on the bastions edge, one could see almost half of the forts perimeter. It also gives a very wide view of horizon, whereby a watch can be kept on approaching army. Such minute things were thought at a time when there were no cranes or vehicles to carry construction material, no advanced communication mechanism, no computer to design a blue print of the structure. Those great minds who envisioned it and the strong hands which built it, certainly deserve a manacha mujra (Salute).

Bastions at Pachapur darwaza

After spending some time over the bastion, we proceeded towards the main fort which was still half an hour away. Nilesh, amongst us was very exhausted. But like all of us he made it to the top.

The perimeter of this fort is quite big. The fort is spread across 55 acres. There are many lakes on the fort. There is a palace of Pant Sachiv on the fort, where 50 people can stay comfortably. Also there is a temple of Bhorai Devi, where 25-30 persons can be accommodated. Different kind of medicinal plants and trees can be seen in the surrounding forest. The entrance from where we had come is called Pachapur Darwaza. Another fort named Tella-baila can be seen from one end of the fort.

On top of Pachapur darwaza

Twin forts : Tella- Baila can be seen in the background

Many aspects of this fort match with those of Raigad. Like Raigad, sudhagad also has a machi called Tak-mak-tok. The main entrance called the Dindi darwaza is very much similar to Maha Darwaza at Raigad. Like raigad, sudhagad has ample supply of water. Because of these similarities, Sudhagad is called a Replica of Raigad. Legend says that Sudhagad was one of the few forts shortlisted by Shivaji Maharaj for his capital. But he selected Raigad due to its proximity to Arabian sea.

We had some snacks which we had carried with us. But we had exhausted all water we had on our way up the fort. There were couple of streams which we came across. But the water didn’t appear to be potable enough. The lakes on top had water, but it was quite murky. A villager took us to a place behind the Pant Sachiv palace. There was a small water stream flowing. This place was kept clean by the local people. It is their source of water in monsoon. Water from this stream was crystal clean.

After roaming around on the fort for a couple of hours, we started our way back. It took us around 45 mins to reach the base village. On  our way back, we had some snacks at khopoli after which Amit went his way to Pune. We proceeded towards our home. By 10.00 we were at our home… Tired, but with a sense of accomplishment.

Posted October 6, 2011 by Yogi in Travel

Tagged with , , , , , , , ,

Sharepoint – Error in SPWorkflowTask.AlterTask Method   Leave a comment

Recently I was working on a Sharepoint workflow.
We had to raise an event from our application form, which would trigger the eventHandler. We had used “OnTaskChange” event for that respective task in the workflow.
There were four different conditions on the “OnTaskChange” event which were segregated based on the If-Else condition.
It such happened that I was able to execute the first three conditions. The control was going to the workflow from the Application page, and I was able to debug the flow and the If-Else conditions as well.
But when I raised the fourth condition, It was not getting executed. After debugging I found that It is not reaching the workflow either.
It was giving “Object reference not set to an instance of an object” error on the

“SPWorkflowTask.AlterTask”

Method. The method basically accepts three parameters,
1. The Task Item
2. HashTable
3. Synchronisation Flag

Interestingly none of the three parameters were Null. Even after searching on the internet, I couldn’t get a break through. I checked the correlation token being set for the task on creation and the one passed “OnTaskChanged”.
After spending a lot of time, one of my colleague told me to check for the values being passed in the HashTable. That was it. Before executing the AlterTask method, the Workflow runtime checks the items in the workflow. If it finds any of the Item from the Hashtable missing, it does not allow the AlterTask method to execute.
In my case too, I was passing a null value for one of my flag, which  was getting checked in the workflow. After setting the flag, the workflow started working as expected.

Trek To Lohagad   2 comments

Read the rest of this entry »

A Saturday, well spent!   1 comment

Life has become so hectic nowadays. People like me, staying in suburbs of a Mega city like Mumbai, spend most of their time either in their office or while traveling. They hardly get any time to spend with their family and friends. Well, I am no different. So, a break from the daily schedule is always welcome.

Korigad

At the Ganesh Darwaja

Last Friday my friend Hemant called me asking my plans for Saturday, he was thinking of an outing on Saturday. Since I had nothing else planned, I conveyed my availability. We first thought of Kelve beach, which is around 60kms from Vasai. We called up others in our group, but most of them had their plans. Expecting everybody to come at such a short notice would be asking for too much. Finally we were just four of us. Hems, Sachin, Anand & Me.

On the highway near Panvel

We had a conference amongst four of us late in the evening and concluded that going to Kelve beach for four of us would be a bit boring. Meanwhile Sachin came up with an idea to go to Lonavla. His grand parents stay in a small village named Karla over there. His grandfather has put in a lot of effort on his mango garden. Sachin said it would be worth a visit. On top of that I suggested a small trek to Koraigad. So now, we had a long drive plus a small trek plus a visit to the Mango garden as an option! The decision was simple. We decided on Lonavla. This would be the first trek for this season!

We had to start as early as possible. But Anand had some important work in the morning. So we decided to start at 7:00 am in Hemant’s car. Hems, Sachin and Andy came to my place by 7:40.

The Long Drive:

As always, we started our journey with the groups favorite slogon – “Ganpati Bappa, Moriyaaa…. Undir mama ki jai“.  This was the first time we were going for a long drive in Hemant’s car. He has good control on the car. But has a habit of driving a bit too fast. It needs a bit of effort to keep his Peppy car, the A-Star to run on lower speed though :) .  We all, including Kaka-kaki,  had told Hemant to avoid over speeding. His conscious effort to keep the speed in check was quite visible.

A view of the valley ahead of tiger's leap

We refueled our car on the Ahmedabad highway. After a while we were on Ghodbunder road. The small ghat section followed by the road aligned with the creek, looks more beautiful at early morning.  We took the Thane-Belapur route via kalwa as it avoids two road tolls. None of us had a proper breakfast while leaving in the morning.  By the time we had crossed into Navi Mumbai, every body of us was feeling hungry. We were looking for a road side tapri for a quick chat-patta breakfast, but ended up at McDonalds just before the Mumbai – Pune Expressway.

McDonalds, need a special mention over here. Coz, this made me nostalgic thinking of the old college days outings with this group. With limited pocket money, our entire picnic budget use to be bit more than what we spent here at the Mcdonalds for a single breakfast. Then it was the  great Indian burger – Wada Pav which was our staple food. Good or bad I am not sure, but the wada pav is much more tastier than this videshi khana.

We took the Express-way and reached Lonavla in around 40 mins. We were heading towards Koraigad. Very few people are aware of this place. It is around 20 kms from Lonavla, near a hamlet named Peth-Shahapur. The road is very curvy and has steep turns. With dense forest on one side and valley on the other, the experience was overwhelming. We made a quick halt at one such curve. The blowing wind from the valley was too strong making it difficult to stand on the edge to view the valley. We left this place soon to reach Peth shahapur by around 11:30.

First Trek of The Season – Koraigad:

Before writing about the trek here is some information about the fort:

Korigad (also called Koraigad, Koarigad or Kumwarigad) is a fort located about 20 km away from Lonavla in Pune district, Maharashtra, India. Its date of construction is not known but likely predates 1500. It is about 929 m above sea level. The closest village is Peth Shahpur.

Almost the entire fort is visible

History: This fort was incorporated into swarajya by Chatrapati Shivaji Maharaj along with the forts of Lohagad, Visapur, Tung and Tikona in 1657.

Fascinating Spots : Koraigad appears like a wall from Peth Shahpur. On the top of the fort is a huge plateau. The ramparts on this fort are around 1 ½ kms in length. While coming up from the Peth-Shahpur route, we come across many caves, some cisterns and an idol of lord Ganesh.

A cave, Must have been used as a store house.

Now because of the Mulshi dam, a lake has formed close to the base of the hill on which Korigad stands. There are two lakes on the top of the fort. A temple to its patron goddess Koraidevi also exists along with several smaller temples to dedicated to Vishnu and Shiva. The former has been recently renovated and has a 3 foot high Deepmala(tower of lamps).The interesting part of the fort is that its wall is completely intact and one can walk along its entire perimeter(about 2 km). Its massive gate is also intact. Several ruins of older structures within the fort still exist. It has six cannons – the largest of which called the Laxmi Toph is located near the Korai devi temple.

The steps leading to the fort

We parked our car near the village and started the trek. It was summer time, but fortunately the atmosphere was a bit cloudy. This spared us, to some extent, from the harsh heat we would have had to face otherwise. The main entrance is from the left side of the fort. It takes around 20 minutes of walk through the forest before we reach the steps that lead to the fort. Despite the summer the jungle had a lot of greenery. As usual, Sachin and Anand were plucking fruits like karwand, jambool etc,. The final stretch before the foothill had thick cover of shrubs and tree branches. Every year trees and shrubs grow and encroach the path when it is not used much. Since the trekking season is yet to begin,  probably we were amongst the initial groups visiting the fort.  The route will become clear when the actual season begins. We made our way through the forest to reach the steps. In the next 45 minutes we were at the Ganesh Darwaza. There were some caves en route the ganesh darwaja. Since this was our first trek of the season and the summer heat, we had got a bit tired. We took some rest at the Darwaza before roaming around on the fort. We were the only group on the fort at that time.

A view from the main machi

The entrance leads us to the center of the large plateau on the fort. Standing at the center you can easily see both the ends of the fort. The temple of goddess Koraistands very close to the entrance. There are two lakes on the fort separated my thin land mass. Surprisingly both of them had ample of water even in this season. The area surrounding the lake has a carpet of green grass, which is quite soothing for eyes. The entire Fort perimeter has wall which is still intact.

Steps on the perimeter wall of the fort

We started walking on the wall from the Mulshi river end.  The Sahara Amby valley covers the fort from three sides. A dam has been built on the mulshi river. This has created a very large reservoir which is adjacent to the Amby valley. We kept walking on the wall to reach the Peth-Shahpur End of the Fort. This is one of the main machi (Bastion) of the fort. The road from lonavla to Peth-shahapur is visible from here. As we moved towards the other end of the fort, we could see the private runway of the Sahara Amby valley. A helicopter was landing on the runway.

The edge of the fort on this side is uneven compared to the other side. We found Cannons mounted on its support structure along with the wall. As we reached the other end, below we saw the main section of the Amby valley. A huge super premium colony of bungalows, separated by lush green lawns, swimming pools, golf course, club house and much more.It was beautiful, no doubt. But this man made beauty pales when you compare it with what nature has given us. The structure on which we were standing has stood there for more than thousand years without any one to maintain it. The forest around it is not cultivated by any human. Yet it makes you forget your day to day concerns. This is the way I perceive it. Different people might have different opinions. From here we started our journey back from the fort. We were back to our car within 30 minutes.

The Mango Garden:

It was around 3:30 by now. Our next destination was Sachins native place. We took lunch in a dhaba, on our way to Karla. Sachin was eager to take us to his grandpa’s farm. He had visited the farm just a couple of weeks back and was very impressed with the effort his grandpa had put into the farm. On reaching there we were offered a traditional maharastrian cold beverage called Panha(made of boiled raw mangoes). After an exciting but tiring drive and trek, we couldn’t have expected anything better to drink. We then proceeded to his grandpa’s farm just behind his home.

His Grandpa had always dreamt of having a Mango Garden of his own and that is how he started his research on kalam(A process where the trees roots and bottom stem is of an ordinary mango tree and joining it with a branch of a good variety of mango tree) mango plantation. He succeeded after 3-4 attempts.

Grandpa, with one of his tree

His grandpa is 82 yrs old but still takes care of the mango farm himself. He started cultivating these trees around 10 years ago. At an age when most of us would probably even find it difficult to walk around, if at all we survive till then. And again, for people of his generation, it is not that easy to get information and do research. For most of us, information means getting to the nearby computer and searching on the internet. But for him, it was a difficult journey. He himself had to roam around places like Ratnagiri, Malvan and Goa etc, to get good quality plants. As most of us must be aware, Mango trees are more commonly found in the coastal areas. The atmosphere there is more conducive for the fruit to grow. The temperature near lonavla is comparatively quite high. Grandpa had to protect his trees with shades when they are small. This along with many other small issues like, time it takes before harvesting, fertilizers, pesticides etc, are part of his research. There are around 10-15 mango trees in the garden. There are around 4-5 types of mangoes, namely, Hapus (Alphonso), Ratna, Kesar, Bitti, Goa Manhurd and so on.

There are some other plants like cashew nut, jaam, jambhul (java plum), avala (Indian gooseberry), etc. Grandpa shared with us some of his experiments. His latest being on how to grow 2-3 different varieties of mangoes on one single tree. He is working on getting hapus, kesar and ratna grow on one single tree.

Looking at his energy level, enthusiasm, dedication and excitement to learn at this age, certainly deserves a salute from us.

It was worth spending time there. We started our journey back  reaching home by 9:30. What a fruitful day it was. Physically tiring, but gave us all the much needed break. With time utilized so efficiently, I can certainly say, it was a Saturday, well spent!

The Gandhian Hypocrisy   Leave a comment

Mr. Gandhi (Jr) took so much efforts to reach the village in Uttar Pradesh, where farmers were agitating for there own land. He says, he felt ashamed to call himself an Indian, by looking at the plight of the people over there. We have farmers fighting for their land here in Jaitapur, Maharashtra too. Why can’t he come and fight for these people? Are they not human? Are they not being deprived of their livelihood? Don’t they have the right to decide whether they want to sell their land or not? Or Is it because the Congress is ruling Maharashtra?

Posted May 15, 2011 by Yogi in Uncategorized

Tagged with , , , , ,

Spare a thought!   6 comments

Last month I got an opportunity to visit this village named Tarankop. It is a small hamlet, around 30 odd kilometers ahead of Panvel.  Cause – a medical /food distribution camp in the nearby adivasi padas.

Spare a thought

The kids having a nice time on a tree

Well, these adivasi padas consists of around 40-50 families each. The condition of the people over here is a shocking example of how little India has achieved even after over 60 years of independence. With a mega city like Mumbai, dreaming to be a financial hub for the region, just 100 kms away the difference cannot be more contrasting.

Education for poor

The school in the background has just one classroom and an open veranda

We had carried some some food stuff which was to be distributed amongst the villagers followed by their medical check-up. Along with this, we also provided them with basic medicines, where ever necessary.

Out of the 20 – odd small mud houses there was one small structure with a board, which read  “Pradhan mantri Sarv shiksha abhiyan”(meaning Prime Minister’s Educate All Program).
This was the primary school for the village kids. The villagers told us there was a single teacher who conducts all the classes simultaneously in one single room. The entire setup is very demotivating and hardly any child ends up completing the primary level. Even if a kid completes it, the secondary school is almost five kilometers away from the village. As we traversed more through this place, we realized how the entire area has been left way behind as far as development of infrastructure and human resource is concerned. With not even a pucca road to the village, expecting public transport would be a bit too much. Children are required to walk their way to school daily. Apart from this, the acute poverty forces the villagers to put there children to work and in case of girls, just marry them off.

free medical check up

Basic medical checkup followed by medicine and tonic

Even basic necessity like food is considered a luxury over here. A small pack of Parle-G brought so much joy on their face. The only reason why the kids go to school is for the lunch which is served as part of the governments “mid-day meal” program.  A local social worker has made arrangement for water from a nearby water pipeline. Electricity is being shared from the connection to school and a small GramPanchayat office. Each home wouldn’t be having more than one or two bulbs. Most of the kids here appeared to be undernourished. The village does not have medical facility anywhere nearby.  Kids have bruise marks which take long time to heal without medication. Women have no one to approach with their medical issues and their men could not afford taking them to nearby town for regular checkups.

Most of the villagers depend on agriculture and related activities for their livelihood. But unlike other farmers they do not have land of their own. For generations they have been forced to work on other people’s farm. The region is not very much blessed as far farm irrigation is concerned. Hence farming activities happen only in the monsoon period. For the other part of the year they do not have dependable source of earning. Add to this the meager wages they earn and scene appears a lot more serious.  With such a hand to mouth situation these people are hardly left with anything which they can save and utilize sometime later. They do not have access to banks. They do not know what investment is, not even postal schemes. For occasions like marriages, pregnancies or any other emergency they are forced to  take loans from local elites on very high interest rates as banks do not lend to them. Paying back such loans eats up most of their lifetime else it is passed on to their children.

Children of a lesser GOD

This is the plight of two hamlets which we happened to visit. But certainly there are thousands of such villages/hamlets in India where the situation is similar if not worse. With India having more than 50% of its population in the 15-55 years age group, most of our population is in the working age group. But with children not getting opportunities to learn and educate themselves, how can they, and in turn the entire country, gain from this Demographic dividend? On one side the country is thinking of competing with major economies like the US, China, UK etc, yet  60% of our population is still dependent on agriculture, Which again is heavily dependent on monsoon. The plight of these young children is pathetic. With lack of  appropriate opportunities, one realizes how a crucial resource is being wasted.

Countries like Japan, Italy, France etc are experiencing reduction in their population. Also they have more number of people in the non-working age group i.e. they have more number of people who are dependent on the working age group compared to countries like India, China and the US. India which will be experiencing purple patch of demographic dividend for next few decades. This gives her a unique opportunity which needs to be carefully capitalized on.

With the economy growing at a blistering pace and government initiating programs like UID, NREGA etc, some positive changes shall certainly happen. But we from our end can also do our bit. It’s not always money which stands as a constraint in development. People like these adivasis are basically just uninformed. They are not aware of many things which are available to them. Guiding them, making them aware of different employment possibilities will certainly help them. More than contributing money, spending some time on planning and executing shall go a long way. A similar case study is availaible in the article : The Real Deal  on “Economic Times” . Lets do our bit in our individual capacity. Let’s try and bring some joy on these faces.poor children

CAML Queries   Leave a comment

CAML is a markup language like html that allows developers to do queries against SharePoint lists, it’s syntax is very easy to understand and it allows to add logical conditions like Where, Contains, And, Or, etc, just like a SQL Query.

For one of our projects we have the need to do a filter on SharePoint views, the problem here is that the view it’s a list containing a CAML Query with the filters the view may have, so in order to filter the view that’s already been filtered before, we need to append our filters to the existing CAML Query.

CAML can be used to do the following:

  • Provide schema definition to the Web site provisioning system about how the site looks and acts.
  • Define views and forms for data and page rendering or execution.
  • Act as a rendering language that performs functions in the DLL like pulling a value from a particular field.
  • Provide batch functionality for posting multiple commands to the server using protocol.

CAML can be used in various ways to customize a SharePoint site, including the following:

  • In script or code that implements members of the SharePoint Foundation object model, where CAML strings are passed through method parameters, assigned to properties, or returned by methods and properties
  • In SOAP messaging that passes CAML strings to a SharePoint Foundation Web service to interact remotely with a deployment
  • In front-end site definitions used to instantiate SharePoint sites
  • In SharePoint Foundation Features to add specific functionality within a particular scope

Query Syntax:

1.       Logical Joins:

a.        And: Elements can be nested inside other And elements. Eg. <And><expression1><expression2></And>

b.      OR: Elements can be nested inside other Or elements. Eg.

<OR><expression1><expression2></OR>

2. Comparison Operator

a.       BeginsWith:  Searches for a string at the start of a column that holds Text of the given value.

<BeginsWith><FieldRef Name = “ColumnName”/><Value Type = “Value”/><XML /></BeginsWith>

b.      Contains: Searches for a string anywhere within a column that holds Text of field type values.

<Contains><FieldRef Name = “ColumnName”/><Value Type = “Value”/><XML /></Contains>

c.       Neq: Arithmetic operator that means “not equal to” and is used in queries.

<Neq>  <FieldRef Name = “Field_Name”/>  <Value Type = “Field_Type”/>  <XML /> </Neq>

d.      Eq: Arithmetic operator that means “equal to” and is used within a query.

<Eq> <FieldRef Name = “Field_Name”/>  <Value Type = “Field_Type”/>  <XML /></Eq>

e.      In: Specifies whether the value of a list item for the field specified by the FieldRef element is equal to one of the values specified by the Values element.

<In><FieldRef Name = “Field_Name”/><Values><Value Type = “Field_Type”/></Values><XML /></In>

f.        Gt: Arithmetic operator that means “greater than.” This element is used similarly to the Eq elements.

<Gt><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></Gt>

g.       IsNotNull: Used within a query to return items that are not empty (Null).

<IsNotNull><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></IsNotNull>

h.      IsNull: Used within a query to return items that are empty (Null).

<IsNull><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></IsNull>

i.         Includes: If the specified field is a Lookup field that allows multiple values, specifies that the Value element is included in the list item for the field that is specified by the FieldRef element.

<Includes><FieldRef    Name = “Field_Name”/><Value    Type = “Field_Type”/><XML /></Includes>

j.        Lt : Arithmetic operator that means “less than” and is used in queries in views. This element is used similarly to the Eq and Gt elements.

<Lt><FieldRef Name = “Field_Name”/><Value Type = “Field_Type”/><XML /></Lt>

k.       NotIncludes: If the specified field is a Lookup field that allows multiple values, specifies that the Value element is excluded from the list item for the field that is specified by the FieldRef element.

<NotIncludes><FieldRef    Name = “Field_Name”/><Value    Type = “Field_Type”/><XML /></NotIncludes>

 

3. Group Operators

a.       GroupBy: Contains a Group By section for grouping the data returned through a query in a list view.

<GroupBy  Collapse = “TRUE” | “FALSE”><FieldRef Name = “Field_Name”/></GroupBy>

b. OrderBy: Determines the sort order for a query. The OrderBy element contains a group of FieldRef elements.

<OrderBy  Override = “TRUE” | “FALSE”  UseIndexForOrderBy = “TRUE” | “FALSE”>

<FieldRef     Ascending = “TRUE” | “FALSE”    Name = “Text” />

</OrderBy>

4. Value Elements

a. Month: Used in the DateRangesOverlap element to retrieve from a calendar all instances of a recurring event that occur within a month.

<DateRangesOverlap>  <FieldRef Name= “EventDate” />  <FieldRef Name= “EndDate” />  <FieldRef Name= “RecurrenceID” />  <Value Type=\”DateTime\”>    <Month />  </Value></DateRangesOverlap>

b. Now: Returns the current date and time.

<Now></Now>

c. Today: Renders the current date in the format that is relative to the server’s local time zone. For servers in the United States, the format is MM/DD/YYYY (for example, 1/21/2001).

<Today  Offset = “Integer”></Today>

d. UserId: Contains the unique ID number of the currently authenticated user of a site, as defined in the UserInfo table of the content database.

<UserID></UserID>

e. XML: Serves as an outer wrapper to denote an XML data island. This element does not render anything by itself.

<XML></XML>

Simple Example:

<Where>

<And>

<Neq>

<FieldRef Name=’Status’ />

<Value Type=’Text’>Accepted</Value>

</Neq>

<Eq>

<FieldRef Name=”AssignedTo”/>

<Value Type=”Integer”><UserID/></Value>

</Eq>

</And>

</Where>

<OrderBy>

<FieldRef Name=’Created’ Ascending=’True’ />

</OrderBy>

*note:- I have tried to collate as much relevant information which I thought would be useful. The information has been sourced from different site on the internet and my own know how of CAML.

Posted March 3, 2011 by Yogi in Sharepoint, Tech

Tagged with , ,

File type Integration process   Leave a comment

Until now I had worked only Query type or Time based integration processes. Users who have never worked on Scribe might have never heard of these terms. So, just to give readers a brief idea, scribe supports four types of Integration Processes viz.

1. File Type: The event is triggered when there is a new file activity in the event folder.

2. Query Type: The event is triggered when the source query returns some data.

3. Time based: The event is triggered after fixed intervals set by the Console admin.

4. Queue based: This event is triggered when a new data object is placed in the Scribe input queue.

In one of our latest requirements there was a scenario where there were several production machinery which generates different log files from time to time. These logs have information like start time, chemicals used, amount of chemicals etc. These log files would be placed at some predefined folder on the network.

The Scribe packages were supposed to read from these logs and dump the data into staging tables from where other packages would take them for further processing.

Accordingly, we planned to use the ‘File’ type integration process provided by Scribe. Following are some critical aspects which need to be kept in mind.

1. Remote folder location:  The integration process requires the user to input the folder location and the type of file which needs to be read. Typically this is the location which would raise the event and initiate the integration process.

2. DTS reading Location: The DTS which has the file with a specific schema as source, need not read from the same location as the remote folder location used in the integration process. The DTS can be configured to read from a location which is independent of the remote location. This feature comes in handy when the incoming files come with a different file name every time. The integration process will raise event every time a file is placed in the folder. But the DTS will read only from the filename which was entered at the time of development.

This can be handled by copying and renaming the file to the DTS location. This can be achieved using a simple Batch file or a .Net exe. The script/exe can be run as a pre-run process in the integration process.

3. Trigger on regular intervals: It may so happen that more than one file is placed on the remote location at a time. But the DTS is capable to read only a single file at a time. To handle such issues, Scribe integration process has the facility to trigger by itself after a given interval of time. Using this feature and some custom queuing logic the problem of multiple files can be resolved.

Follow

Get every new post delivered to your Inbox.

Join 29 other followers