May 15, 2013

GSOC Proposal: Create a social snippets infrastructure

This is proposal #5 submitted to this year's GSOC by Amandeep Singh.
Feel invited to leave comments on Amandeep's proposal below. 




Aman

Email: aman.adsm@gmail.com
Short description: Snipmatch is an eclipse plugin which eases the development and code writing work from a programmer's point of view and helps to store/retrieve/re-use most commonly used code snippets and algorithms in the source code. It simply searches for the snippets stored locally/server and displays the most relevant and context specific code snippets as output.
PERSONAL DETAILS

Name : Amandeep Singh
Email address : aman.adsm@gmail.com
IM service :  aman.adsm(gtalk & skype)
Location: Chandigarh, India 


PROPOSAL TITLE

Eclipse Code Recommenders
project – Create a social snippets infrastructure

SYNOPSIS

Snipmatch is an eclipse plugin which eases the development and code writing work from a programmer's point of view and helps to store/retrieve/re-use most commonly used code snippets and algorithms in the source code. It simply searches for the snippets stored locally/server and displays the most relevant and context specific code snippets as output.

PROJECT DELIVERABLES

Add plugin spy feature to ease and help developers in further developing the plugin and getting insights about the libraries, dependencies and packages imported.

Automatic updation of the snippet list on insertion/deletion/modification of a snipppet in the snipmatch view, consequently leading to the removal of update button from the view and enhancing the UI.

An option to sort the snippet list based on date modified/LOC/topic(proposed).

