Do software engineers use autocompletion features differently than other developers? (2018)
Programmers in movies are often able to crank out working code with seemingly very little effort. In real life, programmers often rely on IDE features like autocompletion to produce correct code quickly. Amlekar et al. studied the differences in autocompletion usage between people who program for a living and people who do it “on the side”.
Why it matters
Most integrated development environments (IDEs) offer some form of autocompletion feature which proposes potentially relevant code fragments that can be easily inserted using a single keystroke. This is useful, because:
- It’s no longer necessary to memorise (or manually lookup) which methods can be called on an object;
- It’s harder to write calls to methods and properties that don’t actually exist;
- It saves keystrokes, which means you can write your code at a higher paceOr write code for longer periods.
One might expect that full-time professional developersWhich is what the “software engineers” in the title actually refers to, who spend much more time within IDEs than other developers (researchers, hobbyists, and students), use autocompletion differently. That would imply that professionals have different needs, and IDEs should adapt their autocompletion behaviour for this special group of users.
How the study was conducted
The authors tried to answer these questions using the MSR 2018 challenge dataset, which contains data on the actions that were performed by 85 developers within their IDEsThis dataset was also used in another exploratory study, about the relationship between working late and long hours on productivity..
The dataset contains 194,500 autocompletion events. Most autocompletion events are terminated because the developer:
- applies one of the proposed code fragments;
- cancels autocompletion altogether; or
- filters the list of proposed code fragments in an attempt to obtain better suggestions.
Autocompletion events that are terminated in other ways or are triggered by developers for whom their job role is not known are filtered out. After filtering about 39,000 events remain.
These are used to calculate autocompletion ratios (share of autocompletion events within the total number of events within a single programming session) and determine the types of proposed code fragments (e.g. type, variable, and method names).
What discoveries were made
The results are fairly straightforward, but are best taken with a grain of salt due to the small size of the dataset:
Autocompletion rates are similar for professional developers and other types of developers. The median rate is slightly higher for other developers, but the difference is not statistically significant;
Professional developers and other types of developers also use autocompletion for similar code fragment types. Again, it’s not that there are no differences at all – it’s just that they don’t mean much.