Automated Identification and Application of Code Refactoring in Scratch to Promote the Culture Quality from the Ground up

ion Duplication-eliminating refactorings have an obvious impact on abstraction (i.e., Extract Custom Block increases procedural abstraction, Extract Parent Sprite increases object abstraction, and Extract Constant increases uses of variable, a basic data 72 Chapter 5. Systematic Code Quality Improvement for Scratch abstraction). Lastly, Reduce Variable Scope improves information hiding or encapsulation, which correlates with the increase in the usage of local variables. The result indicates the refactored projects (N=43) which have used local variables at least once could see an increased usage of local variables by 52% on average. A great room for improvement in the usages of local variable is expected as changing the scope of declared variable in Scratch is an expensive and tedious transformation requiring the programmer to create a new variable with the intended scope and replace each existing variable block with the newly created one manually.ion). Lastly, Reduce Variable Scope improves information hiding or encapsulation, which correlates with the increase in the usage of local variables. The result indicates the refactored projects (N=43) which have used local variables at least once could see an increased usage of local variables by 52% on average. A great room for improvement in the usages of local variable is expected as changing the scope of declared variable in Scratch is an expensive and tedious transformation requiring the programmer to create a new variable with the intended scope and replace each existing variable block with the newly created one manually.

[1]  Mona E. Rizvi,et al.  A Scratch-based CS0 course for at-risk computer science majors , 2012, 2012 Frontiers in Education Conference Proceedings.

[2]  Eli Tilevich,et al.  Understanding recurring quality problems and their impact on code sharing in block-based software , 2017, 2017 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[3]  D. Collet Modelling Survival Data in Medical Research , 2004 .

[4]  Jalal Nouri,et al.  A systematic review of learning computational thinking through Scratch in K-9 , 2019, Comput. Educ..

[5]  Maria José Marcelino,et al.  Learning Computational Thinking and scratch at distance , 2018, Comput. Hum. Behav..

[6]  Trudy Howles,et al.  Fostering the growth of a software quality culture , 2003, SGCS.

[7]  Eli Tilevich,et al.  Code Quality Improvement for All: Automated Refactoring for Scratch , 2019, 2019 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[8]  Kathryn T. Stolee,et al.  Identification, Impact, and Refactoring of Smells in Pipe-Like Web Mashups , 2013, IEEE Transactions on Software Engineering.

[9]  Iwona Miliszewska,et al.  Befriending computer programming: a proposed approach to teaching introductory programming , 2007 .

[10]  Johan Jeuring,et al.  "I know it when I see it" Perceptions of Code Quality: ITiCSE '17 Working Group Report , 2018, ITiCSE-WGR.

[11]  Mark Zuckerberg,et al.  Computer Science for All , 2016 .

[12]  Gregorio Robles,et al.  Dr. Scratch: Automatic Analysis of Scratch Projects to Assess and Foster Computational Thinking , 2015 .

[13]  Arie van Deursen,et al.  Detecting and refactoring code smells in spreadsheet formulas , 2013, Empirical Software Engineering.

[14]  Felienne Hermans,et al.  Teaching Software Engineering Principles to K-12 Students: A MOOC on Scratch , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering: Software Engineering Education and Training Track (ICSE-SEET).

[15]  A. Bandura Social Foundations of Thought and Action , 1986 .

[16]  Jeffrey G. Gray,et al.  Learnable programming , 2017, Commun. ACM.

[17]  Yijun Yu,et al.  Exploring the Influence of Identifier Names on Code Quality: An Empirical Study , 2010, 2010 14th European Conference on Software Maintenance and Reengineering.

[18]  Zhenchang Xing,et al.  Refactoring Practice: How it is and How it Should be Supported - An Eclipse Case Study , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[19]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[20]  Görel Hedin,et al.  JastAdd--an aspect-oriented compiler construction system , 2003, Sci. Comput. Program..

[21]  Gregorio Robles,et al.  Automatic detection of bad programming habits in scratch: A preliminary study , 2014, 2014 IEEE Frontiers in Education Conference (FIE) Proceedings.

[22]  Sze Yee Lye,et al.  Case Studies of Elementary Children’s Engagement in Computational Thinking Through Scratch Programming , 2018 .

[23]  Karen Swan A CONSTRUCTIVIST MODEL FOR THINKING ABOUT LEARNING ONLINE , 2005 .

[24]  Johan Jeuring,et al.  Code Quality Issues in Student Programs , 2017, ITiCSE.

[25]  Diomidis Spinellis,et al.  A survey on software smells , 2018, J. Syst. Softw..

[26]  Diana Franklin,et al.  Hairball: lint-inspired static analysis of scratch projects , 2013, SIGCSE '13.

[27]  Jose Pereira dos Reis,et al.  Code Smells Incidence: Does It Depend on the Application Domain? , 2016, 2016 10th International Conference on the Quality of Information and Communications Technology (QUATIC).

