Squirrel: A Code Snippet Repository

Authors

  • Aziz Nanthaamornphong Faculty of Technology and Environment, Prince of Songkla University, Phuket Campus, Thailand.
  • Saknarong Pomwong Faculty of Technology and Environment, Prince of Songkla University, Phuket Campus, Thailand.
  • Kwanrudee Klebkaew Faculty of Technology and Environment, Prince of Songkla University, Phuket Campus, Thailand.
  • Napawan Jindamanee Faculty of Technology and Environment, Prince of Songkla University, Phuket Campus, Thailand.

Keywords:

Software Development, Software Engineering, Software Engineering Education, Stack Overflow,

Abstract

Teaching programming courses in an academic environment has challenges, particularly for undergraduate students. These challenges can also be found in the software industry, where novice developers still need to obtain coding training. In practice, lecturers or trainers always assign exercises to students with the goal of improving their coding skills. Based on teaching experience, we have found that students may need to rely on software development kits to code an application faster, such as reusing lines of code already developed (code snippets) to solve a particular problem. Additionally, to reduce the software development time, novice developers tend to use crowdsourcing and social media sources of example code that can be used to solve programming problems. Utilizing these code snippets not only saves time for students or novice developers but also helps them to learn. Therefore, we proposed a system, called Squirrel, that is capable of offline and online code snippet storage and searching. Additionally, for online functionalities, this application supports searching for code snippets that exist in question-and-answer websites, such as Stack Overflow. We believe that this system will help increase the effectiveness of software development, especially for computer-science students and novice developers.

References

M. Umarji, S. E. Sim, and C. Lopes, “Archetypal internet-scale source code searching,” in Open Source Development, Communities and Quality: IFIP 20th World Computer Congress, Working Group 2.3 on Open Source Software, September 7-10, 2008, Milano, Italy, B. Russo, E. Damiani, S. Hissam, B. Lundell, and G. Succi, Eds. Boston, MA: Springer US, 2008, pp. 257–263.

R. E. Gallardo-Valencia and S. Elliott Sim, “Internet-scale code search,” in Proceedings of the 2009 ICSE Workshop on Search-Driven Development-Users, Infrastructure, Tools and Evaluation, ser. SUITE ’09, 2009, pp. 49–52.

K. Philip, M. Umarji, M. Agarwala, S. E. Sim, R. Gallardo-Valencia, C. V. Lopes, and S. Ratanotayanon, “Software reuse through methodical component reuse and amethodical snippet remixing,” in Proceedings of the ACM 2012 Conference on Computer Supported Cooperative Work, ser. CSCW ’12, 2012, pp. 1361–1370.

J. Brandt, P. J. Guo, J. Lewenstein, M. Dontcheva, and S. R. Klemmer, “Writing code to prototype, ideate, and discover,” IEEE Software, vol. 26, no. 5, pp. 18–24, 2009.

L. P. Deutsch, “Software reusability,” T. J. Bigger staff and A. J. Perlis, Eds., 1989, ch. Design Reuse and Frameworks in the Smalltalk-80 System, pp. 57–71.

J. Sillito, F. Maurer, S. M. Nasehi, and C. Burns, “What makes a good code example? : a study of programming Q&A in StackOverflow,” in Proceedings of the 2012 IEEE International Conference on Software Maintenance (ICSM), ser. ICSM ’12, 2012, pp. 25–34.

A. Heydarnoori, K. Czarnecki, W. Binder, and T. T. Bartolomei, “Two studies of framework-usage templates extracted from dynamic traces,” IEEE Transactions on Software Engineering, vol. 38, no. 6, pp. 1464– 1487, 2012.

S. Subramanian and R. Holmes, “Making sense of online code snippets,” in Proceedings of the 10th Working Conference on Mining Software Repositories (MSR), May 2013, pp. 85–88.

“StackOverflow Developer Survey Results 2017.” [Online]. Available: http: //stackoverflow.com/insights/survey/2017/. [Accessed: 2017-03-30].

C. Parnin and C. Treude, “Measuring API documentation on the web,” in Proceedings of the 2nd International Workshop on Web 2.0 for Software Engineering, ser. Web2SE ’11, 2011, pp. 25–30.

