Toward so)ware engineering in prac0ce
Claire Le Goues 15-214 April 27, 2017
1
Toward so)ware engineering in prac0ce Claire Le Goues 15-214 - - PowerPoint PPT Presentation
Toward so)ware engineering in prac0ce Claire Le Goues 15-214 April 27, 2017 1 Learning Goals Broad scope of so;ware engineering Importance of nontechnical issues IntroducCon to key challenges 2 So)ware is Everywhere So)ware is
1
2
3
4
5
Crouching Dragon, Hidden So;ware: So;ware in Dod Weapon Systems (Ferguson, IEEE So;ware, 2001)
6
7
8
9
10
11
What is engineering? And how is it different from hacking/ programming?
12
13
14
15
16
17
18
19
20
Sommerville, SE, ed. 8
21
Percent
Effort Time Project beginning Project end 100% 0%
22
Percent
Effort Time Project beginning Project end 100% 0% Trashing / Rework ProducCve Coding
23
Percent
Effort Time Project beginning Project end 100% 0% Trashing / Rework ProducCve Coding Process: Cost and Time esCmates, WriCng Requirements, Design, Change Management, Quality Assurance Plan, Development and IntegraCon Plan
24
Percent
Effort Time Project beginning Project end 100% 0% ProducCve Coding Trashing / Rework Process
25
Percent
Effort Time Project beginning Project end 100% 0% ProducCve Coding Process Trashing / Rework
suggested by customer or manager. Project scope expands 25-50%
new features. Release with known defects.
components at the very end of the project. Interfaces out of sync.
work.
weekly for new esCmates.
26
27
n(n − 1) / 2 communicaCon links
28
29
30
31
32
Windows 95: 200 developers and testers, one of 250 products
33
34
35
36
37
38
Cme % completed 90% 100% reported progress planned actual
39
40
IdenCfy constraints EsCmate project parameters Define milestones Create schedule acCviCes begin Check progress ReesCmate project parameter Refine schedule renegoCate constraints Technical review Problem? no yes Done? yes no Abort? Budget, Personal, Deadlines new feature requests
41
42
43
44
45 π
46
Anda, Bente CD, Dag IK Sjøberg, and Audris Mockus. "Variability and reproducibility in so;ware engineering: A study of four companies that developed the same system." IEEE TransacLons on So4ware Engineering 35.3 (2009): 407-429. 47
48
49
50
51
– e.g., staff illness/turnover
– e.g. used component too slow
– e.g., compeCtor introduces similar product
52
53
54
55
56
Eclipse?
menu items in Eclipse?
secure communicaCon?
plugin?
they coordinate?
subsystems?
57
58
59
60
61
62
63
64
65
– Agree on RPC interfaces, develop system internals independently – Self-contained teams
66
– Short-term soluCon – Skewed load balance – One machine + replicaCons every 3 weeks
67
68
69
70
71
72
73
74
75
Which QA strategy is suitable?
76
h]p://xkcd.com/327/ Which QA strategy is suitable?
77
Which QA strategy is suitable?
78
79
80
– MulCple threads of control access shared data – Data gets corrupted when internal integrity assumpCons are violated.
– Use “lock” objects that enable access by one thread at a Cme
– Follow a thread discipline in which only one thread can access criCcal data (Common in GUI APIs e.g., graphical toolkit redraw)
– Why?
81
stream input: read, close, reset, skip, mark, etc.
methods read and close: interleaved execuCon could cause read to throw
NullPointerException
– But not always; concurrency à non- determinisCc!
the methods, prevenCng close and read from interleaving.
82
(Aaron Greenhouse)
“Aaempt to close while reading causes deadlock”
83
“Hung” socket stream: Use separate thread to close and interrupt “hung” read or write
– Bug fix prevents interleaving. – Intent inferred — is it correct?
– Interleaving intended — Fix race while allowing interleaving – Interleaving not intended — Provide alternaCve idiom to get the same effect.
this problem? Whose fault was it?
84
– Re-enabled socket idiom. – Compromises safety of the class by re-enabling the race condiCon
85
86