Building a stock market game in 2008

This is a post I meant to write almost 13 years back, on how I built a stock market game using Ruby on Rails for our B-school flagship event Quadriga (I did release the game source code on Rubyforge, but the site is no longer operational). Like they say, better late than never :). Below is a short screen capture of the game in action from the beta run I had organized, showcasing the different features to give you an idea of what it entailed:

The game itself was a very simplified version of a stock market designed to be played as individuals or as a team with the following features:

  • Simple buy and sell transactions without any short selling, futures or options .
  • The trading would be spread across a period of 12 sessions with the prices changing before the start of each. Each user would get a fixed set of shares for each of the stocks at the beginning of the game so that selling activity can be initiated from period 1.
  • There was an element of randomization in the stock price movement from period to period partially influenced by a set of pre-defined events.
  • A user login feature with public leaderboard to give everyone a view of how they are performing against the competitors.
  • A transaction & stock price history section to view the changes over time.

I have fond memories of this game as it game me an opportunity to try out Ruby on Rails in a real world scenario (this video from 2005 was the inspiration). I had a lot of fun coding the game and consulting classmates & seniors on how the stock market should be simulated. Even more fun was the beta testing round we did over the hostel LAN (the video above is from the test run as you can in the message on the login screen), with most of my classmates participating. We have come a long way on the technological front, and one of the things I do find missing in the game is an element of visualization in the form of graphs. Mobile support was of course not relevant back in 2008, but today it would be a no brainer.

As for the actual event, we brought in an element of security/standardization where we had the competing teams using laptops borrowed from my classmates. To ensure that their personal files were not affected, we setup Linux virtual machines on top of the Windows environment, and the teams were using browsers to access the game running my laptop through a Wi-Fi network we had setup on a router borrowed from another of my classmates (it was 2008 after all).

This nostalgic post would not have been possible had I not backed up the files to an external hard disk and to OneDrive eventually. So, here’s a bit more of throwback with the event posters & other collaterals:

Social Networks for Rural India

A few weeks back, I participated in the case study competition of IIMA’s Confluence along with 3 of my classmates in SJMSOM, IIT Bombay. As a part of the competition, we were asked to prepare a report on what a social network with 500 million users in India would look like. To this end, we conducted a survey to understand the expectations of users from a social network. We also researched the new developments and requirements for such a huge user base.

One of the things that is evident is that to reach a user base of 500 million as the case states, it is imperative that the social network is accessible to users in rural areas and bottom of the pyramid. There are nearly 6 lakh villages in India and around 60-70% of the population is in the rural areas. So, we dedicated a section in our report for this part of the population and the possible ways to get them on board and the value proposition for the different entities in this regard. I worked on this portion of our report and below is the extract from our report (with some links inserted for clarity) that dwelled upon this part. (Incidentally, my team mate, Parasuram who wrote the introduction of the report has also posted his part online)


There are numerous challenges that present when trying to increase the penetration of a social network in rural areas ranges from lack of infrastructure to that of education and local languages.


Since social networks are internet based and the internet penetration is negligible in the rural areas there is a major challenge in getting the potential users on the network. Mobile phone based access could be a potential solution, thought the penetration is not that high. However, majority of the devices used in these areas are of limited functionality in terms of internet access. Some areas may however have internet browsing centres, but they do not give users anytime access to the network. Thus, the traditional means of accessing the social network are unlikely to succeed in rural areas as the infrastructure is severely limited.

Education & literacy

Even if social networks were to become accessible in rural areas, there would still be challenges in gathering users as very few of the people there are familiar with computers or the internet since they lack basic computer education. Moreover, the internet largely assumes that the user can read and write which in case of rural areas is unlikely to be the case. Thus there is another layer of complexity that needs to be removed or overcome.


Here again, the internet and most social networks have been designed for English speakers (at least none for native Indian languages). So, even if the people were to be educated in the local languages, the language barrier would still remain. Many social networks and other sites do provide Indian language interfaces, but these are not ubiquitous. Also, there are numerous languages in India increasing the challenge further.


Since the challenges are manifold and diverse in nature, they have to be tackled from various dimensions. Some of them need to be tackled at the grassroots and it will take a significant amount of time and effort from various stakeholders to overcome them all.

