-
Notifications
You must be signed in to change notification settings - Fork 9
/
softeng.toc
332 lines (332 loc) · 30.3 KB
/
softeng.toc
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
\contentsline {chapter}{Welcome}{9}{chapter*.2}%
\contentsline {section}{\numberline {0.1}Making better software}{9}{section.0.1}%
\contentsline {section}{\numberline {0.2}Aims}{11}{section.0.2}%
\contentsline {subsection}{\numberline {0.2.1}Learning outcomes}{11}{subsection.0.2.1}%
\contentsline {section}{\numberline {0.3}Recommended reading}{11}{section.0.3}%
\contentsline {subsection}{\numberline {0.3.1}Requirements}{12}{subsection.0.3.1}%
\contentsline {subsection}{\numberline {0.3.2}Overview of course}{12}{subsection.0.3.2}%
\contentsline {section}{\numberline {0.4}Using the lab manual}{12}{section.0.4}%
\contentsline {section}{\numberline {0.5}Contributing to this manual}{13}{section.0.5}%
\contentsline {section}{\numberline {0.6}Acknowledgements}{13}{section.0.6}%
\contentsline {section}{\numberline {0.7}Licensing}{14}{section.0.7}%
\contentsline {subsection}{\numberline {0.7.1}Your privacy}{14}{subsection.0.7.1}%
\contentsline {chapter}{Expectations}{17}{chapter*.3}%
\contentsline {section}{\numberline {0.8}Expectation engineering}{17}{section.0.8}%
\contentsline {subsection}{\numberline {0.8.1}Our expectations of you}{17}{subsection.0.8.1}%
\contentsline {subsubsection}{\numberline {0.8.1.1}Getting help}{17}{subsubsection.0.8.1.1}%
\contentsline {subsubsection}{\numberline {0.8.1.2}Workshops vs.\nobreakspace {}Team study}{19}{subsubsection.0.8.1.2}%
\contentsline {subsubsection}{\numberline {0.8.1.3}Physical vs online sessions}{19}{subsubsection.0.8.1.3}%
\contentsline {subsection}{\numberline {0.8.2}What your team expects of you}{20}{subsection.0.8.2}%
\contentsline {subsection}{\numberline {0.8.3}What to expect of GTAs}{20}{subsection.0.8.3}%
\contentsline {subsection}{\numberline {0.8.4}What to expect from mentors}{20}{subsection.0.8.4}%
\contentsline {subsection}{\numberline {0.8.5}What you can expect from academic staff}{22}{subsection.0.8.5}%
\contentsline {subsection}{\numberline {0.8.6}How your work gets assessed}{22}{subsection.0.8.6}%
\contentsline {section}{\numberline {0.9}Your camera}{22}{section.0.9}%
\contentsline {subsection}{\numberline {0.9.1}Camera on?}{22}{subsection.0.9.1}%
\contentsline {subsection}{\numberline {0.9.2}Camera off?}{23}{subsection.0.9.2}%
\contentsline {subsection}{\numberline {0.9.3}Being appropriate}{23}{subsection.0.9.3}%
\contentsline {subsection}{\numberline {0.9.4}Respecting others}{23}{subsection.0.9.4}%
\contentsline {chapter}{Weekly timetable}{25}{chapter*.4}%
\contentsline {section}{\numberline {0.10}Where should I go if I'm on campus?}{25}{section.0.10}%
\contentsline {section}{\numberline {0.11}Automating}{26}{section.0.11}%
\contentsline {section}{\numberline {0.12}Reading}{26}{section.0.12}%
\contentsline {section}{\numberline {0.13}Debugging}{27}{section.0.13}%
\contentsline {section}{\numberline {0.14}Estimating}{27}{section.0.14}%
\contentsline {section}{\numberline {0.15}Testing}{27}{section.0.15}%
\contentsline {section}{\numberline {0.16}Pausing}{27}{section.0.16}%
\contentsline {section}{\numberline {0.17}Workflowing}{27}{section.0.17}%
\contentsline {section}{\numberline {0.18}Refactoring}{27}{section.0.18}%
\contentsline {section}{\numberline {0.19}Testing}{28}{section.0.19}%
\contentsline {section}{\numberline {0.20}Patterning}{28}{section.0.20}%
\contentsline {section}{\numberline {0.21}Managing}{28}{section.0.21}%
\contentsline {section}{\numberline {0.22}Challenging}{28}{section.0.22}%
\contentsline {section}{\numberline {0.23}Marking interview schedule}{28}{section.0.23}%
\contentsline {section}{\numberline {0.24}Tools}{29}{section.0.24}%
\contentsline {subsection}{\numberline {0.24.1}Microsoft Teams}{29}{subsection.0.24.1}%
\contentsline {subsection}{\numberline {0.24.2}Blackboard}{29}{subsection.0.24.2}%
\contentsline {subsection}{\numberline {0.24.3}GitLab}{29}{subsection.0.24.3}%
\contentsline {part}{I\hspace {1em}Weekly Workshops}{31}{part.1}%
\contentsline {chapter}{\numberline {1}Building and testing}{33}{chapter.1}%
\contentsline {section}{\numberline {1.1}Introduction}{33}{section.1.1}%
\contentsline {section}{\numberline {1.2}Acquiring Marauroa}{34}{section.1.2}%
\contentsline {subsection}{\numberline {1.2.1}Run the IDE}{34}{subsection.1.2.1}%
\contentsline {subsection}{\numberline {1.2.2}Select the Workspace}{34}{subsection.1.2.2}%
\contentsline {subsection}{\numberline {1.2.3}Organise Workspace}{35}{subsection.1.2.3}%
\contentsline {subsection}{\numberline {1.2.4}Create a New Project by Cloning}{36}{subsection.1.2.4}%
\contentsline {subsection}{\numberline {1.2.5}Checkout a Specific Commit}{43}{subsection.1.2.5}%
\contentsline {subsection}{\numberline {1.2.6}Explore your Project}{49}{subsection.1.2.6}%
\contentsline {section}{\numberline {1.3}Building the Marauroa Engine}{50}{section.1.3}%
\contentsline {subsection}{\numberline {1.3.1}Locate and Examine the Build Script}{51}{subsection.1.3.1}%
\contentsline {subsection}{\numberline {1.3.2}Build the System Using the Build Script}{55}{subsection.1.3.2}%
\contentsline {subsection}{\numberline {1.3.3}Examining the Results of the Build}{58}{subsection.1.3.3}%
\contentsline {section}{\numberline {1.4}Testing the Marauroa Engine}{58}{section.1.4}%
\contentsline {subsection}{\numberline {1.4.1}Finding Out What Tests There Are to Run}{59}{subsection.1.4.1}%
\contentsline {subsection}{\numberline {1.4.2}Run the Tests}{61}{subsection.1.4.2}%
\contentsline {subsection}{\numberline {1.4.3}Examining the Test Results}{62}{subsection.1.4.3}%
\contentsline {subsection}{\numberline {1.4.4}Examining the Test Coverage Results}{65}{subsection.1.4.4}%
\contentsline {subsection}{\numberline {1.4.5}Using the Test Suite to Find Bugs}{69}{subsection.1.4.5}%
\contentsline {chapter}{\numberline {2}Large systems}{75}{chapter.2}%
\contentsline {section}{\numberline {2.1}Purposes of the workshop}{76}{section.2.1}%
\contentsline {section}{\numberline {2.2}Learning Large Codebases}{76}{section.2.2}%
\contentsline {subsection}{\numberline {2.2.1}What activity takes most of a maintenance programmer's time?}{76}{subsection.2.2.1}%
\contentsline {subsubsection}{\numberline {2.2.1.1}Tips for learning large codebases}{76}{subsubsection.2.2.1.1}%
\contentsline {paragraph}{\numberline {2.2.1.1.1}Tip 1: Develop general knowledge}{76}{paragraph.2.2.1.1.1}%
\contentsline {paragraph}{\numberline {2.2.1.1.2}Tip 2: Develop domain knowledge}{77}{paragraph.2.2.1.1.2}%
\contentsline {paragraph}{\numberline {2.2.1.1.3}Tip 3: Be systematic}{77}{paragraph.2.2.1.1.3}%
\contentsline {paragraph}{\numberline {2.2.1.1.4}Tip 4: use your IDE}{77}{paragraph.2.2.1.1.4}%
\contentsline {paragraph}{\numberline {2.2.1.1.5}Tip 5}{78}{paragraph.2.2.1.1.5}%
\contentsline {paragraph}{\numberline {2.2.1.1.6}Tip 6: read the tests}{78}{paragraph.2.2.1.1.6}%
\contentsline {paragraph}{\numberline {2.2.1.1.7}Tip 7: Take your time}{78}{paragraph.2.2.1.1.7}%
\contentsline {subsubsection}{\numberline {2.2.1.2}Comprehending Marauroa}{78}{subsubsection.2.2.1.2}%
\contentsline {section}{\numberline {2.3}Unit Testing Overview}{79}{section.2.3}%
\contentsline {subsection}{\numberline {2.3.1}Definition}{79}{subsection.2.3.1}%
\contentsline {subsection}{\numberline {2.3.2}The AAA pattern: Arrange-Act-Assert}{80}{subsection.2.3.2}%
\contentsline {subsection}{\numberline {2.3.3}A simple example}{80}{subsection.2.3.3}%
\contentsline {subsection}{\numberline {2.3.4}Tips and tricks}{81}{subsection.2.3.4}%
\contentsline {subsubsection}{\numberline {2.3.4.1}Tip 1: Arrange section is largest}{81}{subsubsection.2.3.4.1}%
\contentsline {subsubsection}{\numberline {2.3.4.2}Tip 2: Act is usually a single line}{82}{subsubsection.2.3.4.2}%
\contentsline {subsubsection}{\numberline {2.3.4.3}Tip 3: Order is important}{82}{subsubsection.2.3.4.3}%
\contentsline {subsubsection}{\numberline {2.3.4.4}Tip 4: Avoid multiple AAA}{82}{subsubsection.2.3.4.4}%
\contentsline {subsubsection}{\numberline {2.3.4.5}Tip 5: Avoid if statements in tests}{82}{subsubsection.2.3.4.5}%
\contentsline {subsubsection}{\numberline {2.3.4.6}Tip 6: Annotate}{83}{subsubsection.2.3.4.6}%
\contentsline {subsection}{\numberline {2.3.5}Building a simple application with simple tests}{83}{subsection.2.3.5}%
\contentsline {section}{\numberline {2.4}Unit Testing Reading and Writing in Marauroa and Stendhal}{86}{section.2.4}%
\contentsline {subsection}{\numberline {2.4.1}Exercise 1: There is only one instance of World}{86}{subsection.2.4.1}%
\contentsline {subsection}{\numberline {2.4.2}Exercise 2: Zones are actually added to Worlds}{86}{subsection.2.4.2}%
\contentsline {subsection}{\numberline {2.4.3}Exercise 3: Objects are actually added to Zones}{86}{subsection.2.4.3}%
\contentsline {subsection}{\numberline {2.4.4}Exercise 4: Objects are destroyed when removed from Zones}{87}{subsection.2.4.4}%
\contentsline {subsection}{\numberline {2.4.5}Exercise 5: Reading and refactoring Stendhal tests}{87}{subsection.2.4.5}%
\contentsline {section}{\numberline {2.5}JUnit Cheatsheet}{87}{section.2.5}%
\contentsline {subsection}{\numberline {2.5.1}JUnit annotations}{87}{subsection.2.5.1}%
\contentsline {subsection}{\numberline {2.5.2}JUnit statements}{88}{subsection.2.5.2}%
\contentsline {chapter}{\numberline {3}Debugging}{91}{chapter.3}%
\contentsline {section}{\numberline {3.1}Preparing for the workshop}{91}{section.3.1}%
\contentsline {subsection}{\numberline {3.1.1}Introduction to the Workshop Activity}{92}{subsection.3.1.1}%
\contentsline {section}{\numberline {3.2}Workshop Activity: Working Through a Bug Report}{93}{section.3.2}%
\contentsline {subsection}{\numberline {3.2.1}Start With a Problem}{94}{subsection.3.2.1}%
\contentsline {subsection}{\numberline {3.2.2}Stabilise the Problem}{95}{subsection.3.2.2}%
\contentsline {subsection}{\numberline {3.2.3}Isolate the Source of the Problem}{95}{subsection.3.2.3}%
\contentsline {subsection}{\numberline {3.2.4}Fix the Problem}{96}{subsection.3.2.4}%
\contentsline {subsection}{\numberline {3.2.5}Test the Fix}{96}{subsection.3.2.5}%
\contentsline {subsection}{\numberline {3.2.6}Look for Similar Errors}{97}{subsection.3.2.6}%
\contentsline {subsection}{\numberline {3.2.7}The 11 Truths of Debugging}{97}{subsection.3.2.7}%
\contentsline {chapter}{\numberline {4}Cost estimation}{99}{chapter.4}%
\contentsline {section}{\numberline {4.1}Work Breakdown Structures}{99}{section.4.1}%
\contentsline {chapter}{\numberline {5}Test first development}{103}{chapter.5}%
\contentsline {section}{\numberline {5.1}Course content}{103}{section.5.1}%
\contentsline {chapter}{\numberline {6}Git workflows}{105}{chapter.6}%
\contentsline {chapter}{\numberline {7}Software Refactoring}{107}{chapter.7}%
\contentsline {section}{\numberline {7.1}Preparing for the workshop}{107}{section.7.1}%
\contentsline {subsection}{\numberline {7.1.1}Prepare your IDE}{107}{subsection.7.1.1}%
\contentsline {subsection}{\numberline {7.1.2}Run the Regression Test Suite}{107}{subsection.7.1.2}%
\contentsline {section}{\numberline {7.2}Activity: Literals and Magic Numbers}{108}{section.7.2}%
\contentsline {section}{\numberline {7.3}Activity: Long Methods}{109}{section.7.3}%
\contentsline {section}{\numberline {7.4}Activity: Excessive Comments}{111}{section.7.4}%
\contentsline {section}{\numberline {7.5}Activity: Applying the Refactorings Together}{112}{section.7.5}%
\contentsline {chapter}{\numberline {8}Design for Testability}{115}{chapter.8}%
\contentsline {section}{\numberline {8.1}Preparing for the Workshop}{115}{section.8.1}%
\contentsline {section}{\numberline {8.2}Understanding Test Doubles: Dummies}{115}{section.8.2}%
\contentsline {subsubsection}{\numberline {8.2.0.1}Example Dummy No.\nobreakspace {}1}{116}{subsubsection.8.2.0.1}%
\contentsline {subsection}{\numberline {8.2.1}Example Dummy No.\nobreakspace {}2}{116}{subsection.8.2.1}%
\contentsline {subsection}{\numberline {8.2.2}Example Dummy No.\nobreakspace {}3}{117}{subsection.8.2.2}%
\contentsline {section}{\numberline {8.3}Understanding Test Doubles: Stubs}{117}{section.8.3}%
\contentsline {subsection}{\numberline {8.3.1}Example Stub No.\nobreakspace {}1}{117}{subsection.8.3.1}%
\contentsline {subsection}{\numberline {8.3.2}Example Stub No.\nobreakspace {}2}{118}{subsection.8.3.2}%
\contentsline {section}{\numberline {8.4}Test Doubles Scavenger Hunt}{119}{section.8.4}%
\contentsline {subsection}{\numberline {8.4.1}Finding Dummies}{119}{subsection.8.4.1}%
\contentsline {subsection}{\numberline {8.4.2}Finding Stubs}{120}{subsection.8.4.2}%
\contentsline {section}{\numberline {8.5}Understanding Test Doubles: First Experiments with Mock Objects}{120}{section.8.5}%
\contentsline {section}{\numberline {8.6}All Finished and Nowhere to Go?}{121}{section.8.6}%
\contentsline {chapter}{\numberline {9}Software design patterns}{123}{chapter.9}%
\contentsline {section}{\numberline {9.1}Introduction}{123}{section.9.1}%
\contentsline {section}{\numberline {9.2}Workshop Exercise 1 - Behavioural Patterns}{124}{section.9.2}%
\contentsline {subsection}{\numberline {9.2.1}Exercise 1a - The Strategy Pattern}{124}{subsection.9.2.1}%
\contentsline {subsubsection}{\numberline {9.2.1.1}Stage 1 - Add a new Pet class}{125}{subsubsection.9.2.1.1}%
\contentsline {subsubsection}{\numberline {9.2.1.2}Stage 2 - Design sub-class/super-class relationships to avoid duplicated code}{125}{subsubsection.9.2.1.2}%
\contentsline {subsubsection}{\numberline {9.2.1.3}Stage 3 - Introduce a GrowthStrategy}{125}{subsubsection.9.2.1.3}%
\contentsline {subsubsection}{\numberline {9.2.1.4}Stage 4 - Implement concrete growth strategies}{127}{subsubsection.9.2.1.4}%
\contentsline {subsubsection}{\numberline {9.2.1.5}Stage 5 - Modify the codebase to use our GrowthStrategy}{127}{subsubsection.9.2.1.5}%
\contentsline {subsection}{\numberline {9.2.2}Exercise 1b - The State Pattern}{127}{subsection.9.2.2}%
\contentsline {section}{\numberline {9.3}Workshop Exercise 2 - Structural Patterns}{128}{section.9.3}%
\contentsline {subsection}{\numberline {9.3.1}Exercise 2a - The Composite Pattern}{129}{subsection.9.3.1}%
\contentsline {subsubsection}{\numberline {9.3.1.1}Stage 1 - Add new Habitat classes}{129}{subsubsection.9.3.1.1}%
\contentsline {subsubsection}{\numberline {9.3.1.2}Stage 2 - Modify Habitat to contain child Habitat objects}{130}{subsubsection.9.3.1.2}%
\contentsline {subsubsection}{\numberline {9.3.1.3}Stage 3 - Modify Habitat to call child methods}{130}{subsubsection.9.3.1.3}%
\contentsline {subsection}{\numberline {9.3.2}Exercise 2b - The Adapter Pattern}{131}{subsection.9.3.2}%
\contentsline {section}{\numberline {9.4}Workshop Exercise 3 - Creational Patterns}{132}{section.9.4}%
\contentsline {subsection}{\numberline {9.4.1}Exercise 3a - The Factory Method}{132}{subsection.9.4.1}%
\contentsline {subsection}{\numberline {9.4.2}Exercise 3b - The Singleton Pattern}{133}{subsection.9.4.2}%
\contentsline {chapter}{\numberline {10}Risk management}{135}{chapter.10}%
\contentsline {section}{\numberline {10.1}Course content}{135}{section.10.1}%
\contentsline {chapter}{\numberline {11}Open source challenge}{137}{chapter.11}%
\contentsline {section}{\numberline {11.1}Introduction}{137}{section.11.1}%
\contentsline {section}{\numberline {11.2}The challenge}{137}{section.11.2}%
\contentsline {section}{\numberline {11.3}Identify an appropriate project}{137}{section.11.3}%
\contentsline {subsection}{\numberline {11.3.1}Find an interesting issue to work on}{138}{subsection.11.3.1}%
\contentsline {subsection}{\numberline {11.3.2}Fork and clone the repository}{138}{subsection.11.3.2}%
\contentsline {subsection}{\numberline {11.3.3}Branch, change and push}{138}{subsection.11.3.3}%
\contentsline {subsection}{\numberline {11.3.4}Notify the repository creator (make a pull request)}{139}{subsection.11.3.4}%
\contentsline {part}{II\hspace {1em}Team study materials}{141}{part.2}%
\contentsline {chapter}{\numberline {12}Starting Stendhal}{143}{chapter.12}%
\contentsline {section}{\numberline {12.1}Introduction}{143}{section.12.1}%
\contentsline {section}{\numberline {12.2}Choosing an IDE}{145}{section.12.2}%
\contentsline {section}{\numberline {12.3}Acquiring the Code}{145}{section.12.3}%
\contentsline {section}{\numberline {12.4}Building the Code}{146}{section.12.4}%
\contentsline {section}{\numberline {12.5}Running the Test Suite}{147}{section.12.5}%
\contentsline {subsection}{\numberline {12.5.1}Running the Test Suite Through Ant}{147}{subsection.12.5.1}%
\contentsline {subsection}{\numberline {12.5.2}Run the Tests Using the Eclipse JUnit Plugin}{147}{subsection.12.5.2}%
\contentsline {subsection}{\numberline {12.5.3}Running Individual Tests Using the Eclipse JUnit Plugin}{148}{subsection.12.5.3}%
\contentsline {section}{\numberline {12.6}Running the Code}{149}{section.12.6}%
\contentsline {section}{\numberline {12.7}Creating a Local Stendhal Account}{150}{section.12.7}%
\contentsline {section}{\numberline {12.8}Getting to Know the Code}{151}{section.12.8}%
\contentsline {chapter}{\numberline {13}Industrial mentoring}{155}{chapter.13}%
\contentsline {section}{\numberline {13.1}When are the mentoring sessions?}{155}{section.13.1}%
\contentsline {section}{\numberline {13.2}I'm interested, how can I register?}{157}{section.13.2}%
\contentsline {section}{\numberline {13.3}About us}{157}{section.13.3}%
\contentsline {section}{\numberline {13.4}About the course}{158}{section.13.4}%
\contentsline {section}{\numberline {13.5}About the Mentoring Scheme}{158}{section.13.5}%
\contentsline {section}{\numberline {13.6}Meeting agenda}{158}{section.13.6}%
\contentsline {subsection}{\numberline {13.6.1}Getting to know your team}{158}{subsection.13.6.1}%
\contentsline {subsection}{\numberline {13.6.2}Challenging and guiding the team}{159}{subsection.13.6.2}%
\contentsline {subsection}{\numberline {13.6.3}Questions the Students Might Ask Mentors}{159}{subsection.13.6.3}%
\contentsline {section}{\numberline {13.7}What do mentors get in return?}{160}{section.13.7}%
\contentsline {section}{\numberline {13.8}Who are the mentors?}{160}{section.13.8}%
\contentsline {chapter}{\numberline {14}Your mentor}{163}{chapter.14}%
\contentsline {section}{\numberline {14.1}Introducing your team}{163}{section.14.1}%
\contentsline {section}{\numberline {14.2}But I'm not interested in employer x?}{165}{section.14.2}%
\contentsline {chapter}{\numberline {15}Synchronising}{167}{chapter.15}%
\contentsline {section}{\numberline {15.1}Introduction}{167}{section.15.1}%
\contentsline {section}{\numberline {15.2}Making a Local Commit}{168}{section.15.2}%
\contentsline {section}{\numberline {15.3}Step 2: Pushing the Commit to the Team Repository}{170}{section.15.3}%
\contentsline {section}{\numberline {15.4}Step 3: Fetching the New Commit from the Team Repository}{173}{section.15.4}%
\contentsline {section}{\numberline {15.5}Step 4: Incorporating the Commit into Your Local Branch}{176}{section.15.5}%
\contentsline {section}{\numberline {15.6}A Final Word}{178}{section.15.6}%
\contentsline {part}{III\hspace {1em}Coursework}{179}{part.3}%
\contentsline {chapter}{\numberline {16}Individual Coursework 1}{181}{chapter.16}%
\contentsline {section}{\numberline {16.1}Introduction}{181}{section.16.1}%
\contentsline {section}{\numberline {16.2}About the Coursework}{182}{section.16.2}%
\contentsline {subsection}{\numberline {16.2.1}Key Information}{182}{subsection.16.2.1}%
\contentsline {subsection}{\numberline {16.2.2}Submission Procedure}{182}{subsection.16.2.2}%
\contentsline {subsection}{\numberline {16.2.3}Marking Scheme}{183}{subsection.16.2.3}%
\contentsline {subsection}{\numberline {16.2.4}Pre-Deadline Feedback}{184}{subsection.16.2.4}%
\contentsline {subsection}{\numberline {16.2.5}Late Submissions}{184}{subsection.16.2.5}%
\contentsline {subsection}{\numberline {16.2.6}Plagiarism}{185}{subsection.16.2.6}%
\contentsline {subsection}{\numberline {16.2.7}How to Get Help}{185}{subsection.16.2.7}%
\contentsline {section}{\numberline {16.3}The Coursework Instructions}{185}{section.16.3}%
\contentsline {subsection}{\numberline {16.3.1}Step One: Start Eclipse}{185}{subsection.16.3.1}%
\contentsline {subsection}{\numberline {16.3.2}Step Two: Clone a GitLab Repository in Eclipse}{186}{subsection.16.3.2}%
\contentsline {subsection}{\numberline {16.3.3}Step Three: Identify the Bug}{190}{subsection.16.3.3}%
\contentsline {subsection}{\numberline {16.3.4}Step four: Create a Branch for Your Own Changes}{194}{subsection.16.3.4}%
\contentsline {subsection}{\numberline {16.3.5}Step five: Commit a Change to the New Branch}{195}{subsection.16.3.5}%
\contentsline {subsection}{\numberline {16.3.6}Step six: Merge your Changes}{204}{subsection.16.3.6}%
\contentsline {subsection}{\numberline {16.3.7}Step seven: Push the Changes to the Remote Repository}{208}{subsection.16.3.7}%
\contentsline {subsection}{\numberline {16.3.8}Step 8: Record the Project Status in the Issue Tracker}{208}{subsection.16.3.8}%
\contentsline {subsection}{\numberline {16.3.9}Coursework Complete}{210}{subsection.16.3.9}%
\contentsline {chapter}{\numberline {17}Individual Coursework 2}{211}{chapter.17}%
\contentsline {section}{\numberline {17.1}Introduction}{211}{section.17.1}%
\contentsline {section}{\numberline {17.2}About the Coursework}{213}{section.17.2}%
\contentsline {subsection}{\numberline {17.2.1}Key Information}{213}{subsection.17.2.1}%
\contentsline {subsection}{\numberline {17.2.2}Marking Scheme}{213}{subsection.17.2.2}%
\contentsline {subsection}{\numberline {17.2.3}Pre-Deadline Feedback}{214}{subsection.17.2.3}%
\contentsline {subsection}{\numberline {17.2.4}Submission Procedure}{214}{subsection.17.2.4}%
\contentsline {subsection}{\numberline {17.2.5}Late Submissions}{215}{subsection.17.2.5}%
\contentsline {subsection}{\numberline {17.2.6}Plagiarism}{215}{subsection.17.2.6}%
\contentsline {subsection}{\numberline {17.2.7}How to Get Help}{216}{subsection.17.2.7}%
\contentsline {section}{\numberline {17.3}The Coursework Instructions}{216}{section.17.3}%
\contentsline {subsection}{\numberline {17.3.1}Step one: Clone and Import the Project into Eclipse}{216}{subsection.17.3.1}%
\contentsline {subsection}{\numberline {17.3.2}Step two: Run and Understand the Test Cases for the Feature}{216}{subsection.17.3.2}%
\contentsline {subsection}{\numberline {17.3.3}Step three: Implement the Feature/Make the Tests Pass}{218}{subsection.17.3.3}%
\contentsline {subsection}{\numberline {17.3.4}Step four: Commit and Push the Feature Implementation}{220}{subsection.17.3.4}%
\contentsline {subsection}{\numberline {17.3.5}Step five: Merge your Code into the Development Branch}{220}{subsection.17.3.5}%
\contentsline {subsection}{\numberline {17.3.6}Step six: Resolve the Conflicts and Complete the Merge}{222}{subsection.17.3.6}%
\contentsline {subsubsection}{\numberline {17.3.6.1}Walkthrough of the Conflict Resolution Process}{222}{subsubsection.17.3.6.1}%
\contentsline {subsubsection}{\numberline {17.3.6.2}Now It's Your Turn}{227}{subsubsection.17.3.6.2}%
\contentsline {subsection}{\numberline {17.3.7}Step seven: Push the Completed Merge to the Remote Repository}{229}{subsection.17.3.7}%
\contentsline {subsection}{\numberline {17.3.8}Step eight: Update the Issue Tracker and Request Marking}{230}{subsection.17.3.8}%
\contentsline {subsection}{\numberline {17.3.9}Messed Up?}{230}{subsection.17.3.9}%
\contentsline {subsection}{\numberline {17.3.10}Coursework Complete}{230}{subsection.17.3.10}%
\contentsline {chapter}{\numberline {18}Team Coursework 1}{231}{chapter.18}%
\contentsline {section}{\numberline {18.1}Overview}{231}{section.18.1}%
\contentsline {section}{\numberline {18.2}What You Have to Do}{232}{section.18.2}%
\contentsline {subsection}{\numberline {18.2.1}Step one}{232}{subsection.18.2.1}%
\contentsline {subsection}{\numberline {18.2.2}Step two}{232}{subsection.18.2.2}%
\contentsline {subsection}{\numberline {18.2.3}Step three}{233}{subsection.18.2.3}%
\contentsline {subsection}{\numberline {18.2.4}Step four}{233}{subsection.18.2.4}%
\contentsline {subsection}{\numberline {18.2.5}Step five}{234}{subsection.18.2.5}%
\contentsline {subsection}{\numberline {18.2.6}Step six}{234}{subsection.18.2.6}%
\contentsline {subsection}{\numberline {18.2.7}Step seven}{235}{subsection.18.2.7}%
\contentsline {subsection}{\numberline {18.2.8}Step eight}{236}{subsection.18.2.8}%
\contentsline {subsection}{\numberline {18.2.9}Step nine}{237}{subsection.18.2.9}%
\contentsline {subsection}{\numberline {18.2.10}Step ten}{238}{subsection.18.2.10}%
\contentsline {section}{\numberline {18.3}Submission of Your Team's Work}{238}{section.18.3}%
\contentsline {section}{\numberline {18.4}Coursework Extensions}{239}{section.18.4}%
\contentsline {section}{\numberline {18.5}Non-Contributing Team Members}{239}{section.18.5}%
\contentsline {section}{\numberline {18.6}Partially Contributing Team Members}{240}{section.18.6}%
\contentsline {section}{\numberline {18.7}Plagiarism}{241}{section.18.7}%
\contentsline {chapter}{\numberline {19}Team Coursework 2}{243}{chapter.19}%
\contentsline {section}{\numberline {19.1}Overview}{243}{section.19.1}%
\contentsline {section}{\numberline {19.2}What You Have to Do}{244}{section.19.2}%
\contentsline {subsection}{\numberline {19.2.1}Step 1: Release Planning}{244}{subsection.19.2.1}%
\contentsline {subsection}{\numberline {19.2.2}Step 2: Issue Planning}{246}{subsection.19.2.2}%
\contentsline {subsection}{\numberline {19.2.3}Step2.1: Choosing your Issues}{246}{subsection.19.2.3}%
\contentsline {subsection}{\numberline {19.2.4}Step2.2: Creating a Work Breakdown Structure for the Selected Issues}{247}{subsection.19.2.4}%
\contentsline {subsection}{\numberline {19.2.5}Step 2.3: Planning for the Implementation}{247}{subsection.19.2.5}%
\contentsline {subsection}{\numberline {19.2.6}Step 3: Testing and Implementation}{249}{subsection.19.2.6}%
\contentsline {subsubsection}{Choosing a Sensible Starting Commit}{249}{section*.5}%
\contentsline {subsubsection}{Git Workflow}{250}{section*.6}%
\contentsline {subsubsection}{Best Practice Commit Messages}{250}{section*.7}%
\contentsline {subsubsection}{Test-First Coding}{251}{section*.8}%
\contentsline {subsubsection}{Management of Test Coverage}{252}{section*.9}%
\contentsline {subsubsection}{Documenting Your Work}{252}{section*.10}%
\contentsline {subsection}{\numberline {19.2.7}Step 4: Code Review}{253}{subsection.19.2.7}%
\contentsline {subsection}{\numberline {19.2.8}Step 5: Integrate Completed Features into the Development Branch}{253}{subsection.19.2.8}%
\contentsline {subsection}{\numberline {19.2.9}Step 6: Prepare the Release}{255}{subsection.19.2.9}%
\contentsline {subsection}{\numberline {19.2.10}Step 7: Prepare for the Marking Interview}{256}{subsection.19.2.10}%
\contentsline {section}{\numberline {19.3}Submission of Your Team's Work}{256}{section.19.3}%
\contentsline {section}{\numberline {19.4}Coursework Extensions}{257}{section.19.4}%
\contentsline {section}{\numberline {19.5}Non-Contributing Team Members}{257}{section.19.5}%
\contentsline {section}{\numberline {19.6}Partially Contributing Team Members}{258}{section.19.6}%
\contentsline {section}{\numberline {19.7}Plagiarism}{258}{section.19.7}%
\contentsline {section}{\numberline {19.8}Technical Appendix}{259}{section.19.8}%
\contentsline {subsection}{\numberline {19.8.1}Deleting a Tag on GitLab}{259}{subsection.19.8.1}%
\contentsline {part}{IV\hspace {1em}Self study materials}{261}{part.4}%
\contentsline {chapter}{\numberline {20}Testing Stendhal}{263}{chapter.20}%
\contentsline {section}{\numberline {20.1}Introduction}{263}{section.20.1}%
\contentsline {section}{\numberline {20.2}Manually Replicating The Issues}{264}{section.20.2}%
\contentsline {section}{\numberline {20.3}Getting Inspiration for Writing your Own Test Cases}{264}{section.20.3}%
\contentsline {chapter}{\numberline {21}Integrating commits}{267}{chapter.21}%
\contentsline {section}{\numberline {21.1}Introduction}{267}{section.21.1}%
\contentsline {section}{\numberline {21.2}Git has Rejected my Push}{267}{section.21.2}%
\contentsline {subsection}{\numberline {21.2.1}Fetching the New Commits from the Remote}{270}{subsection.21.2.1}%
\contentsline {section}{\numberline {21.3}Integrating the New Commits using Merge}{270}{section.21.3}%
\contentsline {section}{\numberline {21.4}Integrating the New Commits using Rebase}{274}{section.21.4}%
\contentsline {subsection}{\numberline {21.4.1}Rebasing Commits Made on the Master Branch}{276}{subsection.21.4.1}%
\contentsline {subsection}{\numberline {21.4.2}Rebasing to Sync Repositories When Working on a Feature Branch}{277}{subsection.21.4.2}%
\contentsline {subsection}{\numberline {21.4.3}Rebasing to Sync Repositories After a Fast-Forward Merge}{279}{subsection.21.4.3}%
\contentsline {section}{\numberline {21.5}A Final Word}{282}{section.21.5}%
\contentsline {chapter}{\numberline {22}Continuous integration}{283}{chapter.22}%
\contentsline {section}{\numberline {22.1}Introduction to Continuous Integration}{283}{section.22.1}%
\contentsline {section}{\numberline {22.2}Logging onto Jenkins CI Server:}{285}{section.22.2}%
\contentsline {section}{\numberline {22.3}Accessing your Coursework Builds}{287}{section.22.3}%
\contentsline {section}{\numberline {22.4}Drilling Down on the Development Branch Build}{290}{section.22.4}%
\contentsline {section}{\numberline {22.5}What Happens When Jenkins Builds a Job}{292}{section.22.5}%
\contentsline {subsection}{\numberline {22.5.1}What Triggers the Build?}{292}{subsection.22.5.1}%
\contentsline {subsection}{\numberline {22.5.2}The Jenkins Workspace}{293}{subsection.22.5.2}%
\contentsline {subsection}{\numberline {22.5.3}Jenkins Runs the Ant Build}{294}{subsection.22.5.3}%
\contentsline {subsection}{\numberline {22.5.4}The Results are Published}{294}{subsection.22.5.4}%
\contentsline {section}{\numberline {22.6}A Look at Feature Branch Builds}{294}{section.22.6}%
\contentsline {section}{\numberline {22.7}Confused? Stuck? Need Help?}{296}{section.22.7}%
\contentsline {chapter}{\numberline {23}Code review}{299}{chapter.23}%
\contentsline {section}{\numberline {23.1}Why Review Code?}{299}{section.23.1}%
\contentsline {section}{\numberline {23.2}Types of Code Review}{301}{section.23.2}%
\contentsline {subsection}{\numberline {23.2.1}Buddy Review}{301}{subsection.23.2.1}%
\contentsline {subsection}{\numberline {23.2.2}Team-Based Review}{302}{subsection.23.2.2}%
\contentsline {subsection}{\numberline {23.2.3}Formal Review}{302}{subsection.23.2.3}%
\contentsline {section}{\numberline {23.3}Good Practice for Code Reviewers}{303}{section.23.3}%
\contentsline {section}{\numberline {23.4}Code Review Facilities in GitLab}{305}{section.23.4}%
\contentsline {section}{\numberline {23.5}Code Review in COMP23311}{306}{section.23.5}%
\contentsline {chapter}{\numberline {24}Unit testing}{309}{chapter.24}%
\contentsline {section}{\numberline {24.1}Introduction}{309}{section.24.1}%
\contentsline {section}{\numberline {24.2}What is Automated Testing and Why Do We Need It?}{310}{section.24.2}%
\contentsline {section}{\numberline {24.3}Automated Testing in JUnit: a Simple Example}{312}{section.24.3}%
\contentsline {chapter}{\numberline {25}References}{315}{chapter.25}%