Visualizing the Usage of Pythonic Idioms over Time: A Case Study of the with open Idiom

Tattiya Sakulniwat, Raula Gaikovina Kula, Chaiyong Ragkhitwetsagul, Morakot Choetkiertikul, Thanwadee Sunetnanta, Dong Wang, Takashi Ishio, Kenichi Matsumoto

Research output: Chapter in Book/Report/Conference proceedingConference contribution

5 Citations (Scopus)

Abstract

Veterans within the Python community claim that the usage of Pythonic idiomatic writing style is usually preferred. Because of its conciseness and ease of understanding, the idiomatic code tends to be more efficient and less error-prone code. With the growth of Python developers outside the Python community, it is not certain to what extent how Python idiomatic code is used in real software projects, especially if there are consequences. In this paper, our aim is to understand when and how developers start to use idioms in their software projects. Specifically, we propose a technique to visualize and understand the usage of the with open Pythonic idiom, one of the popular idioms. Two visualizations are proposed: (1) a visualization of evolution of non-idiomatic and idiomatic style of writing in four Python software projects over time and (2) a visualization to show the amount of appearing and disappearing idioms by comparing from the first and the latest version of the projects. The results show that developers tend to adopt the idiomatic code over time. We also found that, in three out of the four projects, the developers fixed their code during the evolution of the software to improve their Pythonic coding styles.

Original languageEnglish
Title of host publicationProceedings - 2019 10th International Workshop on Empirical Software Engineering in Practice, IWESEP 2019
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages43-48
Number of pages6
ISBN (Electronic)9781728155906
DOIs
Publication statusPublished - Dec 2019
Externally publishedYes
Event10th International Workshop on Empirical Software Engineering in Practice, IWESEP 2019 - Tokyo, Japan
Duration: Dec 13 2019Dec 14 2019

Publication series

NameProceedings - 2019 10th International Workshop on Empirical Software Engineering in Practice, IWESEP 2019

Conference

Conference10th International Workshop on Empirical Software Engineering in Practice, IWESEP 2019
Country/TerritoryJapan
CityTokyo
Period12/13/1912/14/19

All Science Journal Classification (ASJC) codes

  • Software
  • Safety, Risk, Reliability and Quality

Fingerprint

Dive into the research topics of 'Visualizing the Usage of Pythonic Idioms over Time: A Case Study of the with open Idiom'. Together they form a unique fingerprint.

Cite this