Context. The last several years saw the emergence of AI assistants for code - multi-purpose AI-based helpers in software engineering. As they become omnipresent in all aspects of software development, it becomes critical to understand their usage patterns. Objective. We aim to better understand how specifically developers are using AI assistants, why they are not using them in certain parts of their development workflow, and what needs to be improved in the future. Methods. In this work, we carried out a large-scale survey aimed at how AI assistants are used, focusing on specific software development activities and stages. We collected opinions of 481 programmers on five broad activities: (a) implementing new features, (b) writing tests, (c) bug triaging, (d) refactoring, and (e) writing natural-language artifacts, as well as their individual stages. Results. Our results provide a novel comparison of different stages where AI assistants are used that is both comprehensive and detailed. It highlights specific activities that developers find less enjoyable and want to delegate to an AI assistant, e.g., writing tests and natural-language artifacts. We also determine more granular stages where AI assistants are used, such as generating tests and generating docstrings, as well as less studied parts of the workflow, such as generating test data. Among the reasons for not using assistants, there are general aspects like trust and company policies, as well as more concrete issues like the lack of project-size context, which can be the focus of the future research. Conclusion. The provided analysis highlights stages of software development that developers want to delegate and that are already popular for using AI assistants, which can be a good focus for features aimed to help developers right now. The main reasons for not using AI assistants can serve as a guideline for future work.
翻译:背景。过去几年见证了代码AI助手的兴起——这是一种基于人工智能、用于软件工程的多功能助手。随着它们在软件开发的各个方面变得无处不在,理解其使用模式变得至关重要。目标。我们旨在更好地理解开发者具体如何使用AI助手,为何他们在开发工作流的某些部分不使用这些助手,以及未来需要改进之处。方法。在这项工作中,我们开展了一项大规模调查,重点关注特定的软件开发活动和阶段,旨在探究AI助手的使用情况。我们收集了481名程序员对五大类活动的看法:(a) 实现新功能,(b) 编写测试,(c) 缺陷分类,(d) 重构,以及 (e) 编写自然语言工件,同时也包括这些活动中各个具体阶段的情况。结果。我们的结果提供了一种新颖、全面且详细的比较,展示了AI助手在不同开发阶段的使用情况。它突出了开发者认为不太愉快并希望委托给AI助手的具体活动,例如编写测试和自然语言工件。我们还确定了AI助手被使用的更细粒度阶段,例如生成测试和生成文档字符串,以及工作流中研究较少的环节,例如生成测试数据。在不使用助手的原因中,既有信任和公司政策等普遍因素,也存在诸如缺乏项目规模上下文等更具体的问题,这些问题可以成为未来研究的重点。结论。所提供的分析强调了开发者希望委托的、以及目前已经流行使用AI助手的软件开发阶段,这可以作为当前旨在帮助开发者的功能设计的良好关注点。不使用AI助手的主要原因可以为未来的工作提供指导。