My Experience in Google Summer Of Code (GSOC) 2018 with OpenStreetMap

It has been more than 6 weeks since the list of the selected GSOC projects for 2018 was announced. I was glad to see that my proposal for continuing the development of PT Assistant plugin for OpenStreetMap was among one of the selected projects. I am going to write about my experience with GSOC till now and would try to break it down into various phases in which GSOC happens. As the program proceeds, I would continue writing about them over here.

Pre-GSOC Phase (January 2017–January 2018)

I discovered the amazing world of web development when I was in my second semester (around January 2017). As a person who wanted to learn about various aspects of Computer Science which included programming, I had already looked into areas such as Competitive Programming and had invested myself into it for sometime. During this time I decided to become a part of the development club of my college called Zense. Here I was encouraged by my seniors to start building products which would eventually be used by people around us. One such project which was started by me along with one of my batch mate was CircuitVerse. Through this project I learned quite a lot about the process of development. This included learning about backend frameworks like Ruby on Rails. This framework looked like magic to me(and it still does till date). I completed around 3 projects using this framework and was growing in confidence as the days passed by.

Started looking into GSOC 2018(January 2018)

After completing some projects using Ruby on Rails, I started searching for open source projects where I could contribute to rails related work. Since some of my seniors had already been part of GSOC, they had told me about the various benefits that one can get through this program. To be honest, it was a completely new territory for me. Till now whatever I had done was not of such a large scale. Most of the time, the code on which I worked upon was written by me or one of my friend which made it easier for me to understand. But that was not the case when it came to open source projects. My main motive to come into open source was to start learning about the best practices and gain experience by working with people who have built such massive products. And GSOC seemed to be the best way for me to get into the real world of open source!!!

Search for organisation in GSOC(February 2018)

I started looking into organisations which had projects related to Ruby on Rails. One such organisation was OpenStreetMap. Initially I started contributing to around 3 organisations but I liked the projects which were mentioned in the Idea list of OpenStreetMap. They were interesting and challenging at the same time. One of the developer from openstreetmap-website directed me to contact the people concerned for GSOC through a particular mailing list. On sending a mail about my aspiration to work for OpenStreetMap during the summer, I was replied back by my current mentor Jo(Polyglot) who wanted to know if I would like to work on a project for the desktop based map editor JOSM which was completely written in Java.

Student Application period, announcement of result(March 2018 — April 2018)

Although my experience with Java was only in my class of Object Oriented Programming where we were asked to use Java to create the final project, but I wanted to work on the project as it seemed very interesting. After some hangout calls with Jo and setting up the environment for coding, I was asked to work on a map mode called Double Split for a plugin named PT Assistant which would reduce the number of steps required to do some specific tasks by the users. Although I was able to complete the task, some problems still existed with it. I was thoroughly explained about the intent of the project by Jo which helped me in writing the proposal for the project. On 23rd April, 2018 the results of the accepted student proposals came and along with it started the community bonding.

Community Bonding(April 23rd 2018— May 14th 2018)

Although this is the period where one gets to know more about the code base of the organisation with which they are going to work, but I was busy with my end semester exams till 6th May. I was left with merely a week to look into the existing core code of JOSM along with that of the plugin PT Assistant. During this period I pushed the code I had written for Double Split map mode, Made the dialog box look better in the map mode and learnt in detail about the next tasks which I was going to complete.

Phase I(May 14th 2018— June 2018)

Week 1

I was asked to work on a wizard which would help assist the users when they install the PT Assistant plugin. The biggest challenge I faced here was that most of the tasks which we wanted to automate were not meant to be used by any other code outside the of the scope and hence I had a hard time figuring out how to make the code work without changing anything in the core code. Another place where I got stuck was making the dialog box of the PT Wizard look good visually. But finally by the end of the week I was able to finish my work on the wizard.

Week 2

This was the week where I started working on the Edge Selection Map mode. Although the code already existed but many new features were required to be added. Some of the added features are as follows -

a) Now the map mode is able to select the edges on the basis of the mode of travel. The mode of travel is decided by the mode of travel of the last opened route in relation editor. By default the mode of travel is considered as bus.

b) The functionality to multi-select the edges at the same time using shift and toggle select using ctrl was added to the map mode.

c) The mode now stops the edge when it comes across a first or a last node that happens to be a stop position.

d) It now also adds the common way which is present in between 2 selected edges. If there are 2 ways that start from the same starting and ending point then we don’t select such ways.

Another small but important task completed during this week was the addition of the Public Transport in the menu bar if the PT Assistant plugin is installed.

Week 3

As I mentioned before, there were some problems which existed with my the double split map mode. Michael Zangl suggested me to restructure the code to overcome those issues. This process was definitely not on my plan but was a great experience where I learnt some good practices which are followed to do certain kind of work. Overall after finishing the restructuring, it became a lot more easier for me to make other changes in the map mode. Most of those changes included making the predictions in the dialog box of the map mode smarter.

As the week ended I started working on 3 new shortcuts which helped in transferring the details of platform node to a new place where the cursor is pointing.

Week 4

I finished working on those 3 shortcuts which are ctrl+g, shift+g, ctrl+alt+g. This was also the week when I released the next version of PT Assistant plugin to the users which included all the work that I had done till now.

Later we successfully moved from svn to git thanks to the help provided by Florian Schäfer who himself is a GSOCer this year.

Finally I started working on a new relation editor button which aims to provide assistance to the users by going through all the ways in the current relation, finding out the errors present in it such as gaps, errors in one way direction, problems in roundabouts etc. It is a challenging task but till now we have achieved some success by being able to complete the basic tasks such as showing options to users, detecting the errors(not completely yet), making the users see all the changes that automatically take place in front of them by zooming in to all the ways involved, downloading the extra data which might be useful to fill up the gaps etc.

It has been a great journey till now and I can only see it becoming better. During the entire period of Phase 1, I have been supported a lot by my mentors especially Jo and also by other developers like Michael. I look forward to gaining more experience and contribute more to OpenStreetMap as the program moves ahead.