Access points

  • Mobile: The internet penetration or even personal computers in rural areas is negligible, but the relative penetration of mobile phones in these areas is significantly higher. This makes for a strong case for making the social network accessible on mobile phones. However, it must be noted that majority of the phones are going to have no internet access, and even if they do, the current mobile interface for the sites are unlikely to work on them. This means that an entirely new user interface has to be designed for such users. Some of the requirements of such an interface would be:
    • Largely voice driven to tackle the literacy barriers
    • Support for local languages
    • Maximum information in minimum space without compromising the usability since screen real estate is at a premium on basic phones
  • Postmen with MIDs (Mobile Internet Device): The Indian Postal service is probably the only organization with access to even the remotest of locations. This makes it an ideal partner for increasing the outreach of a social network. The last mile entity, i.e., the postman in this case could be equipped with an MID which would provide functionality on par with a desktop and allow the various households to check their social network profiles in the areas covered by the postman. While this approach tackles the problem of accessibility and increases the richness of the interaction with the social network, it makes for a fleeting user experience as the postman is not going to be able to spend too much time per user. Other complexities would be the initial investments in establishing the infrastructure for such a system and subsequently supporting and maintaining it.
  • Mobile internet centres: This solution could be seen as a cross between the postman MID solution and a browsing centre like ITC’s e-choupal centres. In this case, a vehicle equipped with multiple PCs/netbooks and mobile internet connectivity could go from village to village on a periodic basis enabling the people to access the internet and consequently the social network. There could be a hourly charge for accessing the service depending upon the ability to pay.
  • DTH television services: The social network could also be made accessible on DTH television services as there are a fair number of DTH users in rural areas. However, this has two limitations. First is the unidirectional nature of DTH due to which the service will probably need to be complemented with mobile services to make it interactive. Second is that a new interface will need to be designed for this medium.


Educating the rural masses is essential to growing the user base beyond the city boundaries. In this regard, partnering with different organizations and even the government in a mutually beneficial manner is key. One of the interesting approaches adopted in this regard was the Hole in the wall experiment conducted over the last decade. This approach seeks to emphasize on peer to peer learning in an unsupervised environment using a computer. This would have to be a long term initiative and an internet focused operating system like the Google Chrome OS would be ideal in shifting the learning emphasis towards the internet and subsequently social networks.


For a massive initiative to raise social networking awareness and tap into the potential rural user base, it is imperative to have complete buy in from all stakeholders who are numerous. We are listing some of them here:

  • Telecom service providers: They are essential for the success of social networks in rural areas as they form the backbone of the access infrastructure in any area. Since the rural user base is going to be targeted primarily through the mobile interface, the service providers will have to enable the new means of access to social networks through their networks. In fact tie ups to enable one key access to the social network, like in the case of Aircel-facebook, or feature the social network on the provider’s web interface (accessible through mobile phones) would be key in expanding the user base. In turn, the providers would benefit from increased usage of their services.
  • Corporates: Rural Indians can be seen to be quite brand conscious as many of the major corporates are coming out with smaller SKUs that are affordable to the masses. Moreover, label and container imitation are also quite prevalent in such markets. Thus, corporates with a presence in rural areas would want to increase awareness levels regarding such issues in those markets. This requirement could tapped to become a major source of advertisement revenue for the social network as the social network seeks to connect people and build communication channels between them which is ideal for advertising and recommendations. 
  • Government: In any social development effort, it is important to have a buy in from the government for it to succeed. Since these efforts seek to tackle many of the basic issues like literacy, education and communication, there is a major role for the government to play in order to promote development by the means of favourable legislations, rules, regulations and the wide array of resources including the Indian Postal service at its disposal. Moreover, such an effort also has synergies with making e-governance services accessible to one and all.
  • NGOs: Just as the government can extend its support through various resources at its disposal, NGOs can also help in implementing all the activities required to promote the adoption of social networks in rural areas. Tie ups with NGOs are likely to be essential to reach out to the various areas and put into action all the plans for education, infrastructure setup etc.
  • Political parties: Since the solutions reach out to the masses in rural areas and seek to ultimately connect them in a better manner through the means of a network, political parties also have a major stake in this effort as they hold to benefit from this effort. A thoroughly networked rural India means a very efficient means of communication and reaching out to the masses that would be of interest to the parties. This would change the dynamics of campaigning for elections, holding rallies and other such efforts due to the wide connectedness brought about by a social network.

Applications for bottom of the pyramid and rural population

  • Job search: India has a huge labour class sitting at the bottom of the pyramid of the socio economic triangle. However, most of the poor Indians in such category remain poor not because there are not better jobs but because of the fact that they lack connections to find such jobs. We wish to target this facility to include skilled yet illiterate / low literacy level labour class like drivers, plumbers, gardeners, housemaids, electrician, carpenter, midwives etc. who can register on the social networking site at least once. The people in need of such services can search for skilled labour on the social networking site for “occupation” & “location”. Also, many seasonal jobs can be filled in this way and such an application will be a boon to seasonal workers in rural areas in search of work. We propose that the registration of a social networking site should also include “occupation” field which should also occur in the search field. Thus when a person in a city like Mumbai has to find an electrician for a small job, he need not go on a lookout. He can just search such a person from the social networking site & get the contact details from the same. This will have a high value proposition for such skilled labour as finding a job will be much easier & hence a high incentive to register on the site & keep checking for jobs available. At the same time, for households, it will bring in a lot of convenience, especially when you are shifting to a new place.
  • Mail service augmentation: Social networks can make for a rich user experience when accesses through a capable medium. The postman access point mentioned earlier would effectively enable people in rural areas to gain access to richer experiences. For ex., they would be able to view photos and videos from their relatives in distant places through the postman’s MID.