[28]  Niklaus Wirth,et al.  Program development by stepwise refinement , 1971, CACM.

[29]  Carolyn Penstein Rosé,et al.  Exploring the Effect of Confusion in Discussion Forums of Massive Open Online Courses , 2015, L@S.

[30]  Felienne Hermans,et al.  How Kids Code and How We Know: An Exploratory Study on the Scratch Repository , 2016, ICER.

[31]  Amin Milani Fard,et al.  JSNOSE: Detecting JavaScript Code Smells , 2013, 2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[32]  Dmitry Jemerov Implementing refactorings in IntelliJ IDEA , 2008, WRT '08.

[33]  Sayamindu Dasgupta,et al.  Remixing as a Pathway to Computational Thinking , 2016, CSCW.

[34]  Wolfgang Pree,et al.  Design Patterns for Object-Oriented Software Development , 1994, Proceedings of the (19th) International Conference on Software Engineering.

[35]  Danny Dig,et al.  Refactoring meets spreadsheet formulas , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[36]  D. Kleinbaum,et al.  Survival Analysis: A Self-Learning Text. , 1996 .

[37]  Michael E. Fagan Design and Code Inspections to Reduce Errors in Program Development , 1976, IBM Syst. J..

[38]  David J. Malan,et al.  Scratch for budding computer scientists , 2007, SIGCSE.

[39]  Scott Shenker,et al.  Spark: Cluster Computing with Working Sets , 2010, HotCloud.

[40]  Tibor Gyimóthy,et al.  FaultBuster: An automatic code smell refactoring toolset , 2015, 2015 IEEE 15th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[41]  Daniela Cruzes,et al.  The evolution and impact of code smells: A case study of two open source systems , 2009, 2009 3rd International Symposium on Empirical Software Engineering and Measurement.

[42]  Adam Kiezun,et al.  Advanced Refactoring in the Eclipse JDT: Past, Present, and Future , 2007, WRT.

[43]  Eli Tilevich,et al.  Quality Hound — An online code smell analyzer for scratch programs , 2017, 2017 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[44]  Eli Tilevich,et al.  Novice Programmers and Software Quality: Trends and Implications , 2017, 2017 IEEE 30th Conference on Software Engineering Education and Training (CSEE&T).

[45]  Barbara Rogoff,et al.  Social interaction as apprenticeship in thinking: Guided participation in spatial planning , 1991, Perspectives on socially shared cognition.

[46]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[47]  Erik Barendsen,et al.  Designing a rubric for feedback on code quality in programming courses , 2016, Koli Calling.

[48]  William Pugh,et al.  Helping students appreciate test-driven development (TDD) , 2006, OOPSLA '06.

[49]  Herb Sutter,et al.  C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (C++ in Depth Series) , 2004 .

[50]  Mazyar Seraj,et al.  BEESM, a block-based educational programming tool for end users , 2018, NordiCHI.

[51]  Jingtao Wang,et al.  Combining visual block programming and graph manipulation for clinical alert rule building , 2012, CHI Extended Abstracts.

[52]  Scott Grissom,et al.  An Empirical Evaluation of Using Constructive Classroom Activities to Teach Introductory Programming , 2001, Comput. Sci. Educ..

[53]  Roy D. Pea,et al.  Using a discourse-intensive pedagogy and android's app inventor for introducing computational concepts to middle school students , 2013, SIGCSE '13.

[54]  M. P. Jacob Habgood,et al.  Using Pirate Plunder to Develop Children's Abstraction Skills in Scratch , 2019, CHI Extended Abstracts.

[55]  Felienne Hermans,et al.  Do code smells hamper novice programming? A controlled experiment on Scratch programs , 2016, 2016 IEEE 24th International Conference on Program Comprehension (ICPC).

[56]  Andrea Corradini,et al.  Handbook of Research on Improving Learning and Motivation through Educational Games , 2011 .

[57]  Jeffrey Overbey,et al.  Differential precondition checking: A lightweight, reusable analysis for refactoring tools , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[58]  Aiko Yamashita,et al.  Assessing the capability of code smells to explain maintenance problems: an empirical study combining quantitative and qualitative data , 2013, Empirical Software Engineering.

[59]  Stephen H. Edwards Rethinking computer science education from a test-first perspective , 2003, OOPSLA '03.

[60]  Sanjay Ghemawat,et al.  MapReduce: Simplified Data Processing on Large Clusters , 2004, OSDI.

[61]  Tiago L. Alves,et al.  Deriving metric thresholds from benchmark data , 2010, 2010 IEEE International Conference on Software Maintenance.

[62]  Christopher Scaffidi,et al.  Smell-driven performance analysis for end-user programmers , 2013, 2013 IEEE Symposium on Visual Languages and Human Centric Computing.

