You are on page 1of 8

contributed articles

DOI:10.1145/ 2896587
There is an expanding market of com-
Human-centered design can make panies, software, and services to help
organizations provide APIs. One such
application programming interfaces company, Apigee Corporation (http://
easier for developers to use. apigee.com/), surveyed 200 marketing
and IT executives in U.S. companies
BY BRAD A. MYERS AND JEFFREY STYLOS with annual revenue of more than $500
million in 2013, with 77% of respon-

Improving
dents rating APIs “important” to mak-
ing their systems and data available
to other companies, and only 1% of
respondents rating APIs as “not at all

API Usability
important.”12 Apigee estimated the to-
tal market for API Web middleware was
$5.5 billion in 2014.
However, APIs are often difficult
to use, and programmers at all levels,
from novices to experts, repeatedly
spend significant time learning new
APIs. APIs are also often used incor-
rectly, resulting in bugs and some-
times significant security problems.7
APIs must provide the needed func-
tionality, but even when they do, the
(APIs),
A P P L I C AT I O N P RO G R A M M I N G I N T E R FAC E S design could make them unusable.
including libraries, frameworks, toolkits, and Because APIs serve as the interface be-
tween human developers and the body
software development kits, are used by virtually all of code that implements the function-
code. If one includes both internal APIs (interfaces ality, principles and methods from hu-
internal to software projects) and public APIs man-computer interaction (HCI) can
be applied to improve usability. “Us-
(such as the Java Platform SDK, the Windows .NET ability,” as discussed here, includes a
Framework, jQuery for JavaScript, and Web services variety of properties, not just learnabil-
ity for developers unfamiliar with an
like Google Maps), nearly every line of code most API but also efficiency and correctness
programmers write will use API calls. APIs provide when used by experts. This property
a mechanism for code reuse so programmers can is sometimes called “DevX,” or devel-
oper experience, as an analogy with
build on top of what others (or they themselves) “UX,” or user experience. But usability
have already done, rather than start from scratch also includes providing the appropri-
ate functionality and ways to access it.
with every program. Moreover, using APIs is Researchers have shown how various
often required because low-level access to system
resources (such as graphics, networking, and the key insights
file system) is available only through protected APIs. ˽˽ All modern software makes heavy use
of APIs, yet programmers can find APIs
Organizations increasingly provide their internal data difficult to use, resulting in errors and
inefficiencies.
on the Web through public APIs; for example, http:// ˽˽ A variety of research findings, tools,
www.programmableweb.com lists almost 15,000 and methods are widely available for
improving API usability.
APIs for Web services and https://www.digitalgov. ˽˽ Evaluating and designing APIs with
gov/2013/04/30/apis-in-government/ promotes use of their users in mind can result in fewer
errors, along with greater efficiency,
government data through Web APIs. effectiveness, and security.

62 COM MUNICATIO NS O F TH E AC M | J U NE 201 6 | VO L . 5 9 | NO. 6


human-centered techniques, includ- automated tools,18,20 and mitigations and-evaluation criteria so they do not
ing contextual inquiry field studies, to improve usability when other con- create an unusable API inadvertently,
corpus studies, laboratory user studies, siderations require trade-offs.15,23 As and when they intentionally decrease
and logs from field trials, can be used an example, our own small lab study in usability in favor of some other criteria,
to determine the actual requirements 2008 found API users were between 2.4 at least to do it knowingly and provide
IMAGE BY BENIS A RAPOVIC/D OTSH OCK

for APIs so they provide the right func- and 11.2 times faster when a method mitigations, including specific docu-
tionality.21 Other research focuses on was on the expected class, rather than mentation and tool support.
access to that functionality, showing, on a different class.25 Note we are not Developers have been designing
for example, software patterns in APIs arguing usability should always over- APIs for decades, but without empiri-
that are problematic for users,6,10,25 shadow other considerations when cal research on API usability, many of
guidelines that can be used to evaluate designing an API; rather, API designers them have been difficult to use, and
API designs,4,8 with some assessed by should add usability as explicit design- some well-intentioned design recom-

