Abstract
How working statically-typed functional programmers write code is largely understudied. And yet, a better understanding of developer practices could pave the way for the design of more useful and usable tooling, more ergonomic languages, and more effective on-ramps into programming communities. The goal of this work is to address this knowledge gap: to better understand the high-level authoring patterns that statically-typed functional programmers employ. We conducted a grounded theory analysis of 30 programming sessions of practicing statically-typed functional programmers, 15 of which also included a semi-structured interview. The theory we developed gives insight into how the specific affordances of statically-typed functional programming affect domain modeling, type construction, focusing techniques, exploratory and reasoning strategies, and expressions of intent. We conducted a set of quantitative lab experiments to validate our findings, including that statically-typed functional programmers often iterate between editing types and expressions, that they often run their compiler on code even when they know it will not successfully compile, and that they make textual program edits that reliably signal future edits that they intend to make. Lastly, we outline the implications of our findings for language and tool design. The success of this approach in revealing program authorship patterns suggests that the same methodology could be used to study other understudied programmer populations.
Supplemental Material
- Beth Adelson and Elliot Soloway. 1985. The Role of Domain Experience in Software Design. Transactions on Software Engineering, Nov., issn:0098-5589 https://doi.org/10.1109/TSE.1985.231883 Google Scholar
Digital Library
- Steve Adolph, Philippe Kruchten, and Wendy Hall. 2012. Reconciling Perspectives: A Grounded Theory of How People Manage the Process of Software Development. Journal of Systems and Software, June, issn:0164-1212 https://doi.org/10.1016/j.jss.2012.01.059 Google Scholar
Digital Library
- John R. Anderson, Robert Farrell, and Ron Sauers. 1984. Learning to Program in LISP. Cognitive Science, April, issn:0364-0213 https://doi.org/10.1016/S0364-0213(84)80013-0 Google Scholar
Cross Ref
- Jon Awbrey and Susan Awbrey. 1995. Interpretation as Action: The Risk of Inquiry. Inquiry: Critical Thinking Across the Disciplines, Feb., https://doi.org/10.5840/inquiryctnews199515125Google Scholar
- Alan Baddeley. 2007. Working Memory, Thought, and Action. isbn:978-0-19-168950-5 https://doi.org/10.1093/acprof:oso/9780198528012.001.0001 Google Scholar
Cross Ref
- Titus Barik, Denae Ford, Emerson Murphy-Hill, and Chris Parnin. 2018. How Should Compilers Explain Problems to Developers? In European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE). isbn:978-1-4503-5573-5 https://doi.org/10.1145/3236024.3236040 Google Scholar
Digital Library
- Shraddha Barke, Hila Peleg, and Nadia Polikarpova. 2020. Just-in-Time Learning for Bottom-up Enumerative Synthesis. Proceedings of the ACM on Programming Languages (PACMPL), Issue OOPSLA, Nov., https://doi.org/10.1145/3428295 Google Scholar
Digital Library
- Kent Beck, Ron Crocker, Gerard Meszaros, John Vlissides, James O. Coplien, Lutz Dominick, and Frances Paulisch. 1996. Industrial Experience with Design Patterns. In International Conference on Software Engineering (ICSE). isbn:978-0-8186-7246-0 https://doi.org/10.1109/ICSE.1996.493406 Google Scholar
Cross Ref
- Brett A. Becker, Cormac Murray, Tianyi Tao, Changheng Song, Robert McCartney, and Kate Sanders. 2018. Fix the First, Ignore the Rest: Dealing with Multiple Compiler Error Messages. In SIGCSE Technical Symposium. isbn:978-1-4503-5103-4 https://doi.org/10.1145/3159450.3159453 Google Scholar
Digital Library
- Roman Bednarik and Markku Tukiainen. 2004. Visual Attention and Representation Switching in Java Program Debugging: A Study Using Eye Movement Tracking. In Psychology of Programming Interest Group (PPIG).Google Scholar
- Roman Bednarik and Markku Tukiainen. 2006. An Eye-Tracking Methodology for Characterizing Program Comprehension Processes. In Symposium on Eye Tracking Research & Applications (ETRA). isbn:978-1-59593-305-8 https://doi.org/10.1145/1117309.1117356 Google Scholar
Digital Library
- Hugh Beyer and Karen Holtzblatt. 1997. Contextual Design: Defining Customer-Centered Systems. Morgan Kaufmann Publishers Inc.. isbn:978-0-08-050304-2Google Scholar
Digital Library
- Francisco Enrique Vicente Castro and Kathi Fisler. 2016. On the Interplay Between Bottom-Up and Datatype-Driven Program Design. In SIGCSE Technical Symposium. isbn:978-1-4503-3685-7 https://doi.org/10.1145/2839509.2844574 Google Scholar
Digital Library
- Francisco Enrique Vicente Castro and Kathi Fisler. 2020. Qualitative Analyses of Movements Between Task-Level and Code-Level Thinking of Novice Programmers. In SIGCSE Technical Symposium. isbn:978-1-4503-6793-6 https://doi.org/10.1145/3328778.3366847 Google Scholar
Digital Library
- Kathy Charmaz. 2006. Constructing Grounded Theory: A Practical Guide Through Qualitative Analysis. SAGE Publishing Inc.. isbn:978-0-7619-7353-9Google Scholar
- Gerry Coleman and Rory O’Connor. 2007. Using Grounded Theory to Understand Software Process Improvement: A Study of Irish Software Product Companies. Information and Software Technology, June, issn:0950-5849 https://doi.org/10.1016/j.infsof.2007.02.011 Google Scholar
Digital Library
- Simon P. Davies. 1991. Characterizing the Program Design Activity: Neither Strictly Top-down nor Globally Opportunistic. Behaviour & Information Technology, May, issn:0144-929X https://doi.org/10.1080/01449299108924281 Google Scholar
Cross Ref
- Simon P. Davies and Adrian M. Castell. 1994. From Individuals to Groups Through Artifacts: The Changing Semantics of Design in Software Development. In User-Centred Requirements for Software Engineering Environments, David J. Gilmore, Russel L. Winder, and Françoise Détienne (Eds.). isbn:978-3-662-03035-6 https://doi.org/10.1007/978-3-662-03035-6_2 Google Scholar
Cross Ref
- Françoise Détienne. 2002. Software Design — Cognitive Aspect. isbn:978-1-85233-253-2 https://doi.org/10.1007/978-1-4471-0111-6 Google Scholar
Cross Ref
- Robert G. Farrell, John R. Anderson, and Peter L. Pirolli. 1984. Learning to Program Recursion. In Proceedings of the Sixth Annual Cognitive Science Meetings.Google Scholar
- Kathi Fisler and Francisco Enrique Vicente Castro. 2017. Sometimes, Rainfall Accumulates: Talk-Alouds with Novice Functional Programmers. In International Conference on Computing Education Research (ICER). isbn:978-1-4503-4968-0 https://doi.org/10.1145/3105726.3106183 Google Scholar
Digital Library
- Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, and Grady Booch. 1995. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional.Google Scholar
Digital Library
- David J. Gilmore. 1990. Expert Programming Knowledge: A Strategic Approach. In Psychology of Programming, J.-M. Hoc, T.R.G. Green, R. Samurçay, and D.J. Gilmore (Eds.). isbn:978-0-12-350772-3 https://doi.org/10.1016/B978-0-12-350772-3.50019-7 Google Scholar
Cross Ref
- Matthías Páll Gissurarson. 2018. Suggesting Valid Hole Fits for Typed-Holes (Experience Report). In International Symposium on Haskell (Haskell). isbn:978-1-4503-5835-4 https://doi.org/10.1145/3242744.3242760 Google Scholar
Digital Library
- Barney G. Glaser and Anselm L. Strauss. 1967. The Discovery of Grounded Theory: Strategies for Qualitative Research. Aldine de Gruyter. isbn:978-0-202-30260-7Google Scholar
- Thomas R. G. Green and Marian Petre. 1996. Usability Analysis of Visual Programming Environments: A ‘Cognitive Dimensions’ Framework. Journal of Visual Languages & Computing, June, issn:1045-926X https://doi.org/10.1006/jvlc.1996.0009 Google Scholar
Cross Ref
- Yann-Gaël Guéhéneuc. 2006. TAUPE: Towards Understanding Program Comprehension. In Conference of the Center for Advanced Studies on Collaborative Research (CASCON). https://doi.org/10.1145/1188966.1188968 Google Scholar
Digital Library
- Raymonde Guindon. 1990. Designing the Design Process: Exploiting Opportunistic Thoughts. Human–Computer Interaction, issn:0737-0024 https://doi.org/10.1080/07370024.1990.9667157 Google Scholar
Cross Ref
- Raymonde Guindon, Herb Krasner, and Bill Curtis. 1987. Breakdowns and Processes during the Early Activities of Software Design by Professionals. In Empirical Studies of Programmers: Second Workshop. isbn:978-0-89391-461-5Google Scholar
Digital Library
- Sandra G. Hart and Lowell E. Staveland. 1988. Development of NASA-TLX (Task Load Index): Results of Empirical and Theoretical Research. In Advances in Psychology, Peter A. Hancock and Najmedin Meshkati (Eds.). https://doi.org/10.1016/S0166-4115(08)62386-9 Google Scholar
Cross Ref
- Prateek Hejmady and N. Hari Narayanan. 2012. Visual Attention Patterns during Program Debugging with an IDE. In Symposium on Eye Tracking Research and Applications (ETRA). isbn:978-1-4503-1221-9 https://doi.org/10.1145/2168556.2168592 Google Scholar
Digital Library
- Rashina Hoda, James Noble, and Stuart Marshall. 2013. Self-Organizing Roles on Agile Software Development Teams. Transactions on Software Engineering, March, issn:1939-3520 https://doi.org/10.1109/TSE.2012.30 Google Scholar
Digital Library
- Sami Jantunen and Donald C. Gause. 2014. Using a Grounded Theory Approach for Exploring Software Product Management Challenges. Journal of Systems and Software, Sept., issn:0164-1212 https://doi.org/10.1016/j.jss.2014.03.050 Google Scholar
Digital Library
- Robin Jeffries, Althea A. Turner, Peter G. Polson, and Michael E. Atwood. 1981. The Processes Involved in Designing Software. In Cognitive Skills and Their Acquisition (1st ed.). isbn:978-0-203-72817-8Google Scholar
- Shoaib Kamil, Alvin Cheung, Shachar Itzhaky, and Armando Solar-Lezama. 2016. Verified Lifting of Stencil Computations. In Programming Language Design and Implementation (PLDI). isbn:978-1-4503-4261-2 https://doi.org/10.1145/2908080.2908117 Google Scholar
Digital Library
- Amy J. Ko. 2003. A Contextual Inquiry of Expert Programmers in an Event-Based Programming Environment. In Extended Abstracts on Human Factors in Computing Systems (CHI EA). isbn:978-1-58113-637-1 https://doi.org/10.1145/765891.766135 Google Scholar
Digital Library
- Amy J. Ko and Brad A. Myers. 2003. Development and Evaluation of a Model of Programming Errors. In Symposium on Human Centric Computing Languages and Environments. https://doi.org/10.1109/HCC.2003.1260196 Google Scholar
Cross Ref
- Thomas D. LaToza, Maryam Arab, Dastyni Loksa, and Amy J. Ko. 2020. Explicit Programming Strategies. Empirical Software Engineering, July, issn:1573-7616 https://doi.org/10.1007/s10664-020-09810-1 Google Scholar
Cross Ref
- Stanley Letovsky. 1987. Cognitive Processes in Program Comprehension. Journal of Systems and Software, Dec., issn:0164-1212 https://doi.org/10.1016/0164-1212(87)90032-X Google Scholar
Digital Library
- Colleen M. Lewis. 2012. The Importance of Students’ Attention to Program State: A Case Study of Debugging Behavior. In International Conference on International Computing Education Research (ICER). isbn:978-1-4503-1604-0 https://doi.org/10.1145/2361276.2361301 Google Scholar
Digital Library
- Justin Lubin. 2021. How Statically-Typed Functional Programmers Author Code. In Extended Abstracts on Human Factors in Computing Systems. isbn:978-1-4503-8095-9 https://doi.org/10.1145/3411763.3451515 Google Scholar
Digital Library
- Justin Lubin and Ravi Chugh. 2019. Type-Directed Program Transformations for the Working Functional Programmer. In Workshop on Evaluation and Usability of Programming Languages and Tools, Sarah Chasins, Elena L. Glassman, and Joshua Sunshine (Eds.) (PLATEAU). isbn:978-3-95977-135-1 issn:2190-6807 https://doi.org/10.4230/OASIcs.PLATEAU.2019.3 Google Scholar
Cross Ref
- Justin Lubin, Nick Collins, Cyrus Omar, and Ravi Chugh. 2020. Program Sketching with Live Bidirectional Evaluation. Proceedings of the ACM on Programming Languages (PACMPL), Issue ICFP, Aug., https://doi.org/10.1145/3408991 Google Scholar
Digital Library
- Michael Muller. 2014. Curiosity, Creativity, and Surprise as Analytic Tools: Grounded Theory Method. In Ways of Knowing in HCI, Judith S. Olson and Wendy A. Kellogg (Eds.). isbn:978-1-4939-0378-8 https://doi.org/10.1007/978-1-4939-0378-8_2 Google Scholar
Cross Ref
- Brad A. Myers, Amy J. Ko, Thomas D. LaToza, and YoungSeok Yoon. 2016. Programmers Are Users Too: Human-Centered Methods for Improving Programming Tools. Computer, issn:1558-0814 https://doi.org/10.1109/MC.2016.200 Google Scholar
Digital Library
- Brad A. Myers, John F. Pane, and Amy J. Ko. 2004. Natural Programming Languages and Environments. Communications of the ACM, issn:0001-0782 https://doi.org/10.1145/1015864.1015888 Google Scholar
Digital Library
- Marie-Hélène Nienaltowski, Michela Pedroni, and Bertrand Meyer. 2008. Compiler Error Messages: What Can Help Novices? In SIGCSE Technical Symposium. isbn:978-1-59593-799-5 https://doi.org/10.1145/1352135.1352192 Google Scholar
Digital Library
- John F. Pane and Brad A. Myers. 2000. Tabular and Textual Methods for Selecting Objects from a Group. In International Symposium on Visual Languages (VL/HCC). issn:1049-2615 https://doi.org/10.1109/VL.2000.874379 Google Scholar
Cross Ref
- Candy Pang, Abram Hindle, and Denilson Barbosa. 2020. Understanding Devops Education with Grounded Theory. In International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET). isbn:978-1-4503-7124-7 https://doi.org/10.1145/3377814.3381711 Google Scholar
Digital Library
- Peter Pirolli. 1986. A Cognitive Model and Computer Tutor for Programming Recursion. Human– Computer Interaction, Dec., issn:0737-0024 https://doi.org/10.1207/s15327051hci0204_3 Google Scholar
Digital Library
- Peter L. Pirolli and John R. Anderson. 1985. The Role of Learning from Examples in the Acquisition of Recursive Programming Skills. Canadian Journal of Psychology, https://doi.org/10.1037/h0080061 Google Scholar
Cross Ref
- Catherine Kohler Riessman. 1993. Narrative Analysis. SAGE Publishing Inc.. isbn:978-0-8039-4754-2Google Scholar
- Paige Rodeghero, Cheng Liu, Paul W. McBurney, and Collin McMillan. 2015. An Eye-Tracking Study of Java Programmers and Application to Source Code Summarization. Transactions on Software Engineering, Nov., issn:1939-3520 https://doi.org/10.1109/TSE.2015.2442238 Google Scholar
Digital Library
- Paige Rodeghero and Collin McMillan. 2015. An Empirical Study on the Patterns of Eye Movement during Summarization Tasks. In International Symposium on Empirical Software Engineering and Measurement (ESEM). issn:1949-3789 https://doi.org/10.1109/ESEM.2015.7321188 Google Scholar
Cross Ref
- Paige Rodeghero, Collin McMillan, Paul W. McBurney, Nigel Bosch, and Sidney D’Mello. 2014. Improving Automated Source Code Summarization via an Eye-Tracking Study of Programmers. In International Conference on Software Engineering (ICSE). isbn:978-1-4503-2756-5 https://doi.org/10.1145/2568225.2568247 Google Scholar
Digital Library
- Tobias Roehm, Rebecca Tiarks, Rainer Koschke, and Walid Maalej. 2012. How Do Professional Developers Comprehend Software? In International Conference on Software Engineering (ICSE). isbn:978-1-4673-1067-3 https://doi.org/10.1109/ICSE.2012.6227188 Google Scholar
Cross Ref
- Ogunleye O. Samuel. 2009. MobiNET: A Framework for Supporting Java Mobile Application Developers through Contextual Inquiry. In International Conference on Adaptive Science Technology (ICAST). issn:2326-9448 https://doi.org/10.1109/ICASTECH.2009.5409746 Google Scholar
Cross Ref
- Todd Sedano, Paul Ralph, and Cécile Péraire. 2017. Lessons Learned from an Extended Participant Observation Grounded Theory Study. In International Workshop on Conducting Empirical Studies in Industry (CESI). isbn:978-1-5386-1546-1 https://doi.org/10.1109/CESI.2017.2 Google Scholar
Digital Library
- Armando Solar-Lezama, Rodric Rabbah, Rastislav Bodík, and Kemal Ebcioğlu. 2005. Programming by Sketching for Bit-Streaming Programs. ACM SIGPLAN Notices, June, issn:0362-1340 https://doi.org/10.1145/1064978.1065045 Google Scholar
Digital Library
- Armando Solar-Lezama, Liviu Tancau, Rastislav Bodik, Sanjit Seshia, and Vijay Saraswat. 2006. Combinatorial Sketching for Finite Programs. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS). isbn:978-1-59593-451-2 https://doi.org/10.1145/1168857.1168907 Google Scholar
Digital Library
- Elliot Soloway and Kate Ehrlich. 1986. Empirical Studies of Programming Knowledge. In Readings in Artificial Intelligence and Software Engineering, Charles Rich and Richard C. Waters (Eds.). isbn:978-0-934613-12-5 https://doi.org/10.1016/B978-0-934613-12-5.50042-2 Google Scholar
Cross Ref
- James C. Spohrer and Elliot Soloway. 1986. Novice Mistakes: Are the Folk Wisdoms Correct? Communications of the ACM, July, issn:0001-0782 https://doi.org/10.1145/6138.6145 Google Scholar
Digital Library
- James C. Spohrer and Elliot Soloway. 1989. Simulating Student Programmers. In International Joint Conference on Artificial Intelligence (IJCAI).Google Scholar
- Klaas-Jan Stol, Paul Ralph, and Brian Fitzgerald. 2016. Grounded Theory in Software Engineering Research: A Critical Review and Guidelines. In International Conference on Software Engineering (ICSE). isbn:978-1-4503-3900-1 https://doi.org/10.1145/2884781.2884833 Google Scholar
Digital Library
- Jeffrey Stylos and Brad A. Myers. 2008. The Implications of Method Placement on API Learnability. In International Symposium on Foundations of Software Engineering (FSE). isbn:978-1-59593-995-1 https://doi.org/10.1145/1453101.1453117 Google Scholar
Digital Library
- Kyle Thayer, Sarah E. Chasins, and Amy J. Ko. 2021. A Theory of Robust API Knowledge. Transactions on Computing Education, Jan., https://doi.org/10.1145/3444945 Google Scholar
Digital Library
- Simon Thompson. 2004. Refactoring Functional Programs. In Advanced Functional Programming (AFP). isbn:978-3-540-28540-3 https://doi.org/10.1007/11546382_9 Google Scholar
Digital Library
- Emina Torlak and Rastislav Bodik. 2014. A Lightweight Symbolic Virtual Machine for Solver-Aided Host Languages. ACM SIGPLAN Notices, June, issn:0362-1340 https://doi.org/10.1145/2666356.2594340 Google Scholar
Digital Library
- Cathy Urquhart and Walter Fernandez. 2006. Grounded Theory Method: The Researcher as Blank Slate and Other Myths. In International Conference on Information Systemcs (ICIS). https://aisel.aisnet.org/icis2006/31Google Scholar
- Willemien Visser. 1987. Strategies in Programming Programmable Controllers: A Field Study on a Professional Programmer. In Empirical Studies of Programmers, G. Olson, S. Sheppard, and E. Soloway (Eds.).Google Scholar
- Anneliese von Mayrhauser and A. Marie Vans. 1995. Program Comprehension During Software Maintenance and Evolution. Computer, Aug., issn:0018-9162 https://doi.org/10.1109/2.402076 Google Scholar
Digital Library
- Jacqueline Whalley and Nadia Kasto. 2014. A Qualitative Think-Aloud Study of Novice Programmers’ Code Writing Strategies. In Conference on Innovation & Technology in Computer Science Education (ITiCSE). isbn:978-1-4503-2833-3 https://doi.org/10.1145/2591708.2591762 Google Scholar
Digital Library
- Bin Xie and Gavriel Salvendy. 2000. Review and Reappraisal of Modelling and Predicting Mental Workload in Single- and Multi-Task Environments. Work & Stress, issn:0267-8373 https://doi.org/10.1080/026783700417249 Google Scholar
Cross Ref
- Shehnaaz Yusuf, Huzefa Kagdi, and Jonathan I. Maletic. 2007. Assessing the Comprehension of UML Class Diagrams via Eye Tracking. In International Conference on Program Comprehension (ICPC). isbn:978-0-7695-2860-1 https://doi.org/10.1109/ICPC.2007.10 Google Scholar
Digital Library
- Tianyi Zhang, Björn Hartmann, Miryung Kim, and Elena L. Glassman. 2020. Enabling Data-Driven API Design with Community Usage Data: A Need-Finding Study. In Conference on Human Factors in Computing Systems (CHI). isbn:978-1-4503-6708-0 https://doi.org/10.1145/3313831.3376382 Google Scholar
Digital Library
Index Terms
How statically-typed functional programmers write code
Recommendations
How Statically-Typed Functional Programmers Author Code
CHI EA '21: Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing SystemsHow working statically-typed functional programmers author code is largely understudied. And yet, a better understanding of developer practices could pave the way for the design of more useful and usable tooling, more ergonomic languages, and more ...
Immutables in C++: Language Foundation for Functional Programming
Central European Functional Programming SchoolAbstractThe C++ programming language is a multiparadigm language, with a rich set of procedural, object-oriented, generative and, since C++11, functional language elements. The language is also well-known for its capability to map certain semantic ...
Bridging the qualitative-quantitative divide: guidelines for conducting mixed methods research in information systems
Mixed methods research is an approach that combines quantitative and qualitative research methods in the same research inquiry. Such work can help develop rich insights into various phenomena of interest that cannot be fully understood using only a ...






Comments