Wednesday, 16 February 2011

Tip of the day, strongly typed repeater dataitems

Do you recognize this type of code?
            <asp:repeater ID="MyRepater" runat="server">
                    <span class="some-class"><%# DataBinder.Eval(Container.DataItem, "APropertyOnMyObject") %></span>

Wouldn't it be sweet if we could write something like this instead?
            <asp:repeater ID="MyRepater" runat="server">
                    <span class="some-class"><%# Container.GetItem<MyObject>().APropertyOnMyObject %></span>
Then we have the object strongly typed and will get compile errors if we've messed up.. I don't know about you, but I find it nicer to read without all that boiler-plate-code too

Have you guessed what's coming next..? =]

Well now you can! Just throw this baby in a suitable place and import the namespace in your page (or via web.config to get it in all pages..)

    public static class RepeaterItemExtensions
        public static T GetItem<T>(this RepeaterItem repeaterItem)
            return (T)repeaterItem.DataItem;

Enduro-3 Adventure race 2011

It was a great experience of completing Enduro3 IT Challenge at 5th position. We partcipated in IT mix category and our team was ITX06/Raw Deal.

I wish many more people from IT could participate and enjoy such races.

Enduro3 2011 Adventure race was a mock up for next year’s International level race. This time they tried to include some tricky content like Orienteering! Although it was bit easy but we thought 'what if there is no clue other than a orienteering map/sheet?' - This certainly to be considered for next year’s race.

I suspect that the race would become international any time soon. I have been hearing this for a long time. The organizers were better this year but need to get even better! One thing they really need to do is bring in more support vehicles to help injured/stranded participants along routes where there is no civilization. They also need to take care of our cycles when transporting them back. After completing When we approached the organizers at finish line, their excuse was that they are doing a service. For Christ’s sake, we paid them separately for transporting the bikes back.

The standard do needs to be lifted to make it an international race.

The organizers seem to be positioning the race as a 'tough' self-supported race. While I *finally* understand their unique position, when I hear about the way they treat the bikes, I feel they are using their 'tough' stand for covering gaps in their event hosting abilities.

Most of the participants don't train for the race before participating. When they are pushing hard in the panshet backwaters area, what scares us is that there is no one to back them up if they meet with an accident. A lot of teams lose track because the markers are not well placed. and also you can not make use of GPS and MAP as it was not properly scaled.

Another weird part is that at each time check (TC), the teams line up and sign on the TC form. So if you are marking a team, you can lose contact with them if you lineup for signing behind them.

Good Experience:
Our race started at 9:15 AM on 04-Feb-2011 from SP college ground, and route till Sinhagad toll booth (check point 1) was easiest one we experienced after that whole route was terrible and enjoyable. we kept continuously pushing our bicycles and we crossed Kondanpur village,Vangni Ghat, Vangni village and after that we reported at karanjvane at around 2 P.M.same day. and then we crossed margasni and vinzar village through ups and downs. Our Girl partner Ms. Beenu Thomas supported us a lot, motivated us and reached Kaarev phata (Passage control-2) and crossed Pabe and Dhanep Fork village, After that we reached Vihir (Check point 3) with little water and food but get self motivated because we did not had any other option than moving ahead and we reached our TC-5(Ghisar) where we arranged some food and water with the help of village surpanch and took a rest for 2 hour at around 7 Pm and we waited for few teams and finally started a journey toward dense forest where we could not even drag our Bicycles, we had pull belongings and Bicycle and kept moving ahead throughout the uphill’s where we completely lost our stamina and the only thing we left was determination to complete the race.
Twice in the way we stuck to find out the way ahead. Most of us decided to sleep in the forest because we did not had any other option. At the same time Me and Ravideep who was my team partner decided to search root first, finally we both found one route which was going somewhere and we decided to go ahead in the night itself with all teams.
In between the journey we once again stuck in the forest for around 4 hours where all of us decided to sleep but I decided to search for the root and there were no mobile signals or communication channels. we just had one satellite enabled one GPS system with us. we two Guys any how located our position on GPS wrt MAP and we realized that we were on right track. Also one of us seen one red ribbon on the way so we thought we were on right track. But most of us were already slept so we did not wake up any one and decided to sleep till morning 5 o'clock.

Finally we reached ThanGaon around 10 O’clock next morning where my team member Ravi did River crossing and we took rest for some time. After that we again started our next journey which was supposed to be our next day journey.

During next day we really got tired a lot because of uphill journey through out, we took lot of breaks in between but finally we reached our destination (Panset water sport) in the evening 6:30 P.m. and had some food.

Even after reaching our destination, there was no arrangement for coming back with our Bicycle. and the private Vehicles were there which were asking around Rs.1500 till pune. so we decided to drive again for 3-4 kms and we reached a village nearby that place from where we got transport at cheaper rates.

We reached pune(SarasBaug) aroung 10 pm and we again drove for 15 kms to reach home. Finally we were happy to sleep.
Next day we had prise distribution ceremony at Chandni Launge near on NDA road.

This time we could not get any position but next time we will surely win.

***************** Come and join us, if you have Guts *****************************************