JU N E 2 0 1 6 | VO L. 59 | N O. 6 | C OM M U N IC AT ION S OF T HE ACM 63
contributed articles

mendations have turned out to be well it prevents errors, how simple it is


wrong. There was scattered interest in to use, how consistent it is, and how
API usability in the late 1990s, with the well it matches its users’ mental mod-
first significant research in the area ap- els. Power includes an API’s expres-
pearing in the first decade of the 2000s,
especially from the Microsoft Visual APIs are also often siveness, or the kinds of abstractions
it provides; its extensibility (how us-
Studio usability group.4 This resulted
in a gathering of like-minded research-
used incorrectly, ers can extend it to create convenient
user-specific components); its “evolv-
ers who in 2009 created the API Usabil- resulting in bugs ability” for the designers who will
ity website (http://www.apiusability.
org) that continues to be a repository
and sometimes update it and create new versions; its
performance in terms of speed, mem-
for API-usability information. significant security ory, and other resource consumption;
We want to make clear the vari-
ous stakeholders affected by APIs.
problems. and the robustness and security of its
implementation and resulting appli-
The first is API designers, including cation. Usability mostly affects API
all the people involved in creating users, though error prevention also
the API, like API implementers and affects consumers of the resulting
API documentation writers. Some of products. Power affects mostly API us-
their goals are to maximize adoption ers and product consumers, though
of an API, minimize support costs, evolvability also affects API designers
minimize development costs, and and, indirectly, API users to the extent
release the API in a timely fashion. changes in the API require editing
Next is the API users, or the program- the code of applications that use it.
mers who use APIs to help them write Modern APIs for Web services seem
their code. Their goals include being to involve such “breaking changes”
able to quickly write error-free pro- more than desktop APIs, as when, say,
grams (without having to limit their migrating from v2 to v3 of the Google
scope or features), use APIs many Maps API required a complete rewrite
other programmers use (so others of the API users’ code. We have heard
can test them, answer questions, and anecdotal evidence that usability can
post sample code using the APIs), not also affect API adoption; if an API
needing to update their code due to takes too long for a programmer to
changes in APIs, and having their re- learn, some organizations choose to
sulting applications run quickly and use a different API or write simpler
efficiently. For public APIs, there may functionality from scratch.
be thousands of times as many API Another reason for difficulty is the
users as there are API developers. Fi- design of an API requires making hun-
nally, there are the consumers of the dreds of design decisions at many dif-
resulting products who may be indi- ferent levels, all of which can affect
rectly affected by the quality of the usability.24 Decisions range from the
resulting code but who also might be global (such as the overall architecture
directly affected, as in, say, the case of the API, what design patterns will be
of user-interface widgets, where API used, and how functionality will be pre-
choices affect the look and feel of the sented and organized) down to the low
resulting user interface. Consumers’ level (such as specific name of each ex-
goals include having products with ported class, function, method, excep-
the desired features, robustness, and tion, and parameter). The enormous
ease of use. size of public APIs contributes to these
difficulties; for example, the Java Plat-
Motivating the Problem form, Standard Edition API Specifica-
One reason API design is such a chal- tion includes more than 4,000 classes
lenge is there are many quality attri- with more than 35,000 different meth-
butes on which APIs might be evaluat- ods, and Microsoft’s .NET Framework
ed for the stakeholders (see Figure 1), includes more than 140,000 classes,
as well as trade-offs among them. At methods, properties, and fields.
the highest level, the two basic quali-
ties of an API are usability and power. Examples of Problems
Usability includes such attributes as All programmers are likely able to iden-
how easy an API is to learn, how pro- tify APIs they personally had difficulty
ductive programmers are using it, how learning and using correctly due to us-

64 COMMUNICATIO NS O F TH E AC M | J U NE 201 6 | VO L . 5 9 | NO. 6


contributed articles

