Total Pageviews

Thursday, July 19, 2012

TCS CodeVita : A quarter million pageviews later ...


TCS CodeVita Pageviews
10 days and a quarter million+ pageviews later, its time for analysis. Firstly, I think its a decent start for an initiative, open only to Batch of 2013 of engineering or equivalent graduates. The updated web page says the contest is open for only TCS accredited colleges. Assuming that approximately 4 Lakh students graduate every year and given TCS' track record of recruiting 30K-40K candidates for the past few years, I would assume that the target audience for this contest is approximately 2 Lakh students. The event is a team event where each team is comprised of 3 people. Given that there are approximately 6K teams, CodeVita seems to have attracted participation from as many as 18K students. Not bad, I would say. The registration deadlines have been extended to 31st July, 2012. Its very possible that CodeVita breaches the 5-figure mark. That's a huge number and I have not heard of any competition of that scale. It will be interesting to see how TCS manages to pull off things at such scale.

For the uninitiated, a coding platform usually comprises of an engine which compiles the user submitted code and runs a battery of test cases against it before it can figure out if the submission is to be accepted or rejected. To isolate users from each other, there is usually some sand-boxing that the engine does. All these activities - compilation, execution, sand-boxing etc. are resource intensive. Depending upon level of difficulty, its fair to assume that in a 6 hour window a team would submit at least 10 solutions. That will be 10 * 10K submissions for the engine to handle spread over a 24-hour window. That's roughly 1 submission / sec. To compile and execute 1 submission in 1 sec is a pretty stiff challenge. Moreover, the submitted code is written by the participant. It is very likely that these submissions would run longer. The longer a submission sits inside the sand-box, the more challenging it will keep getting for the engine to manage a rapid rate of submission. Will be interesting to see how its all managed.

Next, let me talk about region wise participation statistics. CodeVita website shows participation from each state. I have access to Google Analytics traffic report for this website. The next set of observations is based on data from these two sources and some correlation between them.

  1. Bangalore and Chennai have nearly the same number of page views, but Tamil Nadu is far ahead of Karnataka in number of teams registered. What it probably means is that rest of the Tamil Nadu has done much better than rest of Karnataka.
  2. Top 5 cities showing interest in CodeVita are Bangalore, Chennai, Kolkata, New Delhi and Pune while Top 5 states which have generated interest are Tamil Nadu, Andhra Pradesh, Maharashtra, Karnataka and West Bengal.  Hyderabad is sixth on the list. Not surprisingly, the states' growth is driven by their educational capitals.
  3. That brings attention to Mumbai. Mumbai is a lowly 12th of list of cities showing interest. Excluding Navi Mumbai, Mumbai has about 25 engineering colleges in TCS' accredited list. We don't know the college-wise break down of registrations yet, but low traffic from Mumbai is a strong indicator of Mumbai's poor participation. I strongly suspect Mumbai's participation will be a tiny fraction of Maharashtra's participation. Given that TCS is head-quartered in Mumbai, this is significant. Wake up, Mumbai, you sleeping beauty ....
  4. We see traffic coming from approximately 80 Indian cities. Would be fair to assume that each of those cities have on an average 3 engineering colleges. That suggests that we could see participation from approximately 250 colleges. In all likelihood, this could be the largest assembly for event of any kind where these many colleges have come together on the same stage.
  5. 66% of the traffic is direct traffic i.e people have reached the site by typing the web site URL. 25% traffic is search traffic. 9% is referral traffic. Facebook has largest share in referral traffic. What this also means is that traditional means of advertising the event has been the pre-dominant form of advertising the event. 
  6. Average time spent on the site is 15 min per user session. Not bad, considering that its only a registration site. This translates to 4500 eyeball-hours. (18000 users * 15 min)
  7. Average page load time is a whopping 10 seconds. But this also includes photo uploads by registered candidates. Besides it also depends on end-user bandwidth. Many who accessed the site would also be first-time users. Their browser caches may also not be primed. Hence difficult to say whether the site is slow or not. My personal experience has been that the site loads in sub-seconds, because I have browsed it many many times.
  8. 46% of the traffic is from Chrome, followed by 39% from Firefox and 11% from IE. In TCS (AFAIK), we don't use much of Chrome, so I doubt the development team was geared for this.
  9. 95% traffic is from Windows machines, 3 % from Linux and 2% from mobile devices and corresponding OSes.
  10. Web searches return hundreds of pages for "TCS CodeVita". Almost nil online presence for CodeVita on Twitter. 
