Difference between revisions of "Summer of Code/2014/Prasoon2211/Social Help"

From Sugar Labs
Jump to navigation Jump to search
Line 93: Line 93:
 
I've also done other minor work in php and nodejs. You can find it at my [https://github.com/prasoon2211 github repository].
 
I've also done other minor work in php and nodejs. You can find it at my [https://github.com/prasoon2211 github repository].
  
==You and the community==
+
==Me and the community==
  
 
''> If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.''
 
''> If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.''

Revision as of 08:38, 15 March 2014

Note: This is the first draft. Please report any mistakes in the discussions page

About Me

> What is your name?

Prasoon Shukla

> What is your email address?

prasoon92.iitr@gmail.com

> What is your Sugar Labs wiki username?

Prasoon2211

> What is your IRC nickname on irc.freenode.net?

prasoon2211

> What is your first language? (We have mentors who speak multiple languages and can match you with one of them if you'd prefer.)

Hindi. But I'm quite comfortable in English as well.

> Where are you located, and what hours (UTC) do you tend to work? (We also try to match mentors by general time zone if possible.)

I'm located in Kanpur, India (+5:30 UTC). I usually tend to work from 10 - 11 in the mornings (~05:00 UTC) to 9 - 10 in the night (~16:00 UTC) with a few breaks in the middle.

> Have you participated in an open-source project before? If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?

Yes, I've contributed code to a few open-source projects. Chief among those is SymPy[1] in which I participated as a student in last year's summer of code[2]. I've contributed to three patches in mercurial - one got merged[3]. A few more patches went to SimpleCV, all but one were merged[4]. One-off patches include this one in django[5] (unmerged) and this one in django-browserid (merged)[6]. Also, I've contributed to two patches to sugar core, one got merged and the other has changes suggested to it[7] which I'll take up as soon as I'm done with my proposal.

[1]: Some important patches: One, Two, Three, Four

[2]: Majority of code, Official link(please see the github repo for the complete code

[3]: One, Two, Three, Merged Patch

[4]: Merged: One, Two, Three. Unmerged: Four

[5]: Django, Patch

[6]: django-browserid, Patch

[7]: One, Two

About my project

> What is the name of your project?

My project is called 'Social Help for Sugar'.

> Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?

I will be integrating the Discourse open-source discussion platform into sugar. This will be done in such a way that the users can launch themselves into discussion on any topic regarding sugar right from the sugar shell. This will be much like sugar help where users can click on the help icon to access context based help.

This project is aimed at all sugar users. The ability to start a discussion on any help-related topic with a single mouse click will be, I believe, extremely helpful for the users. That's why this project needs to be undertaken.

The Discourse platform backend is made up entirely in Ruby. The sugar shell in made in Python. So, I'll mostly need to interact with Python and at times dabble with Ruby as well. The major tasks to be accomplished are:

  1. Getting the Discourse platform tweaked according to the needs of sugar. This will include:
    1. Getting the UI of Discourse match (at least to some extent) with that of sugar.
    2. Setting up standard system that would fetch as much data as it can from sugar shell, making the one time registration as simple as entering a password. This I was thinking of doing like so:
      • The first time the user opens up social help, we'll capture the email id from the sugar shell.
      • The full name will be captured as well.
      • There are two options for the default username (which of course the user can modify during registration):
        • Either we can take the part before the '@' from the email.
        • Or, we can employ a Quora like strategy - the username is FirstName-LastName-<index> where we'll need to fetch the 'index' from the Discourse database.
      • The user will need to feed in the password.
  2. Developing an authentication bridge for use with Discourse. This is a topic of discussion. We've had some opinions posted on the mailing list. All of these strategies can work - but, we need to decide on one of these. (I talked to Walter on IRC and he said to make this discussion a part of your project - maybe something to be done during the community bonding period). Here are the things we can do:
    1. The first approach is to add two methods to the browse activity - a set_cookie and a get_cookie - the can be accessed via DBus by Sugar shell. Here's the workflow:
      • When user opens social help, we'll read the session cookies from a config file set it in the browser (unless the cookies are already set).
      • When the user closes the browser, we check if the session cookie is set. If so, we overwrite the config file with this new cookie.
    2. The second approach is to log users in via facebook/google. This approach I do not like as it won't work in areas with only a local network. Also, I don't like the idea of tying this to a non-free (as in freedom) service.
    3. The third approach could be similar to sugar webservices (facebook, putlocker etc.) The discussion on this is here.
    4. A fourth way, and this was told to me by the Discourse devs, is to use Discourse SSO (Single Sign On). But this would require an existing service on which we can hang the Discourse auth onto.

Anyway, any one of these methods can work. We'll need to decide though. The mailing list thread that I tried discussing this on hasn't really seen much activity yet. So, we shouldn't decide on a approach just yet.

<Timeline forthcoming soon>

> Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.

As I've already mentioned in a previous sections, I've worked on quite a few open source projects. That shows that I'm capable of understanding the architecture of large codebases and successfully modifying small components in that codebase. This is essentially what I'll be doing in this project since the nature of this project is such that the code won't be tightly coupled with other sugar code.

Also, other than my open source source experience, I've developed a few other applications in Python/Django for my college's intranet portal. These applications include a virtual market for my institute for buying and selling used items, a user contributed directory of all items lost and found in the campus with user accounts, a pinterest like application for sharing original creative works (painting, poetry etc) which is in active development and an application that helps students review courses and faculty. Unfortunately however, I cannot share the code of these applications since the code officially belongs to the institute. You can however see some photos of the work here. All of this work is a part of work that I've done at a campus students' group - the Information Management Group. We are the guys who've made the CMS for managing the large amount of content on the college website and developed a great intranet portal for the institute; Photos. Some More.

I've also done other minor work in php and nodejs. You can find it at my github repository.

Me and the community

> If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.

Me: If this project is successfully completed, the users will have instant access to a discussion platform on which they can ask any question related to sugar. Over time, this information will develop itself into a repository of information where most common questions related to the platform would be present. This repository of information will be hugely beneficial for the sugar community.

<Opinion of sugar members to put put>

> What will you do if you get stuck on your project and your mentor isn't around?

Normally in such cases, I like to leave the problem for a little while, work on something else, then come back to the problem. This usually helps me take a new angle on the problem and normally, this resolves the problem. However, if I'm still stuck, then, I'll try to contact other members of the sugar community who are familiar with the components that I'm working on.

> How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?

I shall write a report every one or two weeks (depending on the distribution of components) of all the work done the previous week(s) - all the problems that I faced, how I solved those and what I plan to do in the coming week. This would be a good way to stay on schedule.

Miscellaneous

> We want to make sure that you can set up a development environment before the summer starts. Please do one of the following: Send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of "logout". Send us a link to a pull request or merge request you have made on a Sugar or Sugar activity bug. It's normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.

Here are my two patches:

#244, Merged.

#259, Changes suggested.

> Describe a great learning experience you had as a child. I remember that I used to have this RC car in my childhood. I always wondered how it ran - so I took it apart and when I knew how it worked (with the DC motor), I tore away the motor from the car. Subsequently, I taped the motor to the top of the car along with batteries, made a makeshift propeller with scrap pieces of aluminium from my backyard, expecting the car to fly, if uncontrollably. But it didn't - the car was heavy. I was left with a broken car and a lesson on concepts of force and lift. The other lesson I learnt from this experience was that just because it seems that something should work does not mean that it will; in fact it rarely ever does.

> Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?

Nothing much but I suppose, there is one thing. Sugar is primarily used by children. So one possible question could have been whether I have ever needed to teach a child - especially something technical. Someone who really understands what the end-user (in this case, children) really wants is usually capable of creating a better UX. I have, in fact, taught my little cousin some C programming once and that experience has taught me a little about how a child approaches technology. This could be helpful, I think.