ability limitations.a We list several ex- were also highlighted by a field study19 oped over several years during creation
amples here to give an idea of the range of 440 professional developers learn- of such widespread APIs as the Java
of problems. Other publications have ing to use Microsoft’s APIs. Development Kit and the .NET base
also surveyed the area.10,24 Many sources of API recommen- libraries, respectively. However, we
Studies of novice programmers dations are available in print and on- have found some of these guidelines
have identified selecting the right facil- line. Two of the most comprehensive to be contradicted by empirical evi-
ities to use, then understanding how to are books by Joshua Bloch (then at dence. For example, Bloch discussed
coordinate multiple elements of APIs Sun Micro­systems)3 and by Krzysztof the many architectural advantages of
as key barriers to learning.13 For exam- Cwalina and Brad Abrams (then at Mi- the factory pattern,9 where objects in
ple, in Visual Basic, learners wanted to crosoft). Each offers guidelines devel- a class-instance object system cannot
“pull” data from a dialogue box into a
window after “OK” was hit, but because Figure 1. API quality attributes and the stakeholders most affected by each quality.
controls are inaccessible if their dia-
logue box is not visible in Visual Basic,
data must instead be “pushed” from Key: Stakeholders
the dialogue to the window.
There are many examples of API
quirks affecting expert professional
programmers as well. For example, one
study11 detailed a number of function- API Designers API Users Product Consumers
ality and usability problems with the
.NET socket Select() function in C#,
using it to motivate greater focus on the
Usability
usability of APIs in general. In another
study,21 API users reported difficulty
Learnability Productivity Error-Prevention
with SAP’s BRFplus API (a business-
rules engine), and a redesign of the API
dramatically improved users’ success
and time to completion. A study of the
early version of SAP’s APIs for enterprise
Service-Oriented Architecture, or eSOA,1
identified problems with documenta-
tion, as well as additional weaknesses
with the API itself, including names that Matching
Simplicity Consistency Mental Models
were too long (see Figure 2), unclear
dependencies, difficulty coordinating
multiple objects, and poor error mes-
sages when API users made mistakes.
Severe problems with documentation Power
Expressiveness Extensibility Evolvability Performance,
Robustness

a We are collecting a list of usability concerns


and problems with APIs; please send yours to
author Brad A. Myers; for a more complete list
of articles and resources on API usability, see
http://www.apiusability.org

Figure 2. Method names are so long users cannot tell which of the six methods to select in autocomplete;1 note the autocomplete menu
does not support horizontal scrolling nor does the yellow hover text for the selected item.

JU N E 2 0 1 6 | VO L. 59 | N O. 6 | C OM M U N IC AT ION S OF T HE ACM 65
contributed articles