Adios, Fellas. Will keep following and posting this event. If you like the idea of pan-India inter-collegiate coding competitions, please get the word out. Drive that budding geek you know to take part in the competition.

Disclaimer:- The author works at TCS. This blog is NOT an official source of information about TCS CodeVita. Since the author is a passionate programmer and the source of action is so near to him, it is but natural for the author to talk about it. Is that not why people blog?

Monday, July 9, 2012

An upcoming sport - Coding Competition

India has never made it big in renowned inter-collegiate programming competitions like ACM ICPC or IEEE -IEEEXtreme. The 2011 ICPC and IEEEXtreme competitions had first Indian teams ranked at 42 and 105 respectively. Not to take away anything from the teams, but this is hardly anything to be proud of from a country which produces approximately 4 Lakh (1 Lakh = 100K) engineers annually. In fact, if we consider the fact that IT industry has been the darling of the Indian economy for a past decade, the results are downright poor. For a country having dearth of technical talent and good English speaking skills these results are just not good enough.

The reason is obvious, there are not enough domestic "tournaments" which these colleges can take part in and hone their skills before bursting on the international skills, whereas their international peers have already solved dozens and dozens of programming problems "just for fun". These countries  / universities take pride in organizing such events. Participants receive vociferous support from peers and well-wishers and Coding Competitions are nothing short of an admired sport. We in India are far far behind on this aspect.

This article is inspired by the fact that India's largest IT company - Tata Consultancy Services (TCS) is conducting a pan-India coding contest that is expected to attract thousands of teams from hundreds of colleges. The pleasure of being able to participate in such events is a reward in itself, but from what I have heard and read on the net, the prizes for winners are attractive too. Prizes include iPad 2 WiFi, 16 GB, Smart Phone, Kindle, Digital Photo Frames, IEEE membership etc. How I wish the clock winds back by a decade where I as a collegian could have a shot at these prizes :(

The name of this competition is CodeVita and requires students to register in order to participate in the event. The registration URL is http://tcscodevita.com and it seems that the student community is responding well to this opportunity. The schedule as advertised on the site is as below.

TCS CodeVita Schedule (Source: http://tcscodevita.com)

Registrations opened at 3 PM IST on 9th July 2012. The site is not yet indexed by Google or other search engines which could make this post a very useful one :). Considering that the site is so fresh that Google has not yet indexed it, it is heartening to know that registration count has already reached 3 figures within a few hours of opening.
Screenshot of the registration site
Spread the word out. Let eligible college students know that honour, glory and oh yes, the prizes await them. I for one will be interested to see how it pans out. Will you be interested?





Disclaimer:- The author works at TCS. This blog is NOT an official source of information about CodeVita. Since the author is a passionate programmer and the source of action is so near to him, it is but natural for the author to talk about it. Is that not why people blog?

Sunday, May 13, 2012

Managing Personal Finances Using GnuCash

Bookkeeping for Home Accounting
Heard from some wise guy - "Money has only 3 purposes viz. Earning, Spending and Donating. To be successful in life you need to do all three very well."

Nothing could be more true. After having undergone the pains to buy a house, it behooved me to put a little discipline in managing my finances. My track record with managing money prior to buying the house was dismal - No tax saving, no records of where the money was spent, no efforts to make it grow. In short, I was a dud. All that had to change. My only strength was that I was good at number crunching. I knew I had to augment it with many skills - most importantly finding out when, where and how I was spending money. So I decided to learn Accounting.

