Google Summer of Code 2013 has come to a close, with the firm “pencils down” on September 26. This concludes three months of design and code for BookManagerv2, a new extension designed to ease the representation of book-type content on MediaWiki wikis. The experience was amazing, and I’m really pleased with everything I learned and accomplished. I’m using this as a wrap-up blog post, because I really want to speak about my experience with the Summer of Code program, working with MediaWiki, and the BookManagerv2 extension.
The Summer of Code program
My experience with the Summer of Code program began in late March, when I first discovered it. Someone had mentioned that there was a group of women contributing code, documentation, and design work to MediaWiki through Outreach Program for Women, and that there would be another round happening in the summer months. I knew I was going to have two months of free time because of Northeastern’s somewhat unusual semester system, so I was immediately intrigued. After some research, I learned more about Outreach Program for Women and Google Summer of Code. I spoke with Sumana Harihareswara, the Engineering Community Manager for MediaWiki, who was helping administrate OPW and had experience with the GSoC program as well. I discussed some project ideas with her, Mark Holmquist, and with some others I knew at the MediaWiki foundation. I originally planned to work with the Parsoid team to improve exportation to various formats. Due to unavailability of Parsoid mentors and the general busyness of those working with the project, I was encouraged to look for different projects. My experiences with trying to print or export books from Wikisource led me to realize that a way of organizing book pages into one cohesive group was desperately needed, and so the BookManagerv2 idea was a pretty natural progression.
With help from Google Summer of Code administrators and various members of the Wikimedia communities, I soon had my proposal ready. Google was nothing but helpful in the whole process; any questions I had were quickly answered by mailing list or on IRC. I really enjoyed the structure that Google put in place. They break the program into several parts. First comes the “community bonding period,” where students read about their organization, get to know their mentors and other community members, and learn more about how their project will interact with the organization. The work period follows this, punctuated in the middle by midterm evaluations. This works well to make sure students aren’t leaving all their work until the end; they need to be performing well both halfway through the summer and continuing to do so towards the end. Finally, Google suggests that the last ten days of the project not include any code changes, but rather that this time be used to write documentation and clean up any loose ends.
Working with MediaWiki
I was lucky in that I’d already been working with the MediaWiki communities as an English Wikipedia and English Wikisource editor for over six years. I was already familiar with the Wikimedia IRC channels, and I knew some people who I could ask for help. It didn’t take long after I’d suggested the idea of the BookManagerv2 project that someone directed me to Raylton Sousa, who went on to be my “primary” mentor. Raylton is a Wikimedian who works primarily on the Portuguese Wikibooks. He helped create BookManager, the predecessor to BookManagerv2. I worked closely from Raylton from the beginning; he helped me craft my proposal, design and structure my project, and create the final code. I also had Matthew Walker, a software engineer for the fundraising department at the Wikimedia Foudation, as my secondary mentor. I went to him when I had code-specific or other technical questions, and he did most of my code review.
This is the eighth year the Wikimedia Foundation has participated in Summer of Code, and by now, they’ve learned a lot about what does and does not work with Summer of Code projects. The 2012 “Evaluating Google Summer of Code” post by Sumana, as well as the management page for 2012, were particularly helpful to me: they encouraged me to keep my project narrow in focus, and to be sure to allocate plenty of time for bugfixing, testing, and unexpected developments.
I really enjoyed working with MediaWiki for this project, because I found everyone to be overwhelmingly supportive. In addition to my mentors, there was no shortage of people who were willing to take time out of their days to help me. Niklas Laxström and Siebrand Mazeland were particularly helpful when I had localization or internationalization problems or questions; Mark Holmquist often helped me with quick coding questions, and Quim Gil (who was also the organization admin for Summer of Code with MediaWiki) helped when I had questions about the program.
The BookManagerv2 Extension
Raylton encouraged me to begin the project by designing the extension as thoroughly as possible. We developed a set of pages that we used for design and organization. I looked at other, similar projects, thought a lot about the goals I wanted to accomplish with this extension, and created some design documents to organize the work. I then moved on to creating a quick test extension so I could familiarize myself a bit both with how extensions work in MediaWiki, but also with the PHP language. I’d never used it before, and was pretty much learning as I went along. After this, I moved on to creating the navigation bars that would be used on each chapter or section of the book. These consisted of four buttons: a metadata button, a chapter list button, and buttons to navigate to the previous and next sections in the work. The metadata and chapter list dropdowns first contained dummy data, but as I wrote the structure to hold the metadata and chapter information, began to show useful information. After the navigation bars, I moved on to writing the JSON backend. This involved adapting a lot of existing code from the EventLogging extension, which already had code to validate JSON and pull a schema from a remote wiki. Once this was in place, I moved on to creating the view and edit pages for the Book: pages. The view frontend allowed users to view the data that was being stored in the JSON block, but in a neat and well-formatted way. The edit form allowed the users to enter metadata into text fields, and used a jQuery sortable to allow users to add, remove, reorder, rename, and change the indentation of sections.
I found the extension work very challenging. One difficult part was getting used to PHP; although it had similarities to other languages I’d used in the past, there were parts of it that were completely different. Particularly towards the beginning of the program, I found that I spent quite a lot of time leafing through the PHP docs and StackOverflow posts to learn how to do various things. I also found that I was frequently writing code that accomplished what I wanted to do, but did it in unusual ways. This was where mwalker’s code review was very helpful; he would point out if there was a better way to accomplish something I wanted to do. I also found it hard to keep my work focused. I would often be working on one component of the project, and find myself drifting off to work on another component. I felt myself wanting to build the whole thing at once, instead of creating it one component at a time. Raylton was particularly helpful in keeping me focused, and we weren’t far into the project before we created a bug priority page to organize the bugs I was working on. Although they were all stored in a Bugzilla component, it was difficult for me to look at that list and know at a glance which bugs were the most important, and which were specifically important to the component I was working with at the time.
Status of the project
The project itself is currently in a state of semi-completion. The three main components are all almost done, but there are still a number of unresolved bugs that need to be resolved before the extension can go to security review. I would have liked to have been able to begin the security review by the end of the Summer of Code period, but as the end came closer, it became pretty apparent that I simply would not have enough time. I hope to close these remaining bugs soon, and move the extension on to security review!