<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Toward a Better Understanding Strategies: A Pilot Study of End-User Debugging</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ren Manfredi</string-name>
          <email>ren.manfredi@unitn.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Margherita Andrao</string-name>
          <email>margherita.andrao@unitn.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesco Greco</string-name>
          <email>f.greco66@studenti.uniba.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe Desolda</string-name>
          <email>giuseppe.desolda@uniba.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Barbara Treccani</string-name>
          <email>barbara.treccani@unitn.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Massimo Zancanaro</string-name>
          <email>massimo.zancanaro@unitn.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Psychology and Cognitive Science, University of Trento</institution>
          ,
          <addr-line>Rovereto (Trento)</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Fondazione Bruno Kessler - FBK</institution>
          ,
          <addr-line>Trento</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Bari Aldo Moro</institution>
          ,
          <addr-line>Bari</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we describe a pilot study aimed to explore strategies used by non-programmer users to test trigger-action rules for customizing an IoT device. The main goal of our research was to examine strategies used by participants to detect and solve errors. In the pilot study, we asked non-programmers to imagine testing a set of rules, some of which were bugged. The pilot study was meant to understand the feasibility of this approach to investigate users' mental models while performing this kind of task.</p>
      </abstract>
      <kwd-group>
        <kwd>1 End-User Development</kwd>
        <kwd>End-User Programming</kwd>
        <kwd>Debugging</kwd>
        <kwd>Trigger-action programming</kwd>
        <kwd>IoT</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>In this paper, we present a pilot study to explore the strategies of non-programmer users in debugging
trigger-action (TA) rules to customize an IoT educational tool. In particular, we wanted to investigate
how naive users approach debugging and the characteristics of the strategies they adopt.</p>
      <p>
        In recent years, the rapid diffusion of IoT has brought end-users to the center of a complex ecosystem