be created by calling new but must involves trade-offs and how useful it it helps explain the results by revealing
instead be created using a separate is to know what factors can influence participants’ mental models.
“factory” method or entirely different usability and security. Only a few empirical studies have
factory class. Use of other patterns covered API design patterns but con-
(such as the singleton or flyweight Human-Centered Methods sistently show simplifying the API and
patterns)9 could also require factory If you are convinced API usability avoiding patterns like the factory pat-
methods. However, empirical re- should be improved, you might wonder tern will improve usability.6 Other rec-
search has shown significant usability how it can be done. Fortunately, a vari- ommendations on designs are based
penalties when using the factory pat- ety of human-centered methods are on the opinions of experienced de-
tern in APIs.6 available to help answer the questions signers,3,5,11,17 though there are many
There is also plenty of evidence an API designer might have. recommendations, and they are some-
that less usable API designs affect Design phase. At the beginning of times contradictory.
security. Increasing API usability of- the process, as an API is being planned, As described here, there is a wide
ten increases security. For example, many methods can help the API de- variety of evaluation methods for de-
a study by Fahl et al.7 of 13,500 pop- signer. The Natural Programming signs, but many of them can also be
ular free Android apps found 8.0% Project at Carnegie Mellon University used during the design phase as guide-
had misused the APIs for the Secure has pioneered what we call the “natu- lines the API designer should keep in
Sockets Layer (SSL) or its successor, ral programming” elicitation method, mind. For example, one guideline that
the Transport Layer Security (TLS), where we try to understand how API us- appears in “cognitive dimensions”4
and were thus vulnerable to man- ers are thinking about functionality25 and in Nielsen’s “heuristic evalua-
in-the-middle and other attacks; a to determine what would be the most tion”16 is consistency, which applies
follow-on study of Apple iOS apps natural way to provide it. The essence to many aspects of an API design.
found 9.7% to be vulnerable. Causes of this approach is to describe the re- One example of its application is that
include significant difficulties using quired functionality to the API users, the order of parameters should be
security APIs correctly, and Fahl et then ask them to write onto blank pa- the same in every method. However,
al.7 recommended numerous chang- per (or a blank screen) the design for javax.xml.stream.XMLStreamWriter
es that would increase the usability the API. The key goals are to under- for Java 8 has different overloadings
and security of the APIs. stand the names API users assign to for the writeStartElement method,
On the other hand, increased se- the various entities and how users or- taking the String parameters local-
curity in some cases seems to lower ganize the functionality into different Name and namespaceURI in the oppo-
usability of the API. For example, classes, where necessary. Multiple re- site order from each other,18 and, since
Java security guidelines strongly en- searchers have reported trying to guess both are strings, the compiler is not able
courage classes that are immutable, the names of classes and methods is to detect user errors (see code section 1).
meaning objects cannot be changed the key way users search and browse Another Nielsen guideline is to re-
after they are constructed.17 Howev- for the needed functionality,14 and we duce error proneness.16 It can apply
er, empirical research shows profes- have found surprising consistency in to avoiding long sequences of param-
sionals trying to learn APIs prefer to how they name and organize the func- eters of the same type the API user is
be able to create empty objects and tionality among the classes.25 This elic- likely to get wrong and the compiler
set their fields later, thus requiring itation technique also turns out to be will also not be able to check. For exam-
mutable classes.22 This programmer useful as part of a usability evaluation ple, the class TPASupplierOrderXDE
preference illustrates that API design of an existing API (described later), as in Petstore (J2EE demonstration soft-
ware from Oracle) takes a sequence of
Code section 1. Two overloadings of the writeStartElement method in Java where nine Strings (see code section 2).18
localName and namespaceURI are in the opposite order.
Likewise, in Microsoft’s .Net,
System.Net.Cookie has four con-
void writeStartElement(String namespaceURI, structors that take zero, two, three,
String localName) or four strings as input. Another ap-
void writeStartElement(String prefix,
String localName,
plication of this principle is to make
String namespaceURI) the default or example parameters
do the right thing. Fahl et al.7 report-
ed that, by default, SSL certificate
validation is turned off when using
Code section 2. String parameters many API users are likely to get wrong. some iOS frameworks and libraries,
resulting in API users making the
void setShippingAddress ( error of leaving them unchecked in
String firstName, String lastName, String street, deployed applications.
String city, String state, String country,
String zipCode, String email, String phone)
Evaluating the API Design
Following its design, a new API
should be evaluated to measure and

66 COMMUNICATIO NS O F TH E AC M | J U NE 201 6 | VO L . 5 9 | NO. 6


contributed articles

