Summer 2009 Tech Projects

Hackathon

I’m one of the project directors for next year’s Dance Marathon Hackathon.  Dance Marathon was an organization dedicated to fundraising for FACE AIDS, and the Hackathon was designed to connect technically inclined people, who might not otherwise be interested in public service, with nonprofits.  During the 24 hours when the Dance Marathon dancers are dancing to fundraise, the Hackathon hackers are working on tech projects for nonprofits.

Over the summer, the other project directors and I have been meeting on Skype to plan various aspects of the Hackathon.  Mostly, we’ve discussed the website (dm.stanford.edu/hackathon), organizations that we want to work with, our integration with Dance Marathon, hacker registration, letters to send to nonprofits, and what we want the overall vision to be. 

Mostly, this has just meant logistical work, but it’s good to get working on it.

ASSU

I’m on the tech team in the ASSU (student government) executive cabinet.  I’m the only person who was on the web development team last year, so I’ve been the main person dealing with the current website (assu.stanford.edu).  So far, I’ve put together a draft of a student jobs website and updated one of the modules on the website so that you can link to a specific javascript-hidden part of any page (see *).  I’ve also done some smaller jobs on the site and have been working with other people who want to manage their own parts of our website or their own sites (ie, greenstore.stanford.edu, gsc.stanford.edu), and soon I’ll be making a module to make it easier for our site to interact with Twitter and Facebook.

* for those interested: we use a content management system called Joomla, and there’s a free module for it called Tabs and Slides within Content Items that lets you split up one webpage into different ‘tabs’.  Each tab is like a page of its own, but they’re all on the same web address.  The makers of the module didn’t provide any functionality to automatically load a certain tab when you loaded the page as a whole, so I had to delve into their code and make some additions.

One thing that this showed me was how difficult it can be to go into someone else’s code when they don’t have much documentation.  You almost have to read through the entire program even if you only want to change one small part just because it isn’t obvious what everything does when you first look at the code.

PSO

I did some website work for my sister’s nonprofit, the Pain Society of Oregon.  They put on continuing education conferences for doctors about pain management.

This gave me the opportunity to learn a lot of the things that are happening in basic web programming.  Before, I had done some website work, and I could understand conceptually what each of the web programming languages did, but I didn’t do much with them, so I had less of a holistic understanding.  Now, I feel familiar enough that I’m comfortable jumping in to a web project even if I didn’t immediately know all of the details. 

One thing that this showed me is how relatively easy it is to make moderately powerful sites even with only basic computer science and web programming skills.  Even though it took me a while to figure out how to make any changes to the site (because I had to read articles online about how to make those changes before actually making the changes), and some of my changes might not have been the most elegant, my sister says that she likes the look and feel of the site much more now.

Debate

Early on in the summer, I discovered that Whitman College’s Policy Debate team went entirely paperless during the 2008-2009 season.  This is incredibly significant in debate as a whole: Whitman proved that it could be done, and now other teams are trying to go paperless.  This has a number of benefits: it helps with organization during the debate round since every piece of evidence that you use is in the same place rather than scattered across your table and your opponent’s table; it helps with getting to debate rounds on time because you don’t have to cart around 4 tubs of evidence; it helps with cost because checking 4 tubs and a cart on an airplane is expensive, and when you don’t have so much luggage, you can afford to rent smaller cars when going to tournaments; it helps the team stay organized because you can more easily share and format evidence; and there’s a lot of convenience and cost just from not having to print thousands of pages of evidence.

The Microsoft Word template that Whitman had been using for paperless debate did everything that it needed to, but it was programmed in a rush (they decided about 3 weeks before the debate season started last year to go paperless and then just pushed forward), and the person who programmed it didn’t have any formal education in computer science – they just picked it up because they needed to learn to get the job done.  As a result, I sent Whitman’s debate coaches an email and started developing my own version of the template.

The template is a continuing work in progress, but I’m fairly satisfied with it.  It does everything that Whitman’s old template does, plus it has a few new features that make it easier to select certain pieces of evidence and to debate paperless overall.  Also, sharing my code with Whitman influenced them to implement some of the same features that I did, moving paperless debate as a whole forward.

