-
Notifications
You must be signed in to change notification settings - Fork 8
/
api-usability.slide
141 lines (100 loc) · 4.04 KB
/
api-usability.slide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
How Usable Are Your APIs?
07 Apr 2017
Ben Cheng
* Usability of API?
- Important for Skygear / General Development
- Making software: what really works and why we believe it
- Steven Clarke, Usability researcher for Visual Studio
- Self-blamed Developer: MFC vs ATL Server
* How often does Developer use API?
Explosion of online forum and Stack Overflow. Instead of writing code and be
productive, they end up spending their time browsing online forums. Their
self-esteem takes a hit. It doesn't really feel like she is programming
anymore
* How developers estimates it pays off?
When Payoff > Cognitive cost of using the API
- Class/Method names, documentation
- Recognizable design patterns
- Consistent approach with other parts of the API
- Match of the domain understanding
* Usability Tests
*** Card Sort Study on ATL Server (2000)
- 14 C++ developers x 24 classes
- 8 - 14 grouping in Spreadsheet
- 3 distinct clusters
- no conceptual model in common
*** Usability Labs on Visual Basic .NET (2002)
- 8 VB Developers x Read&write Text file x Talk out loud
- Usability Engineer behind glass
- Video for patterns of behavior, interesting highlights
- All developers failed on the simple task
- Enlightening Learning
* Usability Labs on Visual Basic .NET
- Generate huge empathy for the customer
- StreamReader/Writer + Documentation time => Sample code
- Looks for representation of File, but ends up with Stream
- Complete in 20 minutes:
Dim f As New FileObject
f.Open(OpenMode.Write, "testfile.txt")
f.WriteLine("A line of text")
f.Close()
* Profile of Developers
A more diversified usability test, tagged each partcipants's video segments with the Congitive Dimensions framework [Green and Petre 1996]
*** Opportunistic developers
- Rapid prototype
- Task focused
- Extensive use of high-level, concrete components
*** Pragmatic developers
- Code focused
- Use tools (refactoring, unit testing)
- Focus on robustness and correctness of the code
*** Systematic developers
- Defensive approach to development
- Depp understanding of any technology before start working on it
* Make a guess!
Who wants to use FileObject? Opportunistic, Pragmatic, or Systematic?
* Habits of Developers
*** Opportunistic developers
- Prefer high-level concrete components
- Love style
*** Pragmatic developers
- Factored components - high-level concrete components with all the modes of operation factored out into different components
- Neutral to style
*** Systematic developer
- Prefer primitive components
- Hate style
* Scenario-based Design
Answer to targeting all three of the personas - Scenario-based Design.
- Complete set of interface is not what the API team thinks about, but the developers think about the scenarios in which they will use.
In usability test, developers
- don't care about the whole API.
- only focus on the API help them complete the task.
- dismiss classes weren't at the expected abstraction level.
Thus,
- Complete set of interface = scenario x developer expectations
- Which type of developers will use which type of API?
- e.g. File should be high-level, Memory mapped should be primitives
* Scenario-based Design (cont.)
- Write out code that they expect a developer to write in each scenario and type
- Checklist of dimension frameworks for review.
- Design and build the API after happy with the scenario.
- Focus on the user experience of multiple APIs instead of the architecture of the total API.
- Focus on what the API for instead of what the API is.
* Appendix
- Evaluate the usability of an API that does not require a usability study
Farooq, U., and D. Zirkler. 2010 API peer reviews: A method for evaluating
usability of application programming interfaces. Proceedings of the 2010 ACM
Conference on Computer Supported Cooperative Work: 207-210
* API Congitive Dimensions framework [Clarke and Becker 2003]
- Abstraction level
- Learning Style
- Working framework
- Work-step unit
- Progressive evaluation
- Premature commitment
- Penetrability
- API elaboration
- API viscosity
- Consistency
- Role expressiveness
- Domain coresspondence