I had no background in Finances, Accounting or Commerce. My background is computer science and engineering.  I wanted to bring every single means of spend – credit card, debit card, net banking, phone banking and every single header from EMI to Entertainment under the ambit of this “Get Disciplined” project of mine. Clearly, spreadsheet was not enough and maintaining them certainly wasn’t easy. I wanted to move out from this method since it was too time-consuming and error-prone. So I started looking out for some software solution to help me meet my goals. That’s how I stumbled upon GnuCash.

It was then that I figured out the basics like Double Entry accounting. A credit in some account has to have debit in some other account.  Voila, that was my answer. All the time it was in front of me, but it had never occurred to me that this way I could have kept a tight grip on my finances even when using spreadsheets. GnuCash, automates it. In fact, automates is an understatement, GnuCash enforces it. One cannot enter a transaction without telling the software which header to add the credits and debits to. It took me a few hours to understand the whole stuff, but the software UI and documentation made it so easy.

Here are a few examples of what I could achieve using GnuCash that I couldn’t with spreadsheets.
  1. Effectively tracking credit card transactions – The transaction dates and the settlement dates were almost always different which made it difficult to tally in spreadsheet.
  2. Cash transactions РThe loop invariably used to be withdraw from bank, buy something, usually multiple items and update the spreadsheet headers (e.g. Books, Gifts, Entertainment etc). This way I could correctly keep a track how much I spend where, but I could never tell how much is remaining in the bank account and the wallet. GnuCash updates it automatically once I enter the transactions. Consistency issues were pass̩ once GnuCash burst on the stage.
  3. Reimbursement transactions – Many times, I need to spend and get reimbursed from office. These are multi-day transactions sometimes spanning months and sometime different currencies. I found these very easy to maintain in GnuCash. GnuCash’s colour coding used to tell me if I needed to follow up for settlement. Doing this in spreadsheet never gave this insight.

GnuCash works on the following principle



Once this is understood and you have an idea of how you want to structure different headers under which you will keep track of expenses, everything becomes easy. GnuCash defaults are quite relevant and can get one started without having to make any changes. However if you are the type who is fussy about seeing data only under headers than you want, GnuCash allows customization to suit your taste. I didn’t have to make much changes. The defaults just worked fine for me.  All I had to do was enter the balances from different accounts into GnuCash and I was ready to go. On an on-going basis I just had to enter transactions. That’s it. Pretty much an “Enter it and forget it” funda.

Moving from spreadsheet to GnuCash gave me the following advantages

  1.  More time to myself – No more writing formulae and verifying manually. Software does everything from managing data to generating reports.
  2. Less Typing – Being a software professional I end up typing up a lot. With GnuCash’s one time entry I need to type a lot less without having to compromise on data consistency.
  3. Self Discovery – Earlier, I thought I knew where I was spending my money. Now I know exactly where the money is spent.  One of the discoveries for me was that I was indeed susceptible to impulse buying which otherwise I would have firmly denied. With smart phone apps and books coming for as less as $0.99 I had indeed spent much more than I had thought.
  4. Peace of mind – It’s convenient to keep all entries for a financial year together.  Those are thousands of entries for me. Keeping in spreadsheet is so error-prone, especially when reconciling transactions, that it is easy to lose a few important details. With GnuCash I don’t have to worry about that. I can create a timeline of the spends.
For a full list of features, go to http://www.gnucash.org/features.phtml . If you like it, download a copy for your platform. It has worked like a charm for me without any quirks. The hints at startup give useful Usability as well as Best Practices tips. That minimizes the drudgery in entering transaction details and reduces a lot of efforts.

All in all, my “Get Disciplined” project is on track. As a side-effect it has made me more lazy. These days, I think more about how to escape not having to even enter the transactions. In fact, GnuCash supports Home Banking Computer Interface (HBCI) which allows German users to download a statement from their banks. Until that sophistication comes in India, don’t really see an alternative to manual data entry.

Overall, I am pretty happy how managing personal finances has become easy. If you have easier (and cheaper) ways to do it, let me know. GnuCash is free (despite having many more features) and that’s hard to beat, but they do accept donations. Hope I have been useful here.

