SECRApr 8, 2020

Fluid Intelligence Doesn't Matter! Effects of Code Examples on the Usability of Crypto APIs

arXiv:2004.03973v17 citations
Originality Incremental advance
AI Analysis

This addresses the problem of crypto API misuse for developers by showing that concrete, similar examples are crucial, though it is incremental in applying analogical problem-solving theory to this domain.

The study investigated how code example similarity affects the usability of cryptographic APIs, finding that highly procedurally similar examples significantly improved effectiveness, efficiency, and satisfaction while reducing security bugs, whereas fluid intelligence had no impact.

Context: Programmers frequently look for the code of previously solved problems that they can adapt for their own problem. Despite existing example code on the web, on sites like Stack Overflow, cryptographic Application Programming Interfaces (APIs) are co monly misused. There is little known about what makes examples helpful for developers in using crypto APIs. Analogical problem solving is a psychological theory that investigates how people use known solutions to solve new problems. There is evidence that the capacity to reason and solve novel problems a.k.a Fluid Intelligence (Gf ) and structurally and procedurally similar solutions support problem solving. Aim: Our goal is to understand whether similarity and Gf also have an effect in the context of using cryptographic APIs with the help of code examples. Method: We conducted a controlled experiment with 76 student participants developing with or without procedurally similar examples, one of two Java crypto libraries and measured the Gf of the participants as well as the effect on usability (effectiveness, efficiency, satisfaction) and security bugs. Results: We observed a strong effect of code examples with a high procedural similarity on all dependent variables. Fluid intelligence Gf had no effect. It also made no difference which library the participants used. Conclusions: Example code must be more highly similar to a concrete solution, not very abstract and generic to have a positive effect in a development task.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes