Dissertation Submitted in Partial Fulfillment of the Requirements for The
Total Page:16
File Type:pdf, Size:1020Kb
ON THE HUMAN FACTORS IMPACT OF POLYGLOT PROGRAMMING ON PROGRAMMER PRODUCTIVITY by Phillip Merlin Uesbeck Master of Science - Computer Science University of Nevada, Las Vegas 2016 Bachelor of Science - Applied Computer Science Universit¨at Duisburg-Essen 2014 A dissertation submitted in partial fulfillment of the requirements for the Doctor of Philosophy { Computer Science Department of Computer Science Howard R. Hughes College of Engineering The Graduate College University of Nevada, Las Vegas December 2019 c Phillip Merlin Uesbeck, 2019 All Rights Reserved Dissertation Approval The Graduate College The University of Nevada, Las Vegas November 15, 2019 This dissertation prepared by Phillip Merlin Uesbeck entitled On The Human Factors Impact of Polyglot Programming on Programmer Productivity is approved in partial fulfillment of the requirements for the degree of Doctor of Philosophy – Computer Science Department of Computer Science Andreas Stefik, Ph.D. Kathryn Hausbeck Korgan, Ph.D. Examination Committee Chair Graduate College Dean Jan Pedersen, Ph.D. Examination Committee Member Evangelos Yfantis, Ph.D. Examination Committee Member Hal Berghel, Ph.D. Examination Committee Member Deborah Arteaga-Capen, Ph.D. Graduate College Faculty Representative ii Abstract Polyglot programming is a common practice in modern software development. This practice is often con- sidered useful to create software by allowing developers to use whichever language they consider most well suited for the different parts of their software. Despite this ubiquity of polyglot programming there is no empirical research into how this practice affects software developers and their productivity. In this disser- tation, after reviewing the state of the art in programming language and linguistic research pertaining to the topic, this matter is investigated by way of two empirical studies with 109 and 171 participants solving programming tasks. Based on the findings, the design of a data management library, a common use-case for polyglot programming, is proposed broadly and then applied specifically to the language Quorum as a case study. The review of previous studies finds that there is a pattern of productivity gain that can be explained by the occurrence of type annotations in programming, which gives insight into how programmers comprehend code. Study results show that there is a significant improvement of programmer productivity 2 when programmers are using polyglot programming in an embedded context (ηp = 0:039) and that less experienced programmers do better in a group with more frequent, but less severe, switches, while more experienced developers perform better with less frequent but more complete switches between languages. A study on language switches on a file level shows that file level programming language switching has a 2 clear negative impact on programmer productivity (ηp = 0:059) and is most likely caused by the increased occurrence of errors when switching. iii Acknowledgements First and foremost, I want to thank my supervisor Dr. Andreas Stefik for his continued support of my efforts and for continuously pushing me to be the best researcher I can be. Without him and Dr. Stefan Hanenberg, who helped me get started on this journey into empirical programming language research, I would never have been in the situation to strive for a doctorate to begin with. I also have to extend special thanks to Dr. Deborah Arteaga, who helped me dive headlong into the topic of code switching and helped me understand linguistic research, without which this dissertation would look very different. I also have to thank the other members of my committee, Dr. Pedersen, Dr. Berghel, and Dr. Yfantis who have always shown confidence in my abilities and readily given advice. Furthermore, I have to thank my colleagues of the Software Engineering and Media Lab at UNLV, espe- cially William Allee, Patrick Daleiden, and Tim Rafalski, for all their support and collaboration. But most importantly, I want to thank my wife Emma for inspiration and support throughout the process, as well as the opportunity to make a life outside of research and work. Lastly, I want to thank my family and friends, old and new, for supporting my ambitions and my friends for always having an open ear. Phillip Merlin Uesbeck University of Nevada, Las Vegas December 2019 iv Table of Contents Abstract iii Acknowledgements iv Table of Contents v List of Tables ix List of Figures x List of Code Samples xi Chapter 1 Introduction 1 1.1 Polyglot Programming . .2 1.2 Views on Polyglot Programming . .4 1.3 The Design of a Data Management Interface . .5 1.4 Scientific Contribution . .7 1.5 Methods . .9 1.6 Structure . .9 Chapter 2 Literature Review 10 2.1 Polyglot Programming . 10 2.2 Education . 12 2.3 Evidence on Programming Language Productivity . 16 2.4 Code Switching . 20 2.4.1 Code Switching in Natural Languages . 20 2.4.2 Cognitive Cost of Code Switching . 22 2.4.3 The Relation of Polyglot Programming and Code Switching . 23 2.5 Task Switching and Cognition . 25 2.6 Database Access Approaches . 27 v Chapter 3 On the Effect of Type Information on Developer Productivity 29 3.1 Introduction . 29 3.2 Related Work . 30 3.2.1 Type Systems . 31 3.2.2 Naming . 34 3.2.3 Program Comprehension . 34 3.3 Theoretical Synthesis . 37 3.4 Enumerated Types Experiment . 39 3.4.1 Experiment Description . 39 3.4.2 Results . 43 3.4.3 Discussion of Results . 49 3.4.4 Threats to Validity . 50 3.5 Conclusion . 52 Chapter 4 Randomized Controlled Trial on the Impact of Embedded Computer Language Switching 54 4.1 Introduction . 54 4.1.1 Objective . 56 4.1.2 Design Progress . 57 4.1.3 Structure . 58 4.2 Methods . 58 4.2.1 Trial Design . 59 4.2.2 Participants . 59 4.2.3 Study Setting . 59 4.2.4 Intervention . 60 4.2.5 Outcomes . 64 4.2.6 Sample Size . 65 4.2.7 Randomization . 65 4.2.8 Blinding . 65 4.3 Quantitative Results . 66 4.3.1 Recruitment . 66 4.3.2 Baseline Data . 66 4.3.3 Analysis . 68 4.4 Qualitative Results . 71 4.4.1 Object-Oriented Group . 71 4.4.2 String-Based Group . 73 4.4.3 Hybrid Group . 74 vi 4.5 Discussion . 74 4.5.1 Limitations . 75 4.5.2 Interpretation . 77 4.6 Conclusion . 80 Chapter 5 Randomized Controlled Trial on the Impact of File Level Computer Language Switching 82 5.1 Introduction . 82 5.1.1 Objective . 83 5.1.2 Design Process . 85 5.1.3 Structure . 85 5.2 Methods . 85 5.2.1 Trial Design . 86 5.2.2 Participants . 86 5.2.3 Study Setting . 87 5.2.4 Intervention . 87 5.2.5 Outcomes . 92 5.2.6 Sample Size . 94 5.2.7 Randomization . 94 5.2.8 Blinding . ..