I also want to change the icon images in the snipmatch view(personally I don't like them).

Complete and detailed  documentation of  the snipmatch plugin and if time allows I'm also looking forward to make a thesis on the same as my college summer project.

A backup/export feature by exporting snippets as files to the custom directory or folder according to the developer's choice.
Formats I wish to support : .txt, .html, java, .csv and obviously the .json format.

Syndication of snippets in wordpress(my own idea)
The Idea is, to simply publish the snippet to wordpress as a new post right from the IDE without logging in to the wordpress dashboard and manually posting to it.

Reccommend this snip button: A snippet sharing feature with the help of a  recommend button. Developers can recoomend/share the snippet with fellow developers via mail, or simply generate a shortlink to post anywhere or share with a friend.


IMPLEMENTATION DETAILS

Plugin spy can be easily added to snipmatch by simply adding it to the plugin dependencies.(1 or 2 days)
For implementing the export feature I suggest the following code(1 week approx):
For taking backups I'll be using Mysql. I wish the same Json template format could be used here as well, so as to easily store the snippets according to the Title in the database(1 week). 
Once this is done, wordpress syndication can also be done easily as I'm already aware about wordpress platform/php and know jdbc concepts(1 week at the max).
For recommend button I wish to use servelets/JSP/Mysql. In the process the snippet will be simply sent to the server via FTP and stored in a remote Mysql database. A shortlink generating algorithm(will try to make in a week or so) will be attached to the script with which the user can share it with anybody via mail, social networking or post it to pastebin or any other code sharing site. Temporarily I'll be storing this at my own online live server and then can be easily imported to the snipmatch server after approval. (10 days)
Algorithm has to be made for the sorting feature and will take help from my mentors in this regard. (1 week)


TIMELINE

deadline : till june 17
I am having exams till May 17th, so won't be able to do much till then. From the very next day onwards I'll indulge in the Eclipse Gsoc project.
Firstly I'll gather more knowledge and expertise in eclipse PDE and the whole code recommenders project esp the snipmatch plugin.
I'm not much aware about json template format, so will be devoting an ample amount of time on the same.
deadline : after june 17
> plugin spy
> change icons
> export feature
> backup support
> snippet list automatic refresh/update feature
> snippet sorting facility
> syndication with wordpress
> recommend this snip
Documentation will be done side by side along with the advancements in the project.
During the google SOC i.e the actual coding period, I will continue to commit regularly to the git branch, for proper review and testing of my work by other developers and mentors.
Each objective is anticipated to take only a few days to handle , so many can be completed over the summer.

WHY I AM WELL SUITED FOR THE PROJECT

Focussed, bright, fast learner, quite persistant and do not give up/quit easily 
Confident and have the necessary programming skills
I want to make projects that succeed
I act professionaly and take my work seriously and assure my mentors that I’ll definitely live up to their expections and come out with a well featured Snipmatch Eclipse plugin.


PROJECT OUTCOME AND BENEFITS TO COMMUNITY

A simple,nice and well integrated snipmatch GUI supporting all the features(new snippet creation, snippet sharing and rating,database, backup feature, multiple backend support, documentation) as required by the gsoc project. 
With EclipseIDE/Wordpress syndication feature, a new feature of blogging right from the IDE interface while developing can be implemented, thus helping the programmers to post their ideas, logical views, algorithms and code snippets  to the WWW easily.

ABOUT ME

Pursuing bachelors in computer science from Guru Nanak Dev Engineering College(http://gndec.ac.in) and in pre-final year.
for programming related skills and projects done, please refer to my website: www.kodevelop.com

May 10, 2013

GSOC Proposal: Enhance Extdoc Plugin

Hi,
I'm Dammina Sahabandu, 3rd year undergraduate of University of Moratuwa(dept. of Computer of Science and Engineering). I hope to contribute for the Eclipse Code Recommenders project through this years GSOC. Specifically by enhancing the Extdoc plugin. This is my project idea. Your feedbacks are mostly welcome!







Abstract

The current Extdoc view provides extended documentation on classes and methods which has been data mined from code. But there is no way for users to influence the documentation yet. The major goal of this project is to enhance Extdoc view such that user can involve for the documentation. That is if there is no existing Javadoc at the moment users can users can create new Javadoc or if there is Javadoc already then users can edit it, annotate it and rate it.(that is users can create, annotate and rate contributions(for this task Mylyn's wikitext will be used) to the documentation of classes and methods.

Detailed Information

Writing documentation is one of those tasks that programmers are typically not really interested in. It is time-consuming, wearisome task which has almost no immediate rewards. So as a consequence, most of the times documentation is incomplete or out-dated.
But at the same time good and comprehensive documentation is critical for the success of a library or framework. There tools which can generate documentation (Javadoc comments) by extracting the obvious information from the source code. But the thing is for an instant it may be seems like helpful and valuable but finally this kind of documentation will only pleases the project manager since it improves the source code to documentation ratio. But in the developers point of view these kind of documentation is less helpful and rather useless.
However there are many other resources out there such as tutorial sites, Code-search engines and code snippet repositories which offers valuable information about an API (how to use a certain API or deal with errors). The current Extended Documentation platform is exclusively developed to serve the purpose of aggregate this wide range of information sources available on the web into a single view in eclipse.
The figure below shows the current Extdoc view.

The existing view of Extension documentation is great. But as you can see, there are no user feedback components. Without that functionalities the Extdoc view is rather incomplete. So the proposed idea of the project is to enhance the Extdoc platform which enables the functionality for the users to involve in the documentation. The figure below is a mock-up screenshot of the user interface of Extdoc view after adding the functionalities. 


There by clicking on the log in text user will be navigated to a log in window which will be like this.


There user can authenticate himself by providing his/her Google, Yahoo likewise ID. It will be openId based authentication. By successfully log in to the system user will be able navigated to the Extdoc view which the user interface will be like this.


There user have the privileges to edit/create, annotate and rate the existing documentation. 

The user interface  will communicate with the back end database using the Open Data protocol. At the database there will be tables for handling these user feedbacks including including entries for comments, rating info etc. 
Server side implementation will process the existing data and return the information(Current rating etc.) to the UI. And UI will display them. 

Deliverable

Final product deliverable will be the Extended documentation platform with a very solid restful API for commenting and editing API elements and a very tight editing integration into the IDE.
For these tasks, following technologies will be used.
  • Users will be authenticated based on openId authentication.
  • OData protocol will be used for backend communication.
  • The database back end will be SQL-DB.

Schedule


Contact Information

Phone number: +94716422775
Skype: damminams

GSOC Proposal: Code Recommenders for Javadoc!

Hi,

my name is Patrick Gottschaemmer and I'm a computer science student at the Darmstadt University of Technology. Besides that, I work for the Code Recommenders project as a Eclipse contributor since October 2012. I'd like to participate in the Google Summer of Code 2013 and this is my GSOC Proposal about an integration of Code Recommenders statistics into Javadoc. Any feedback would be welcome!

Abstract



The Eclipse Code Recommenders project [1] provides a smart Code Completion for the Eclipse IDE in Java, based on the context where code completion is triggered and gained knowledge by analyzing source code of open source projects. These machine learned statistics of API and framework usages (e.g. JFace or the JDK itself) can be summarized and made abstract from the current code context. This way, typical usage patterns of API calls or code snippets (lines of code which are usually appear together) can be identified.
These gained informations can be a great advantage when learning how to use a new API or a framework.
Furthermore, a directly integration into the standard documentation platform of the programming language would be useful, because that is normally the starting point for developers which want to learn something about core classes, package usages and interfaces in frameworks or APIs. In this GSoC Proposal, I’d like to implement the following additional features for the Javadoc generation tool [2]:
  • Integration of Code Recommenders statistics for packages, classes and methods on Javadoc

  • A little helper utility which fetches source code from a repository, runs javadoc on it, integrates the Code Recommenders statstics and uploads the updated documentation back to the repository

  • Enable developers to directly edit, comment or rate on API documentation and new code snippets, which are provided by the Snipmatch subproject of Code Recommenders or posted by developers themselves

Introduction



The standard Code Completion of the Eclipse IDE (or Code Completion in general) is a great feature to speed-up your workflow in programming. Not only saving you a dozens of keystrokes per day by complete your not yet finished lines of code, it can also be used to show you syntactically correct proposals for your method calls or your overrides.
While this is a great way to learn how to use new APIs and frameworks, it can quickly get confusing if you trigger code completion for example on a bloated ui class and get flooded by hundreds of method call proposals:


(all permissions granted by codetrails.com)



But actually, only a few methods are interesting, depending on your current code context:



(all permissions granted by codetrails.com)

This is exactly what Code Recommenders does. The knowledge, which methods are relevant for a programmer at a certain point in his code context are gained from machine learning and analyzing of source code from open source projects at the Eclipse Foundation.


Unfortunately, if you’re completely new to an API or a framework, your first step wouldn’t be to trigger code completion on some unfamiliar classes. Usually, you start paying attention on some documentation, whether it be a book, an online web page or a demo talk. For a specific problem, you’d lookup a forum or something like stackoverflow.com
But unfortunately, the machine learned source code statstics of Code Recommenders are only available in your Eclipse IDE. At least until now!

Javadoc & Code Recommenders - What will it look like?



There are several questions and statistics from Code Recommenders which you could insert in a Javadoc HTML generated website, e.g.


  • When selecting a package:
    'What are the most frequently overwritten (used) classes in package org.eclipse.xyz*?'
  • When selecting a method:
    'Which methods are frequently called together with m()?'
  • When selecting a type:
    'Which methods of type X frequently used by clients?'
  • and many more...


While these are just some basic ideas, I’d like to prioritize them (and others) for the implementation with a Google Docs poll for the Eclipse GSoC mentors.

An integration of the Code Recommenders statistic to the generated HTML output of Javadoc could look like this:



I’ve created some more Javadoc examples in HTML with the Javadoc framework, check them out at
The following elements are annotated with some statistics from Code Recommenders:
  • The package org.eclipse.jface.viewers (at the bottom)
  • The class org.eclipse.jface.viewers.TableViewer(right beneath the class description)
  • The method getTable() in class TableViewer


Javadoc & Code Recommenders - How are they working together?



For this generation part, I plan to extend the Javadoc Tool framework by one or more 'Doclets' (see [2]) that allow different extdoc providers (based on the extdoc providers of Code Recommenders) to contribute directly to the generated HTML output via the Javadoc api.
In contrast to the normal way how the javadoc command is used, I'd like to develop a little helper utility that fetches and unzips the sources directly from a maven repository, runs the normal javadoc tool and adds the recommenders documentation to the standard javadoc output, and finally uploads the updated javadocs to the repository or deploys them on a website.


Going further - Let’s get social!



In addition (when there is still some timet), I'd like to enable users to directly edit, comment or rate on API documentation and new code snippets, which are provided by the Snipmatch subproject of Code Recommenders. Alternatively, these code snippets could also be posted directly by developers through the webinterface or even via a REST API (so you could implement an additional IDE plugin for this afterwards). The code snippets shall be grouped by java classes and/or packages, which then can be tagged, commented and rated by other developers. Top rated code snippets ('favorites') shall appear at the top of the list, indeed similar to stackoverflow.com.


Here are two mock-ups for a first impression:


API Commentation feature for developers



Social Code Snippets Integation


Server Backend



For these social features, an additional backend (a RESTful api) will be needed, which stores and organizes the code snippets, including tags and comments by users.
The snippets shall be inserted dynamically in the (so far static generated) Javadoc website. For the server-side part I'm thinking of using the OData [3] protocol backed up by a SQL database like MySQL.


Milestones and Timeline



Milestone #
Description
Duration
1 -
Javadoc Generation Utility
Provide a little helper utility which
  • fetches and unzips sources directly from a maven repository
  • runs the javadoc tool (with recommenders documenation)
  • upload updated javadoc
~3 Weeks
2 -
Extend Javadoc with CoRe statistics
Extend the Javadoc Tool framework by one or more 'Doclets' which allow different extdoc providers (based on the extdoc providers of Code Recommenders) to contribute directly to the generated HTML output via the Javadoc API
~7 Weeks
3 -
Server Backend für Social Javadoc
RESTful API Server backend, which stores and organizes the code snippets, tags and documentation comments by users.
Implementation with the OData protocol backed up by a SQL database like MySQL.
~4-5 Weeks
4 -
Webpage Frontend for API Documenation
Enable users to directly edit, comment or rate on API documentation through a webpage or the REST API (maybe an Eclipse IDE plugin afterwards)
Remaining Time
5 -
Webpage Frontend for Code Snippets
Integration of code snippets, which are provided by the Snipmatch subproject of Code Recommenders. Alternatively, the code snippets could also be posted directly by developers through the webinterface or via the REST API (maybe an Eclipse IDE plugin afterwards)
Remaining Time


18 Weeks GSoC


About my work and contact information



Until now, I’ve done some various bugfixes and corrections in the frontend of the Code Recommenders Eclipse Plug-in, improved the drag’n’drop provider ranking in the Extdoc View and worked out a documentation for the different code completion scenarios (method calls, overrides, annotations etc.) in Java and how we want to treat them in the future at Code Recommenders.


Please feel free to contact me for further informations on my work or my GSoC proposal:


email
mail@gottschaemmer.net
mailing lists
recommenders-dev@eclipse.org,
soc-dev@eclipse.org
gtalk/jabber
patrick@gottschaemmer.net
icq
216653447
skype
paddyg89
astra
paddyg89


Links
[3] http://www.odata.org/