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