Teddy: Automatic Recommendation of Pythonic Idiom Usage For Pull-Based Software Projects

09/05/2020
by   Purit Phan-udom, et al.
0

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.

READ FULL TEXT
research
07/12/2022

Making Python Code Idiomatic by Automatic Refactoring Non-Idiomatic Python Code with Pythonic Idioms

Compared to other programming languages (e.g., Java), Python has more id...
research
03/30/2022

pycefr: Python Competency Level through Code Analysis

Python is known to be a versatile language, well suited both for beginne...
research
10/21/2020

Uncovering the Hidden Dangers: Finding Unsafe Go Code in the Wild

The Go programming language aims to provide memory and thread safety thr...
research
11/03/2020

Exempla Gratis (E.G.): Code Examples for Free

Modern software engineering often involves using many existing APIs, bot...
research
01/30/2023

Faster or Slower? Performance Mystery of Python Idioms Unveiled with Empirical Evidence

The usage of Python idioms is popular among Python developers in a forma...
research
03/26/2021

AVATAR: Blender add-on for fast creation of 3D human models

Create an articulated and realistic human 3D model is a complicated task...
research
04/09/2021

Memory Error Detection in Security Testing

We study 10 C/C++ projects that have been using a static analysis securi...

Please sign up or login with your details

Forgot password? Click here to reset