DOI QR코드

DOI QR Code

Implementation and Experimentation of StyleJigsaw for Programming Beginners

프로그래밍 초보자를 위한 스타일직소의 구현과 실험

  • 이윤정 (부산대학교 컴퓨터 및 정보통신연구소) ;
  • 정인준 (eBay 코리아) ;
  • 우균 (부산대학교 컴퓨터공학과, 컴퓨터 및 정보통신연구소, LG전자 스마트 제어센터)
  • Received : 2012.12.18
  • Accepted : 2013.01.30
  • Published : 2013.02.28

Abstract

Since the high readable source codes help us to understand and modify the program, it is much easy to maintain them. The readability of source code is not only affected by the complexity of algorithms such as control structures but also affected by the coding styles such as naming and indentation. Although various coding standards have been presented for promoting the readability of source codes, it has been usually lost or ignored in a programming course. One of the reasons is that the coding standard is not a hard-and-false rule since it does not contribute to the performance of software. In this paper, we propose a simple automatic system, namely StyleJigsaw, which checks the style of the source codes written by C/C++ or Java. In this system, the coding style score is calculated and visualized as a jigsaw puzzle. To measure the educational effectiveness of StyleJigsaw, several experiments have been conducted on a class students in C++ programming course. According to the experimental results, the coding style score increased about 8.0 points(10.9%) on average using StyleJigsaw. Further, according to a questionnaire survey targeting the students who attended the programming course, about 88.5% of the students responded that StyleJigsaw was of help to learn the coding standards. We expect that the StyleJigsaw can be effectively used to encourage the students to obey the coding standards, resulting in high readable programs.

가독성 있는 소스코드는 이해하기 쉽고 수정하기 편하기 때문에 손쉽게 유지보수할 수 있다. 소스코드의 가독성은 프로그램의 제어 구조와 같은 알고리즘의 복잡도뿐만 아니라 함수명, 들여쓰기 등과 같은 코딩스타일에 의해서도 많은 영향을 받는다. 지금까지 소스코드의 가독성을 높이기 위해 다양한 코딩 표준들이 제안되었으나 프로그래밍 교과목에서는 코딩스타일을 다루지 않거나 무시하는 경우가 많았다. 그 이유는 코딩스타일이 프로그램의 효율에는 영향을 주지 않기 때문에 강제하기 어렵기 때문이다. 이 논문에서는 프로그램 소스코드의 코딩스타일을 분석하고 그 결과를 시각화하는 스타일직소(StyleJigsaw) 시스템을 제안한다. 스타일직소 시스템은 C/C++나 Java 언어로 작성된 소스코드의 코딩스타일을 분석하여 이를 정량화하고 그 결과를 퍼즐화된 이미지로 시각화한다. 스타일직소 시스템의 교육적 효과를 입증하기 위해 C++프로그래밍 수업을 듣는 학생들을 대상으로 스타일직소 사용 실험을 진행하였다. 실험 결과 스타일직소 시스템을 사용한 경우 코딩스타일 평균 점수가 약 8.0점(10.9%) 가량 향상된 것으로 나타났다. 또한, 프로그래밍 수업의 수강생들을 대상으로 한 설문조사에서 약 88.5%의 학생이 스타일직소 시스템이 코딩스타일 학습에 도움이 되었다고 응답하였다. 프로그래밍 수업에서 스타일직소 시스템을 활용함으로써 학생들이 가독성 있는 프로그램 작성 능력을 기르는 데 도움을 줄 수 있을 것이다.

Keywords

