论文标题
流体智能无关紧要!代码示例对加密API的可用性的影响
Fluid Intelligence Doesn't Matter! Effects of Code Examples on the Usability of Crypto APIs
论文作者
论文摘要
上下文:程序员经常寻找可以适应自己问题的先前解决的问题的代码。尽管网络上现有的示例代码,但在堆栈溢出等网站上,加密应用程序编程界面(API)还是很误用的。对于什么使对开发人员使用加密API有用的示例鲜为人知。类比解决问题是一种心理理论,该理论研究人们如何使用已知解决方案解决新问题。有证据表明,推理和解决新的问题的能力,即流体智能(GF)以及结构和程序上相似的解决方案支持解决问题的解决方案。目的:我们的目标是了解相似性和GF是否在使用密码示例的情况下使用加密API的上下文也有效果。方法:我们对有或没有程序类似示例的76名学生参与者进行了对照实验,这是两个Java Crypto库之一,并测量了参与者的GF,以及对可用性(有效性,效率,满意度)和安全错误的影响。结果:我们观察到代码示例的强烈影响,其程序相似性对所有因变量都具有很高的相似性。流体智能GF无效。参与者使用的库也没有区别。结论:示例代码必须与具体解决方案更高度相似,而不是很抽象和通用,才能对开发任务产生积极影响。
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.