made of interconnected objects and web services, changing the way they live [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ][
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        In this context, the End-User Development (EUD) paradigm has allowed non-technical users
without programming skills to customize the behavior of their devices and applications [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], empowering
users and letting them benefit from the potential of IoT. Specifically, through the trigger-action
programming (TAP) approach, end-users have the possibility to create rules to automate the behavior
of both hardware and software artifacts.
      </p>
      <p>
        The relative simplicity and applicability of TAP to IoT have attracted a lot of interest [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. However,
this rule-based approach has limitations. Indeed, despite its ease of use, non-programmers still make
numerous mistakes in composing TA rules, like loops, inconsistencies, and redundancies [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. That is
important because poor or conflicting rule settings can lead to unsatisfactory or even potentially
dangerous behavior for the user.
      </p>
      <p>
        Only very recently, a few studies have been carried out that focused on the problem of rule errors in
EUD and explored debugging approaches to support end-users in customizing their IoT devices [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
However, while many efforts have been directed towards debugging for mashup programming,
spreadsheet, and rule analysis, little work has investigated debugging in TAP [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ][
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Some of these
works, inspired by and extending the Interrogative Debugging paradigm of Ko and Myers [7], proposed
tools and approaches that allow end-users to simulate their own rules and identify errors [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ][
        <xref ref-type="bibr" rid="ref5">5</xref>
        ][8].
Specifically, these pioneering works developed and tested different EUD interfaces able to simulate the
rules created, detect potential errors, and return an explanation of those errors to the user to support
them in correcting the rules. The results of these studies, although preliminary, seem to suggest that
interfaces of this type can support the end-user in dealing with and better understanding errors in the
composition of trigger-action rules.
      </p>
      <p>
        However, several aspects remain to be clarified. In particular, we still do not know much about how
end-users approach debugging and what strategies they adopt [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Knowing more about end users'
debugging strategies is important to inform the design of better tools to support this important task [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>The present study aimed to explore the strategies and approaches of naive users in debugging TA
rules to outline possible and valid future research.
1.1.</p>
    </sec>
    <sec id="sec-2">
      <title>Tool and EUD interface</title>
      <p>In this pilot study, a tangible educational IoT device prototype (Figure 1) was employed [9]. Such a
device was designed to support mathematics learning in elementary school children. It has a rectangular
surface with five slots for placing external pieces (digit, symbol, or operator tiles), and it is provided
with a visual and acoustic feedback system. This tool makes it possible to implement different types of
mathematical exercises such as comparing quantities, sorting numbers, and simple arithmetic
operations.</p>
      <p>Teachers could customize the tool's functioning through a set of language primitives for actions,
states, and events implemented as part of an existing authoring interface (see Figure 2). The primitives
for the actions consist of commands to control visual (lights) and acoustic feedback. At the same time,
states and events describe respectively the operations that teachers and children can perform on the tool
(i.e., insertion and removal of tiles) and the tool configuration at that moment. An example of an event
description is "WHEN a digit tile is inserted", while an example of a state is "WHILE the position to
the right of the inserted tile is empty". Finally, "Turn on blue LED SMARTER" is an example of action.</p>
    </sec>
    <sec id="sec-3">
      <title>2. The pilot study</title>
      <p>Five (5) primary school math teachers with no previous experience in programming were recruited.
The study consisted of individual semi-structured interviews conducted remotely (90 minutes).</p>
      <p>After describing the tool and the interface through videos and explanatory images, the participants
were familiarized with the interface and a set of rules already prepared and related to a simple number
ordering game (from the smallest number to the largest). In the first phase, participants were then asked
to discuss how they would evaluate the correctness of the rules and then to indicate three specific actions
by which they would test the program's functioning (debugging task).</p>
      <p>In the second phase of the study, participants were given an error-finding task on a different set of
rules in which two types of errors were intentionally included. Specifically, both inconsistent and
redundant rules were introduced, that is, rules providing for two conflicting actions for the same trigger
and different rules producing the same outcome, respectively.</p>
      <p>A verbal reporting procedure was used to explore participants' strategies and mental models during
the familiarization and error-finding tasks.
2.1.</p>
    </sec>
    <sec id="sec-4">
      <title>Results</title>
      <p>As a first approach to the debugging task, all participants imagined testing the rules in the field with
a hands-on approach, i.e., in the classroom with their students. Some of them proposed a trial-and-error
strategy ("I would try to make a rule if I realized something was wrong, I would go back and change
it"), while others (participants B and C) suggested testing directly with the children using a more
functional and child-focused approach.</p>
      <p>Specifically, some participants (such as B, D, E) proposed a “step-by-step” strategy, e.g., proposing
to insert the first tile, then a correct tile, and finally an incorrect one, checking the outcomes each time
a single tile was inserted. In contrast, Participant A took a different approach, preferring to place all the
tiles first to observe the result. Interestingly, such an approach, focused on obtaining a direct solution,
has already been observed in novice programmers and has been associated with a misunderstanding of
how the system works [10][11].</p>
      <p>Finally, participants A and C proposed the placement of a symbol tile to test the alternative case.
Also, participant E evaluated this approach, but she argued it was not fundamental considering the task
goal of sorting numbers progressively. Debugging task results are summarized in Table 1.</p>
      <p>In the error-finding phase, participants exhibited two different approaches. Some assumed a
ruleby-rule approach (participants B and D), directing the error search to individual rules and ignoring their
relationships. Participants who adopted this approach failed to identify any errors present in the ruleset.
They also state that the errors were due to the excessive number of rules, in their opinion, unnecessary
and confusing. Conversely, participants who extended their error search to include the relationships
between rules (participants A, C, E) could identify some errors. Eventually, only one participant was
able to identify all errors correctly. Results of the error-finding task are summarized in Table 2.</p>
      <p>
        Consistent with the literature [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the most commonly identified error was inconsistency, while
redundancy was the most difficult error to identify.
      </p>
    </sec>
    <sec id="sec-5">
      <title>3. Conclusions</title>
      <sec id="sec-5-1">
        <title>Approach adopted</title>
        <p>Error search extended to rule relationship</p>
        <p>Error search limited to individual rules
Error search extended to rule relationship</p>
        <p>Error search limited to individual rules
Error search extended to rule relationship</p>
      </sec>
      <sec id="sec-5-2">
        <title>Identified errors</title>
        <p>Inconsistency</p>
        <p>None
Inconsistency</p>
        <p>None
Inconsistency, Redundancy</p>
        <p>In this pilot study, we explored the strategies adopted by non-programmer users for debugging a TA
rule set and for finding inconsistent and redundant rules. While the extant literature on end-users
debugging TA rules focuses on tools to support bug identification, in our approach, we tried to focus
on the mental models users initially assume in facing a debugging task.</p>
        <p>
          Three different debugging strategies implemented by participants emerged from the results. These
strategies were partly similar to those already observed in novice programmers [10][11][12].
Nevertheless, to our knowledge, they have not been discussed in the context of EUD with TA rules.
Specifically, naive users might have more problems considering the entire set of rules and their
relationships. We believe that extending this approach with a more robust study will help to design
more effective tools (along the lines, for example, of the work done by Corno et al. [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]). In our future
work, we plan to refine the study's design by involving the users in actual debugging with the real tool.
        </p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>4. Acknowledgments</title>
      <p>This work has been supported by the Italian Ministry of Education, University and Research (MIUR)
under grant PRIN 2017 "EMPATHY: EMpowering People in deAling with internet of THings
ecosYstems" (Progetti di Rilevante Interesse Nazionale – Bando 2017, Grant 2017MX9T7H).</p>
    </sec>
    <sec id="sec-7">
      <title>5. References</title>
      <p>[7] Ko &amp; Myers 2004 (Ko, A. and Myers, B. 2004. Designing the whyline: A debugging interface for
asking questions about program behavior. In Proceedings of the SIGCHI Conference on Human
Factors in Computing Systems. ACM, 151–158)
[8] Manca, M., Paternò, F., Santoro, C., &amp; Corcella, L. 2019. Supporting end-user debugging of
trigger-action rules for IoT applications. International Journal of Human-Computer Studies, 123,
56-69.
[9] Andrao, M., Desolda, G., Greco, F., Manfredi, R., Treccani, B., Zancanaro, M. 2022, June .</p>
      <p>SMARTER: an IoT learning game to teach math. In International Conference on Advanced Visual
Interfaces (AVI 2022), June 6–10, 2022, Frascati, Rome, Italy.
[10] Chen Li, Emily Chan, Paul Denny, Andrew Luxton-Reilly, and Ewan Tempero. 2019. Towards a
framework for teaching debugging. Proceedings of the Twenty-First Australasian Computing
Education Conference on - ACE '19 (2019). DOI:http://dx.doi.org/10.1145/3286960.3286970
[11] Fitzgerald, S., Lewandowski, G., McCauley, R., Murphy, L., Simon, B., Thomas, L. and Zander,
C., 2008. Debugging: finding, fixing and flailing, a multi-institutional study of novice debuggers.</p>
      <p>Computer Science Education, 18(2), pp.93-116.
[12] S. Fitzgerald, R. McCauley, B. Hanks, L. Murphy, B. Simon and C. Zander, "Debugging From the
Student Perspective," in IEEE Transactions on Education, vol. 53, no. 3, pp. 390-396, Aug. 2010,
doi: 10.1109/TE.2009.2025266.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Giuseppe</given-names>
            <surname>Ghiani</surname>
          </string-name>
          , Marco Manca, Fabio Paternò, and
          <string-name>
            <given-names>Carmen</given-names>
            <surname>Santoro</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Personalization of context-dependent applications through trigger-action rules</article-title>
          .
          <source>ACM Transactions on ComputerHuman Interaction 24</source>
          ,
          <issue>2</issue>
          (
          <year>2017</year>
          ),
          <fpage>1</fpage>
          -
          <lpage>33</lpage>
          . DOI:http://dx.doi.org/10.1145/3057861
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Barbara</given-names>
            <surname>Rita</surname>
          </string-name>
          Barricelli and
          <string-name>
            <given-names>Stefano</given-names>
            <surname>Valtolina</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Designing for end-user development in the internet of things</article-title>
          . End-User
          <string-name>
            <surname>Development</surname>
          </string-name>
          (
          <year>2015</year>
          ),
          <fpage>9</fpage>
          -
          <lpage>24</lpage>
          . DOI:http://dx.doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -18425-
          <issue>8</issue>
          _
          <fpage>2</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Luigi</given-names>
            <surname>De Russis and Alberto Monge Roffarello</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>A debugging approach for trigger-action programming</article-title>
          .
          <source>Extended Abstracts of the 2018 CHI Conference on Human Factors in Computing Systems</source>
          (
          <year>2018</year>
          ). DOI:http:// dx.doi.org/10.1145/3170427.3188641
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Paternò</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Santoro</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>End-user development for personalizing applications, things, and robots</article-title>
          .
          <source>International Journal of Human-Computer Studies</source>
          ,
          <volume>131</volume>
          ,
          <fpage>120</fpage>
          -
          <lpage>130</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Corno</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Russis</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Monge Roffarello</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <year>2019</year>
          , May.
          <article-title>Empowering end users in debugging trigger-action rules</article-title>
          .
          <source>In Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems</source>
          (pp.
          <fpage>1</fpage>
          -
          <lpage>13</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Grigoreanu</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Burnett</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wiedenbeck</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cao</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rector</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Kwan</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          <year>2012</year>
          .
          <article-title>End-user debugging strategies: A sensemaking perspective</article-title>
          .
          <source>ACM Transactions on Computer-Human Interaction (TOCHI)</source>
          ,
          <volume>19</volume>
          (
          <issue>1</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>28</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>