Document Open Access Logo

Sni'per: a Code Snippet RESTful API

Authors Ricardo Queirós, Alberto Simões



PDF
Thumbnail PDF

File

OASIcs.SLATE.2016.13.pdf
  • Filesize: 470 kB
  • 11 pages

Document Identifiers

Author Details

Ricardo Queirós
Alberto Simões

Cite AsGet BibTex

Ricardo Queirós and Alberto Simões. Sni'per: a Code Snippet RESTful API. In 5th Symposium on Languages, Applications and Technologies (SLATE'16). Open Access Series in Informatics (OASIcs), Volume 51, pp. 13:1-13:11, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2016)
https://doi.org/10.4230/OASIcs.SLATE.2016.13

Abstract

Today we use the Web for almost everything, even to program. There are several specialized code editors gravitating on the Web and emulating most of the features inherited from traditional IDEs, such as, syntax highlight, code folding, autocompletion and even code refactorization. One of the techniques to speed the code development is the use of snippets as predefined code blocks that can be automatically included in the code. Although several Web editors support this functionality, they come with a limited set of snippets, not allowing the contribution of new blocks of code. Even if that would be possible, they would be available only to the code's owner or to the editors' users through a private cloud repository. This paper describes the design and implementation of Sni'per, a RESTful API that allows public access for multi-language programming code-blocks ordered by popularity. Besides being able to access code snippets from other users and score them, we can also contribute with our own snippets creating a global network of shared code. In order to make coding against this API easier, we create a client library that reduces the amount of code required to write and make the code more robust.
Keywords
  • Programming languages
  • interoperability
  • web services
  • code snippets

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Roy T. Fielding and Richard N. Taylor. Principled design of the modern web architecture. In Proceedings of the 22Nd International Conference on Software Engineering, ICSE '00, pages 407-416, New York, NY, USA, 2000. ACM. URL: http://dx.doi.org/10.1145/337180.337228.
  2. Joel Galenson, Philip Reames, Rastislav Bodik, Björn Hartmann, and Koushik Sen. Codehint: Dynamic and interactive synthesis of code snippets. In Proceedings of the 36th International Conference on Software Engineering, ICSE 2014, pages 653-663, New York, NY, USA, 2014. ACM. URL: http://dx.doi.org/10.1145/2568225.2568250.
  3. Tihomir Gvero, Viktor Kuncak, and Ruzica Piskac. Interactive synthesis of code snippets. In Ganesh Gopalakrishnan and Shaz Qadeer, editors, Computer Aided Verification: 23rd International Conference, CAV 2011, Snowbird, UT, USA, July 14-20, 2011. Proceedings, pages 418-423. Springer Berlin Heidelberg, 2011. URL: http://dx.doi.org/10.1007/978-3-642-22110-1_33.
  4. Miryung Kim, Lawrence Bergman, Tessa Lau, and David Notkin. An ethnographic study of copy and paste programming practices in oopl. In Empirical Software Engineering, International Symposium on, pages 83-92, Aug 2004. URL: http://dx.doi.org/10.1109/ISESE.2004.1334896.
  5. Torben Lorenzen, Lee Mondshein, Abdul Sattar, and Seikyung Jung. A code snippet library for cs1. ACM Inroads, 3(1):41-45, March 2012. URL: http://dx.doi.org/10.1145/2077808.2077822.
  6. Zachary Parker, Scott Poe, and Susan V. Vrbsky. Comparing nosql mongodb to an sql db. In Proceedings of the 51st ACM Southeast Conference, ACMSE '13, pages 5:1-5:6, New York, NY, USA, 2013. ACM. URL: http://dx.doi.org/10.1145/2498328.2500047.
  7. Naiyana Sahavechaphan and Kajal Claypool. Xsnippet: Mining for sample code. SIGPLAN Not., 41(10):413-430, October 2006. URL: http://dx.doi.org/10.1145/1167515.1167508.
  8. Doug Wightman, Zi Ye, Joel Brandt, and Roel Vertegaal. Snipmatch: Using source code context to enhance snippet retrieval and parameterization. In Proceedings of the 25th Annual ACM Symposium on User Interface Software and Technology, UIST '12, pages 219-228, New York, NY, USA, 2012. ACM. URL: http://dx.doi.org/10.1145/2380116.2380145.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail