Skip to content

Comparing Identifier Naming Practices Between Chinese and American Developers

Hsin-Chun Yin, Dror G. Feitelson

cs.SE

Abstract

Identifiers act as the narrative backbone of software, yet they are rarely analyzed as artifacts of human language. This study investigates whether the linguistic background of a developer--specifically the typological differences between English and Mandarin Chinese--systematically influences naming practices. By combining large-scale mining of GitHub repositories with a targeted cognitive survey, we compare the coding styles of developers from China and the United States. The results provide strong evidence of linguistic transfer: Chinese developers frequently omit morphological markers for plurality and past tense, mirroring the grammatical constraints of their native tongue. Additionally, we identify a distinct divergence in lexical economy, where Chinese developers demonstrate a preference for brevity and abbreviations, while American developers favor more verbose, formal descriptions. These findings suggest that source code is not a linguistically neutral medium but is instead shaped by the distinct "dialects" and cognitive habits of its authors.

Create a lesson

Metadata

Comments
30 pages, 11 figures. Replication data and analysis code available on Zenodo: https://doi.org/10.5281/zenodo.22817275