improve its usability, with a wide va- complete because the names were so
riety of user-centered methods avail- long the differences were off screen,1
able for the evaluation. as in Figure 2. We also found these
The easiest is to evaluate the design names were indistinguishable when
based on a set of guidelines. Nielsen’s
“heuristic evaluation” guidelines 16 The most generic users were trying to read and under-
stand existing code, leading to much
describe 10 properties an expert can
use to check any design (http://www.
and well-known confusion and errors;1
Flexibility and efficiency of use. Us-
nngroup.com/articles/ten-usability- name should be ers should be able to accomplish their
heuristics/) that apply equally well to
APIs as to regular user interfaces. Here
used for the class tasks with the API efficiently;
Aesthetic and minimalist design. It
are our mappings of the guidelines to that programmers might seem obvious that a smaller
API designs with a general example of
how each can be applied.
are supposed and less-complex API is likely to be
more usable. One empirical study20
Visibility of system status. It should to actually use, found that for classes, the number
be easy for the API user to check the
state (such as whether a file is open but this is violated of other classes in the same package/
namespace had an influence on the
or not), and mismatches between the by Java in success of finding the desired one.
state and operations should provide
appropriate feedback (such as writing many places. However, we found no correlation
between the number of elements in
to a closed file should result in a help- an API and its usability, as long as
ful error message); they had appropriate names and were
Match between system and real world. well organized.25 For example, adding
Names given to methods and the or- more different kinds of objects that
ganization of methods into classes can be drawn does not necessarily
should match the API users’ expecta- complicate a graphics package, and
tions. For example, the most generic adding convenience constructors that
and well-known name should be used take different sets of parameters can
for the class programmers are sup- improve usability.20 An important fac-
posed to actually use, but this is vio- tor seems to be having distinct prefix-
lated by Java in many places. There is es for the different method names so
a class in Java called File, but it is a they are easily differentiated by typing
high-level abstract class to represent a small number of characters for code
file system paths, and API users must completion in the editor;20
use a completely different class (such Help users recognize, diagnose, and
as FileOutputStream) for reading recover from errors. A surprising num-
and writing; ber of APIs supply unhelpful error in-
User control and freedom. API users formation or even none at all when
should be able to abort or reset opera- something goes wrong, thus decreas-
tions and easily get the API back to a ing usability and also possibly affect-
normal state; ing correctness and security. Many
Consistency and standards. All parts approaches are available for reporting
of the design should be consistent errors, with little empirical evidence
throughout the API, as discussed earlier; (but lots of opinions) about which is
Error prevention. The API should more usable—a topic for our group’s
guide the user into using the API cor- current work; and
rectly, including having defaults that Help and documentation. A key com-
do the right thing; plaint about API usability is inadequate
Recognition rather than recall. documentation.19
As discussed in the following para- Likewise, the Cognitive Dimen-
graphs, a favorite tool of API users to sions Framework provides a set of
explore an API is the autocomplete guidelines that can be used to evalu-
popup from the integrated devel- ate APIs.4 A related method is Cogni-
opment environment (IDE), so one tive Walkthrough2 whereby an expert
requirement is to make the names evaluates how well a user interface
clear and understandable, enabling supports one or more specific tasks.
users to recognize which element We used both Heuristic Evaluation
they want. One noteworthy violation and Cognitive Walkthrough to help
of this principle was an API where six improve the NetWeaver Gateway prod-
names all looked identical in auto- uct from SAP, Inc. Because the SAP

JU N E 2 0 1 6 | VO L. 59 | N O. 6 | C OM M U N IC AT ION S OF T HE ACM 67
contributed articles

