The Joy of Writing Software
It’s 06:45 AM in Houston. I nervously go over the logs and make sure that no errors were reported. I type in a few queries in the datastore to make sure that its state is consistent. I go over the quota and make sure the website will be able to handle the traffic influx. I look over analytics data to see the visitor flow and statistics. Its almost like being part of a startup. Entrepreneurs are anxious that their product will engage users and win the confidence of their investors. I’m anxious that my elections app will run smoothly and successfully work for the first real election that opens in 15 minutes.
About a year ago, there was a really close round of election at Brown, my residential college within Rice University. There were some inconsistencies in the number of people who voted and the number of ballots cast. Because the votes were so close between the candidates the ballots were declared spoilt and a runoff election had to be held. It highlighted some issues with the paper based system and the tediousness of manually counting ballots that were supposed to be anonymous but still fair. Phil Tarpley, who was the elections committee chair that year was the first to mention the idea of having online elections for Brown during cabinet. Last semester, Julian Cooper, the new elections committee chair approached me about making this happen. The idea was to have elections online that were simple, secure, and anonymous. A list of NetIDs would be entered in the application to restrict voting to a subset of people within Rice. At first, I was a bit reluctant to work on such an application. I wondered if all of the work would be worth the effort.
I thought over the situation for a while. Being the Vice President of Rice CS Club, I remembered how fickle and improvised our own election system is for office and how an online election would make more sense. These thoughts, a Christmas break, and my restlessness to be always doing something productive were enough to get me started on the project during the break. The two most important features of this application would be user friendliness and automatic results computation. These were two key characteristics that I hadn’t seen in any of the existing online election systems at Rice. In order to program a good interactive UI, I needed to learn JavaScript and jQuery really fast. I picked up JavaScript & jQuery: The Missing Manual and began learning JavaScript and building the UI as I went along. The book was suited more towards people who were beginner programmers so I had to skim a lot through the book but I still found it to be a great book. I had the election creation process for the administrator implemented in a week or so. I naively thought that I could finish the project by the end of the year and pack my bags and fly off to London with no worries.
I realized that I was moving too slow so I asked Andrew Capshaw to join me. Andrew has a lot more experience in programming UIs and the client side of websites. I moved my focus to the server side of the application and used Google AppEngine to build the infrastructure. It was naturally my choice of platform because of my proficiency in Python and my fondness of the language. Furthermore, AppEngine forces you to architect the website in a manner that makes it very scalable to heavy use. The two of us setup a Github repository and developed in a rapid iterative style making minor changes and pushing small releases to a live but non-working website. Andrew took care of all of the front end aspects of the website while I worked on the back. There were some days when I committed a dozen changes. After moving to London, I continued to work on the application. With everything around me completely changed, it was actually a very comforting experience to keep writing code as it was one of the few things familiar.
Fast forward to last Friday, we had about 4 days left till Brown’s first round of elections. I told Julian I would devote my entire weekend on working on the application. But I couldn’t help it and went out twice that weekend :D. Some how I still managed to put in a tremendous amount of time into the website. I pushed the website to production and held a universal election to poll people about their opinions of food, social networks, and the residential colleges. I advertised the website on Facebook. Initially the website would refuse people’s ballots because I made a mistake in the verification rules. I scrambled to change the rule and it was working in 10 minutes. About 200 people visited the website and we recorded over a 100 votes in 2 hours. Immediately we got an overwhelming amount of feedback about how the rules and instructions for voting were confusing. Andrew and I discussed the feedback and he made a lot of changes on the front end. I fixed a lot of minor bugs in the back.
Right now the website is thoroughly tested and stable. It’s the calm before the storm as the day begins and people use the website. After its use at Brown, we hope to expand it to the rest of the residential colleges and student organizations at Rice. This website uses Rice’s CAS authentication system to let people login. Fortunately, CAS is used by hundreds of other universities. And since the project is open-source, I hope that other universities will adopt our application for their own use.
Trackback from your site.