Saturday, April 30, 2011

GSoC 2011: Integration with External APIs

I'm Orçun Avşar. Yet another Melange student for GSoC 2011. I'm from Çanakkale Onsekiz Mart University, Çanakkale, Turkey. I study Computer Engineering. Summer of Code is a dream for most students and i'm very happy and proud of myself about taking first step on this. Since begining of university, I always loved the philosopy of Free Software. Devoloping software for everyone not for groups gives me enthusiasm on this.

We've chatted and made a Skype conference call with Melange team, we were added as commiter to project. My project aims to integrate External APIs ( for now Google APIs) with Melange. I will first start from Google spreadsheet API. then discuss other APIs like Calendar, XMPP messaging to see what else can be integrated.

My timeline till 13 May consist of theese:
- Read Melange source-code
- Read documentation and wiki pages
- Read old important discussions, issues
- Read new tests
- Get familiar with tools that Melange use (like zc.buildout)
- Get familiar with Google Data Apis and OAuth
- Submit small patches to warm up.

As well as studying melange code, i will start a playground GAE project to play with OpenOuth. You can see my proposal from here.

Mario is my mentor on that project. Also special thanks to Sverre for answering my newbie questions on #IRC without getting bored. That helped me a lot.

Thursday, April 28, 2011

GSoC 2011 GUI Overhaul Project

Hi, everyone. This blog post is about self introduction by me, Akeda Bagus, after my proposal, GUI Overhaul (Backend and Frontend), got accepted. For those who don't know what Melange is, you can read its project page and try the getting started page — yes, Melange is open source project that powers Google Summer of Code (GSoC) and Google Highly Open Participant (GHOP) contest. Melange was written in Python, using Django framework, that runs on Google App Engine (GAE). So, if you want to dig into Melange codebase you should have basic knowledge of Python, probably Django framework too, and GAE. Don't worry, Django and GAE have good documentation available on their sites. When I cloned Melange's repository for the first time and read its codebase it was little bit confusing because at that time Melange's fronted is being renovated. Some new contributors didn't recognize which one is the new codebase (V2) and which one is the old one. But it doesn't matter actually if we know how Melange system dispatch the request and how django template renders a response. Maybe in the next post I'll talk about the internal working of Melange. But for now this post is just about what "GUI Overhaul (Backend and Frontend)" project talks about.

As the name suggests, "GUI Overhaul (Backend and Frontend)" project has a goal to improve the newly Melange's UI both from backend (administration) and frontend (public, student, mentor or organization admin). The idea of administration interface improvement is described at Melange's GSoC 2011 Ideas Page. The rest of the timeline during GSoC period will be devoted to improve the frontend, of course, after administration interface is finished. This project fits my skill as my previous experience on GSoC 2010 also to enhance GUI side — It was "Improve GUI Configuration" project. But this time is little bit different than the last year — where I defined the spec of GUI and Validaton by myself. In Melange, I don't use administration interface regularly, neither know what kind of features wanted mostly. So, I need to gather requirements from users that use Melange in regular basis. From the requirement, we build a spec and then implement it. Of course, there will be much iterations over the spec and implementation until we get the "hey, this is awesome" or "we don't need that". I googling a bit about requirement gathering and found articles written by Joel Spolsky. The article has four parts and worth reading it. Recently, I found a nice quote that related to spec and implementation :

Implementations and specifications have to do a delicate dance together. You don't want implementations to happen before the specification is finished, because people start depending on the details of implementations and that constrains the specification. However, you also don't want the specification to be finished before there are implementations and author experience with those implementations, because you need the feedback. There is unavoidable tension here, but we just have to muddle on through ... I think we're doing OK.

GSoC 2011 Melange Testing Project : Community Bonding Period

Its been two days since the GSoC 2011 results were declared and I am still unable to tell myself that I am now a Google Summer of Code student. :) . A vote of thanks and gratitude from the very depth of my heart to the Melange developers.

Python is awesome and I am now in love with it. My project is on testing and frankly speaking I have never studied about software testing before. The only idea about testing which I had was during solving exercise problems proposed in Google's Python Class videos. The coding problems had to be solved and then their output tested.

I explored about the Melange testing project more and more. I did not understand many of the terms like 'Test Driven Development', 'Continuous Integration' etc mentioned on the Melange's ideas page, but I googled and learnt about them, followed online tutorials and resources linked on the ideas page. I joined the melange-soc-dev mailing list and asked Sverre if I understood correctly what the project is aimed at. He said 'Sounds about right :) ' and then he pointed me to the 'Getting Started' guide. Since then there was no turning back and I devoted most of my time getting familiar with the framework and the testing modules. I explored the Melange's blog and read the posts of previous GSoC students. Leo and Savitha very well explained how they tried to understand the codebase. I did not know about the tools like tree and pylint.pyreverse before.

Then I decided to write a test for one of the modules in app.soc.logic and chose the 'validate' module. The test was simple but difficult to write if one does not know about the organisation of the modules and how the functions were used. I took me two days to get a feel of the code and get familiar with the directory structure. I finished the test, learnt and fixed the style issues and finally signed the CLA and the module was integrated into the codebase. That was my first contribution to Melange as a pre-GSoC exercise. This gave a boost to my confidence to contribute more to Melange.

I knew there were many students competing for the project and I decided to write my proposal differently so as to have an edge over other students. I decided to show a graph of the failures and errors that occurred everyday, the data which I collected everyday by running tests over a period of ten days. I also thought of showing a test code vs production code analysis. April 8 was the last date of submitting the proposals and I was busy with exams till April 5. Melange was the only organisation on which I had concentrated since the beginning and I knew I had to write a good proposal to get selected and dedicated all the 3 days in writing the proposal. The 'graph' and 'the code analysis' do not reveal anything groundbreaking but that was what my mind could think of then.

I regularly followed all the discussions on IRC, melange-soc-dev and gsoc lists. There were criticisms about the tinyMce editor and asked Sverre if the editor size can be increased because it seemed too cluttered. He asked me to do it. I read the tinyMce documentation and found many more helpful buttons can be added to the toolbar. Mario helped me in writing the configurations for the 'basic' and 'advanced' editor settings. I had never learnt jQuery before and I believed that I should not say " I don't know jQuery, so I can not do it". Instead I followed some tutorials and then it was easy. I also thought "Hey! you applied for the testing project and you are working on the editor."

It was a great experience working hard to bag the project. It is the first time I am contributing to an Open Source project in a major way and to see my name in the Author's List, Mario's Code Swarm video and the commit messages fills me with a feeling that I find difficult to describe.

Yesterday I attended my first conference call with the Melange developers and heard the sweet voice of Carol :P . I thought the meeting would be very formal but all of them were very jovial. Sadly, I could not introduce myself to other members as the mic was not working. Hope to fix it soon so that I can communicate during the meeting on Monday. I have exams starting Tuesday next week, so will discuss about the project plan with Leo after 15 May 2011. I will get a week of time before May 23 to read about GAE, Django and Software testing.

Melange community is really the 'awesome-st ' community and I wish to meet the developers and have fun with them at least once in my life. :) :)