Variable and function names are extremely important for program comprehension. It is therefore also important to study how developers select names. But controlled experiments on naming are hindered by the need to describe to experimental subjects what it is they need to name. Words appearing in these descriptions may then find their way into the names, leading to a bias in the results. We suggest that this problem can be alleviated by using emojis or other small graphics in lieu of key words in the descriptions. A replication of previous work on naming, this time including such emojis and graphics, indeed led to a more diverse and less biased choice of words in the names than when using English descriptions.
翻译:变量和函数名称对于程序理解极为重要。 因此, 研究开发者如何选择名称也很重要 。 但是, 受控的命名实验因需要描述实验科目而受阻。 这些描述中出现的单词可能会在名称中找到, 从而导致结果的偏差 。 我们建议, 使用 emojis 或其他小图形代替描述中的关键词可以缓解这个问题 。 重复先前的命名工作, 这次包括这样的演示文和图形, 确实导致名称中的单词选择比使用英语描述时更加多样化和少偏见 。