This summer I was a mentor for the Google Summer of Code program for Drupal. I maintain the Facebook-style Statuses module, which allows users to have a stream of “status updates” on their user profiles and to write messages on other users’ profiles, like Facebook. So when I had the chance to mentor the Facebook-style Micropublisher proposal, which built on Facebook-style Statuses to allow attaching images, links, and video to status updates, I jumped on it.

The result was a resounding success, and I learned a lot during the process. Nitin Gupta, the student driving the project (and better known to some as publicmind) was an extraordinary developer in the true Drupal spirit. He gracefully put up with my pickiness about coding style, thoroughly researched the best code architecture for our purposes, and even identified places where Facebook-style Statuses itself could become more flexible. I truly believe that Nitin will remain committed to the module he created, and that both of us are better Drupal developers as a result of this process.
Long before the 2010 Google Summer of Code (GSoC) process began, I identified two major areas where Facebook-style Statuses (FBSS) could be improved. The first was abstracting status updates from users to allow creative solutions like FBSS as a replacement for the core comment module or status streams attached to Organic Groups. (Actually, although I had long thought about Organic Groups integration, that level of abstraction was Michelle Cox’s idea.) That effort is currently underway in the form of a new Facebook-style Statuses 3.x branch, since it requires rewriting thousands of lines of code and significant changes to the API and database schema. 
The second was attaching data to status updates – links, images, and video, but also audio, files, or anything else within reason. I wanted an extensible system held to very strict stylistic and architectural standards, but I knew that this would also require thousands of lines of code, and I didn’t have the resources in time or funding to get started.
Then Thomas Cermak contacted Nitin and me in February to discuss building out this second feature, which we eventually dubbed the “Micropublisher.” Nitin had first worked with FBSS in September 2009 when he had contacted me to ask about how to make some changes to it for a now-deprecated Facebook-style Links extension. At that point he didn’t even know what hook_form_alter() was, although he was a capable programmer outside of Drupal. Now Nitin was to take on the bulk of the work for this new, complex initiative because of my lack of time. We discussed and settled on an outline for development, and then on March 24th Nitin realized that the recently announced GSoC 2010 would be a perfect opportunity to gain support and exposure for the project. He submitted it and invited me to be a mentor, and real development work began soon afterwards.
Nitin’s skills were immediately apparent. I had an email (or six) from him nearly every day for the first month alone, in addition to commit notifications from the SVN repository where we developed until the project moved to the CVS repository on drupal.org. I reviewed Nitin’s commits every day and gave feedback. We often discussed the best way to implement various features and sometimes I explained new techniques, but usually I just had a list of places where Nitin had neglected to insert whitespace in control structures as recommended by Drupal’s coding standards.
I never had to say “rewrite this part, that code is unreadable…”
That is to say that Nitin made my job as mentor much easier than it could have been. I never had to say “rewrite this part, that code is unreadable” because Nitin researched everything before he acted, although I did try to ask “why did you do that this way?” frequently. I had a list of tasks I wanted Nitin to complete, and he was ticking them off faster than I had anticipated. By mid-June, the fundamentals of the new Facebook-style Micropublisher module, or FBSMP, were stable enough that I could preview its awesomeness in a presentation at Drupalcamp South Carolina / SouthEast LinuxFest.
In late June and early July, Nitin took a vacation, having graduated from the prestigious Indian Institute of Technology at Guwahati. This made me nervous. After a prolonged period of frequent communication, we were communicating much less frequently, right in the middle of when most GSoC students are at their most active. The fault was mostly mine; I neglected to check up as often as I should have because it was not something I had had to consciously think about before. It was just something we did. This was also when we transitioned to using Drupal.org for version control, so I wasn’t receiving commit notices any more from the SVN repository, which made it harder to keep up with and review changes.
It turned out that I had no need to worry, because Nitin stayed on task and completed everything we had planned. In the end, I was the one who was unable to do everything I had promised, because I didn’t keep track of the GSoC schedule and inadvertently planned a trip to Italy two weeks before it ended. Luckily Nitin had progressed so far by that point that it hardly mattered, and I’m extremely pleased with the end result.
To be honest, I wasn’t sure what we were trying to accomplish could be done in a summer – but I am happy to say I was very wrong. I can now say that Drupal has a full Facebook-style Micropublisher, complete with link, image, and video attachments (as well as a thorough API, an extensible plugin system, and documentation for everything). You can see for yourself how cool this is on the demo I set up for the two presentations I’ve given on Social Networking in Drupal. (It’s now possible to build full-featured microblogging platforms like Twitter and Facebook in Drupal!)
It’s now possible to build full-featured microblogging platforms like Twitter and Facebook in Drupal!
Nitin was a pleasure to work with, and I look forward to continuing to work with him as we transition FBSMP to a central part of FBSS in Drupal 7. It is very clear how much he learned about Drupal, and I commend him on his ability to soak up information and come up with creative solutions. I am happy to say that Nitin also seems to have adopted Drupal’s coding style rules as a result of my incessant demands! I’m quite sure that he will continue to be a valuable contributor to Drupal’s ecosystem in the future.
As for me, I learned a lot about remote project management, and I also learned some valuable lessons from a number of times when Nitin asked for changes to the FBSS API to make FBSMP development easier. I had never actually had a reason to use my own API in the wild before, since I could just change the source if I needed to. It was fascinating to see my successes and failures in predicting how the API would need to be used.
There’s still quite a lot to be done. There are some inconsistencies in FBSMP that should be worked out, a CTools dependency that can probably be removed, some potential UI improvements, and of course the port to Drupal 7. But for a single summer’s work, I couldn’t be happier.