developers who built this tool were ideal mitigation would be to change
using agile software-development the API to fix the problem. However,
processes, they were able to quickly actually changing an API may not be
improve the tool’s usability based on possible for a number of reasons. For
our evaluations.8
Although a user-interface expert APIs specify not example, legacy APIs can be changed
only rarely since it would involve also
usually applies these guidelines to
evaluate an API, some tools automate
just the interfaces changing all the code that uses the
APIs. Even with new APIs, an API de-
API evaluations using guidelines; for for programmers signer could make an explicit trade-
example, one tool can evaluate APIs
against a set of nine metrics, includ-
to understand off to decrease usability in favor of
other goals, like efficiency. For exam-
ing looking for methods that are and write code ple, a factory pattern might be used in
overloaded but with different return
types, too many parameters in a row
against but also a performance-critical API to avoid al-
locating any memory at all.
with the same types, and consistency for computers to When a usability problem can-
of parameter orderings across differ-
ent methods.18 Likewise, the API Con- execute, making not be removed from the API itself,
many mitigations can be applied to
cepts Framework takes the context of them brittle and help its users. The most obvious is to
use into account, as it evaluates both
the API and samples of code using difficult to change. improve the documentation and ex-
ample code, which are the subjects
the API.20 It can measure a variety of of frequent complaints from API us-
metrics already mentioned, including ers in general.19 API designers can
whether multiple methods have the be careful to explicitly direct users
same prefix (and thus may be annoy- to the solutions to the known prob-
ing to use in code-completion menus) lems. For example, the Jadeite tool
and use the factory pattern. adds cross-references to the docu-
Among HCI practitioners, running mentation for methods users expect
user studies to test a user interface to exist but which are actually in a dif-
with target users is considered the ferent class.23 For example, the Java
“gold standard.”16 Such user tests can Message class does not have a send
be done with APIs as well. In a think- method, so Jadeite adds a pretend
aloud usability evaluation, target us- send method to the documentation
ers (here, API users) attempt some for the Message class, telling users
tasks (either their own or experiment- to look in the mail Transport class
er-provided) with the API typically in instead. Knowing users are confused
a lab setting and are encouraged to by the lack of this method in the Mes-
say aloud what they are thinking. This sage class allows API documentation
makes clear what they are looking for to add help exactly where it is needed.
or trying to achieve and, in general,
why they are making certain choices. Tools
A researcher might be interested in a This kind of help can be provided even
more formal A/B test, comparing, say, in programming tools (such as the code
an old vs. new version of an API (as we editor or IDE), not just in the documen-
previously have done6,21,25), but the in- tation. Calcite15 adds extra entries into
sights about usability barriers are usu- the autocomplete menus of the Eclipse
ally sufficient when they emerge from IDE to help API users discover what ad-
an informal think-aloud evaluation. ditional methods will be useful in the
Grill et al.10 described a method current context, even if they are not
where they had experts use Nielsen’s part of the current class. It also high-
Heuristic Evaluation to identify prob- lights when the factory pattern must be
lems with an API and observed devel- used to create objects.
opers learning to use the same API in Many other tools can also help
the lab. An interesting finding was with API usability. For example,
these two methods revealed mostly some tools that help refactor the API
independent sets of problems with users’ code may lower the barrier for
that API. changing an API (such as Gofix for
the Go language, http://blog.golang.
Mitigations org/introducing-gofix). Other tools
When any of these methods reveals help find the right elements to use
a usability problem with an API, an in APIs, “wizards” that produce part

68 COMMUNICATIO NS O F TH E AC M | J U NE 201 6 | VO L . 5 9 | NO. 6


contributed articles

