Understanding misunderstandings in source code

Dan Gopstein, Jake Iannacone, Yu Yan, Lois DeLong, Yanyan Zhuang, Martin K.C. Yeh, Justin Cappos

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    Abstract

    Humans often mistake the meaning of source code, and so misjudge a program's true behavior. These mistakes can be caused by extremely small, isolated patterns in code, which can lead to signiicant runtime errors. These patterns are used in large, popular software projects and even recommended in style guides. To identify code patterns that may confuse programmers we extracted a preliminary set of atoms of confusion' from known confusing code. We show empirically in an experiment with 73 participants that these code patterns can lead to a signiicantly increased rate of misunderstanding versus equivalent code without the patterns. We then go on to take larger confusing programs and measure (in an experiment with 43 participants) the impact, in terms of programmer confusion, of removing these confusing patterns. All of our instruments, analysis code, and data are publicly available online for replication, experimentation, and feedback.

    Original languageEnglish (US)
    Title of host publicationESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering
    PublisherAssociation for Computing Machinery
    Pages129-139
    Number of pages11
    VolumePart F130154
    ISBN (Electronic)9781450351058
    DOIs
    StatePublished - Aug 21 2017
    Event11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2017 - Paderborn, Germany
    Duration: Sep 4 2017Sep 8 2017

    Other

    Other11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2017
    CountryGermany
    CityPaderborn
    Period9/4/179/8/17

    Fingerprint

    Experiments
    Feedback
    Atoms

    Keywords

    • Program understanding
    • Programming languages

    ASJC Scopus subject areas

    • Software

    Cite this

    Gopstein, D., Iannacone, J., Yan, Y., DeLong, L., Zhuang, Y., Yeh, M. K. C., & Cappos, J. (2017). Understanding misunderstandings in source code. In ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering (Vol. Part F130154, pp. 129-139). Association for Computing Machinery. https://doi.org/10.1145/3106237.3106264

    Understanding misunderstandings in source code. / Gopstein, Dan; Iannacone, Jake; Yan, Yu; DeLong, Lois; Zhuang, Yanyan; Yeh, Martin K.C.; Cappos, Justin.

    ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering. Vol. Part F130154 Association for Computing Machinery, 2017. p. 129-139.

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    Gopstein, D, Iannacone, J, Yan, Y, DeLong, L, Zhuang, Y, Yeh, MKC & Cappos, J 2017, Understanding misunderstandings in source code. in ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering. vol. Part F130154, Association for Computing Machinery, pp. 129-139, 11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2017, Paderborn, Germany, 9/4/17. https://doi.org/10.1145/3106237.3106264
    Gopstein D, Iannacone J, Yan Y, DeLong L, Zhuang Y, Yeh MKC et al. Understanding misunderstandings in source code. In ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering. Vol. Part F130154. Association for Computing Machinery. 2017. p. 129-139 https://doi.org/10.1145/3106237.3106264
    Gopstein, Dan ; Iannacone, Jake ; Yan, Yu ; DeLong, Lois ; Zhuang, Yanyan ; Yeh, Martin K.C. ; Cappos, Justin. / Understanding misunderstandings in source code. ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering. Vol. Part F130154 Association for Computing Machinery, 2017. pp. 129-139
    @inproceedings{3b978209776c4b82a682cfa3500e6e3f,
    title = "Understanding misunderstandings in source code",
    abstract = "Humans often mistake the meaning of source code, and so misjudge a program's true behavior. These mistakes can be caused by extremely small, isolated patterns in code, which can lead to signiicant runtime errors. These patterns are used in large, popular software projects and even recommended in style guides. To identify code patterns that may confuse programmers we extracted a preliminary set of atoms of confusion' from known confusing code. We show empirically in an experiment with 73 participants that these code patterns can lead to a signiicantly increased rate of misunderstanding versus equivalent code without the patterns. We then go on to take larger confusing programs and measure (in an experiment with 43 participants) the impact, in terms of programmer confusion, of removing these confusing patterns. All of our instruments, analysis code, and data are publicly available online for replication, experimentation, and feedback.",
    keywords = "Program understanding, Programming languages",
    author = "Dan Gopstein and Jake Iannacone and Yu Yan and Lois DeLong and Yanyan Zhuang and Yeh, {Martin K.C.} and Justin Cappos",
    year = "2017",
    month = "8",
    day = "21",
    doi = "10.1145/3106237.3106264",
    language = "English (US)",
    volume = "Part F130154",
    pages = "129--139",
    booktitle = "ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering",
    publisher = "Association for Computing Machinery",

    }

    TY - GEN

    T1 - Understanding misunderstandings in source code

    AU - Gopstein, Dan

    AU - Iannacone, Jake

    AU - Yan, Yu

    AU - DeLong, Lois

    AU - Zhuang, Yanyan

    AU - Yeh, Martin K.C.

    AU - Cappos, Justin

    PY - 2017/8/21

    Y1 - 2017/8/21

    N2 - Humans often mistake the meaning of source code, and so misjudge a program's true behavior. These mistakes can be caused by extremely small, isolated patterns in code, which can lead to signiicant runtime errors. These patterns are used in large, popular software projects and even recommended in style guides. To identify code patterns that may confuse programmers we extracted a preliminary set of atoms of confusion' from known confusing code. We show empirically in an experiment with 73 participants that these code patterns can lead to a signiicantly increased rate of misunderstanding versus equivalent code without the patterns. We then go on to take larger confusing programs and measure (in an experiment with 43 participants) the impact, in terms of programmer confusion, of removing these confusing patterns. All of our instruments, analysis code, and data are publicly available online for replication, experimentation, and feedback.

    AB - Humans often mistake the meaning of source code, and so misjudge a program's true behavior. These mistakes can be caused by extremely small, isolated patterns in code, which can lead to signiicant runtime errors. These patterns are used in large, popular software projects and even recommended in style guides. To identify code patterns that may confuse programmers we extracted a preliminary set of atoms of confusion' from known confusing code. We show empirically in an experiment with 73 participants that these code patterns can lead to a signiicantly increased rate of misunderstanding versus equivalent code without the patterns. We then go on to take larger confusing programs and measure (in an experiment with 43 participants) the impact, in terms of programmer confusion, of removing these confusing patterns. All of our instruments, analysis code, and data are publicly available online for replication, experimentation, and feedback.

    KW - Program understanding

    KW - Programming languages

    UR - http://www.scopus.com/inward/record.url?scp=85030755893&partnerID=8YFLogxK

    UR - http://www.scopus.com/inward/citedby.url?scp=85030755893&partnerID=8YFLogxK

    U2 - 10.1145/3106237.3106264

    DO - 10.1145/3106237.3106264

    M3 - Conference contribution

    AN - SCOPUS:85030755893

    VL - Part F130154

    SP - 129

    EP - 139

    BT - ESEC/FSE 2017 - Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering

    PB - Association for Computing Machinery

    ER -