S. Exchange, “Stack Exchange,” http://stackexchange.com, accessed: 2017-03-30.

L. A. Adamic, J. Zhang, E. Bakshy, and M. S. Ackerman, “Knowledge sharing and Yahoo answers: everyone knows something,” in Proceedings of the 17th International Conference on World Wide Web, ser. WWW ’08, 2008, pp. 665–674.

K. K. Nam, M. S. Ackerman, and L. A. Adamic, “Questions in, knowledge in?: A study of Naver’s question answering community,” in Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, ser. CHI ’09, 2009, pp. 779–788.

L. Mamykina, B. Manoim, M. Mittal, G. Hripcsak, and B. Hartmann, “Design lessons from the fastest Q&A site in the west,” in Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, ser. CHI ’11, 2011, pp. 2857–2866.

C. Treude, O. Barzilay, and M.-A. Storey, “How do programmers ask and answer questions on the web? (nier track),” in Proceedings of the 33rd International Conference on Software Engineering, 2011, pp. 804– 807.

M.-A. Storey, L. Singer, B. Cleary, F. Figueira Filho, and A. Zagalsky, “The (r) evolution of social media in software engineering,” in Proceedings of the on Future of Software Engineering, ser. FOSE 2014, 2014, pp. 100–116.

E. M. Wilcox, J. W. Atwood, M. M. Burnett, J. J. Cadiz, and C. R. Cook, “Does continuous visual feedback aid debugging in directmanipulation programming systems?” in Proceedings of the ACM SIGCHI Conference on Human Factors in Computing Systems, ser. CHI ’97, 1997, pp. 258–265.

S. Chatterjee, S. Juvekar, and K. Sen, “Sniff: A search engine for java using free-form queries,” in Proceedings of the 12th International Conference on Fundamental Approaches to Software Engineering: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009, ser. FASE ’09, 2009, pp. 385–400.

S. P. Reiss, “Semantics-based code search,” in Proceedings of the 31st International Conference on Software Engineering, ser. ICSE ’09, 2009, pp. 243–253.

C. McMillan, M. Grechanik, D. Poshyvanyk, Q. Xie, and C. Fu, “Portfolio: Finding relevant functions and their usage,” in Proceedings of the 33rd International Conference on Software Engineering, ser. ICSE ’11, 2011, pp. 111–120.

J. Galenson, P. Reames, R. Bodik, B. Hartmann, and K. Sen, “Codehint: dynamic and interactive synthesis of code snippets,” in Proceedings of the 36th International Conference on Software Engineering, ser. ICSE 2014, 2014, pp. 653–663.

N. Sahavechaphan and K. Claypool, “Xsnippet: Mining for sample code,” SIGPLAN Not., vol. 41, no. 10, pp. 413–430, Oct. 2006.

“Web Services Architecture.” [Online]. Available: https://www.w3.org/TR/ws- arch/. [Accessed: 12-Jun-2017].

“Web Services Description Requirements.” [Online]. Available: https://www.w3.org/TR/WS-DESC-REQS/. [Accessed: 12-Jun-2017].

“StackOverflow.” [Online]. Available: http://stackoverflow.com/tour. [Accessed: 12-Jun-2017].

“ServerFault.” [Online]. Available: http://www.serverfault.com. [Accessed: 12-Jun-2017].

“Ask Ubuntu.” [Online]. Available: http://askubuntu.com. [Accessed: 12-Jun-2017].

“Database Administrators.” [Online]. Available: http://dba. stackexchange.com/. [Accessed: 12-Jun-2017].

“Android Enthusiasts.” [Online]. Available: http://android.stackexchange. com/. [Accessed: 12-Jun-2017].

“Game Development.” [Online]. Available: http://gamedev.stackexchange. com/. [Accessed: 12-Jun-2017].

Downloads

Published

2017-10-20

How to Cite

Nanthaamornphong, A., Pomwong, S., Klebkaew, K., & Jindamanee, N. (2017). Squirrel: A Code Snippet Repository. Journal of Telecommunication, Electronic and Computer Engineering (JTEC), 9(3-3), 73–77. Retrieved from https://jtec.utem.edu.my/jtec/article/view/2875