Text to movie with Xtranormal & State

I created the above video as an introduction to HarIT, the Green IT event of Avenues 2009, the annual B-school fest of SJMSOM, my B-school. I used the text to movie service – Xtranormal. It is a handy and innovative service that allows you to make movies by literally placing words in the mouths of characters. It has been around for a few months now and it recently launched a desktop software for making movies called State.

So, there are now two ways to make movies – one using the online service and two using the State software. The service is available in a basic and premium version. The basic version limits the number of actors, scenes & voices available. There are numerous worlds available online (see pic below) while the desktop software limits the worlds available but provides more actors, scenes & voices. The software is in beta and so is likely to change to be consistent with the online version.

Xtranormal worlds

The desktop software, State, requires you to have an account on Xtranormal and login before you can start using it. This is likely to regulate features available to free and premium members. It can be a bit of a problem to use the software if you are behind an authenticated proxy like me, as it does not load without logging in. It seems to use the proxy settings from Internet Explorer, but doesn’t prompt you for authentication. Due to this, it almost became a non-starter. However, I managed to find a workaround using a HTTP tunnel client that removes the need for authentication and sets up a local proxy address instead.

State Login

Since the software is in beta there are frequent updates, and upon logging in, you may find yourself facing an update window. When I was using the software the day before, it was prompting me for updates, but failed to download any of the files and later on, the prompts went away.

State Update

However, the software is quite easy to use (though pretty unstable – crashed many many times) and I managed to put together the video you saw on top in half a day. Not bad for a first time user eh? 🙂 It seems to support movie exports in 3 formats as of now (I used only the AVI option). It has support for background scores, character expressions, postures, movements, looking and lots more. There also seem to be a few placeholder elements in the interface indicating that there’ll be support for inserting videos and pictures along with the option of recording audio (or are those premium features?). In absence of these features as of now, I just exported an AVI file and then did some editing in Windows Live Movie Maker (another easy to use & handy product) to create the final piece.

Here’s a screenshot from the software:

State screenshot

One of the things that struck me while making the video was the level to which text to speech has progressed. Earlier, I remember the text to speech convertors spelling out words in case it did not have it built in. In State however, the words were handled phonetically. There were some limitations of course with the default spellings for some of the Indian words, but I solved them easily by going in for phonetic spellings. For example, HarIT was being pronounced as Har-I-T rather than Har-eet, and the latter is the spelling we used in the script to get the desired result. Similarly we also had to split facebook to “face book” to get the right pronunciation.

Overall, the service holds a lot of promise and if you look into the future, it’s only a matter of a few years before we’re able to create high quality animated movies from our personal machines. Just imagine directing well known characters yourself. That said, the online version seems to be having load issues as the number of users seems to have expanded quite a bit. The desktop version does addresses the availability problems of the online version, but the feature sets are not same across the two.

You can also check out the Xtranormal youtube channel to catch their latest movies.

Another year, another shift

And another round of classes begin in SJMSOM. In fact, they began last week itself (22nd July). This semester is filled with elective courses, and I’ve opted for Systems, Marketing and General Management courses. I’m also doing the Photo Communication course offered by the IDC, and it should be a useful learning. We’ve also kick-started our club sessions this week with experience sharing sessions from my batch. SOM11 has also joined, and they outnumbered my batch by almost a score. In fact the freshers’ party is scheduled this Sunday.

As for the shift that I mentioned, it was the hostel shift. The entire SOM senior batch was transferred from Hostel-1 to Hostel-13. So, all of us now have single rooms. I was one of the few to have enjoyed a single room in Hostel-1. This was due to a roof leak during the monsoons last year when my side of the roof started dripping and I moved out to another leak-free room. It is quite a coincidence that I once again ended up with a room closest to the bathroom. It does have its advantages I suppose. Hostel-13 is a pretty good place to be in though it is at the fag end of the campus. The bus passes come in handy over here and the mess (shared with Hostel-12) is also pretty good.

There are quite a few things lined up this semester other than the academics. We had the Finance and Marketing Continuum a couple of weeks ago. There’ll also be industry interaction sessions over the course of the semester along with the usual club meets. The big event will be AVENUES 09, our annual fest at the end of October. As of now, I’m helping out with the IT work and the IT event (HarIT). We’ve also started a twitter stream for our school that’s gaining traction gradually and we’re chalking out the policy and publicity strategy for it. It will definitely help us open up a new and more interactive channel for both the SJMSOM members and the external world. Let’s see how that goes.