of the needed code based on API us- knowledge and set of methods and Design Patterns. Addison-Wesley, Reading, MA, 1995.
10. Grill, T., Polacek, O., and Tscheligi, M. Methods
ers’ answers to questions,8 and many tools that can be used to evaluate and towards API usability: A structural analysis of
kinds of bug checkers that check for improve API usability. The result will usability problem categories. In Proceedings of
the Fourth International Conference on Human-
proper API use (such as http://find- be APIs that are easier to learn and use Centered Software Engineering, M. Winckler et al.,
bugs.sourceforge.net/). correctly, API users who are more effec- Eds. (Toulouse, France, Oct. 29–31). Springer, Berlin,
Germany, 2012, 164–180.
tive and efficient, and resulting prod- 11. Henning, M. API design matters. ACM Queue 5, 4
Conclusion ucts that are more robust and secure (May–June, 2007), 24–36.
12. Kirschner, B. The Perceived Relevance of APIs. Apigee
Since our Natural Programming group for consumers. Corporation, San Jose, CA, 2015; http://apigee.com/
about/api-best-practices/perceived-relevance-apis
began researching API usability in the 13. Ko, A.J., Myers, B.A., and Aung, H.H. Six learning
early 2000s, some significant shifts Acknowledgments barriers in end-user programming systems. In
Proceedings of the IEEE Symposium on Visual
have occurred in the software indus- This article follows from more than a Languages and Human-Centric Computing (Rome,
try. One of the biggest is the move decade of work on API usability by the Italy, Sept. 26–29). IEEE Computer Society Press,
Washington, D.C., 2004, 199–206.
toward agile software development, Natural Programming group at Carn- 14. Ko, A.J., Myers, B.A., Coblenz, M., and Aung, H.H. An
whereby a minimum-viable-product egie Mellon University by more than exploratory study of how developers seek, relate,
and collect relevant information during software
is quickly released and then iterated 30 students, staff, and postdocs, in maintenance tasks. IEEE Transactions on Software
upon based on real-world user feed- addition to the authors, and we thank Engineering 33, 12 (Dec. 2006), 971–987.
15. Mooty, M., Faulring, A., Stylos, J., and Myers, B.A.
back. Though it has had a positive them all for their contributions. We Calcite: Completing code completion for constructors
effect on usability overall in driving also thank André Santos, Jack Beaton, using crowds. In Proceedings of the IEEE Symposium
on Visual Languages and Human-Centric Computing
user-centric development, it exposes Michael Coblenz, John Daughtry, Josh (Leganés-Madrid, Spain, Sept. 21–25). IEEE Computer
some of the unique challenges of API Sunshine, and the reviewers for their Society Press, Washington, D.C., 2010, 15–22.
16. Nielsen, J. Usability Engineering. Academic Press,
design. APIs specify not just the inter- comments on earlier drafts of this ar- Boston, MA, 1993.
faces for programmers to understand ticle. This work has been funded by 17. Oracle Corp. Secure Coding Guidelines for the
Java Programming Language, Version 4.0,
and write code against but also for SAP, Adobe, IBM, Microsoft, and mul- 2014; http://www.oracle.com/technetwork/java/
seccodeguide-139067.html
computers to execute, making them tiple National Science Foundation 18. Rama, G.M. and Kak, A. Some structural measures of
brittle and difficult to change. While grants, including CNS-1423054, IIS- API usability. Software: Practice and Experience 45, 1
(Jan. 2013), 75–110; https://engineering.purdue.edu/
human users are nimble responding 1314356, IIS-1116724, IIS-0329090, RVL/Publications/RamaKakAPIQ_SPE.pdf
to the small, gradual changes in user CCF-0811610, IIS-0757511, and CCR- 19. Robillard, M. and DeLine, R. A field study of API
learning obstacles. Empirical Software Engineering 16,
interface design that result from an 0324770. Any opinions, findings, and 6 (Dec. 2011), 703–732.
agile process, code is not. This aver- conclusions or recommendations ex- 20. Scheller, T. and Kuhn, E. Automated measurement
of API usability: The API concepts framework.
sion to change raises the stakes for pressed in this material are those of the Information and Software Technology 61 (May 2015),
getting the design right in the first authors and do not necessarily reflect 145–162.
21. Stylos, J., Busse, D.K., Graf, B., Ziegler, C., Ehret,
place. API users behave just like other those of any of the sponsors. R., and Karstens, J. A case study of API design
users almost universally, but the con- for improved usability. In Proceedings of the IEEE
Symposium on Visual Languages and Human-Centric
straints created by needing to avoid References Computing (Herrsching am Ammersee, Germany,
1. Beaton, J., Jeong, S.Y., Xie, Y., Stylos, J., and Myers, Sept. 20–24). IEEE Computer Society Press,
breaking existing code make the evo- B.A. Usability challenges for enterprise service- Washington, D.C., 2008, 189–192.
lution, versioning, and initial release oriented architecture APIs. In Proceedings of the 22. Stylos, J. and Clarke, S. Usability implications of
IEEE Symposium on Visual Languages and Human- requiring parameters in objects’ constructors. In
process considerably different from Centric Computing (Herrsching am Ammersee, Proceedings of the International Conference on
other design tasks. It is not clear how Germany, Sept. 15–18). IEEE Computer Society Press, Software Engineering (Minneapolis, MN, May 20–26).
Washington, D.C., 2008, 193–196. IEEE Computer Society Press, Washington, D.C., 2007,
the “fail fast, fail often” style of agile 2. Blackmon, M.H., Polson, P.G., Kitajima, M., and Lewis, 529–539.
development popular today can be C. Cognitive walkthrough for the Web. In Proceedings 23. Stylos, J., Faulring, A., Yang, Z., and Myers, B.A.
of the Conference on Human Factors in Computing Improving API documentation using API usage
adapted to the creation and evolu- Systems (Minneapolis, MN, Apr. 20–25). ACM, Press, information. In Proceedings of the IEEE Symposium
New York, 2002, 463–470.
tion of APIs, where the cost of releas- 3. Bloch, J. Effective Java Programming Language
on Visual Languages and Human-Centric Computing
(Corvallis, OR, Sept. 20–24). IEEE Computer Society
ing and supporting imperfect APIs or Guide. Addison-Wesley, Boston, MA, 2001. Press, Washington, D.C., 2009, 119–126.
4. Clarke, S. API Usability and the Cognitive Dimensions
making breaking changes to an exist- Framework, 2003; http://blogs.msdn.com/stevencl/
24. Stylos, J. and Myers, B.A. Mapping the space of
API design decisions. In Proceedings of the IEEE
ing API—either by supporting mul- archive/2003/10/08/57040.aspx Symposium on Visual Languages and Human-Centric
5. Cwalina, K. and Abrams, B. Framework Design
tiple versions or by removing support Guidelines, Conventions, Idioms, and Patterns for
Computing (Coeur d’Alene, ID, Sept 23–27). IEEE
Computer Society Press, Washington, D.C., 2007, 50–57.
for old versions—is very high. Reusable .NET Libraries. Addison-Wesley, Upper- 25. Stylos, J. and Myers., B.A. The implications of method
Saddle River, NJ, 2006.
We envision a future where API de- 6. Ellis, B., Stylos, J., and Myers, B.A. The factory pattern
placement on API learnability. In Proceedings of the
16th ACM SIGSOFT Symposium on Foundations of
signers will always include usability as in API design: A usability evaluation. In Proceedings of Software Engineering (Atlanta, GA, Sept. 23–27). ACM
the International Conference on Software Engineering Press, New York, 2008, 105–112.
a key quality metric to be optimized by (Minneapolis, MN, May 20–26). IEEE Computer Society
all APIs and where releasing APIs that Press, Washington, D.C., 2007, 302–312.
7. Fahl, S., Harbach, M., Perl, H., Koetter, M., and Smith, Brad A. Myers (bam@cs.cmu.edu) is a professor in the
have not been evaluated for usability M. Rethinking SSL development in an appified world. Human-Computer Interaction Institute in the School
will be as unacceptable as not evalu- In Proceedings of the ACM SIGSAC Conference on of Computer Science at Carnegie Mellon University,
Computer and Communications Security (Berlin, Pittsburgh, PA.
ating APIs for correctness or robust- Germany, Nov. 4–8). ACM Press, New York, 2013,
ness. When designers decide usability 49–60. Jeffrey Stylos (jsstylos@us.ibm.com) is a software
8. Faulring, A., Myers, B.A., Oren, Y., and Rotenberg, K. engineer at IBM in Littleton, MA, and received his Ph.D.
must be compromised in favor of other A case study of using HCI methods to improve tools in computer science at Carnegie Mellon University,
for programmers. In Proceedings of Workshop on Pittsburgh, PA, while doing research reported in this
goals, this decision will be made know- Cooperative and Human Aspects of Software Engineering article.
ingly, and appropriate mitigations will at the International Conference on Software Engineering
(Zürich, Switzerland, June 2). IEEE Computer Society
be put in place. Researchers and API Press, Washington, D.C., 2012, 37–39.
designers will contribute to a body of 9. Gamma, E., Helm, R., Johnson, R., and Vlissides, J. © 2016 ACM 0001-0782/16/06 $15.00

JU N E 2 0 1 6 | VO L. 59 | N O. 6 | C OM M U N IC AT ION S OF T HE ACM 69

You might also like