One thing that this showed me is the language-independence of computer science.  So far, I’ve taken classes that used C++ and Java, whereas the only programming language that can interact nicely with MS Word is Visual Basic for Applications.  Despite that, though, the same principles that I learned in my programming classes applied: decomposing a bigger problem down into smaller parts, and then coding each of those small parts (which also lets you re-use those smaller parts a lot of times); using references whenever you don’t know how to achieve a certain function; testing all of the edge cases to make sure that your program doesn’t have any big bugs in it… In general, even though the first time I ever looked at Visual Basic code was programming the template, I was able to do a fairly good job because Stanford’s CS classes taught me to think like a programmer.

Another thing this project showed me was that some languages are much nicer to work with than others.  Visual Basic can do (almost) everything that other programming languages can, but programming in it feels very wrong.  The parts of the language that were designed to make it seem ‘simple’ to program in (ie, less use of curly braces {} to denote blocks of code) make the language feel overly simplistic.  That is, other languages might have a slightly steeper learning curve, but after you learn, it’s a lot easier to do powerful stuff in other languages than it is in Visual Basic.

I also discovered that there are a lot of tech-interested people in the debate community.  After I posted the template, someone else said that they were working on their own template for paperless debate.  They had been working in visual basic (and, I suspect, programming as a whole) for a while longer than me, so they looked over my code and gave me a bunch of tips.

Whitman’s coach also told me that he’s developing a program to tabulate debate tournaments (ie, decide who judges which teams in which rooms) and offered me a job helping with it.  There’s a long list of features that he wants added and bugs that he wants fixed by the end of September.  It should be quite a project, but it’ll be good to get to know what’s going on in a tabulation program behind the scenes.

On the Horizon: Essay Analyzer, Vi, Open Office

One program that I’ve been wanting to work on for a while is an essay analyzer.  I discussed this in the previous letter.  I still haven’t started.  It’s still on the horizon, but it might not get done for a long while.

Another thing that I want to do is improve navigation in MS Word.  There’s a program that programmers use to write software called Vi (or VIM – Vi Improved) that has a lot of powerful features for navigating around a text file.  It works in ‘modes’.  The main mode, ‘normal’, doesn’t let you insert text, but it makes it very easy to navigate around a document.  You can press one key and enter ‘visual mode’, which lets you select text easily.  You can press another key to go into ‘insert mode’ or ‘search mode’ or ‘command mode’, each of which lets you do other things to the document. 

This would be very helpful for debate because now, whenever you want to use a piece of evidence, you have to format it properly and underline it (in a debate round, you don’t read the entirety of a piece of evidence – only the snippets that you underline).  Now, you either have to use the navigation shortcuts built in to MS Word or use your mouse, and neither strategy is particularly fast.  With Vi features, I would be able to press “10w” to move 10 words forward, or “63b” to move 63 words back.  I could press $ to go to the end of the line and _ to go to the start of the line.  I could press “d$” to delete everything up to the end of the line, or “5iab” to insert “ababababab” where the cursor is.  I could press “v2/Country” to select all of the text between my cursor and the second time the word “Country” appears in the document. 

In other words, if I programmed Vi functionality into MS Word, it would be very convenient for navigation, especially when formatting evidence for debate.

Another thing I might want to do is get away from MS Word.  Open Office, a free and open source office suite, is almost as good as MS Office, but it lacks a few features that I really like.  Notably, its document map is worse, it doesn’t have a ‘normal’ view (so there’s no way to get rid of the space inbetween pages), and you can’t view all nonprinting characters (particularly page breaks).

Because Open Office is open source, that means that I could go into its source code and edit the program so that it had those features.  It would likely be very hard to do – it’s difficult enough to go into a small code project, and Open Office is one of the biggest open source programs out there – but it would also enable me to permanently switch to Open Office, something that I’ve wanted to do for a while.

Programming in Open Office would also be much nicer.  If I were to write my paperless debate template for Open Office, I wouldn’t be forced to use Visual Basic: I could use Java, JavaScript, Python, and several other languages.  All of them are, in my experience, much nicer to program in than Visual Basic.