Be in charge

Sunday, February 19, 2012

Bitter End to a Great Beginning


This weekend of 18th and 19th Feb 2012 I was playing Bhakti Park Premier League (BPPL), a tennis ball cricket tournament. It was played on a very well done ground with grass cover and “pata” wicket made of rolled red soil.  The BPPL is organized to weave a camaraderie between residents of Bhakti Park, Wadala (E), the builder (Ajmera Builders) and near-by localities such as Imax theater. Unity through Cricket, a great intent !!!.  Kudos to the all those who took the idea from conception to execution. This year was the second year of the tournament and I was very eagerly waiting for this moment to arrive.  As the tournament progressed it was getting interesting with each match and things were all hunky dory and it was fun unlimited, at least to me.

Then came the bitter moment and it came so swift that there was hardly any time to give a measured reaction. The rest of this article is about that. Whether it is an angry rant or expression of heart-felt concern of a cricket lover is for you to decide. Be your own judge.  Here are the details.

The tournament comprised of two groups of 5 teams each. Group games were round robin basis with each team playing every other team in their respective group. Top 2 teams from each group would qualify for the semifinals. Winners would advance to the finals. So far so good.  Now comes the part with the gotcha. The tournament rule said that in case of more than 2 teams tying for the top 2 spots in the group the team that will go through will be decided based on the highest score those teams scored in any of the league matches. As unintelligent and unattractive this rule was, the fact remains that it was known before hand. Later on I will elaborate of why it was silly and dumb, but first I will quickly come to the point that made my experience bitter.  Here it follows

In group B, there were 3 teams that had a chance to qualify for second spot in the group.  The last league match, let’s say was between First and Second team. Both had won 1 out of 3 matches each. The Third team was sitting with 2 wins and 2 losses. Now it so happened that the Third team which had finished all the league games had the top score of 45 runs from 5 overs.  First and Second team had never crossed 40 in their previous matches with average runs per inning closer to less than 35. According to the tournament rules, the winner of First v/s Second match could qualify if the winner scored more than 45 runs, else if the match scores were less than 45 runs the Third team could qualify for the semis. This is when the absurdity of the rule became glaringly evident and it was clear that teams First, Second and Third were not in control of their destiny. Here is how:

  •  In the last match between teams First and Second, if the team batting first sets a target of less than 45 runs, both teams lose out of a semi-final berth.
  • Third team who was keenly watching the game, could do nothing but pray that scores remained below 45 disregarding all their previous merits.
Situation could still be salvaged at this point if the tournament continued in fair spirit. If a hard fought tussle between teams First and Second took the score above 45 then it would have been fair that the winner of that match rightly and justly move to the semis. If it resulted in no team scoring 45 runs, then again it was fair and just that Third team qualified.

This is exactly where things went bitter.  Teams First and Second colluded.  Amongst themselves the teams decided that the team batting first would be allowed to score more than 45 runs. The team bowling first would then try and chase the score, thus effectively shutting the Third team out of the tournament. Before the match, began the organizers were alerted of the possibility of match-fixing, but it was only fair that at this point they gave benefit of doubt to both the teams. They couldn’t act on mere suspicion.

As the match progressed it became clear which way the winds were blowing. The first innings was marked with shoddy fielding (catch drops, missed run-out, overthrows, fumbles and unnecessarily attempted run-outs)  and poor bowling (spurt in number of extras, loose balls – short and full tosses). Also worth noting here is that the 45-run mark was met in 4.4 overs for loss of 2 wickets. The innings folded marginally above 45 runs and each run above 45 was taken amidst superb fielding. Yes, I am alleging match-fixing and here are my reasons

  1.  Of the 19 or so matches played in the league, only about 5-6 matches had a score of over 45 (in 5 overs). Hence the probability of scoring more than 45 runs was close to only 30-35 percent.
  2. Of the matches where 45+ was scored, 2 were scored by strongest team in the tournament and 2 were scored against the weakest team in the tournament. These were 4 separate matches.
  3. Teams First and Second had never scored 45 runs in their previous outings with their average scores being closer to 35 runs per innings. They had never even crossed 40.
  4. Close to 30% runs of this controversial inning could be attributed to ‘extras’ as mentioned above. This is much higher  than previous matches for both teams from respective perspectives (batting or bowling)
  5. The team which batted first had lost on average 5 wickets in each of their previous matches, whereas in the said match they lost a lot less.
  6. Last but not the least, as a player I could clearly see the bowling team under-perform.

