论文标题
泰迪:基于拉的软件项目的Pythonic Idiom使用的自动建议
Teddy: Automatic Recommendation of Pythonic Idiom Usage For Pull-Based Software Projects
论文作者
论文摘要
Pythonic代码是惯用的代码,遵循Python社区中的指导原则和实践。为了提供性能和可读性优势,Pythonic代码被认为是经验丰富的Python开发人员广泛采用的,但可以成为新手程序员的学习曲线。为了帮助使用Pythonic学习,我们创建了一个称为Teddy的自动化工具,可以帮助检查Pythonic Idiom使用情况。该工具提供了一种预防模式,并在代码审查过程中建议使用Pythonic Idiom,并使用具有历史分析的检测模式使用Pythonic Idiom,以进行彻底扫描惯用和非偶然代码。在本文中,我们首先描述了我们的工具及其性能的评估。此外,我们提出了一个案例研究,该案例研究演示了如何在开源项目的现实生活中使用泰迪。评估表明,泰迪(Teddy)在检测Pythonic Idiom和非Pythonic代码方面具有很高的精度。使用交互式可视化,我们演示了新手程序员如何在其项目中导航和识别Pythonic Idiom和非Pythonic代码。我们的视频演示具有完整的交互式可视化,请访问https://youtu.be/vocqresvbxa。
Pythonic code is idiomatic code that follows guiding principles and practices within the Python community. Offering performance and readability benefits, Pythonic code is claimed to be widely adopted by experienced Python developers, but can be a learning curve to novice programmers. To aid with Pythonic learning, we create an automated tool, called Teddy, that can help checking the Pythonic idiom usage. The tool offers a prevention mode with Just-In-Time analysis to recommend the use of Pythonic idiom during code review and a detection mode with historical analysis to run a thorough scan of idiomatic and non-idiomatic code. In this paper, we first describe our tool and an evaluation of its performance. Furthermore, we present a case study that demonstrates how to use Teddy in a real-life scenario on an Open Source project. An evaluation shows that Teddy has high precision for detecting Pythonic idiom and non-Pythonic code. Using interactive visualizations, we demonstrate how novice programmers can navigate and identify Pythonic idiom and non-Pythonic code in their projects. Our video demo with the full interactive visualizations is available at https://youtu.be/vOCQReSvBxA.