2019 · 16 citations · 41 references
ComputingComputer ScienceNatural Language ProcessingProgramming LanguagesSoftware EngineeringComputer-based TestingSoftware Composition AnalysisSoftware TestingUsability TestingUser Behavior AnalysisExploratory Case StudyRegular Expression MatchingRegular ExpressionsWeb Search BehaviorWeb Search Logs
Regular expressions are frequently found in programming projects. Studies have found that developers can accurately determine whether a string matches a regular expression. However, we still do not know the challenges associated with composing regular expressions. We conduct an exploratory case study to reveal the tools and strategies developers use during regular expression composition. In this study, 29 students are tasked with composing regular expressions that pass unit tests illustrating the intended behavior. The tasks are in Java and the Eclipse IDE was set up with JUnit tests. Participants had one hour to work and could use any Eclipse tools, web search, or web-based tools they desired. Screen-capture software recorded all interactions with browsers and the IDE. We analyzed the videos quantitatively by transcribing logs and extracting personas. Our results show that participants were 30% successful (28 of 94 attempts) at achieving a 100% pass rate on the unit tests. When participants used tools frequently, as in the case of the novice tester and the knowledgeable tester personas, or when they guess at a solution prior to searching, they are more likely to pass all the unit tests. We also found that compile errors often arise when participants searched for a result and copy/pasted the regular expression from another language into their Java files. These results point to future research into making regular expression composition easier for programmers, such as integrating visualization into the IDE to reduce context switching or providing language migration support when reusing regular expressions written in another language to reduce compile errors.
41
Why a Diagram is (Sometimes) Worth Ten Thousand Words
Jill H. Larkin, Herbert A. Simon · Cognitive Science · 1987 · 3.6K citations
A study of the difficulties of novice programmers
Essi Lahtinen, Kirsti Ala-Mutka, Hannu-Matti Järvinen · 2005 · 826 citations