I belonged to the Third team. Hence one can argue that it’s a case of sour grapes for me. My rebuttal to that is that I trust my conscience (based on my points above) and I would not have alleged match fixing if none was done, but I cannot remain silent when scrupulous practices bring disrepute to the game I love. Winning and losing are part and parcel of the game. I am not concerned that we didn’t get to play the semis, but I am concerned that the game was brought to shame due to wrong actions by teams and inaction of the organizers.

Repeated appeal to organizers to investigate the matter fell on deaf ears. Under the garb of “not enough evidence”, the organizers allowed the game to continue without taking any action. As a self-respecting individual with love for Cricket I retracted further participation, refused lunch, registered a protest and am going to return the sponsors T-shirt. Thanks to many others who followed the same suite.

Whatever has happened has happened, but what can we learn out of this.

  • First of all, I would like to pooh-pooh all arguments which refuse to accept that there was match-fixing. Dig the stats, see the recording, ask your conscience – You WILL get your own answers.  If there was match-fixing why not act swiftly with spontaneity even if that means changing rules on the fly? Why shy away from a tit-for-tat when protecting integrity of the game?
  • Secondly, there is no merit in the argument that teams can decide how they want to play even if that means allowing some easy runs to the opposition, because that is against the spirit of the game. There is a fixed set of parameters that earns one Cricketing respect and not putting up a fight or killing the competition is not one of them. Depending on situation, does one get a license to cheat?
  • Third – The concerned teams should ask themselves - Is the semifinal berth more important than honour and cricketing respect? What prompted (or tempted ) these otherwise honest individuals to collude?
  • Fourth – Do the organizers have an iota of cricketing sense? What prompted the organizers to “innovate” some silly rules? What was so difficult about breaking ties with net run rate which considers all-round performance at the same time enforces competition? Why not consider a super-over to break ties?
  • Fifth – Does the sponsors responsibility end with provision of funds? Did they keep tab on tournament rules? If the hard-earned money they are pouring in, leaves bad taste will they earn goodwill or get returns?
  •  Finally – Whose job is it to ensure that things remain fair and just?

My closing comments to organizers are – Cricket is a great tool for unity. Organizers should not waste the opportunity by creating non-sensical, illogical rules. If innocent-until-proven-guilty is binding, inaction after discovery is a crime. Remember, the participants in the tournament have many available alternatives to spend their week-ends. Organizers should feel privileged that participants and their families devoted time or be ready for poorer participation in future editions. Organizing Cricket is more about organizing the fairness of the competition more than food, logistics or prize money. Let core cricket not suffer due to poor planning. Be aware that it is Cricket that brings crowd, not food, facilities or trophies. Salvage some pride by issuing an apology for amending poor rules that create opportunities for cheating. Do your homework and (if and) when you find traces of cheating rebuke the cheaters. Most importantly, consider fairness concerns before any other concerns for future events. On my scale of ratings, you get a 0 out of 5 for this years edition.

Appendix
Why the decision to break the tie on the basis of highest scores is dumb?
Because,
  • The team chasing is limited by the targets set by the team batting first. So unused deliveries are unaccounted for in the performance.
  • The rule is unfair to a team who has stronger bowling units than batting units
  • Considers only peak performance as opposed to consistent average performance

Cricketing Solution to the situation
The unfortunate events could have been averted if the team chasing would have been assured a full quota of 5 overs despite overhauling the target. If the chasing team would then have reached the 45-run mark then it was the rightful candidate for a semi-final berth. That way it would have ensured competition as well as fairness.