Sunday, May 1, 2011

GSoC 2011: Google Code-In with new architecture

Hello Everyone!
I'm the last one to introduce myself here, had exams last week so sorry about that.And I'm Selwyn Jacob from India, one of the Summer of Code Student's for Melange this year.I'm doing my Computer Science Engineering in GITAM University and I have always been Inspired and Amazed by the Free and Open Source World.Google Summer of Code has been my dream and I just cant believe that I'm living it, I'm just too happy to put it into words and this is just the start and I have a long way ahead to go.

My Project is to port the Google Code-In module to the new Architecture.Google Code-In is a contest to introduce pre-university students to the many kinds of contributions like writing Code,Documentation,Outreach etc that make open source software development possible. The GSoC module has undergone a major re-write this year, the UI and the Views layer have completely been changed and the same has to be reflected for the Google Code-In module too and this is the focus of this project.I would like to thank Madhu and Sverre for helping me out right from the first day and welcoming me to the community.They have answered all my noob-ish questions and guided me with patience, so many thanks to them.This week I will be going through the current GCI code, the wiki pages and discuss the plan with my Mentor Madhu and Co-Mentor Lenny.
Looking forward for a great learning and contributing experience this summer and be a part of Melange Community :)

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. :) :)

Monday, August 16, 2010

Social Features Project: Week 12

The final week of GSoC has rolled in and my blog post is incredibly late too as I spent much of my time working on my code.

My final version is upload on my app engine instance here. It consists of User Pages, Calendars and a Map View. The Calendars feature is functional and works as per the workflow I had originally planned. The past week had some last minute bugs which popped up only when I ran my code on AppEngine as they were not detected while I was testing on local host. The bug was that I was storing a universal session authtoken for the entire application instead of one for each user. This did not show on my own machine as I always used it under my own google account! Hence, I had to spend time to rectify this and ensure that each User model stores the session token and later the services uses the set token when the user decides to use the calendars feature.
This issue has been fixed now. However, I believe it will take a bit more work to integrate it and will have to spend time with my mentor in revising the finer details before actual code integration with the main code base. I look forward to doing this in the week after next.

My latest code is uploaded to my bit bucket account here.

Some problems still awaiting to be solved are nasty server error being cause by issues in the Google Calendars API, which I thought I resolved however, they still seem to pop up randomly. The issue has been taken up by others using the API here, although there does not seem to be a good fix for this yet.

Another thing that needs to be settled is the scalability of the Maps View. As GSoC has about a 1000 students, 1000 mentors and then org_admins etc. Right now, as I am having to manually populate the data, the map view has hardly 40-50 pointers on it. Hence how will the JS handle a large number of objects is to be seen as yet.

Finally, it has been a great experience with loads of learning and coding. It has been great working with the Melange team, and specially my mentor Madhu. :)
I am looking forward to staying with Melange and contributing to the project as best as I can in the future too.

GSoC 2010 Data Seeder: Wrapping up for end of GSoC

So GSoC is coming to an end, it's time to wrap up the project to a pretty much fully functional and usable state, while there could still be much to do. So, my latest changes mostly include usability improvements like being able to test the configuration for a data provider and get some sample values, include provider and parameters descriptions, being able to validate, download or upload a configuration sheet.

Other improvements include some visual styling, although I personally find my work very ugly, I'm hoping someone with better visual appeal might help me with this part in the future.

As a final proof of concept, I will provide a number of configuration sheets that will demonstrate the full power of the module: being able to generate mass amounts of "real world" data very easily (although doing a first-time configuration might be a little time consuming).

I have also encountered some unexpected problems. It seems that GAE (or maybe the Mapper API, I'm not sure) limits the amount of data that a task can receive as a parameter. Configuration sheets can get pretty big (I won't be surprised to see some reach tens of KBs) so I needed to find a workaround. My solution involves storing the actual configuration sheet in a model, and then each task would read the configuration sheet from the datastore. While this solution speeds down the process by quite a bit, it might prove more scalable and also provide some historical value, should the configuration sheets remain in the datastore.

Enough about the technical stuff... It's been a real joy working with everyone around the Melange community and I'm sorry if I haven't been all that serious all the time during GSoC. Many thanks to my mentor Mario who has provided me with priceless information all the time and who has made all my work so far possible. Also, thanks to all the other developers (Lennard, Sverre, Madhusudan and Daniel), you are simply great and it's been a pleasure to work with you all. Cheers to all other GSoC students (Leo, Pavel and Savitha), I hope we'll see each other in the future as well. Having said that, it's time to continue working on the project, there's still a lot of things that can be improved.

Cheers!

GSoC 2010 Melange Testing Project: Week 12 (Final) of the Coding Period

In this week, I have cleaned up, commited and pushed all the tasks testing code to my online clone. I also worked on adding test cases for soc.logic.cleaning with suggestion of Sverre. Besides, I have also uncovered a couple of bugs in the soc.modules.ghop.tasks.task_update module and sent a patch to the mailing list. Lennard was very kind to help me merge the patch. I have also uncovered one issue with my test code for soc.modules.gsoc.tasks.accept_proposals (set the timelimit parameter too small) and then corrected it. In addition, I have also investigated the diference between the console and html coverage report. It seems that the console one counts statements while the html one counts lines.

When I tried to move the the gaetestbed and pymox modules to buildout dependencies, however, I found the easy_installed versions of both modules have problems (easy_install is used during Melange buildout). For gaetestbed, I found that the gaetestbed on PyPi is an old version which cannot check the html body of an email. So, I emailed the author to ask him to put the latest version onto PyPI. The author (JJ Geewax) was very kind to have helped me do it. For pymox, the easy_installed version available is a quite old version (0.5.0) which has a bug fixed in the later versions. Unfortunately, these newer versions are not available on PyPi, so not easy_install searchable. I reported the issue to the project issue tracker. One of its authors (Steve) was also very kind to helped me to put a newer version (0.5.3) to PyPi. After all these problems have been sorted out, there remains one issue that gaetestbed currently depends on webtest even though you do not need this part of function due to the design of gaetestbed, which the author agreed to resolve in the near future. After consulting Sverre, I finally moved the the gaetestbed and pymox modules to buildout dependenciesi and then commited and pushed the change to my online clone.

In the next week, I will add the experience of how to do mail and taskqueue related tests with gaetestbed to the testing wiki page, make a patch for removing the cron/job related modules and then send it to the list as well as add more test cases for existing Melange modules.

This is the last week of GSoC2010. It was a quite exciting and enjoyable summer. My project is very interesting, my mentor (Sverre), other developers (Lennard, Daniel, Madhusudan, Mario) and GSoC administrator (Carol) are very helpful, and my fellow students (Felix, Pavel and Savitha) are also very nice people to work with. Specially thank my wonderful mentor, Sverre, who is always ready to help me out when I got stuck and without whom I may not complete my project. During this period of time, I have also learned a lot about GAE and Melange, I have also come up with something useful and merged to the trunk, and uncovered several issues. Though the program has ended, it does not mean the end of my project or my involement in Melange. On the contrary, I will continue to work on the testing project after GSoC, i.e. add more test cases for more modules, improve the testing design and code, integrate Felix' data seeder, and so on, which have not been done because of the time limit of GSoC or dependency. I also hope to work for Melange beyond the testing project and hopefully become one core developer of Melange in the future. I also wish to come up some ideas to improve Melange so that I can serve as a mentor for Melange in the next GSoC and experience the excitement of these guys about the upcoming mentor summit :-).