[63]  Zhendong Su,et al.  DECKARD: Scalable and Accurate Tree-Based Detection of Code Clones , 2007, 29th International Conference on Software Engineering (ICSE'07).

[64]  David Wolber,et al.  App inventor and real-world motivation , 2011, SIGCSE.

[65]  Mitchel Resnick,et al.  Empowering kids to create and share programmable media , 2008, Interactions.

[66]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[67]  Carolyn Penstein Rosé,et al.  “ Turn on , Tune in , Drop out ” : Anticipating student dropouts in Massive Open Online Courses , 2013 .

[68]  Esteban Vázquez-Cano,et al.  Visual programming languages integrated across the curriculum in elementary school: A two year case study using "Scratch" in five schools , 2016, Comput. Educ..

[69]  Chuck Leska Testing across the curriculum: square one! , 2004 .

[70]  Michele Lanza,et al.  Object-Oriented Metrics in Practice - Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems , 2006 .

[71]  Thomas J. Mowbray,et al.  AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis , 1998 .

[72]  Johan Jeuring,et al.  How Teachers Would Help Students to Improve Their Code , 2019, ITiCSE.

[73]  Kathryn T. Stolee,et al.  Refactoring pipe-like mashups for end-user programmers , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[74]  Capers Jones,et al.  The Economics of Software Quality , 2011 .

[75]  Eli Tilevich,et al.  Unmixing Remixes: The How and Why of Not Starting Projects from Scratch , 2019, 2019 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC).

[76]  Nergiz Ercil Cagiltay,et al.  Improving programming skills in engineering education through problem-based game projects with Scratch , 2018, Comput. Educ..

[77]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[78]  R. G. Dromey,et al.  Cornering the Chimera , 1996, IEEE Softw..

[79]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[80]  R Core Team,et al.  R: A language and environment for statistical computing. , 2014 .

[81]  Hongfang Liu,et al.  Modeling the Effect of Size on Defect Proneness for Open-Source Software , 2007, 29th International Conference on Software Engineering (ICSE'07 Companion).

[82]  Roger S. Pressman,et al.  Software Engineering: A Practitioner's Approach , 1982 .

[83]  Mordechai Ben-Ari,et al.  Habits of programming in scratch , 2011, ITiCSE '11.

[84]  John Boyland,et al.  Integrating code smells detection with refactoring tool support , 2012 .

[85]  Henrik Bærbak Christensen Systematic testing should not be a topic in the computer science curriculum! , 2003, ITiCSE.

[86]  David A. Fisher,et al.  C4 Software Technology Reference Guide - A Prototype. , 1997 .

[87]  Brian W. Kernighan,et al.  Elements of Programming Style , 1974 .

[88]  Francisco J. Gutierrez,et al.  Assessing Software Development Skills Among K-6 Learners in a Project-Based Workshop with Scratch , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET).

[89]  Thorna O. Humphries,et al.  A CS0 course using Scratch , 2011 .

[90]  Chanchal Kumar Roy,et al.  Comparison and evaluation of code clone detection techniques and tools: A qualitative approach , 2009, Sci. Comput. Program..

[91]  John Maloney,et al.  'scratch' your way to introductory cs , 2008, SIGCSE '08.

[92]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[93]  Assaf Marron,et al.  Spaghetti for the main course?: observations on the naturalness of scenario-based programming , 2012, ITiCSE '12.

[94]  Samuel B. Williams,et al.  ASSOCIATION FOR COMPUTING MACHINERY , 2000 .

[95]  Ying Zou,et al.  Studying the Impact of Clones on Software Defects , 2010, 2010 17th Working Conference on Reverse Engineering.

[96]  Gregorio Robles,et al.  On the Automatic Assessment of Computational Thinking Skills: A Comparison with Human Experts , 2017, CHI Extended Abstracts.

[97]  Hongfang Liu,et al.  An Investigation into the Functional Form of the Size-Defect Relationship for Software Modules , 2009, IEEE Transactions on Software Engineering.

[98]  Gregorio Robles,et al.  Software clones in scratch projects: on the presence of copy-and-paste in computational thinking learning , 2017, 2017 IEEE 11th International Workshop on Software Clones (IWSC).

[99]  Eric Rosenbaum,et al.  Scratch: programming for all , 2009, Commun. ACM.

[100]  Harold Abelson,et al.  Democratizing Computing with App Inventor , 2015, GETMBL.

[101]  Boyang Li,et al.  Evaluating CoBlox: A Comparative Study of Robotics Programming Environments for Adult Novices , 2018, CHI.

[102]  Eni Mustafaraj,et al.  Calls of the wild: Exploring procedural abstraction in app inventor , 2017, 2017 IEEE Blocks and Beyond Workshop (B&B).

[103]  Yi Sun,et al.  Some Code Smells Have a Significant but Small Effect on Faults , 2014, TSEM.

[104]  Andrew Luxton-Reilly,et al.  Worked examples in computer science , 2014, ACE.