CodeNuggets is an experimental (lunch break) project that I’ve been working on during during the last couple of months. CodeNuggets is an eclipse plugin that gives developers quick and contextual access to Github Gist. Gist is an online platform created by Github to share snippets and pastes among developers. All gists are Git repositories, so they are automatically versioned, forkable and usable from Git. Currently more than 10 millions of gists, written in all the imaginable programming and scripting languages, are accessible from the Gist website https://gist.github.com/search.


CodeNuggets is an eclipse plugin that allows developers to search and insert code snippets available in Gist directly from Eclipse. The motivation behind of CodeNuggets stems from the fact that developers access online code repositories, and question and answer platforms such as StackOverflow, as a fundamental step in their normal coding and problem solving workflow. More often than not, developers look for coding recipes that help them to solve complex problems. From how how to dump information into a file, to how to consume REST services or even implement sorting algorithms, developers constantly look for resources online that help them to understand the operational mechanics of frameworks, libraries, or any other development artifact to achieve a greater development goal. 

CodeNuggets helps developers to find code snippets from inside of their development environment. The plugin takes advantage of the developer’s imported projects and open resources, to identify the environment context, and uses static program analysis to identify API usage statements, and function naming semantics, in order to pivot its search function. Furthermore, CodeNuggets takes advantage of the social nature of Github (in which developers have followers and shared repositories can be starred) in order to optionally prioritize code snippets according to their author social centrality. It is important to mention that this social integration strategy is not part of Gist, however, because authors are registered Github users, CodeNuggets is capable of accessing both platforms to pair-match code snippets with their author social ranking. We believe CodeNuggets can help with multiple questions that developers ask in their daily development workflows, from troubleshooting API usage problems, to support code-review processes, relying on publicly available solutions from the best developers around the globe.

Screencast Demo:


Currently, we have developed an analyzer that identifies environment contextual information for Java classes with different granularity levels (e.g. method, class, project), this analyzer pivots the search capabilities of the plugin. However, we are aware of the potential of CodeNuggets to provide code snippet suggestions in the context of projects developed using any other programming or scripting languages. From Python and Ruby, to HTML and Javascript, we are extending the architecture of CodeNuggets so the community can develop and submit program-specific analyzers that can be seamlessly plugged into the tool.

Eclipse Update Site: http://hypatia.cs.ualberta.ca/~guana/code-nuggets/

Eclipse Update Site – Configuration Screen

 

Source: V.G. – RSS