References

  1. 이덕희, 디지털화와 산업의 양극화, 삼성경제연구소, 2008.
  2. T. Tenny, "Program Readability: Procedures Versus Comments," IEEE Trans. on Software Engineering, Vol.14, No.9, pp.1271-1279, 1988. https://doi.org/10.1109/32.6171
  3. http://www.cwu.edu/-gellenbe/javastyle/
  4. http://www.gnu.org/prep/standards/standards.html
  5. H. Sutter and A. Alexandrescu, C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (C++ in Depth Series), Addison-Wesley Professional, 2004.
  6. X. Fang, "Using a Coding Standard to Improve Program Quality," in Proc. of the 2nd Asia-Pacific Conference on Quality Software, pp.73-78, IEEE, 2011.
  7. T. Howles, "Fostering the Growth of a Software Quality Culture," ACM SIGCSE Bulletin, Vol.35, No.2, pp.45-47, 2003.
  8. X. Li and C. Prasad, "Effectively Teaching Coding Standards in Programming," in Proc. of the 6th Conference on Information Technology Education, pp.239-244, 2005.
  9. 지정훈, 이윤정, 우균, "얼굴 표정을 이용한 코딩 스타일 점수 시각화", 정보과학회논문지: 소프트 웨어 및 응용, 제37권, 제7호, pp.578-583, 2010.
  10. J. S. Lim, J. H. Ji, Y. J. Lee, and G. Woo, "Style Avatar: a Visualization System for Teaching C Coding Style," in Proc. of the 2011 ACM Symposium on Applied Computing, pp.1210-1211, ACM, 2011.
  11. I. J. Jung, Y. J. Lee, B. H. Chun, E. K. Kim, and G. Woo, "Design and Implementation of Coding Style Jigsaw Game for C Learners," in Proc. of 2011 International Digital Design Invitation Exhibition, pp.61-62, 2011.
  12. L. W. Cannon, R. A. Elliott, L. W. Kirchoff, J. H. Miller, R. W. Mitze, E. P. Schan, N. O. Whittington, H. Spencer, D. Keppel, and M. Brader, Recommended C Style and Coding Standards, AT&T Bell Labs. 1990.
  13. MISRA Ltd., Guidelines for the use of the C language in vehicle based software, The Motor Industry Software Reliability Association, 1998.
  14. MISRA Ltd., Guidelines for the use of the C language in critical systems, The Motor Industry Software Reliability Association, 2004.
  15. L. Hatton, "Language Subsetting in an Industrial Context: A Comparison of MISRA C 1998 and MISRA C 2004," J. of Information Software Technology, Vol.49, No.5, pp.475-482, 2007. https://doi.org/10.1016/j.infsof.2006.07.004
  16. http://google-styleguide.googlecode.com/svn/trunk/ cppguide.xml
  17. http://geosoft.no/development/javastyle.html
  18. 문양선, 유철중, 장옥배, "인지심리 이론을 반영 한 객체지향 설계 및 프로그래밍 스타일 지침", 정보과학회논문지(B) 제25권, 제3호, pp.530-542, 1998.
  19. J. G. Greeno, "The Structure of Memory and the Process of Solving Problem," in Contemporary Issues in Cognitive Psychology, pp.23-45, 1973.
  20. R. Mayer and B. Shnejderman, "Syntactic/ Semantic Interactions in Programmer Behavior: Model and Experimental Result," J. of Computer and Information Sciences, Vol.8, No.3, pp.213-238, 1979.
  21. 황준하, "C 코딩스타일 검증기의 설계 및 구현", 한국컴퓨터정보학회논문지, 제13권, 제2호, pp.31-40, 2008.
  22. P. W. Oman and C. R. Cook, "A Taxonomy for Programming Style," in Proc. of the 1990 ACM annual conference Cooperation, pp.244-250, ACM, 1990.
  23. 이윤정, 김영봉, "컬러 정보를 이용한 실시간 표 정 데이터 추적 시스템", 한국콘텐츠학회논문지 제9권, 제7호, pp.159-170, 2009.
  24. 윤진성, 김계영, 최형일, "피부색상을 이용한 유 해영상 분류기 개발," 한국콘텐츠학회논문지, 제9 권, 제4호, pp.1-11, 2009.
  25. D. Chai and K. N. Ngan, "Face Segmentation Using Skin-color Map in Videophone Application," IEEE Trans. on Circuit and Systems for Video Technology, Vol.9, No.4, pp.551-564, 1999. https://doi.org/10.1109/76.767122