A Theory of Robust API Knowledge

Author:

Thayer Kyle1,Chasins Sarah E.2,Ko Amy J.1

Affiliation:

1. The Information School, University of Washington, Seattle, WA, USA

2. Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, California

Abstract

Creating modern software inevitably requires using application programming interfaces (APIs). While software developers can sometimes use APIs by simply copying and pasting code examples, a lack of robust knowledge of how an API works can lead to defects, complicate software maintenance, and limit what someone can express with an API. Prior work has uncovered the many ways that API documentation fails to be helpful, though rarely describes precisely why. We present a theory of robust API knowledge that attempts to explain why, arguing that effective understanding and use of APIs depends on three components of knowledge: (1) the domain concepts the API models along with terminology, (2) the usage patterns of APIs along with rationale, and (3) facts about an API’s execution to support reasoning about its runtime behavior. We derive five hypotheses from this theory and present a study to test them. Our study investigated the effect of having access to these components of knowledge, finding that while learners requested these three components of knowledge when they were not available, whether the knowledge helped the learner use or understand the API depended on the tasks and likely the relevance and quality of the specific information provided. The theory and our evidence in support of its claims have implications for what content API documentation, tutorials, and instruction should contain and the importance of giving the right information at the right time, as well as what information API tools should compute, and even how APIs should be designed. Future work is necessary to both further test and refine the theory, as well as exploit its ideas for better instructional design.

Funder

National Science Foundation

Publisher

Association for Computing Machinery (ACM)

Subject

Education,General Computer Science

Reference54 articles.

1. npm Inc. 2018. npm. Retrieved from https://www.npmjs.com/. npm Inc. 2018. npm. Retrieved from https://www.npmjs.com/.

2. Struggles of new college graduates in their first software development job

3. Two studies of opportunistic programming

Cited by 21 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Understanding Documentation Use Through Log Analysis: A Case Study of Four Cloud Services;Proceedings of the CHI Conference on Human Factors in Computing Systems;2024-05-11

2. Harnessing Test-Oriented Knowledge Graphs for Enhanced Test Function Recommendation;Electronics;2024-04-18

3. Using an LLM to Help With Code Understanding;Proceedings of the IEEE/ACM 46th International Conference on Software Engineering;2024-04-12

4. API usage templates via structural generalization;Journal of Systems and Software;2024-04

5. Domain-Specific Theories of Teaching Computing: Do they Inform Practice?;Proceedings of the 23rd Koli Calling International Conference on Computing Education Research;2023-11-13

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3