1
00:00:00,070 --> 00:00:02,500
The following content is
provided under a Creative

2
00:00:02,500 --> 00:00:04,019
Commons license.

3
00:00:04,019 --> 00:00:06,360
Your support will help
MIT OpenCourseWare

4
00:00:06,360 --> 00:00:10,730
continue to offer high quality
educational resources for free.

5
00:00:10,730 --> 00:00:13,330
To make a donation or
view additional materials

6
00:00:13,330 --> 00:00:17,217
from hundreds of MIT courses,
visit MIT OpenCourseWare

7
00:00:17,217 --> 00:00:17,842
at ocw.mit.edu.

8
00:00:20,996 --> 00:00:23,290
PROFESSOR: Just very
quick-- very quick

9
00:00:23,290 --> 00:00:29,550
what we're doing today and what
we're doing next on Wednesday.

10
00:00:29,550 --> 00:00:32,280
Phil's going to start with
an estimation lecture.

11
00:00:32,280 --> 00:00:34,770
We're going to follow that
up with a lecture from me

12
00:00:34,770 --> 00:00:38,049
on Sprint Backlogs
and Task Lists.

13
00:00:38,049 --> 00:00:39,965
And then we're probably
going to take a break.

14
00:00:39,965 --> 00:00:43,250
You'll come back and you'll have
essentially a Sprint planning

15
00:00:43,250 --> 00:00:47,860
meeting here in class where you
will create a Sprint backlog

16
00:00:47,860 --> 00:00:50,726
and a task list,
hopefully with estimations

17
00:00:50,726 --> 00:00:52,892
down to how many hours you
think all those tasks are

18
00:00:52,892 --> 00:00:55,570
going to take you.

19
00:00:55,570 --> 00:00:58,500
Then we'll ask you
to come up and give

20
00:00:58,500 --> 00:01:02,391
a very brief two minute
presentation on hey,

21
00:01:02,391 --> 00:01:04,349
how did the process work,
and what was it like?

22
00:01:04,349 --> 00:01:05,650
How did it work for your team?

23
00:01:05,650 --> 00:01:08,710
We're not actually interested
in hearing about your game

24
00:01:08,710 --> 00:01:11,980
or what the top task
you have to do is.

25
00:01:11,980 --> 00:01:14,200
We trust that you have
a good game in progress

26
00:01:14,200 --> 00:01:16,310
and that you've got a
reasonable set of tasks.

27
00:01:16,310 --> 00:01:19,110
But we actually want to hear
about how that meaning worked.

28
00:01:19,110 --> 00:01:21,000
So we'll also give
you about 10 minutes

29
00:01:21,000 --> 00:01:23,240
to have a little sort
of post-mort review

30
00:01:23,240 --> 00:01:27,185
to talk about the process, after
you've made your task lists.

31
00:01:30,130 --> 00:01:31,580
Andrew will then come in.

32
00:01:31,580 --> 00:01:35,210
He'll be leading a discussion,
sort of a review discussion

33
00:01:35,210 --> 00:01:37,800
on good software to see
what you've been doing

34
00:01:37,800 --> 00:01:41,480
and see if you've remembered
anything he said from earlier.

35
00:01:41,480 --> 00:01:45,860
And you should have turned
in your product backlogs.

36
00:01:45,860 --> 00:01:48,620
And you should have code
running on your machines.

37
00:01:48,620 --> 00:01:51,470
We're not going to walk around
and inspect all your laptops

38
00:01:51,470 --> 00:01:53,850
to find out if you
have running code.

39
00:01:53,850 --> 00:01:56,830
But to be on target, you really
should have something running,

40
00:01:56,830 --> 00:02:01,070
and if not playable,
at least pokable.

41
00:02:01,070 --> 00:02:04,070
For Wednesday, we'll be
talking about testing.

42
00:02:04,070 --> 00:02:07,090
And you'll be running
a focus test in house.

43
00:02:07,090 --> 00:02:11,960
And Genevieve Conley,
yes, from Riot

44
00:02:11,960 --> 00:02:16,260
will be also giving a guest
lecture after the focus test.

45
00:02:16,260 --> 00:02:19,310
And I believe she'll be here
to wander around and help out

46
00:02:19,310 --> 00:02:21,190
in the focus test a little bit.

47
00:02:21,190 --> 00:02:25,280
So I think that's everything.

48
00:02:25,280 --> 00:02:25,889
Now!

49
00:02:25,889 --> 00:02:26,930
Those were my two slides.

50
00:02:26,930 --> 00:02:29,090
Now you can have the controls.

51
00:02:29,090 --> 00:02:32,641
PROFESSOR: Do try to come
in on time for class.

52
00:02:32,641 --> 00:02:35,140
If you are unsure about whether
you can get your game set up

53
00:02:35,140 --> 00:02:36,490
in time, come in early.

54
00:02:36,490 --> 00:02:39,280
And make sure that
your game is ready.

55
00:02:39,280 --> 00:02:41,370
When we have guests
coming to our class,

56
00:02:41,370 --> 00:02:43,180
we really will
prefer that people

57
00:02:43,180 --> 00:02:45,470
don't walk in terribly late.

58
00:02:45,470 --> 00:02:48,520
It's just kind of embarrassing.

59
00:02:48,520 --> 00:02:49,720
All right.

60
00:02:49,720 --> 00:02:54,570
So over the weekend,
I found myself

61
00:02:54,570 --> 00:02:56,080
in an unenviable
position of having

62
00:02:56,080 --> 00:02:59,700
to teach-- prepare for
a video game class,

63
00:02:59,700 --> 00:03:01,800
and not having a
working computer.

64
00:03:01,800 --> 00:03:05,070
So I had to prepare
for the possibility

65
00:03:05,070 --> 00:03:08,090
that I wouldn't have a
computer as of today,

66
00:03:08,090 --> 00:03:12,170
and redo my entire
presentation in analog format.

67
00:03:12,170 --> 00:03:15,720
But it turns out that IS&T
actually does miracles

68
00:03:15,720 --> 00:03:18,190
and got my computer back
and working on Monday.

69
00:03:18,190 --> 00:03:19,891
If you happen to
be working at IS&T,

70
00:03:19,891 --> 00:03:21,140
give yourself pat on the back.

71
00:03:21,140 --> 00:03:24,650
You are doing God's work.

72
00:03:24,650 --> 00:03:26,810
But I'm going to try to
do the analog thing anyway

73
00:03:26,810 --> 00:03:29,840
because might is worth a shot.

74
00:03:29,840 --> 00:03:31,629
I'm going to do
to be very clear,

75
00:03:31,629 --> 00:03:33,420
this is the first time
that I'm doing this.

76
00:03:33,420 --> 00:03:36,440
I'm going to need three
volunteers to come down.

77
00:03:36,440 --> 00:03:37,710
Come on down.

78
00:03:37,710 --> 00:03:38,840
Come on.

79
00:03:38,840 --> 00:03:39,340
Come down.

80
00:03:42,300 --> 00:03:44,230
All right.

81
00:03:44,230 --> 00:03:45,390
OK.

82
00:03:45,390 --> 00:03:52,760
So on Wednesday, we asked you
to split things up into small,

83
00:03:52,760 --> 00:03:56,320
medium, and large
features, right?

84
00:03:56,320 --> 00:03:58,150
Small, medium, large.

85
00:03:58,150 --> 00:04:04,900
And I'm going to give you
an idea of what your product

86
00:04:04,900 --> 00:04:06,240
backlog currently looks like.

87
00:04:06,240 --> 00:04:11,070
Your product backlog currently
looks like a bunch of features.

88
00:04:11,070 --> 00:04:12,640
All right.

89
00:04:12,640 --> 00:04:20,769
Now I'm going to assume that
all of you have sort of already

90
00:04:20,769 --> 00:04:27,420
assigned small, medium, large
things to your features.

91
00:04:27,420 --> 00:04:29,910
Sort of small, medium, large
categories to your features.

92
00:04:29,910 --> 00:04:32,260
But I want to try doing
it slightly differently.

93
00:04:36,130 --> 00:04:40,090
I'm going to give each
of you three cards.

94
00:04:40,090 --> 00:04:43,070
These are the large currents.

95
00:04:43,070 --> 00:04:45,784
Medium.

96
00:04:45,784 --> 00:04:47,700
Can people see this from
the back, by the way?

97
00:04:47,700 --> 00:04:51,640
The letters on the card?

98
00:04:51,640 --> 00:04:54,300
Small.

99
00:04:54,300 --> 00:04:56,580
So this is what's
going to happen.

100
00:04:56,580 --> 00:04:58,780
I'm going to pull
something out from here,

101
00:04:58,780 --> 00:05:00,770
and you all are going
to all look at it.

102
00:05:00,770 --> 00:05:03,844
And you are going to
figure out whether that

103
00:05:03,844 --> 00:05:06,010
is going to be small, medium,
large without actually

104
00:05:06,010 --> 00:05:07,350
discussing anything.

105
00:05:07,350 --> 00:05:07,850
All right.

106
00:05:07,850 --> 00:05:14,050
So you keep the cards hidden,
and only you can see it.

107
00:05:14,050 --> 00:05:17,760
And then when I ask you to
reveal it, show it all at once.

108
00:05:17,760 --> 00:05:19,740
Show me what you've picked.

109
00:05:19,740 --> 00:05:20,265
All right.

110
00:05:20,265 --> 00:05:22,515
I'm not going to tell you
what's small, what's medium,

111
00:05:22,515 --> 00:05:23,560
or what's large.

112
00:05:23,560 --> 00:05:26,410
I want you to tell me what's
small, medium, and large.

113
00:05:26,410 --> 00:05:26,910
All right.

114
00:05:26,910 --> 00:05:31,400
So everyone clear
on how this works?

115
00:05:31,400 --> 00:05:31,900
OK.

116
00:05:34,830 --> 00:05:37,970
Don't show it to anyone yet.

117
00:05:37,970 --> 00:05:40,780
Make sure everyone's picked.

118
00:05:40,780 --> 00:05:41,280
Yes?

119
00:05:41,280 --> 00:05:42,196
AUDIENCE: [INAUDIBLE].

120
00:05:44,627 --> 00:05:45,990
PROFESSOR: Good question.

121
00:05:45,990 --> 00:05:48,130
Hang on to that.

122
00:05:48,130 --> 00:05:50,080
Is this a small,
medium, or large feature

123
00:05:50,080 --> 00:05:53,200
with no frame of reference?

124
00:05:53,200 --> 00:05:54,220
So everyone's got one?

125
00:05:54,220 --> 00:05:55,860
Show it to me.

126
00:05:55,860 --> 00:05:57,030
Medium, medium, medium.

127
00:05:57,030 --> 00:05:57,530
All right.

128
00:05:57,530 --> 00:06:00,200
I'm going to put this here.

129
00:06:00,200 --> 00:06:02,260
Next one.

130
00:06:02,260 --> 00:06:04,581
Can everyone see this?

131
00:06:04,581 --> 00:06:05,080
All right.

132
00:06:07,600 --> 00:06:08,650
Everyone's picked one?

133
00:06:08,650 --> 00:06:10,170
Show it.

134
00:06:10,170 --> 00:06:11,180
Medium, small, small.

135
00:06:11,180 --> 00:06:11,680
OK.

136
00:06:11,680 --> 00:06:12,615
Why is this a medium?

137
00:06:12,615 --> 00:06:14,346
AUDIENCE: Looks similar.

138
00:06:14,346 --> 00:06:16,486
PROFESSOR: It looks similar.

139
00:06:16,486 --> 00:06:16,985
All right.

140
00:06:16,985 --> 00:06:17,901
AUDIENCE: [INAUDIBLE].

141
00:06:20,682 --> 00:06:21,830
PROFESSOR: OK.

142
00:06:21,830 --> 00:06:23,372
The other one does
have a hole in it.

143
00:06:23,372 --> 00:06:24,330
If you haven't seen it.

144
00:06:24,330 --> 00:06:24,950
OK.

145
00:06:24,950 --> 00:06:28,480
I'm going to put this
one aside for now.

146
00:06:28,480 --> 00:06:30,090
This one.

147
00:06:30,090 --> 00:06:30,645
It is red.

148
00:06:35,140 --> 00:06:38,140
All right.

149
00:06:38,140 --> 00:06:40,080
Still being picked.

150
00:06:40,080 --> 00:06:41,030
Small, small, small.

151
00:06:41,030 --> 00:06:41,529
OK.

152
00:06:41,529 --> 00:06:43,110
So this is unequivocally small.

153
00:06:43,110 --> 00:06:47,460
And this piece.

154
00:06:47,460 --> 00:06:50,460
This one also has a color in it.

155
00:06:50,460 --> 00:06:50,960
All right.

156
00:06:50,960 --> 00:06:52,490
Show it to me.

157
00:06:52,490 --> 00:06:53,010
Large.

158
00:06:53,010 --> 00:06:54,120
OK.

159
00:06:54,120 --> 00:06:58,020
Going back to this
one, what do you think?

160
00:07:03,790 --> 00:07:07,130
Everyone show me
what you're thinking.

161
00:07:07,130 --> 00:07:08,800
Everyone thinks
that now is small.

162
00:07:08,800 --> 00:07:09,610
OK.

163
00:07:09,610 --> 00:07:10,420
All right.

164
00:07:10,420 --> 00:07:12,400
So, don't go back yet.

165
00:07:12,400 --> 00:07:16,450
But I want to say thank you very
much to all of our volunteers.

166
00:07:16,450 --> 00:07:19,570
Why did I just make you
all go through all of that?

167
00:07:19,570 --> 00:07:22,060
That seems like a very,
very inefficient way

168
00:07:22,060 --> 00:07:24,784
of sorting out features.

169
00:07:24,784 --> 00:07:26,450
Like if I just gave
you this entire box,

170
00:07:26,450 --> 00:07:27,914
this is what I
want you to do now.

171
00:07:27,914 --> 00:07:29,830
Sort this whole box into
small, medium, large.

172
00:07:29,830 --> 00:07:30,840
All three of you together.

173
00:07:30,840 --> 00:07:31,881
You don't need the cards.

174
00:07:31,881 --> 00:07:34,245
Go for it.

175
00:07:34,245 --> 00:07:35,161
AUDIENCE: [INAUDIBLE].

176
00:08:20,372 --> 00:08:22,170
PROFESSOR: OK.

177
00:08:22,170 --> 00:08:23,070
Thank you very much.

178
00:08:26,997 --> 00:08:29,330
If you can just hang out here,
just a little bit longer,

179
00:08:29,330 --> 00:08:31,120
that will be great.

180
00:08:31,120 --> 00:08:34,700
Now that is probably a fairly
good analog of how most of you

181
00:08:34,700 --> 00:08:38,380
figured out small, medium,
and large on Wednesday.

182
00:08:38,380 --> 00:08:41,270
Which was you just compared
features next to each other.

183
00:08:41,270 --> 00:08:43,240
Figured out which one's
seen on the larger end.

184
00:08:43,240 --> 00:08:45,190
Which ones was on the small end.

185
00:08:45,190 --> 00:08:49,140
And just kind of
put things in place.

186
00:08:49,140 --> 00:08:51,220
But there was some
discussion going on.

187
00:08:51,220 --> 00:08:51,867
Is this small?

188
00:08:51,867 --> 00:08:52,450
Is this large?

189
00:08:52,450 --> 00:08:55,790
It's just like do
two of these put

190
00:08:55,790 --> 00:09:00,070
together make one
medium, for instance?

191
00:09:00,070 --> 00:09:04,940
Now think about the first
method of first choosing

192
00:09:04,940 --> 00:09:07,080
whether this was small,
medium, large and revealing

193
00:09:07,080 --> 00:09:11,400
it, was that I forced you
to actually voice out why

194
00:09:11,400 --> 00:09:13,380
you thought that was different.

195
00:09:13,380 --> 00:09:14,630
I believe you picked a medium.

196
00:09:14,630 --> 00:09:17,090
And the others picked a small.

197
00:09:17,090 --> 00:09:20,580
For a lot of these other pieces,
you didn't voice anything out.

198
00:09:20,580 --> 00:09:23,070
And one of the reasons why
we can do this so quickly,

199
00:09:23,070 --> 00:09:24,710
is because human
beings are actually

200
00:09:24,710 --> 00:09:29,570
pretty good at reasoning
about spatial volume.

201
00:09:29,570 --> 00:09:33,320
You're pretty good
at-- and being at MIT,

202
00:09:33,320 --> 00:09:39,310
you also understand geometry,
3D geometry, in a sense

203
00:09:39,310 --> 00:09:40,180
pretty well.

204
00:09:40,180 --> 00:09:44,220
So you can make these spatial
reasonings pretty well.

205
00:09:44,220 --> 00:09:47,090
But when it comes to things
like time and complexity,

206
00:09:47,090 --> 00:09:49,807
human beings tend to
have a tougher problem.

207
00:09:49,807 --> 00:09:51,390
So I'm going to say,
for instance, I'm

208
00:09:51,390 --> 00:09:54,740
going to give you three blocks.

209
00:09:54,740 --> 00:09:59,480
This represents for you,
seven hours of work.

210
00:09:59,480 --> 00:10:00,690
OK?

211
00:10:00,690 --> 00:10:03,480
This represents for
you, six hours of work.

212
00:10:03,480 --> 00:10:06,790
This represents eight
hours of work for you.

213
00:10:06,790 --> 00:10:09,380
All right?

214
00:10:09,380 --> 00:10:15,185
So you know you've got
16 hours of work to do.

215
00:10:17,670 --> 00:10:19,670
Pick out features that
you're going to implement

216
00:10:19,670 --> 00:10:20,461
in your next print.

217
00:10:20,461 --> 00:10:24,190
AUDIENCE: So this is how
much time I have in my life.

218
00:10:24,190 --> 00:10:26,230
PROFESSOR: That is
how much time that you

219
00:10:26,230 --> 00:10:28,240
spent on the last feature.

220
00:10:28,240 --> 00:10:30,877
If all three of you worked
on identical features--

221
00:10:30,877 --> 00:10:32,460
AUDIENCE: OK, so
this is already done.

222
00:10:32,460 --> 00:10:32,905
This is already done.

223
00:10:32,905 --> 00:10:33,700
PROFESSOR: Yeah.

224
00:10:33,700 --> 00:10:34,250
This is done.

225
00:10:34,250 --> 00:10:35,595
This is a known value.

226
00:10:39,800 --> 00:10:41,050
You spent seven hours on that.

227
00:10:43,610 --> 00:10:44,920
You have 16 hours.

228
00:10:44,920 --> 00:10:48,864
AUDIENCE: So I spent
seven hours on this.

229
00:10:48,864 --> 00:10:50,836
And then there are the
two small triangles.

230
00:10:55,766 --> 00:10:58,190
AUDIENCE: [INAUDIBLE], right?

231
00:10:58,190 --> 00:11:00,065
PROFESSOR: The first
one is just a reference.

232
00:11:10,932 --> 00:11:11,890
And the little feature.

233
00:11:11,890 --> 00:11:12,390
OK.

234
00:11:12,390 --> 00:11:13,510
All right.

235
00:11:13,510 --> 00:11:15,220
All right.

236
00:11:15,220 --> 00:11:18,280
What did the cube
represent to you again?

237
00:11:18,280 --> 00:11:19,290
Seven hours of work.

238
00:11:19,290 --> 00:11:20,160
And you picked?

239
00:11:23,730 --> 00:11:26,100
And you think that that's
a reasonable amount of work

240
00:11:26,100 --> 00:11:27,215
to get done in 16 hours?

241
00:11:29,762 --> 00:11:30,720
Not including that one.

242
00:11:30,720 --> 00:11:35,340
So this is about 16 hours of--
assuming volume equals time.

243
00:11:35,340 --> 00:11:39,100
Sorry, volume equals
effort, actually.

244
00:11:39,100 --> 00:11:40,190
All right.

245
00:11:40,190 --> 00:11:40,774
And over here?

246
00:11:40,774 --> 00:11:43,106
AUDIENCE: How long did it
take me to do the other block?

247
00:11:43,106 --> 00:11:44,000
AUDIENCE: Six hours.

248
00:11:44,000 --> 00:11:44,190
AUDIENCE: Oh.

249
00:11:44,190 --> 00:11:45,734
I guess I could have
done a little bit more.

250
00:11:45,734 --> 00:11:46,485
Well, that's fine.

251
00:11:46,485 --> 00:11:47,942
I'll just do
[INAUDIBLE] like them.

252
00:11:47,942 --> 00:11:50,027
And then if I have leftover
time, I'll do more.

253
00:11:50,027 --> 00:11:52,652
PROFESSOR: If you went for more,
what would you try to pick on?

254
00:11:52,652 --> 00:11:54,312
AUDIENCE: I guess
maybe this one.

255
00:11:54,312 --> 00:11:55,888
It's a little bit
more than perhaps I

256
00:11:55,888 --> 00:11:58,096
could do in exactly 16, but
it wouldn't hurt to touch it.

257
00:11:58,096 --> 00:12:00,400
PROFESSOR: It's the smallest
thing that you can find.

258
00:12:00,400 --> 00:12:00,910
OK.

259
00:12:00,910 --> 00:12:01,710
All right.

260
00:12:01,710 --> 00:12:02,270
And for you?

261
00:12:02,270 --> 00:12:04,740
AUDIENCE: This exactly
fills my estimate.

262
00:12:04,740 --> 00:12:07,007
But realistically, I'd
probably go with this.

263
00:12:10,950 --> 00:12:15,600
PROFESSOR: So you're using
kind of programmer patterning.

264
00:12:15,600 --> 00:12:16,430
You got a question?

265
00:12:16,430 --> 00:12:22,210
AUDIENCE: Sometimes you do not
[INAUDIBLE] the small things,

266
00:12:22,210 --> 00:12:25,150
for example, adding balls
to your game set is small.

267
00:12:25,150 --> 00:12:27,600
But bringing out
the framework itself

268
00:12:27,600 --> 00:12:29,312
is a large test
that must be done

269
00:12:29,312 --> 00:12:31,520
before you have the choice
of choosing smaller tasks.

270
00:12:31,520 --> 00:12:32,480
PROFESSOR: That's true.

271
00:12:32,480 --> 00:12:35,230
That's true.

272
00:12:35,230 --> 00:12:38,970
I am not indicating
priority in here.

273
00:12:38,970 --> 00:12:41,360
I'm assuming that you're
picking up high priority tasks.

274
00:12:41,360 --> 00:12:43,110
The next thing that
needs to be done.

275
00:12:43,110 --> 00:12:43,950
Thank you very much.

276
00:12:43,950 --> 00:12:46,535
And you may have a seat.

277
00:12:46,535 --> 00:12:47,660
Big hand to our volunteers.

278
00:12:47,660 --> 00:12:50,552
[APPLAUSE]

279
00:12:52,000 --> 00:12:54,760
I'll be going back to
this example shortly,

280
00:12:54,760 --> 00:12:57,140
as soon as I get my
presentation going on.

281
00:13:03,620 --> 00:13:05,750
I want you to hang
onto these examples

282
00:13:05,750 --> 00:13:10,190
because I'm going to come
back to them during the talk.

283
00:13:10,190 --> 00:13:13,980
On Wednesday-- and what I first
asked our volunteers down here

284
00:13:13,980 --> 00:13:19,230
to do was to do a small, medium,
large, extra large feature

285
00:13:19,230 --> 00:13:21,050
sizing, basically.

286
00:13:21,050 --> 00:13:23,970
The reason why we use
these broad categories

287
00:13:23,970 --> 00:13:26,740
is because actually
it can be pretty fast.

288
00:13:26,740 --> 00:13:30,320
And on Wednesday a lot of
you did it pretty quickly.

289
00:13:30,320 --> 00:13:31,850
However, what I
noticed on Wednesday

290
00:13:31,850 --> 00:13:35,740
was a lot of people weren't
actually discussing how big

291
00:13:35,740 --> 00:13:37,490
or how small these
features were.

292
00:13:37,490 --> 00:13:39,500
Like you all using your
own little metrics.

293
00:13:39,500 --> 00:13:41,430
So that was a good question.

294
00:13:41,430 --> 00:13:45,280
Small, medium, or large to
what frame of reference?

295
00:13:45,280 --> 00:13:48,280
And everybody had their
own frames of reference.

296
00:13:48,280 --> 00:13:52,170
When I forced people
to make the assessment

297
00:13:52,170 --> 00:13:54,950
and then declare it in
front of the entire team,

298
00:13:54,950 --> 00:13:58,160
and then discuss if they
disagreed with the entire team,

299
00:13:58,160 --> 00:14:01,540
then assumptions
started coming out.

300
00:14:01,540 --> 00:14:04,740
You had to vocalize why you
thought a certain feature was

301
00:14:04,740 --> 00:14:06,830
a bigger or smaller.

302
00:14:06,830 --> 00:14:11,710
You could adjust your
assessment after the discussion.

303
00:14:11,710 --> 00:14:14,620
But it very, very important
to get that discussion out

304
00:14:14,620 --> 00:14:16,530
to everybody.

305
00:14:16,530 --> 00:14:20,520
So as long as you're discussing
with your entire team,

306
00:14:20,520 --> 00:14:23,470
I don't really care what method
you use to split things up

307
00:14:23,470 --> 00:14:26,060
into small, medium, and large.

308
00:14:26,060 --> 00:14:28,060
But you need to be
discussing as an entire team.

309
00:14:28,060 --> 00:14:29,980
In fact, every single
member of the team

310
00:14:29,980 --> 00:14:32,130
should be in on the
discussion, because somebody

311
00:14:32,130 --> 00:14:35,440
in charge of sound design,
or somebody in charge of art,

312
00:14:35,440 --> 00:14:37,800
or in charge of art of
the code architecture

313
00:14:37,800 --> 00:14:40,850
would have very different
perspective on any given future

314
00:14:40,850 --> 00:14:42,100
from other people on the team.

315
00:14:42,100 --> 00:14:44,760
And you want all of those
perspectives in the same time.

316
00:14:44,760 --> 00:14:46,590
There's oh!

317
00:14:46,590 --> 00:14:47,699
Playing a sound effect.

318
00:14:47,699 --> 00:14:49,990
That's going to take no time
at all, because we already

319
00:14:49,990 --> 00:14:52,960
have sound effects
in our game, and we

320
00:14:52,960 --> 00:14:54,170
know how that code works.

321
00:14:54,170 --> 00:14:55,230
That's what a programmer thinks.

322
00:14:55,230 --> 00:14:56,640
The sound designer
says wait a minute.

323
00:14:56,640 --> 00:14:58,240
I need to create
that sound effect.

324
00:14:58,240 --> 00:15:00,780
I don't even know what this
is going to sound like yet.

325
00:15:00,780 --> 00:15:01,710
I have no idea.

326
00:15:01,710 --> 00:15:04,570
And that's going to be larger
feature from my point of view.

327
00:15:04,570 --> 00:15:06,640
And you want that
discussion to come out.

328
00:15:06,640 --> 00:15:08,960
So each row should try
to lend its perspective.

329
00:15:08,960 --> 00:15:10,670
And is very important to listen.

330
00:15:10,670 --> 00:15:13,992
The reason why I forced everyone
to do this-- the volunteers

331
00:15:13,992 --> 00:15:15,450
to do this-- right
at the beginning

332
00:15:15,450 --> 00:15:18,620
was because it was a
very turn-based method

333
00:15:18,620 --> 00:15:21,390
of getting that discussion out.

334
00:15:21,390 --> 00:15:25,380
I had to force everybody
to listen to everybody.

335
00:15:25,380 --> 00:15:27,590
And something that I didn't
ask our volunteers to do

336
00:15:27,590 --> 00:15:32,702
was to offer
alternate solutions.

337
00:15:32,702 --> 00:15:35,160
However, they kind of did that
automatically by themselves.

338
00:15:35,160 --> 00:15:38,190
When I just left them
to their own devices,

339
00:15:38,190 --> 00:15:40,480
I said, sort these
out into features.

340
00:15:40,480 --> 00:15:42,450
They started
discussing well, this

341
00:15:42,450 --> 00:15:45,340
is how I look at a problem, this
is how you look at a problem.

342
00:15:45,340 --> 00:15:50,046
And they quickly came to
some sort of consensus.

343
00:15:50,046 --> 00:15:51,920
Of course, something I
mentioned on Wednesday

344
00:15:51,920 --> 00:15:54,169
was if you've got a really,
really huge feature that's

345
00:15:54,169 --> 00:15:55,640
kind of hard to figure out.

346
00:15:55,640 --> 00:15:58,470
It doesn't really fit neatly
into any of these boxes.

347
00:15:58,470 --> 00:16:00,780
Break it up into
smaller features.

348
00:16:00,780 --> 00:16:01,810
You want to converge.

349
00:16:01,810 --> 00:16:06,619
You want to converge
down in to a consensus.

350
00:16:06,619 --> 00:16:08,660
But there are right ways
and there are wrong ways

351
00:16:08,660 --> 00:16:11,336
to go about that.

352
00:16:11,336 --> 00:16:12,835
Every time you have
that discussion,

353
00:16:12,835 --> 00:16:16,580
you're getting new information
into the team about how

354
00:16:16,580 --> 00:16:17,960
complex a certain problem is.

355
00:16:17,960 --> 00:16:20,150
Maybe sometimes
through a discussion,

356
00:16:20,150 --> 00:16:22,700
you discover a certain
problem is easier--

357
00:16:22,700 --> 00:16:25,190
a certain feature is easier
to implement than you

358
00:16:25,190 --> 00:16:26,800
had originally expected.

359
00:16:26,800 --> 00:16:28,160
And then you redraw a C.

360
00:16:28,160 --> 00:16:31,096
Other people's estimates is
actually new information.

361
00:16:31,096 --> 00:16:32,720
And that's actually
what happened here.

362
00:16:32,720 --> 00:16:40,320
There was small, small medium,
and the people on the volunteer

363
00:16:40,320 --> 00:16:46,785
team figured out how other
people were seeing the problem.

364
00:16:46,785 --> 00:16:48,410
Here's something
that's very important.

365
00:16:48,410 --> 00:16:49,680
Don't negotiate.

366
00:16:49,680 --> 00:16:53,452
Don't say I think it's
small, you think it's small,

367
00:16:53,452 --> 00:16:54,910
most of the team
thinks it's small,

368
00:16:54,910 --> 00:16:56,600
somebody thinks it's medium.

369
00:16:56,600 --> 00:16:59,700
Just change your
estimate down to a small.

370
00:16:59,700 --> 00:17:01,210
I suppose it's kind of adamant.

371
00:17:01,210 --> 00:17:03,870
No, I think this is a bigger
problem than you think it is.

372
00:17:03,870 --> 00:17:06,630
Don't try to negotiate
with that person

373
00:17:06,630 --> 00:17:10,040
because that person has
a valid point of view,

374
00:17:10,040 --> 00:17:12,380
and this starts to
focus a discussion

375
00:17:12,380 --> 00:17:16,069
on changing the person's mind,
not focusing on the feature.

376
00:17:16,069 --> 00:17:18,540
You actually want
to figure out how

377
00:17:18,540 --> 00:17:20,929
complex a certain feature is.

378
00:17:20,929 --> 00:17:22,720
For the same reason,
don't take an average.

379
00:17:22,720 --> 00:17:23,910
Someone thinks it's
a small feature,

380
00:17:23,910 --> 00:17:25,050
someone think that's
a large feature.

381
00:17:25,050 --> 00:17:26,859
That doesn't make
it a medium feature.

382
00:17:26,859 --> 00:17:29,600
That means that your team has
no idea what this feature is

383
00:17:29,600 --> 00:17:34,010
because you aren't in agreement
with how complex something is.

384
00:17:34,010 --> 00:17:37,330
So what I did--
does anyone remember

385
00:17:37,330 --> 00:17:40,140
what I did when-- let me see.

386
00:17:40,140 --> 00:17:42,590
Which feature was the
weird one that people

387
00:17:42,590 --> 00:17:44,161
were kind of hung up on?

388
00:17:44,161 --> 00:17:45,160
I think it was this one.

389
00:17:47,545 --> 00:17:49,920
When we got to this one, and
there was some disagreement,

390
00:17:49,920 --> 00:17:51,211
can anyone remember what I did?

391
00:17:53,950 --> 00:17:54,450
Yeah.

392
00:17:54,450 --> 00:17:55,990
I just put it aside, right?

393
00:17:55,990 --> 00:17:58,850
I actually gave it away.

394
00:17:58,850 --> 00:18:01,700
It is a very, very easy to
get into a long drawn out

395
00:18:01,700 --> 00:18:04,225
discussion about how large
or how small a feature is.

396
00:18:04,225 --> 00:18:06,500
It's usually much more
clearer if you sort of

397
00:18:06,500 --> 00:18:09,614
tackle the easy ones first,
and then come back to the ones

398
00:18:09,614 --> 00:18:10,530
that you disagreed on.

399
00:18:10,530 --> 00:18:12,270
But you remember
that you disagreed,

400
00:18:12,270 --> 00:18:16,170
and you got new information in
the process of talking it out.

401
00:18:16,170 --> 00:18:18,270
So that's a role for
the Scrum Master.

402
00:18:18,270 --> 00:18:21,640
The Scrum Master says we don't
want this feature estimation

403
00:18:21,640 --> 00:18:23,579
process to take too
long, so we're just

404
00:18:23,579 --> 00:18:25,370
going to put that
feature aside first, look

405
00:18:25,370 --> 00:18:28,870
at the other features, do
the estimation on that,

406
00:18:28,870 --> 00:18:30,460
and then review it later.

407
00:18:30,460 --> 00:18:32,440
But a Scrum Master
does not decide

408
00:18:32,440 --> 00:18:33,830
what size that feature is.

409
00:18:33,830 --> 00:18:35,700
The whole team has to
come to a consensus.

410
00:18:35,700 --> 00:18:37,770
You want to converge
on a single estimate.

411
00:18:40,700 --> 00:18:44,850
So if you put together
your product backlog,

412
00:18:44,850 --> 00:18:48,230
and you never really discussed
with the rest of your team

413
00:18:48,230 --> 00:18:51,214
what those size estimates
were, then that's

414
00:18:51,214 --> 00:18:53,130
something that you're
going to do later today.

415
00:18:53,130 --> 00:18:54,766
Before the end of
today I want you

416
00:18:54,766 --> 00:18:56,890
to have a discussion about
whether these things are

417
00:18:56,890 --> 00:19:00,890
actually small,
medium, or large.

418
00:19:00,890 --> 00:19:05,060
And the reason is
because estimation--

419
00:19:05,060 --> 00:19:08,310
it is not just a process of
just putting down numbers

420
00:19:08,310 --> 00:19:09,720
or letters on a spreadsheet.

421
00:19:09,720 --> 00:19:12,637
There is a goal for the
process of estimation.

422
00:19:12,637 --> 00:19:13,220
And it's this.

423
00:19:13,220 --> 00:19:16,877
It's to get a clear enough view
of the reality of your project

424
00:19:16,877 --> 00:19:18,960
so that you can make
informed decisions to control

425
00:19:18,960 --> 00:19:22,160
your project in order
to hit the targets.

426
00:19:22,160 --> 00:19:24,100
Now what's a target?

427
00:19:24,100 --> 00:19:26,500
A target is a goal that
you wish would happen.

428
00:19:26,500 --> 00:19:31,300
It's your fondest desires
is to get this project done.

429
00:19:31,300 --> 00:19:35,320
Entire product backlog of
all features into your game

430
00:19:35,320 --> 00:19:37,080
before the deadline.

431
00:19:37,080 --> 00:19:38,790
That's a target, right?

432
00:19:38,790 --> 00:19:41,390
Maybe your target's a
little bit closer term.

433
00:19:41,390 --> 00:19:42,860
What can you get
done by this week?

434
00:19:42,860 --> 00:19:44,510
What can you get
done by this spread?

435
00:19:44,510 --> 00:19:47,270
It's still a target, and
something that you want to hit.

436
00:19:47,270 --> 00:19:52,460
But you can't base
all of your decisions

437
00:19:52,460 --> 00:19:54,110
on your fondest desires.

438
00:19:54,110 --> 00:19:56,560
You have to base it on
what your team's actually

439
00:19:56,560 --> 00:19:58,070
capable of doing.

440
00:19:58,070 --> 00:20:00,460
An estimation is a
process of actually trying

441
00:20:00,460 --> 00:20:03,040
to understand what your
team is capable of doing.

442
00:20:03,040 --> 00:20:12,840
Not whether what you want to
happen, but what can happen.

443
00:20:12,840 --> 00:20:16,290
So what are you estimating?

444
00:20:16,290 --> 00:20:17,880
This is where you
are at right now.

445
00:20:17,880 --> 00:20:21,330
You have a product
backlog, and you have size.

446
00:20:21,330 --> 00:20:25,490
You have feature size that
is going to get broken down

447
00:20:25,490 --> 00:20:28,350
into a bunch of tasks.

448
00:20:28,350 --> 00:20:30,230
Each feature is going
to be broken down

449
00:20:30,230 --> 00:20:33,240
into individual things that
individual people can do.

450
00:20:33,240 --> 00:20:35,580
Maybe a certain
feature like jump

451
00:20:35,580 --> 00:20:38,110
involves art, involves
code, involves sound,

452
00:20:38,110 --> 00:20:40,736
involves debugging,
involves integration.

453
00:20:40,736 --> 00:20:42,110
All of these are
individual tasks

454
00:20:42,110 --> 00:20:45,050
that might be carried
out by different people.

455
00:20:45,050 --> 00:20:47,706
So what you're really
doing in the second step

456
00:20:47,706 --> 00:20:50,080
is to figure out how much time
something's going to take.

457
00:20:50,080 --> 00:20:54,470
Remember what Drew said on
the very first day of class.

458
00:20:54,470 --> 00:20:56,850
It's not so much how
hard something is,

459
00:20:56,850 --> 00:20:59,709
how hard a feature is, but
how long it's going to take.

460
00:20:59,709 --> 00:21:01,250
And what you want
to do is figure out

461
00:21:01,250 --> 00:21:03,920
how long it's going to take.

462
00:21:03,920 --> 00:21:06,785
Now that's a process of arriving
at a number of how many hours

463
00:21:06,785 --> 00:21:08,410
this is really going
to take, and is it

464
00:21:08,410 --> 00:21:10,020
going to fit within
the amount of time

465
00:21:10,020 --> 00:21:15,350
that we've actually
given the team?

466
00:21:15,350 --> 00:21:17,730
And you need to translate
it first from size

467
00:21:17,730 --> 00:21:21,460
into effort, which is like,
total amount of effort that's

468
00:21:21,460 --> 00:21:23,510
going to be used to
tackle the problem.

469
00:21:23,510 --> 00:21:25,780
Split it up among the
people who are actually

470
00:21:25,780 --> 00:21:28,390
going to work on it,
and then each person

471
00:21:28,390 --> 00:21:33,170
has an individual
amount of efficiency.

472
00:21:33,170 --> 00:21:38,410
So for instance, I gave
exactly the same cube

473
00:21:38,410 --> 00:21:39,550
to all three volunteers.

474
00:21:39,550 --> 00:21:41,560
But I told them this
meant different things

475
00:21:41,560 --> 00:21:43,070
to each one of you.

476
00:21:43,070 --> 00:21:49,360
And when they picked off
tasks off the product backlog,

477
00:21:49,360 --> 00:21:52,200
they picked it based on
their own personal metric.

478
00:21:52,200 --> 00:21:53,870
That's what you've
got to do too.

479
00:21:53,870 --> 00:21:56,660
When you decide that you're
going to take on a task,

480
00:21:56,660 --> 00:21:58,850
you have to assess it
based on your own ability

481
00:21:58,850 --> 00:22:00,300
to actually execute on a task.

482
00:22:00,300 --> 00:22:02,430
Say it's an AI
problem, and you're not

483
00:22:02,430 --> 00:22:04,050
very well versed in AI.

484
00:22:04,050 --> 00:22:08,430
It's going to take you longer
than somebody that has done

485
00:22:08,430 --> 00:22:11,037
artificial intelligence before.

486
00:22:11,037 --> 00:22:12,870
But that's OK because
maybe the person who's

487
00:22:12,870 --> 00:22:15,130
doing artificial
intelligence is busy

488
00:22:15,130 --> 00:22:17,810
trying to solve or harrier
problem establishing the base

489
00:22:17,810 --> 00:22:19,917
framework of code.

490
00:22:19,917 --> 00:22:21,250
And that needs to be done first.

491
00:22:21,250 --> 00:22:22,730
And that needs to
be done sooner.

492
00:22:22,730 --> 00:22:24,150
So that person is busy.

493
00:22:24,150 --> 00:22:27,390
You can start working
on certain features,

494
00:22:27,390 --> 00:22:30,157
even though you may not be
the best person to do it.

495
00:22:30,157 --> 00:22:32,240
That's fine as long as I
make an honest assessment

496
00:22:32,240 --> 00:22:36,570
of how long it's going
to take you to do it.

497
00:22:36,570 --> 00:22:39,030
Size estimates are pretty easy.

498
00:22:39,030 --> 00:22:40,830
You're just sorting
things into buckets.

499
00:22:40,830 --> 00:22:42,630
Very large buckets.

500
00:22:42,630 --> 00:22:46,250
Time estimates are very much
like hitting a moving target.

501
00:22:46,250 --> 00:22:49,080
As you start to
make estimates, you

502
00:22:49,080 --> 00:22:51,000
are going to discover
that many of those

503
00:22:51,000 --> 00:22:53,401
estimates just flat out wrong.

504
00:22:53,401 --> 00:22:54,900
You're going to say
oh, that's going

505
00:22:54,900 --> 00:22:56,700
to take me four hours to do.

506
00:22:56,700 --> 00:22:58,980
And it takes you
four days to do.

507
00:22:58,980 --> 00:23:01,970
And you're going to have to
communicate that to your team.

508
00:23:04,980 --> 00:23:08,920
Giving an estimate is not the
same thing as making a plan.

509
00:23:08,920 --> 00:23:11,494
It is part of the
same process, but I

510
00:23:11,494 --> 00:23:12,910
want to be very
clear about what's

511
00:23:12,910 --> 00:23:15,390
the difference between
estimation and planning.

512
00:23:15,390 --> 00:23:17,590
Say somebody on your team
asks you for an estimate.

513
00:23:20,900 --> 00:23:22,670
[INAUDIBLE] alarm
bells going off

514
00:23:22,670 --> 00:23:25,320
when he says, how long is
this going to take you to do?

515
00:23:25,320 --> 00:23:28,660
Everyone starts to get worried
because you're not quite sure

516
00:23:28,660 --> 00:23:32,380
whether they're actually trying
to ask you for how difficult is

517
00:23:32,380 --> 00:23:34,380
something, and how
much time do you think

518
00:23:34,380 --> 00:23:35,890
it's really going to take.

519
00:23:35,890 --> 00:23:41,090
Or are they asking you, can
you get it done by Monday?

520
00:23:41,090 --> 00:23:44,220
That's kind of like
the hidden question

521
00:23:44,220 --> 00:23:47,910
that they're not asking, but
they think that they're asking.

522
00:23:47,910 --> 00:23:51,150
So you need to be very
clear when you respond,

523
00:23:51,150 --> 00:23:53,320
whether you're giving
an estimate or a plan.

524
00:23:53,320 --> 00:23:55,610
You plan to reach your targets.

525
00:23:55,610 --> 00:23:58,170
Obviously, none of
you-- I hope none of you

526
00:23:58,170 --> 00:24:00,820
are planning to not
hit your targets.

527
00:24:00,820 --> 00:24:03,320
I plan to get this done one
week after the deadline.

528
00:24:03,320 --> 00:24:04,092
(WHISPERS) No.

529
00:24:07,630 --> 00:24:11,140
But once you've made your
plan-- here's our entire product

530
00:24:11,140 --> 00:24:12,986
backlog, and we think
it looks reasonable,

531
00:24:12,986 --> 00:24:14,360
and we think that
it can actually

532
00:24:14,360 --> 00:24:17,769
be done by the
deadline-- you need

533
00:24:17,769 --> 00:24:20,435
to start making estimates to see
whether that plan is realistic.

534
00:24:23,040 --> 00:24:27,910
You can say, yeah, I think
that's a reasonable estimate

535
00:24:27,910 --> 00:24:30,810
when you think that
assessment is accurate.

536
00:24:30,810 --> 00:24:33,050
I've done something
similar before,

537
00:24:33,050 --> 00:24:34,950
so I figured that
this is something

538
00:24:34,950 --> 00:24:38,090
that we can get done
before the end of the week.

539
00:24:38,090 --> 00:24:40,680
You can commit to that estimate.

540
00:24:40,680 --> 00:24:43,610
But you haven't
committed to the plan.

541
00:24:43,610 --> 00:24:46,260
You haven't said, I'm going
to take responsibility

542
00:24:46,260 --> 00:24:48,430
for getting it done by
the end of the week.

543
00:24:48,430 --> 00:24:50,740
That's a very different thing.

544
00:24:50,740 --> 00:24:52,470
When you accept
the task and say,

545
00:24:52,470 --> 00:24:54,990
all right, put my name
on that spreadsheet,

546
00:24:54,990 --> 00:24:59,461
and I have decided
that I think I'm

547
00:24:59,461 --> 00:25:01,460
going to be able to get
this done in four hours,

548
00:25:01,460 --> 00:25:04,080
so I'm now committing
to this plan.

549
00:25:04,080 --> 00:25:07,790
Of course then everything goes
wrong, and you re-estimate.

550
00:25:07,790 --> 00:25:10,070
You're allowed to
make re-estimations

551
00:25:10,070 --> 00:25:11,120
while you work on tasks.

552
00:25:11,120 --> 00:25:15,000
You have to because no
plan survives first contact

553
00:25:15,000 --> 00:25:18,610
with actual development.

554
00:25:18,610 --> 00:25:21,160
So here's a quick quiz.

555
00:25:21,160 --> 00:25:22,840
Here are four
statements that you

556
00:25:22,840 --> 00:25:26,380
might hear in the middle
of a team meeting.

557
00:25:26,380 --> 00:25:27,590
OK.

558
00:25:27,590 --> 00:25:31,630
I want you to tell me what
each one of these things are.

559
00:25:31,630 --> 00:25:34,990
I've already used
the words describing

560
00:25:34,990 --> 00:25:38,610
each one of these things
in my talk so far.

561
00:25:38,610 --> 00:25:40,130
It has to be done in two days.

562
00:25:40,130 --> 00:25:42,400
What is that?

563
00:25:42,400 --> 00:25:43,809
It's a deadline.

564
00:25:43,809 --> 00:25:45,350
I used another word
to describe that.

565
00:25:45,350 --> 00:25:47,610
It is a deadline.

566
00:25:47,610 --> 00:25:48,840
Is it a plan?

567
00:25:48,840 --> 00:25:50,830
It's a target.

568
00:25:50,830 --> 00:25:52,290
Someone.

569
00:25:52,290 --> 00:25:53,500
All right.

570
00:25:53,500 --> 00:25:55,150
So the next one.

571
00:25:55,150 --> 00:25:57,690
It'll take about
two days to do it.

572
00:25:57,690 --> 00:25:59,200
You're talking in
a team, you say,

573
00:25:59,200 --> 00:26:01,750
this feature looks like it'll
take about two days to do it.

574
00:26:04,260 --> 00:26:05,210
That's an estimate.

575
00:26:05,210 --> 00:26:06,930
That's right.

576
00:26:06,930 --> 00:26:08,610
I'll need two days to do it.

577
00:26:12,090 --> 00:26:13,070
That is a plan.

578
00:26:13,070 --> 00:26:16,270
That is a plan that you're
committing to, more accurately.

579
00:26:16,270 --> 00:26:19,350
It's like, I will take
two days to do it.

580
00:26:19,350 --> 00:26:21,360
You might take
three days to do it.

581
00:26:21,360 --> 00:26:24,760
You might be able to do it
faster than [INAUDIBLE].

582
00:26:24,760 --> 00:26:27,290
But I'll need two days to do it.

583
00:26:27,290 --> 00:26:33,170
And of course the last
one is, actual reality.

584
00:26:33,170 --> 00:26:35,260
It actually took
two days to do it.

585
00:26:35,260 --> 00:26:39,750
I mean, in reality it'd be like,
it took four days to do it.

586
00:26:39,750 --> 00:26:42,030
So I want you to
be very, very clear

587
00:26:42,030 --> 00:26:44,330
that when you're
communicating with your team,

588
00:26:44,330 --> 00:26:46,680
what you are trying to say.

589
00:26:46,680 --> 00:26:49,380
Are you giving estimations?

590
00:26:49,380 --> 00:26:51,410
Given all the information
that you know,

591
00:26:51,410 --> 00:26:53,510
this is how tough
something is going to take.

592
00:26:53,510 --> 00:26:55,920
And this is how long
it is going to take

593
00:26:55,920 --> 00:26:57,444
to get this feature working.

594
00:26:57,444 --> 00:26:59,110
Or are you making a
personal commitment,

595
00:26:59,110 --> 00:27:00,879
saying this is my
responsibility now?

596
00:27:00,879 --> 00:27:02,420
I'm going to get it
to you by Monday.

597
00:27:07,210 --> 00:27:10,190
Just a quick side
note, you've probably

598
00:27:10,190 --> 00:27:13,910
seen these two words come up in
numerous engineering classes.

599
00:27:13,910 --> 00:27:15,940
The difference between
accuracy and precision.

600
00:27:15,940 --> 00:27:17,065
Which one is more accurate?

601
00:27:21,692 --> 00:27:23,650
Raise your hand in the
direction that you think

602
00:27:23,650 --> 00:27:26,280
is more accurate.

603
00:27:26,280 --> 00:27:26,780
OK.

604
00:27:26,780 --> 00:27:29,490
That's actually-- OK.

605
00:27:29,490 --> 00:27:32,300
I think that's a
majority on this side.

606
00:27:32,300 --> 00:27:34,440
Which means that that
one is more precise.

607
00:27:34,440 --> 00:27:35,370
OK?

608
00:27:35,370 --> 00:27:37,260
So that's right.

609
00:27:37,260 --> 00:27:38,200
This is more accurate.

610
00:27:38,200 --> 00:27:40,366
It's closer to the target
that you're trying to hit.

611
00:27:40,366 --> 00:27:43,340
Even though it's kind of
like broadly spaced out.

612
00:27:43,340 --> 00:27:44,922
None of them actually
hit the target,

613
00:27:44,922 --> 00:27:46,380
but if you took
the average of all,

614
00:27:46,380 --> 00:27:51,080
then you get pretty
close to the center.

615
00:27:51,080 --> 00:27:52,800
That one's a really
nice tight grouping.

616
00:27:52,800 --> 00:27:57,050
Anyone here do pistol,
or archery, or rifle?

617
00:27:57,050 --> 00:28:01,350
So we always talk about
how tight the grouping

618
00:28:01,350 --> 00:28:03,570
is when you're shooting.

619
00:28:03,570 --> 00:28:04,750
That's very precise.

620
00:28:04,750 --> 00:28:11,690
That can be corrected by say,
fixing the sites on a pistol,

621
00:28:11,690 --> 00:28:13,080
or on a rifle.

622
00:28:13,080 --> 00:28:18,280
But for time estimates, this
is consistent underestimating.

623
00:28:18,280 --> 00:28:18,820
Right?

624
00:28:18,820 --> 00:28:20,600
It's like, yeah, it's going
to take me two days to do it.

625
00:28:20,600 --> 00:28:21,890
I'll get it done in two hours.

626
00:28:21,890 --> 00:28:24,500
Really, it took four
days and four hours.

627
00:28:24,500 --> 00:28:27,080
And you're always doing this.

628
00:28:27,080 --> 00:28:31,000
When it comes to estimation,
accuracy is more important then

629
00:28:31,000 --> 00:28:34,520
precision because you're going
to work on multiple tasks.

630
00:28:34,520 --> 00:28:39,590
And if your estimates are a
little bit off all the time,

631
00:28:39,590 --> 00:28:41,510
but sometimes you're
under, sometimes

632
00:28:41,510 --> 00:28:43,350
you're over, that
kind of averages out.

633
00:28:43,350 --> 00:28:49,010
Which means that you can still
make some effective plans.

634
00:28:49,010 --> 00:28:53,410
But if you are consistently
underestimating or consistently

635
00:28:53,410 --> 00:28:56,150
overestimating, you need
to figure that out quickly.

636
00:28:56,150 --> 00:28:59,500
You need to learn that about
yourself during this class

637
00:28:59,500 --> 00:29:02,002
so that you can start
to correct that.

638
00:29:02,002 --> 00:29:03,710
And if you can't figure
it out, hopefully

639
00:29:03,710 --> 00:29:06,510
somebody else on your team can
realize that your estimates are

640
00:29:06,510 --> 00:29:08,010
always off in a
certain direction

641
00:29:08,010 --> 00:29:10,960
and then adjust the
plan accordingly.

642
00:29:10,960 --> 00:29:12,960
It's also important to
know what the uncertainty

643
00:29:12,960 --> 00:29:15,050
of your estimates are.

644
00:29:15,050 --> 00:29:18,050
It's very valuable to know
how imprecise an estimate is.

645
00:29:18,050 --> 00:29:21,560
It's like, this could
be done in a week

646
00:29:21,560 --> 00:29:24,350
if I find someone else who's
implemented a feature just

647
00:29:24,350 --> 00:29:25,509
like the one that we want.

648
00:29:25,509 --> 00:29:27,800
If not, I'm going to have to
implement it from scratch,

649
00:29:27,800 --> 00:29:33,530
and it's going to take
four weeks to implement.

650
00:29:33,530 --> 00:29:36,420
I mean, that's a
fairly common scenario.

651
00:29:36,420 --> 00:29:40,290
So it's very valuable to know
how imprecise an estimate is.

652
00:29:40,290 --> 00:29:45,960
But while I welcome that
kind of discussion in a team,

653
00:29:45,960 --> 00:29:46,980
don't just give a range.

654
00:29:46,980 --> 00:29:48,560
Don't just say,
well that's going

655
00:29:48,560 --> 00:29:51,820
to take anywhere between
one week and four weeks.

656
00:29:51,820 --> 00:29:53,120
That's too wide a range.

657
00:29:53,120 --> 00:29:56,100
You can't establish
a plan on that.

658
00:29:56,100 --> 00:29:58,200
How many of you have
been in this situation?

659
00:29:58,200 --> 00:29:59,210
Two minutes remaining.

660
00:29:59,210 --> 00:30:01,330
And it just kind of sits there.

661
00:30:01,330 --> 00:30:03,356
And it's really
four minutes later,

662
00:30:03,356 --> 00:30:04,980
and it's just what
the heck's going on?

663
00:30:08,607 --> 00:30:10,440
It would be much better
if you had actually,

664
00:30:10,440 --> 00:30:11,617
that progress bar.

665
00:30:11,617 --> 00:30:13,450
And that progress bar
is actually giving you

666
00:30:13,450 --> 00:30:14,530
a single point estimate.

667
00:30:14,530 --> 00:30:16,460
This progress bar is
kind of telling you

668
00:30:16,460 --> 00:30:20,540
this job is about 15% complete.

669
00:30:20,540 --> 00:30:23,765
And it's telling me there's
two minutes remaining.

670
00:30:26,720 --> 00:30:29,750
And that bar still has
a long way to fill up.

671
00:30:29,750 --> 00:30:31,437
So you realize this
estimate may not

672
00:30:31,437 --> 00:30:33,270
be terribly accurate,
because it not working

673
00:30:33,270 --> 00:30:35,075
on a lot of information.

674
00:30:37,720 --> 00:30:40,297
It may be a
pessimistic estimate.

675
00:30:40,297 --> 00:30:42,630
But you still need to commit
to a single point estimate,

676
00:30:42,630 --> 00:30:44,171
if you want to make
a plan around it.

677
00:30:44,171 --> 00:30:46,030
Don't just use the
average of a range.

678
00:30:46,030 --> 00:30:50,114
The difference between
a one week estimate

679
00:30:50,114 --> 00:30:52,030
and a four week estimate
for the same feature,

680
00:30:52,030 --> 00:30:54,130
is not somewhere in between.

681
00:30:54,130 --> 00:30:56,844
It's not like it's going to
take two and a half weeks.

682
00:30:56,844 --> 00:30:59,010
With the one week estimate
and a four week estimate,

683
00:30:59,010 --> 00:31:01,090
are two very different
circumstances.

684
00:31:01,090 --> 00:31:03,202
One week, if you found
somebody else's code

685
00:31:03,202 --> 00:31:04,660
that basically does
the same thing.

686
00:31:04,660 --> 00:31:07,120
Four weeks if you had to
write it from scratch.

687
00:31:07,120 --> 00:31:10,450
One week in, you know exactly
what situation you're in.

688
00:31:10,450 --> 00:31:12,849
Either the code is done,
or the code is not done,

689
00:31:12,849 --> 00:31:14,640
and you know it's going
to take four weeks.

690
00:31:14,640 --> 00:31:18,430
Your estimate is not like,
two and a half weeks.

691
00:31:18,430 --> 00:31:22,087
You're not halfway in between.

692
00:31:22,087 --> 00:31:23,920
The good news is that
the time estimates are

693
00:31:23,920 --> 00:31:25,940
entirely internal to your team.

694
00:31:25,940 --> 00:31:27,780
No one outside your
team needs to know this.

695
00:31:27,780 --> 00:31:29,630
I don't need to know this,
Sarah doesn't need to know this.

696
00:31:29,630 --> 00:31:32,680
None of the graders need to know
what your time estimates were.

697
00:31:32,680 --> 00:31:39,610
We're not holding you to-- your
grade is not dependent on this.

698
00:31:39,610 --> 00:31:42,240
This means that you can revise
your estimates over time.

699
00:31:42,240 --> 00:31:45,310
And I'm going to
encourage you to do that.

700
00:31:45,310 --> 00:31:46,170
You are not Neo.

701
00:31:46,170 --> 00:31:47,990
You aren't going
to be faster, just

702
00:31:47,990 --> 00:31:49,850
because you want to be faster.

703
00:31:49,850 --> 00:31:52,040
So it's important to
actually understand what's

704
00:31:52,040 --> 00:31:54,550
your actual pace of work.

705
00:31:54,550 --> 00:31:57,580
Now this is something
that I'm going

706
00:31:57,580 --> 00:32:00,210
to recommend that everybody
do starting from today.

707
00:32:00,210 --> 00:32:02,090
And that's to track
your own estimates.

708
00:32:02,090 --> 00:32:04,020
This is one way
that you can do it.

709
00:32:04,020 --> 00:32:06,777
It's not the only way,
but it's good enough.

710
00:32:06,777 --> 00:32:09,110
Where you write down the
feature that you're working on.

711
00:32:09,110 --> 00:32:10,590
Say it's the jump feature.

712
00:32:10,590 --> 00:32:14,480
And you have the task
that you took on.

713
00:32:14,480 --> 00:32:17,330
I'm a coder, so I'm
going to say I'm

714
00:32:17,330 --> 00:32:20,670
going to put some upward
velocity when the player hits

715
00:32:20,670 --> 00:32:22,120
the space bar.

716
00:32:22,120 --> 00:32:23,930
I'm also going to
write some code

717
00:32:23,930 --> 00:32:25,880
to play a sound effect
when that happens.

718
00:32:25,880 --> 00:32:27,210
These are two separate tasks.

719
00:32:27,210 --> 00:32:29,522
And with the
original estimations,

720
00:32:29,522 --> 00:32:30,980
that was going to
take eight hours.

721
00:32:30,980 --> 00:32:32,800
It's going to take five hours.

722
00:32:32,800 --> 00:32:34,930
And then you actually
write down how many hours

723
00:32:34,930 --> 00:32:38,777
you spent on this task so far.

724
00:32:38,777 --> 00:32:40,110
For the first task, it was done.

725
00:32:40,110 --> 00:32:41,900
It took me 10 hours to do.

726
00:32:41,900 --> 00:32:44,890
Or longer than I expected.

727
00:32:44,890 --> 00:32:48,300
So my eventual estimate
was 10 because I actually

728
00:32:48,300 --> 00:32:50,310
knew it took ten hours to do.

729
00:32:50,310 --> 00:32:53,630
If I ever have to do
that same feature again,

730
00:32:53,630 --> 00:32:55,710
let's say a feature
of the same size,

731
00:32:55,710 --> 00:32:57,170
again, a task of the same size.

732
00:32:57,170 --> 00:32:59,300
Again to be accurate,
then I'm going

733
00:32:59,300 --> 00:33:00,990
to estimate, next
time if I think

734
00:33:00,990 --> 00:33:03,448
it's going to be eight, I'm
going to write down 10 instead,

735
00:33:03,448 --> 00:33:07,440
because that's what previous
history has taught me.

736
00:33:07,440 --> 00:33:11,520
Let's say I'm in the middle
of writing my jump sound code.

737
00:33:11,520 --> 00:33:13,410
I thought it will
take five hours.

738
00:33:13,410 --> 00:33:15,530
I've spent two hours on it.

739
00:33:15,530 --> 00:33:18,502
And I look at it, and
I think actually this

740
00:33:18,502 --> 00:33:20,710
is a little easier than I
thought it was going to be.

741
00:33:20,710 --> 00:33:24,170
So I'm going to say probably
only another two more

742
00:33:24,170 --> 00:33:26,392
hours of work on this.

743
00:33:26,392 --> 00:33:27,850
And my current
estimate is actually

744
00:33:27,850 --> 00:33:29,390
being revised downwards.

745
00:33:29,390 --> 00:33:30,890
So this is going to get faster.

746
00:33:30,890 --> 00:33:34,770
And if I put this in a public
location, where my Scrum

747
00:33:34,770 --> 00:33:36,610
Master to read this,
it can actually

748
00:33:36,610 --> 00:33:39,504
see my progress on my work.

749
00:33:39,504 --> 00:33:41,920
You might be able to also do
this on certain task tracking

750
00:33:41,920 --> 00:33:43,720
tools.

751
00:33:43,720 --> 00:33:45,680
Don't estimate in
ideal work hours.

752
00:33:45,680 --> 00:33:48,810
Don't say, if I had
four uninterrupted hours

753
00:33:48,810 --> 00:33:51,240
to just work on
this game, I'm going

754
00:33:51,240 --> 00:33:54,560
to get this jump thing working.

755
00:33:54,560 --> 00:33:58,790
How many of you ever have
four uninterrupted hours?

756
00:33:58,790 --> 00:33:59,720
Really?

757
00:33:59,720 --> 00:34:01,890
Is this like between
midnight and 4 AM?

758
00:34:01,890 --> 00:34:03,760
OK.

759
00:34:03,760 --> 00:34:04,260
OK.

760
00:34:08,237 --> 00:34:08,820
Uninterrupted?

761
00:34:08,820 --> 00:34:12,469
You're not like, checking
Facebook, or having

762
00:34:12,469 --> 00:34:14,170
to get a snack in between?

763
00:34:14,170 --> 00:34:14,710
No?

764
00:34:14,710 --> 00:34:15,210
Really?

765
00:34:17,489 --> 00:34:20,949
If there are distractions,
if there are team meetings,

766
00:34:20,949 --> 00:34:25,120
if there are other problems
that [INAUDIBLE] that you

767
00:34:25,120 --> 00:34:27,870
expect to have to do,
you should count it.

768
00:34:27,870 --> 00:34:29,770
You should count it
in your task time.

769
00:34:29,770 --> 00:34:32,920
You should be able
to account for this.

770
00:34:32,920 --> 00:34:38,366
Because say so you've
blocked off 12 hours of-- No.

771
00:34:38,366 --> 00:34:39,199
Let's say six hours.

772
00:34:39,199 --> 00:34:43,840
You are going to spend six hours
on this project over the week.

773
00:34:43,840 --> 00:34:45,719
And you know you've got
that, because you're

774
00:34:45,719 --> 00:34:47,552
going to have to spend
the rest of your time

775
00:34:47,552 --> 00:34:49,845
going to other classes,
and doing other work.

776
00:34:49,845 --> 00:34:51,469
And you know that
you've got a one hour

777
00:34:51,469 --> 00:34:54,800
meeting somewhere in there.

778
00:34:54,800 --> 00:34:57,080
Part of your task is actually
going to that meeting,

779
00:34:57,080 --> 00:34:59,792
and figuring out how a
certain feature should

780
00:34:59,792 --> 00:35:01,250
be implemented,
before you actually

781
00:35:01,250 --> 00:35:02,220
start writing the code.

782
00:35:02,220 --> 00:35:05,190
Or actually start
doing the art for it.

783
00:35:05,190 --> 00:35:07,790
You want to factor that
into your task estimation.

784
00:35:07,790 --> 00:35:10,440
You don't want to say
that's a separate thing.

785
00:35:10,440 --> 00:35:12,440
At least if you do count
it as a separate thing,

786
00:35:12,440 --> 00:35:13,856
make sure that
you've actually got

787
00:35:13,856 --> 00:35:17,050
that as a separate task with
an actual time estimate on it.

788
00:35:17,050 --> 00:35:18,610
Count all of your distractions.

789
00:35:18,610 --> 00:35:20,818
Do try to schedule and time
box all of your meetings,

790
00:35:20,818 --> 00:35:22,460
because it makes
estimation easier.

791
00:35:22,460 --> 00:35:25,010
If you know that a meeting's
time boxed to one hour,

792
00:35:25,010 --> 00:35:27,710
you can't spend more than
one hour in a meeting.

793
00:35:27,710 --> 00:35:30,560
And you can actually account
for that in your estimations.

794
00:35:30,560 --> 00:35:33,420
Don't just always have ad
hoc meetings, for instance,

795
00:35:33,420 --> 00:35:34,150
like on Skype.

796
00:35:34,150 --> 00:35:37,260
Because then you're
just stealing

797
00:35:37,260 --> 00:35:39,230
a couple of minutes from
everybody's schedule

798
00:35:39,230 --> 00:35:44,240
all the time without any one
being able to plan for it.

799
00:35:44,240 --> 00:35:45,960
So you've got
something like this,

800
00:35:45,960 --> 00:35:47,892
where you're tracking
all of your progress,

801
00:35:47,892 --> 00:35:49,850
then you just add up all
of your time estimates

802
00:35:49,850 --> 00:35:51,720
when a feature is done.

803
00:35:51,720 --> 00:35:54,270
And then you can go
back to your original

804
00:35:54,270 --> 00:35:59,410
small, medium, and large
and say this thing took me

805
00:35:59,410 --> 00:36:01,890
seven hours to complete.

806
00:36:01,890 --> 00:36:05,770
And if I get another feature
that looks like these two

807
00:36:05,770 --> 00:36:08,720
features, for
instance, and say it's

808
00:36:08,720 --> 00:36:11,750
about two half features
compared to that seven hours.

809
00:36:11,750 --> 00:36:14,220
I said, OK, three and a
half, three in a half.

810
00:36:14,220 --> 00:36:15,512
And you can use that.

811
00:36:15,512 --> 00:36:16,720
It's not going to be perfect.

812
00:36:16,720 --> 00:36:18,220
It's not going to be accurate.

813
00:36:18,220 --> 00:36:21,930
But you're basing it on real
evidence of how fast you

814
00:36:21,930 --> 00:36:24,600
personally work.

815
00:36:24,600 --> 00:36:27,700
So all of this information helps
you become a better estimator

816
00:36:27,700 --> 00:36:29,700
of your own performance.

817
00:36:29,700 --> 00:36:32,050
And in the future, you
can use those numbers

818
00:36:32,050 --> 00:36:33,860
for future sprint planning.

819
00:36:33,860 --> 00:36:36,957
So when you finish one
sprint-- say it's project 4,

820
00:36:36,957 --> 00:36:38,290
and you've got multiple sprints.

821
00:36:38,290 --> 00:36:41,440
You finish one sprint, and
you know that this takes you

822
00:36:41,440 --> 00:36:42,840
eight hours to complete.

823
00:36:42,840 --> 00:36:45,930
So the next time you get
this size feature, well

824
00:36:45,930 --> 00:36:47,550
it took me eight
hours last time.

825
00:36:47,550 --> 00:36:51,541
So I'm going to say that that
feature looks like a eight hour

826
00:36:51,541 --> 00:36:52,040
task.

827
00:36:55,620 --> 00:36:57,640
You should
re-estimate every day.

828
00:36:57,640 --> 00:37:03,120
So you animate your jump and
say that's too big of a feature,

829
00:37:03,120 --> 00:37:06,240
so I'm going to split into
two tasks, the animate,

830
00:37:06,240 --> 00:37:09,807
the jump take off, and the
animate, the jump landing.

831
00:37:09,807 --> 00:37:11,390
Since they are two
very similar tasks,

832
00:37:11,390 --> 00:37:14,030
I'm going to put the same
time estimate on both of them.

833
00:37:14,030 --> 00:37:16,196
And then I'm going to start
working on jump take off

834
00:37:16,196 --> 00:37:19,060
since you have to go in the
air before you can come down.

835
00:37:19,060 --> 00:37:23,371
And I'm going to
start working on this.

836
00:37:23,371 --> 00:37:25,370
The task is a little bit
harder than I expected,

837
00:37:25,370 --> 00:37:27,120
so actually it was a
five hour estimate.

838
00:37:27,120 --> 00:37:31,040
So I'm going to increase it
up to a six hour estimate.

839
00:37:31,040 --> 00:37:33,100
And then eventually,
I got it done.

840
00:37:33,100 --> 00:37:34,359
Down to zero.

841
00:37:34,359 --> 00:37:35,900
I have no more hours
on this feature.

842
00:37:35,900 --> 00:37:36,399
It works.

843
00:37:36,399 --> 00:37:36,900
It's tested.

844
00:37:36,900 --> 00:37:37,790
It's integrated.

845
00:37:37,790 --> 00:37:40,480
Everything's fine.

846
00:37:40,480 --> 00:37:42,570
Now I have to do
the second feature.

847
00:37:42,570 --> 00:37:44,540
Animate the jump landing.

848
00:37:47,530 --> 00:37:49,042
What should I write
down for that?

849
00:37:53,240 --> 00:37:56,250
Let's say by the time I
actually came to the situation

850
00:37:56,250 --> 00:37:59,260
where I wrote down I
had six hours remaining,

851
00:37:59,260 --> 00:38:03,230
I had already spent eight
hours working on the feature.

852
00:38:07,756 --> 00:38:09,630
I spent eight hours
working on jump take off,

853
00:38:09,630 --> 00:38:10,860
and it wasn't done.

854
00:38:10,860 --> 00:38:14,200
Then I wrote down I
had six hours left.

855
00:38:14,200 --> 00:38:16,060
So what's my new
feature estimate?

856
00:38:18,700 --> 00:38:21,000
14.

857
00:38:21,000 --> 00:38:23,080
A lot bigger.

858
00:38:23,080 --> 00:38:26,290
Because that's real evidence.

859
00:38:26,290 --> 00:38:28,599
It may be that during the
process of doing this earlier

860
00:38:28,599 --> 00:38:30,890
feature, you've learned
certain techniques that's going

861
00:38:30,890 --> 00:38:32,220
to speed up your next thing.

862
00:38:32,220 --> 00:38:33,880
However, that's
wishful thinking.

863
00:38:33,880 --> 00:38:35,380
That's hope.

864
00:38:35,380 --> 00:38:38,850
That's what you desire
will happen in reality.

865
00:38:38,850 --> 00:38:40,619
The actual information
that you have

866
00:38:40,619 --> 00:38:43,160
is that actually if you add up
all the hours I actually spend

867
00:38:43,160 --> 00:38:44,666
on this, it took me 14 hours.

868
00:38:44,666 --> 00:38:46,290
So I'm going to revise
the next feature

869
00:38:46,290 --> 00:38:48,160
and let the rest of
my team know that I

870
00:38:48,160 --> 00:38:52,100
think this next feature
is going to 14 hours.

871
00:38:52,100 --> 00:38:53,186
Divide and conquer.

872
00:38:53,186 --> 00:38:55,560
If you've got a very big
feature and very, very big task,

873
00:38:55,560 --> 00:38:58,920
break into little bits,
and do your estimations.

874
00:38:58,920 --> 00:39:04,260
Don't forget to
account for debugging.

875
00:39:04,260 --> 00:39:07,630
This is one of the very
first actual bugs found

876
00:39:07,630 --> 00:39:10,560
by Admiral Grace
Hopper, stuck in a vial

877
00:39:10,560 --> 00:39:13,590
somewhere in a computer in 1940,
that actually caused a program

878
00:39:13,590 --> 00:39:15,960
to fail.

879
00:39:15,960 --> 00:39:20,130
That's one theory of where
the term debugging came from.

880
00:39:20,130 --> 00:39:21,380
Don't forget integration time.

881
00:39:21,380 --> 00:39:25,870
Taking your code and your
assets and your writing

882
00:39:25,870 --> 00:39:28,090
and your dialogue
and sound effects,

883
00:39:28,090 --> 00:39:31,450
and making them work
with other people's code

884
00:39:31,450 --> 00:39:33,580
and contributions.

885
00:39:33,580 --> 00:39:35,510
Don't forget that
some of you are

886
00:39:35,510 --> 00:39:38,540
going to get very exhausted
and overloaded while you're

887
00:39:38,540 --> 00:39:39,994
working on this project.

888
00:39:39,994 --> 00:39:42,660
And don't forget to take breaks,
and to account for those breaks

889
00:39:42,660 --> 00:39:44,160
in your time estimation.

890
00:39:44,160 --> 00:39:46,780
If you know that you
don't tend to work well

891
00:39:46,780 --> 00:39:49,110
on a four-hour
stretch, and you tend

892
00:39:49,110 --> 00:39:51,060
to work much better
with one hours,

893
00:39:51,060 --> 00:39:55,160
with a five minute or 10 minute
break, and then another hour,

894
00:39:55,160 --> 00:39:57,950
then use that in
your time estimates.

895
00:39:57,950 --> 00:40:02,800
Try to estimate so that
you can work efficiently.

896
00:40:02,800 --> 00:40:08,137
Not just how you wish
you could be working.

897
00:40:08,137 --> 00:40:08,720
Any questions?

898
00:40:16,247 --> 00:40:17,830
I thought that was
kind of fire hosey.

899
00:40:20,530 --> 00:40:23,680
We'll probably get
back to this-- actually

900
00:40:23,680 --> 00:40:26,220
we will actually have
you practice this

901
00:40:26,220 --> 00:40:28,700
later on in class.

902
00:40:28,700 --> 00:40:29,859
Five minute break?

903
00:40:29,859 --> 00:40:32,400
All right, so right now we'll
do a five minute break while we

904
00:40:32,400 --> 00:40:33,720
switch our computers around.

905
00:40:33,720 --> 00:40:37,790
Be back here by 1:53.

906
00:40:37,790 --> 00:40:39,780
OK.

907
00:40:39,780 --> 00:40:41,410
We are back on.

908
00:40:46,610 --> 00:40:49,550
So we're back on.

909
00:40:49,550 --> 00:40:51,912
Hopefully this will actually
not be terribly long,

910
00:40:51,912 --> 00:40:54,120
because at least some of
the stuff I'm talking about,

911
00:40:54,120 --> 00:40:56,410
Philip has already
really touched on,

912
00:40:56,410 --> 00:40:58,930
and discussed in more
detail than I need to hit.

913
00:40:58,930 --> 00:41:01,050
Since he just talked about it.

914
00:41:01,050 --> 00:41:02,780
I'm just taking a
lot of the terms

915
00:41:02,780 --> 00:41:04,530
he has introduced and
explained and talked

916
00:41:04,530 --> 00:41:07,210
about all the estimations
and tasks and so forth,

917
00:41:07,210 --> 00:41:11,180
and stuffing them back
into our Scrum framework.

918
00:41:11,180 --> 00:41:13,940
So you can think about-- given
that data, about estimating,

919
00:41:13,940 --> 00:41:15,349
what do you do with it?

920
00:41:15,349 --> 00:41:16,140
How do you show it?

921
00:41:16,140 --> 00:41:17,130
How do you share with it?

922
00:41:17,130 --> 00:41:18,005
How do you record it?

923
00:41:21,020 --> 00:41:23,827
But first, let's have
a really quick review.

924
00:41:23,827 --> 00:41:25,660
Remember I said there
would be a quiz later?

925
00:41:25,660 --> 00:41:27,572
Here's our quiz.

926
00:41:27,572 --> 00:41:29,780
I want to see how many of
you actually still remember

927
00:41:29,780 --> 00:41:31,870
we talked about on men day.

928
00:41:31,870 --> 00:41:34,760
So can I get some volunteers
to give you some definitions

929
00:41:34,760 --> 00:41:35,260
up here?

930
00:41:39,760 --> 00:41:40,570
One per customer.

931
00:41:40,570 --> 00:41:42,562
AUDIENCE: All right.

932
00:41:42,562 --> 00:41:44,056
[INAUDIBLE]

933
00:41:44,056 --> 00:41:47,210
In charge of the vision of the
products, and also in charge

934
00:41:47,210 --> 00:41:49,534
of maintaining the backlogs
of the team's [INAUDIBLE].

935
00:41:49,534 --> 00:41:50,600
PROFESSOR: Yep.

936
00:41:50,600 --> 00:41:53,390
Specifically prioritizing
the backlog, but yeah.

937
00:41:53,390 --> 00:41:54,470
OK.

938
00:41:54,470 --> 00:41:55,070
Someone else?

939
00:41:57,920 --> 00:42:01,216
This is going to be a
really long lecture.

940
00:42:01,216 --> 00:42:02,132
AUDIENCE: [INAUDIBLE].

941
00:42:10,706 --> 00:42:12,560
PROFESSOR: Great.

942
00:42:12,560 --> 00:42:15,370
Next?

943
00:42:15,370 --> 00:42:17,881
Grab them while they're easy.

944
00:42:17,881 --> 00:42:20,117
AUDIENCE: The product
backlog is a list

945
00:42:20,117 --> 00:42:23,100
of features to be implemented
to have the whole product done.

946
00:42:23,100 --> 00:42:24,040
PROFESSOR: OK.

947
00:42:24,040 --> 00:42:26,304
And I saw someone.

948
00:42:26,304 --> 00:42:27,280
AUDIENCE: [INAUDIBLE].

949
00:42:31,184 --> 00:42:32,045
PROFESSOR: OK.

950
00:42:38,760 --> 00:42:41,924
You're already a
repeat customer.

951
00:42:41,924 --> 00:42:44,870
AUDIENCE: The
sprint is the period

952
00:42:44,870 --> 00:42:48,220
of working on one
installation of the product.

953
00:42:48,220 --> 00:42:53,850
It should be kept short,
so we can [INAUDIBLE].

954
00:42:53,850 --> 00:42:57,442
And each sprint should
have [INAUDIBLE]

955
00:42:57,442 --> 00:42:59,882
that can be published,
or that's running,

956
00:42:59,882 --> 00:43:01,834
so that you can only
do incremental work.

957
00:43:01,834 --> 00:43:03,750
PROFESSOR: OK.

958
00:43:03,750 --> 00:43:04,770
Somebody else.

959
00:43:04,770 --> 00:43:05,540
Somebody else.

960
00:43:10,250 --> 00:43:11,450
We got two meanings left.

961
00:43:11,450 --> 00:43:12,210
Grab the meetings.

962
00:43:15,260 --> 00:43:17,234
Team members?

963
00:43:17,234 --> 00:43:19,150
Don't make me do the
whole lecture over again,

964
00:43:19,150 --> 00:43:20,600
because I don't want
to give it, and I don't

965
00:43:20,600 --> 00:43:21,683
think you want to hear it.

966
00:43:24,760 --> 00:43:27,500
AUDIENCE: The retrospective is
the meeting at the end where

967
00:43:27,500 --> 00:43:28,830
you review your processes.

968
00:43:36,080 --> 00:43:40,000
AUDIENCE: Team member
is really easy.

969
00:43:40,000 --> 00:43:41,510
PROFESSOR: Nobody's
grabbed that.

970
00:43:45,430 --> 00:43:47,390
AUDIENCE: Team
member is everyone

971
00:43:47,390 --> 00:43:49,350
on that's on your team.

972
00:43:49,350 --> 00:43:52,300
PROFESSOR: Well done!

973
00:43:52,300 --> 00:43:55,411
Do I have anyone that
will take Scrum Master?

974
00:43:55,411 --> 00:43:56,660
You've already answered twice.

975
00:43:56,660 --> 00:43:58,515
Thank you for noble
participation.

976
00:44:02,818 --> 00:44:05,086
AUDIENCE: A Scrum
Master is in charge

977
00:44:05,086 --> 00:44:08,164
of just making sure
the Scrums go quickly,

978
00:44:08,164 --> 00:44:10,594
and everyone knows
what they need to do,

979
00:44:10,594 --> 00:44:13,010
but he doesn't actually
have to do anything.

980
00:44:13,010 --> 00:44:15,075
He's not actually in charge
of planning anything.

981
00:44:15,075 --> 00:44:17,533
He's just in charge of making
sure everything goes smoothly

982
00:44:17,533 --> 00:44:18,324
during [INAUDIBLE].

983
00:44:18,324 --> 00:44:19,090
PROFESSOR: Yep.

984
00:44:19,090 --> 00:44:20,460
Yep.

985
00:44:20,460 --> 00:44:22,560
Coach is a great
description for that.

986
00:44:22,560 --> 00:44:23,940
OK.

987
00:44:23,940 --> 00:44:26,220
Now I think we have not hit
the sprint review meeting,

988
00:44:26,220 --> 00:44:29,830
but other than that, I
think were pretty good.

989
00:44:29,830 --> 00:44:32,110
So the sprint review
meeting is the meeting

990
00:44:32,110 --> 00:44:34,580
that you're going to get
to do in class today.

991
00:44:34,580 --> 00:44:35,080
No it's not.

992
00:44:35,080 --> 00:44:36,080
Sprint planning meeting.

993
00:44:36,080 --> 00:44:36,870
Ah!

994
00:44:36,870 --> 00:44:37,740
Sprint planning
meeting is the one

995
00:44:37,740 --> 00:44:39,490
you're going to get
to do in class today,

996
00:44:39,490 --> 00:44:42,147
where you go ahead, look
at your product backlog,

997
00:44:42,147 --> 00:44:44,480
decide what you can get done,
and make a sprint backlog.

998
00:44:44,480 --> 00:44:47,190
And then break that down
into sprint task list.

999
00:44:47,190 --> 00:44:50,940
And don't think anybody
gave sprint review.

1000
00:44:50,940 --> 00:44:51,720
OK.

1001
00:44:51,720 --> 00:44:55,380
And sprint review is just
at the end of your sprint,

1002
00:44:55,380 --> 00:44:57,410
when you were
evaluating your project

1003
00:44:57,410 --> 00:45:01,230
for how close it came to what
you had intended to make.

1004
00:45:01,230 --> 00:45:03,990
And it is a chance to change
and update the product backlog

1005
00:45:03,990 --> 00:45:07,434
by the team, usually led
by the product owner,

1006
00:45:07,434 --> 00:45:09,100
since they're the
person with the vision

1007
00:45:09,100 --> 00:45:12,174
and a lot of strong opinions, to
modify any changes to the plan

1008
00:45:12,174 --> 00:45:13,840
that you guys have
realized now that you

1009
00:45:13,840 --> 00:45:17,905
see what you've actually made.

1010
00:45:17,905 --> 00:45:20,640
I'll stop torturing you now.

1011
00:45:20,640 --> 00:45:23,360
So backlogs, task
lists, and tasks.

1012
00:45:27,070 --> 00:45:30,710
First step is creating
a sprint backlog.

1013
00:45:30,710 --> 00:45:31,550
It's pretty basic.

1014
00:45:31,550 --> 00:45:32,830
It's pretty simple.

1015
00:45:32,830 --> 00:45:35,140
Usually a product
backlog ends up

1016
00:45:35,140 --> 00:45:36,870
having lots of
really big stories.

1017
00:45:36,870 --> 00:45:37,910
Big fancy features.

1018
00:45:37,910 --> 00:45:39,820
The things that you
want your game to

1019
00:45:39,820 --> 00:45:43,840
do when everything is in and
it's all working at the end.

1020
00:45:43,840 --> 00:45:45,550
By nature, these are
usually big stories.

1021
00:45:45,550 --> 00:45:49,450
We want to have physics so
that the game feels realistic.

1022
00:45:49,450 --> 00:45:51,350
I want the player to
be able to develop

1023
00:45:51,350 --> 00:45:53,510
lots of different
powers through the game.

1024
00:45:53,510 --> 00:45:56,030
I want to be a long
complicated story.

1025
00:45:56,030 --> 00:45:58,880
I want there to be lots and lots
of characters to interact with.

1026
00:45:58,880 --> 00:46:00,940
I want a fully immersive world.

1027
00:46:00,940 --> 00:46:02,430
Never ever put
that in a backlog.

1028
00:46:02,430 --> 00:46:04,000
But I want a fully
immersive world.

1029
00:46:04,000 --> 00:46:08,330
These are all somewhere
passed extra large, often.

1030
00:46:08,330 --> 00:46:10,386
But in a product backlog,
it's OK to go that big.

1031
00:46:10,386 --> 00:46:11,760
But when you're
actually thinking

1032
00:46:11,760 --> 00:46:14,320
about what you're going to
do this particular sprint,

1033
00:46:14,320 --> 00:46:16,070
and this particular
iteration, you

1034
00:46:16,070 --> 00:46:17,540
got to get a lot
smaller than that.

1035
00:46:17,540 --> 00:46:20,130
For example, I want a fully
immersive world is not

1036
00:46:20,130 --> 00:46:21,660
getting done in one sprint.

1037
00:46:21,660 --> 00:46:23,640
Even if it's the only
thing you're working on.

1038
00:46:23,640 --> 00:46:25,770
So clearly you're going
to have to break that down

1039
00:46:25,770 --> 00:46:28,070
into smaller stories.

1040
00:46:28,070 --> 00:46:30,670
And the place you do that is
usually your sprint planning

1041
00:46:30,670 --> 00:46:31,750
meetings.

1042
00:46:31,750 --> 00:46:34,897
So as you break those really big
stories into smaller stories,

1043
00:46:34,897 --> 00:46:36,980
you can leave some of them
on the product backlog,

1044
00:46:36,980 --> 00:46:37,820
because oh my gosh.

1045
00:46:37,820 --> 00:46:39,950
We're not touching those yet.

1046
00:46:39,950 --> 00:46:43,570
And then you can decide which
of those pieces of the story

1047
00:46:43,570 --> 00:46:45,102
are complete enough
and small enough

1048
00:46:45,102 --> 00:46:46,810
that you can get them
done in the sprint.

1049
00:46:46,810 --> 00:46:48,830
Be it one week, or
two week, or a month.

1050
00:46:48,830 --> 00:46:51,330
And again, the size of
stories you're grabbing

1051
00:46:51,330 --> 00:46:54,580
is really going to vary, based
on how long your sprint is.

1052
00:46:54,580 --> 00:46:58,550
By definition, the sprint
you guys have coming up

1053
00:46:58,550 --> 00:46:59,290
is one week.

1054
00:46:59,290 --> 00:47:01,630
Because your project
is due next Monday.

1055
00:47:01,630 --> 00:47:05,510
So once you've got your
stories broken down

1056
00:47:05,510 --> 00:47:08,614
that you've pulled out, and
you've got your sprint backlog,

1057
00:47:08,614 --> 00:47:10,530
then you can start taking
a look at the tasks.

1058
00:47:10,530 --> 00:47:12,750
Except that's not
quite how it works.

1059
00:47:12,750 --> 00:47:14,480
Because it's kind
of easy to grab

1060
00:47:14,480 --> 00:47:17,210
too many stories onto your
sprint backlog at your first

1061
00:47:17,210 --> 00:47:17,710
pass.

1062
00:47:17,710 --> 00:47:20,293
And when you actually are going
through and estimating things,

1063
00:47:20,293 --> 00:47:22,750
and you realize just how much
work each of those stories

1064
00:47:22,750 --> 00:47:25,987
take, you may find you have to
put some of those stories back.

1065
00:47:25,987 --> 00:47:28,070
You may even realize that
some of the stories that

1066
00:47:28,070 --> 00:47:30,017
were at the bottom
of your priority list

1067
00:47:30,017 --> 00:47:31,850
are actually more
important than you thought

1068
00:47:31,850 --> 00:47:35,390
because you've got other stories
higher up that depend on them.

1069
00:47:35,390 --> 00:47:37,367
So while you're
doing your planning,

1070
00:47:37,367 --> 00:47:39,200
and while you're making
your sprint backlog,

1071
00:47:39,200 --> 00:47:43,110
and making your task list,
all a little bit-- you're

1072
00:47:43,110 --> 00:47:45,550
going to go forward
two steps, back a step,

1073
00:47:45,550 --> 00:47:50,230
forward three steps as you
both reorder your backlogs,

1074
00:47:50,230 --> 00:47:53,360
put stories back, take
stories back off as you're

1075
00:47:53,360 --> 00:47:56,240
trying to figure out how you
get all those dependencies

1076
00:47:56,240 --> 00:47:58,465
and squished into
what is actually

1077
00:47:58,465 --> 00:47:59,950
a really short amount of time.

1078
00:47:59,950 --> 00:48:01,670
You guys don't even
have what a sprint

1079
00:48:01,670 --> 00:48:03,720
team thinks of as a full week.

1080
00:48:03,720 --> 00:48:06,302
You do not have a 40 hour
work week ahead of you.

1081
00:48:06,302 --> 00:48:10,690
You have, per person, probably
a 10 to 12 hour work week.

1082
00:48:10,690 --> 00:48:12,580
Because that's about
the amount of time

1083
00:48:12,580 --> 00:48:14,690
the class expects
you to put into it.

1084
00:48:14,690 --> 00:48:16,600
So small.

1085
00:48:16,600 --> 00:48:17,310
Small stories.

1086
00:48:17,310 --> 00:48:20,360
Small tasks.

1087
00:48:20,360 --> 00:48:20,970
OK.

1088
00:48:20,970 --> 00:48:23,420
I just went through
all of that, didn't I?

1089
00:48:23,420 --> 00:48:26,220
How do you break things down?

1090
00:48:26,220 --> 00:48:27,880
When you're breaking
down your stories,

1091
00:48:27,880 --> 00:48:31,350
think about what's the
most important part of what

1092
00:48:31,350 --> 00:48:32,455
your breaking down into?

1093
00:48:35,810 --> 00:48:40,070
Because your stories have
a because, or so I can,

1094
00:48:40,070 --> 00:48:41,750
you can start
thinking about what

1095
00:48:41,750 --> 00:48:43,600
is most important
part of that story.

1096
00:48:43,600 --> 00:48:46,540
And which portions of those
stories you can just dump.

1097
00:48:46,540 --> 00:48:48,050
You don't need a
full physics engine

1098
00:48:48,050 --> 00:48:49,756
to create realistic driving.

1099
00:48:49,756 --> 00:48:51,630
Because, what the heck
does realistic driving

1100
00:48:51,630 --> 00:48:53,232
mean in this case any way?

1101
00:48:53,232 --> 00:48:55,190
Does it mean that it
accelerates, and it really

1102
00:48:55,190 --> 00:48:57,200
feels like it's
accelerating properly?

1103
00:48:57,200 --> 00:48:59,580
Doesn't mean that when
you handle curves,

1104
00:48:59,580 --> 00:49:02,740
you can feel it
spinning out on you?

1105
00:49:02,740 --> 00:49:04,150
What does feel mean anyway?

1106
00:49:04,150 --> 00:49:06,140
Does it mean that
the computer is

1107
00:49:06,140 --> 00:49:09,050
playing really realistic
sound effects for me?

1108
00:49:09,050 --> 00:49:12,350
That I'm getting really cool
sparks off of the wheels.

1109
00:49:12,350 --> 00:49:17,030
I'm getting this view
of the car spinning out.

1110
00:49:17,030 --> 00:49:18,960
When you understand
what you actually want,

1111
00:49:18,960 --> 00:49:21,180
then you can create
smaller stories

1112
00:49:21,180 --> 00:49:25,330
that let you break it down
and sign up just for that.

1113
00:49:25,330 --> 00:49:28,212
You can also take a look at what
the abilities of your team are.

1114
00:49:28,212 --> 00:49:29,420
And what you can actually do.

1115
00:49:29,420 --> 00:49:31,917
If you have somebody who's
really get at sound effects,

1116
00:49:31,917 --> 00:49:33,500
maybe you really
want to try to create

1117
00:49:33,500 --> 00:49:36,044
a realistic aural environment.

1118
00:49:36,044 --> 00:49:38,210
You're not going to worry
so much about the physics.

1119
00:49:38,210 --> 00:49:40,626
You're not going to worry so
much about the sound effects.

1120
00:49:40,626 --> 00:49:42,530
But boy, is it going
to sound sharp.

1121
00:49:42,530 --> 00:49:43,220
That's OK.

1122
00:49:43,220 --> 00:49:45,200
That's working within
your capabilities

1123
00:49:45,200 --> 00:49:46,750
and your limitations
to do your best

1124
00:49:46,750 --> 00:49:51,170
to fulfill your overall vision.

1125
00:49:51,170 --> 00:49:54,060
Philip really already
covered this pretty well.

1126
00:49:54,060 --> 00:49:56,830
I will zip right through it.

1127
00:49:56,830 --> 00:49:58,220
Tasks.

1128
00:49:58,220 --> 00:50:00,620
Think of them in terms of
going down to a half hour

1129
00:50:00,620 --> 00:50:03,795
is probably a waste
of your time if you're

1130
00:50:03,795 --> 00:50:05,170
looking at a whole
bunch of tasks

1131
00:50:05,170 --> 00:50:07,461
that are a half hour long,
that's a really small amount

1132
00:50:07,461 --> 00:50:08,770
of time.

1133
00:50:08,770 --> 00:50:10,647
On the other hand,
eight hours is probably

1134
00:50:10,647 --> 00:50:12,230
the biggest you want
to look at, given

1135
00:50:12,230 --> 00:50:13,900
that that's most of a week.

1136
00:50:13,900 --> 00:50:15,730
Ideally, you don't
have one task that

1137
00:50:15,730 --> 00:50:18,090
takes up your entire
week's worth of work.

1138
00:50:18,090 --> 00:50:20,750
If so, you're rolling some
really big dice there.

1139
00:50:20,750 --> 00:50:23,460
Because you're assuming that
your estimate is pretty good.

1140
00:50:23,460 --> 00:50:26,050
And especially the first
time you start estimating,

1141
00:50:26,050 --> 00:50:29,580
your estimate probably
isn't that good.

1142
00:50:29,580 --> 00:50:33,090
It is more common for
people to overestimate by up

1143
00:50:33,090 --> 00:50:34,490
to twice as much.

1144
00:50:34,490 --> 00:50:37,340
So, I can get this task
done in eight hours

1145
00:50:37,340 --> 00:50:41,390
often means I can get this
task done in 16 hours.

1146
00:50:41,390 --> 00:50:44,600
Think about that as you
are tasking things out,

1147
00:50:44,600 --> 00:50:46,825
and as you are creating
your sprint task lists.

1148
00:50:52,610 --> 00:50:56,340
So I think I've
mostly covered that.

1149
00:50:56,340 --> 00:51:01,020
Finally, once you have this
big pile of tasks on an Excel

1150
00:51:01,020 --> 00:51:03,090
spreadsheet that no
one actually ever wants

1151
00:51:03,090 --> 00:51:04,610
to look at again,
because they're

1152
00:51:04,610 --> 00:51:09,220
kind of hard to pick out there,
what do you do with them?

1153
00:51:09,220 --> 00:51:10,690
I mentioned Scrum boards.

1154
00:51:10,690 --> 00:51:12,082
I mentioned them
being preferably

1155
00:51:12,082 --> 00:51:13,290
there a physical Scrum board.

1156
00:51:13,290 --> 00:51:15,100
That's really not
realistic for us.

1157
00:51:15,100 --> 00:51:16,830
So you're going to
want-- and I really

1158
00:51:16,830 --> 00:51:20,930
strongly do recommend that
you use-- a visual Scrum board

1159
00:51:20,930 --> 00:51:22,370
solution.

1160
00:51:22,370 --> 00:51:25,030
Two that I have used
on projects that

1161
00:51:25,030 --> 00:51:26,930
work well for
different situations

1162
00:51:26,930 --> 00:51:29,100
are Trello and Scrummy.com.

1163
00:51:29,100 --> 00:51:31,450
Don't feel like you have
to use either of these.

1164
00:51:31,450 --> 00:51:34,450
If you find something better,
use it and tell me about it.

1165
00:51:34,450 --> 00:51:36,790
Because I want to know.

1166
00:51:36,790 --> 00:51:40,050
Especially if it's free.

1167
00:51:40,050 --> 00:51:43,900
So let me show you
very quickly-- let's

1168
00:51:43,900 --> 00:51:46,400
see if I can pull them up.

1169
00:51:46,400 --> 00:51:50,110
So here it is-- is that showing?

1170
00:51:50,110 --> 00:51:52,360
Here's scrummy.com
which I actually-- I

1171
00:51:52,360 --> 00:51:56,212
think it's kind of the easiest
and quickest one to use.

1172
00:51:56,212 --> 00:51:58,670
This is always going to be more
work for your Scrum Master.

1173
00:51:58,670 --> 00:52:00,590
So when you're
thinking about tasks,

1174
00:52:00,590 --> 00:52:03,930
set some time aside for your
Scrum Master, who's probably

1175
00:52:03,930 --> 00:52:06,070
going to create this board.

1176
00:52:06,070 --> 00:52:07,570
It's going to be
your responsibility

1177
00:52:07,570 --> 00:52:09,520
to maintain it, and
move things over,

1178
00:52:09,520 --> 00:52:12,180
but somebody's going to
have to type tasks into it.

1179
00:52:12,180 --> 00:52:15,297
And it would work
best if everyone

1180
00:52:15,297 --> 00:52:17,130
could be relied upon
to type in their tasks,

1181
00:52:17,130 --> 00:52:18,770
but it rarely works
that way, especially

1182
00:52:18,770 --> 00:52:20,305
since you often have a
whole bundle of tasks

1183
00:52:20,305 --> 00:52:22,310
that haven't been assigned,
at least at the beginning

1184
00:52:22,310 --> 00:52:24,435
of the sprint, because
people start picking them up

1185
00:52:24,435 --> 00:52:28,550
as they discover that
they've gotten stuff done.

1186
00:52:28,550 --> 00:52:33,790
So pretty much it works much
like a Scrum board ought to.

1187
00:52:33,790 --> 00:52:37,790
So you can create
all your tasks.

1188
00:52:37,790 --> 00:52:40,367
It divides things up
naturally by stories.

1189
00:52:40,367 --> 00:52:42,450
Although if you'd like to
put it by user, you can.

1190
00:52:42,450 --> 00:52:44,970
They're two standard ways
to organize a Scrum board.

1191
00:52:44,970 --> 00:52:48,720
Either organizing all
your tasks by the story it

1192
00:52:48,720 --> 00:52:51,510
belongs to, or by the
user who's working on.

1193
00:52:51,510 --> 00:52:54,640
Feel free to do it how
ever works well for you.

1194
00:52:54,640 --> 00:52:56,769
Scrummy, because
it's free, and you

1195
00:52:56,769 --> 00:52:58,560
don't want to pay for
the upgraded version,

1196
00:52:58,560 --> 00:53:00,518
won't let you change the
names of your columns.

1197
00:53:00,518 --> 00:53:04,000
But it's pretty hard from
the end of the world.

1198
00:53:04,000 --> 00:53:07,830
So if my stories demonstrate
so many of the [INAUDIBLE],

1199
00:53:07,830 --> 00:53:10,410
I have recorded the URL,
so I can get back here.

1200
00:53:10,410 --> 00:53:11,260
That's done.

1201
00:53:11,260 --> 00:53:12,274
I've made a new board.

1202
00:53:12,274 --> 00:53:12,940
That's all done.

1203
00:53:12,940 --> 00:53:15,660
And I confirmed the
board was there.

1204
00:53:15,660 --> 00:53:17,240
I've assigned a
task to Philip, so

1205
00:53:17,240 --> 00:53:19,910
that there can be a task there.

1206
00:53:19,910 --> 00:53:22,135
And it's a really pretty
quick and easy-- ah!

1207
00:53:22,135 --> 00:53:24,681
No, don't delete it.

1208
00:53:24,681 --> 00:53:26,930
It's really pretty quick and
easy to go ahead and edit

1209
00:53:26,930 --> 00:53:28,946
things.

1210
00:53:28,946 --> 00:53:31,070
It changes color, so you
can have different colors.

1211
00:53:31,070 --> 00:53:33,690
Easy to tell apart.

1212
00:53:33,690 --> 00:53:35,639
And it's really just
sort of a click and grab.

1213
00:53:35,639 --> 00:53:37,680
Click and drag, except
that I don't have a mouse.

1214
00:53:37,680 --> 00:53:38,090
Sorry.

1215
00:53:38,090 --> 00:53:39,714
I don't have a track
counter, and so it

1216
00:53:39,714 --> 00:53:43,369
takes these fancy two-fingered
maneuver to actually move it.

1217
00:53:43,369 --> 00:53:44,910
So I'm going to fail
to move it over,

1218
00:53:44,910 --> 00:53:47,344
but they're pretty easy
just click and drag

1219
00:53:47,344 --> 00:53:48,260
to the various things.

1220
00:53:48,260 --> 00:53:49,682
To the various sides.

1221
00:53:49,682 --> 00:53:54,100
So that's Scrummy, which has
less functionality than Trello,

1222
00:53:54,100 --> 00:53:56,810
but it's actually, in exchange
for that, it's quick and easy.

1223
00:53:56,810 --> 00:54:01,100
You type in a task, you
type in a name, you're done.

1224
00:54:01,100 --> 00:54:05,920
Trello-- and I apologize
about the resolution here.

1225
00:54:05,920 --> 00:54:07,170
Let's see if I can close this.

1226
00:54:10,690 --> 00:54:13,790
Trello let's you go ahead
and create as many columns

1227
00:54:13,790 --> 00:54:14,755
as you'd like.

1228
00:54:14,755 --> 00:54:16,255
You can name them
whatever you want.

1229
00:54:21,035 --> 00:54:23,109
You can put in all the
information you want.

1230
00:54:23,109 --> 00:54:24,900
If you want to track
your estimations here,

1231
00:54:24,900 --> 00:54:27,400
if you want to have a checklist
of subtasks that are related

1232
00:54:27,400 --> 00:54:30,520
to it, if you want to put
on pretty little labels

1233
00:54:30,520 --> 00:54:32,430
so that every user
has a different color,

1234
00:54:32,430 --> 00:54:35,013
or every story has a different
color, as long as you only have

1235
00:54:35,013 --> 00:54:41,660
five stories-- but
on the other hand,

1236
00:54:41,660 --> 00:54:44,610
you can also waste a lot of
time organizing your project

1237
00:54:44,610 --> 00:54:45,550
on Trello.

1238
00:54:45,550 --> 00:54:47,380
And it will look really nice,
and it will have all the data

1239
00:54:47,380 --> 00:54:49,350
there, and you will have
sucked all those hours

1240
00:54:49,350 --> 00:54:51,974
that you could have been coding,
or drawing, or actually making

1241
00:54:51,974 --> 00:54:52,780
a game.

1242
00:54:52,780 --> 00:54:55,660
So Trello can be
really nice to use,

1243
00:54:55,660 --> 00:54:58,380
but don't let it steal
your project from you,

1244
00:54:58,380 --> 00:55:01,360
if you choose to use it.

1245
00:55:01,360 --> 00:55:06,400
I was told that there's a cool
Scrum-free download extension.

1246
00:55:06,400 --> 00:55:09,280
Runs in the Chrome browser
that makes it work better

1247
00:55:09,280 --> 00:55:11,042
for Scrum because
it adjusts lists,

1248
00:55:11,042 --> 00:55:12,750
and it does some
previous set up for you.

1249
00:55:12,750 --> 00:55:15,390
I haven't tested that, so
I don't know how it works.

1250
00:55:15,390 --> 00:55:17,150
If you'd like to try it out, do.

1251
00:55:17,150 --> 00:55:19,690
But don't do it this project,
because you don't have time

1252
00:55:19,690 --> 00:55:21,800
to waste mixing it
around and fixing that.

1253
00:55:21,800 --> 00:55:24,570
Do that on outside
time, if you really

1254
00:55:24,570 --> 00:55:27,115
want to is my advice to you.

1255
00:55:27,115 --> 00:55:28,990
I don't want you to
spend a whole lot of time

1256
00:55:28,990 --> 00:55:30,529
getting the perfect
system together.

1257
00:55:30,529 --> 00:55:33,070
I want you to get a system that
works well enough and use it.

1258
00:55:37,900 --> 00:55:38,400
Yay.

1259
00:55:38,400 --> 00:55:40,680
Back to the slideshow.

1260
00:55:40,680 --> 00:55:41,850
So that is Scrum boards.

1261
00:55:44,730 --> 00:55:45,230
Ah.

1262
00:55:47,964 --> 00:55:49,130
Don't use PowerPoint either.

1263
00:55:49,130 --> 00:55:52,100
Apparently it has
to be difficult.

1264
00:55:52,100 --> 00:55:54,700
So the classic line
up on a Scrum board

1265
00:55:54,700 --> 00:55:58,140
is you've got all the
tasks in your to-do pile.

1266
00:55:58,140 --> 00:55:59,899
You've got the in-progress.

1267
00:55:59,899 --> 00:56:02,190
And anything in-progress
should be assigned to someone,

1268
00:56:02,190 --> 00:56:03,320
should have a name
attached to it.

1269
00:56:03,320 --> 00:56:05,700
It can't be in-progress if
someone isn't working on it.

1270
00:56:05,700 --> 00:56:08,780
And it should have a time
estimate attached to it.

1271
00:56:08,780 --> 00:56:10,940
Ideally, the time remaining.

1272
00:56:10,940 --> 00:56:13,410
Although, it's good to
keep track of how much time

1273
00:56:13,410 --> 00:56:16,720
has actually gone by on it.

1274
00:56:16,720 --> 00:56:18,650
The task cards are
really good places

1275
00:56:18,650 --> 00:56:21,656
to keep track of your
estimates as they change.

1276
00:56:21,656 --> 00:56:23,280
Then it's all in
together in one place.

1277
00:56:26,552 --> 00:56:28,760
Once you get finished, it
should not go over to done.

1278
00:56:28,760 --> 00:56:29,716
It's going to testing.

1279
00:56:29,716 --> 00:56:31,090
Someone who is
not the person who

1280
00:56:31,090 --> 00:56:34,454
did it should test it, and
then move it over to done.

1281
00:56:34,454 --> 00:56:36,120
That way you've got
a second set of eyes

1282
00:56:36,120 --> 00:56:38,703
on every piece of code and every
feature, just confirming it's

1283
00:56:38,703 --> 00:56:40,590
working.

1284
00:56:40,590 --> 00:56:43,040
Many Scrum boards also
have another column

1285
00:56:43,040 --> 00:56:45,280
called Blocked or On Fire.

1286
00:56:45,280 --> 00:56:47,280
Which is to say this
is a task that someone

1287
00:56:47,280 --> 00:56:49,780
can't get done until someone
else gets something out

1288
00:56:49,780 --> 00:56:51,150
of my way.

1289
00:56:51,150 --> 00:56:52,850
It's nice to have.

1290
00:56:52,850 --> 00:56:55,020
It's not required.

1291
00:56:55,020 --> 00:56:57,920
And if you're working on a board
that you're having a hard time

1292
00:56:57,920 --> 00:57:02,370
fitting everything
into one screen,

1293
00:57:02,370 --> 00:57:04,900
Trello has always a problem
for that with me, it's

1294
00:57:04,900 --> 00:57:06,290
OK to leave it off.

1295
00:57:06,290 --> 00:57:09,440
But it can be really
helpful to have.

1296
00:57:09,440 --> 00:57:10,950
That sort of is a Scrum board.

1297
00:57:10,950 --> 00:57:12,580
And I do really recommend them.

1298
00:57:12,580 --> 00:57:14,540
They are useful.

1299
00:57:14,540 --> 00:57:16,880
I know it feels like a
lot of extra time often,

1300
00:57:16,880 --> 00:57:18,320
when you're setting them up.

1301
00:57:18,320 --> 00:57:20,405
But if your team is
actually looking in there

1302
00:57:20,405 --> 00:57:22,520
and checking it every
day and updating,

1303
00:57:22,520 --> 00:57:24,700
it's a really good
way for the team

1304
00:57:24,700 --> 00:57:26,730
to know where it's at
without having to spend

1305
00:57:26,730 --> 00:57:28,080
a lot of time talking about it.

1306
00:57:28,080 --> 00:57:31,822
Because all the really basic
stuff is there to be seen,

1307
00:57:31,822 --> 00:57:33,280
which means you
could freeze you up

1308
00:57:33,280 --> 00:57:37,740
to talk about any real
problems that are coming up.

1309
00:57:37,740 --> 00:57:38,450
OK.

1310
00:57:38,450 --> 00:57:41,820
So that said, it's your turn.

1311
00:57:41,820 --> 00:57:45,190
You've got a week
left on your project,

1312
00:57:45,190 --> 00:57:50,360
so let's try creating a
sprint backlog and a task list

1313
00:57:50,360 --> 00:57:53,070
from that backlog
for what you're

1314
00:57:53,070 --> 00:57:56,441
going to get done for Monday
when you have your turn in.

1315
00:57:56,441 --> 00:57:58,190
I'm going to give you--
like all meetings,

1316
00:57:58,190 --> 00:57:59,600
they should be time boxed.

1317
00:57:59,600 --> 00:58:03,160
So I was going to give
you half an hour to do it.

1318
00:58:03,160 --> 00:58:05,600
I will check in at half
an hour, and if people

1319
00:58:05,600 --> 00:58:08,770
are screaming oh no,
we're nowhere near done,

1320
00:58:08,770 --> 00:58:10,862
I will give you another
10 minutes or 15 minutes.

1321
00:58:10,862 --> 00:58:12,320
Not actually a
whole lot more time,

1322
00:58:12,320 --> 00:58:14,950
but I'll give you
a little more time.

1323
00:58:14,950 --> 00:58:16,754
This is probably
doable in half an hour

1324
00:58:16,754 --> 00:58:18,670
if you guys have been
working on your project,

1325
00:58:18,670 --> 00:58:20,630
and you've got your product
backlogs in good shape.

1326
00:58:20,630 --> 00:58:22,296
But it's the first
time you're doing it,

1327
00:58:22,296 --> 00:58:24,020
so it's always-- it's
hard to know what

1328
00:58:24,020 --> 00:58:26,320
the right amount of time is.

1329
00:58:26,320 --> 00:58:28,930
After that, I will give
you five or 10 minutes--

1330
00:58:28,930 --> 00:58:33,650
probably call it five minutes
to talk about the process,

1331
00:58:33,650 --> 00:58:36,290
and have someone come up and
give a very short presentation

1332
00:58:36,290 --> 00:58:38,110
of what the process was like.

1333
00:58:38,110 --> 00:58:41,870
What worked, what didn't,
whether you liked it or not.

1334
00:58:41,870 --> 00:58:43,670
It's OK to come up
here and say bleh.

1335
00:58:43,670 --> 00:58:45,426
I don't feel like
this helped us at all.

1336
00:58:45,426 --> 00:58:47,050
Just come up and tell
us what happened,

1337
00:58:47,050 --> 00:58:48,960
and how it works for your team.

1338
00:58:53,118 --> 00:58:55,603
[CHATTER]

1339
00:59:13,495 --> 00:59:14,480
PROFESSOR: OK.

1340
00:59:14,480 --> 00:59:17,600
So [INAUDIBLE] meaning
we used Scrummy

1341
00:59:17,600 --> 00:59:21,470
to try to organize our product
backlog into our sprint task

1342
00:59:21,470 --> 00:59:22,091
list.

1343
00:59:22,091 --> 00:59:24,590
We found Scrummy to be a little
annoying, because it doesn't

1344
00:59:24,590 --> 00:59:28,810
automatically update instantly,
you have to refresh the page.

1345
00:59:28,810 --> 00:59:30,830
And whatever happens
last, we find,

1346
00:59:30,830 --> 00:59:34,370
is what it shows
as what's edited.

1347
00:59:34,370 --> 00:59:39,040
So it shouldn't break, but
it's not the most useful thing.

1348
00:59:39,040 --> 00:59:43,360
I think more useful would
be to Google use the Google

1349
00:59:43,360 --> 00:59:45,470
Doc of the product backlog.

1350
00:59:45,470 --> 00:59:48,030
Section out the stuff that
you do in that sprint,

1351
00:59:48,030 --> 00:59:49,689
and then just update it there.

1352
00:59:49,689 --> 00:59:51,980
We had it all color coded,
and so it looks really nice.

1353
00:59:51,980 --> 00:59:58,500
And that's much easier to look
at and do than importing that

1354
00:59:58,500 --> 01:00:01,520
into some other program,
and then doing everything

1355
01:00:01,520 --> 01:00:02,710
there and then going back.

1356
01:00:02,710 --> 01:00:04,210
It just seems better
to use Google.

1357
01:00:04,210 --> 01:00:04,957
PROFESSOR: OK.

1358
01:00:04,957 --> 01:00:06,418
Thank you.

1359
01:00:06,418 --> 01:00:09,814
[APPLAUSE]

1360
01:00:09,814 --> 01:00:10,314
[INAUDIBLE]

1361
01:00:17,132 --> 01:00:21,380
AUDIENCE: OK, so we used
Trello for our Scrum planning.

1362
01:00:21,380 --> 01:00:24,080
And we liked Trello
because you can just

1363
01:00:24,080 --> 01:00:26,745
create cards that
have lists of tasks

1364
01:00:26,745 --> 01:00:29,000
and easily move them around
between different columns.

1365
01:00:29,000 --> 01:00:32,524
So when someone takes on a task
they can move it to in-progress

1366
01:00:32,524 --> 01:00:33,690
and assign their name to it.

1367
01:00:33,690 --> 01:00:36,450
And it' really easy
to look at and see

1368
01:00:36,450 --> 01:00:37,950
what's going on at a glance.

1369
01:00:37,950 --> 01:00:40,280
Trello does have a lot of
features like checklists

1370
01:00:40,280 --> 01:00:43,300
that you might not want to use
a lot of, especially if you

1371
01:00:43,300 --> 01:00:44,749
have really complex tasks.

1372
01:00:44,749 --> 01:00:47,040
You don't want to put all of
those inside the checklist

1373
01:00:47,040 --> 01:00:48,206
because that gets confusing.

1374
01:00:48,206 --> 01:00:50,520
The thing that we had
the most problems with

1375
01:00:50,520 --> 01:00:52,180
was doing time
estimates for the tasks,

1376
01:00:52,180 --> 01:00:54,950
because no one in our group
has used Phaser before.

1377
01:00:54,950 --> 01:00:58,050
And so we have a very kind
of shaky grasp on how long

1378
01:00:58,050 --> 01:01:00,860
things are going to take, so
our guesses were mostly random

1379
01:01:00,860 --> 01:01:02,050
at this point in time.

1380
01:01:02,050 --> 01:01:05,316
But we will update that as
we get more experienced.

1381
01:01:05,316 --> 01:01:07,190
One thing that we did
find was really helpful

1382
01:01:07,190 --> 01:01:09,767
was when we were
drawing up goals,

1383
01:01:09,767 --> 01:01:11,600
we broke down all the
features that the game

1384
01:01:11,600 --> 01:01:14,230
needed into as fine
detail as we could

1385
01:01:14,230 --> 01:01:16,791
because we know what
results we need to have

1386
01:01:16,791 --> 01:01:17,790
to get the game to work.

1387
01:01:17,790 --> 01:01:19,248
But we don't know
Phaser yet, so we

1388
01:01:19,248 --> 01:01:22,600
don't know exactly what the
processes are going entail yet.

1389
01:01:22,600 --> 01:01:25,277
But having like
the list of things

1390
01:01:25,277 --> 01:01:26,860
that need to go into
the game gives us

1391
01:01:26,860 --> 01:01:29,730
some guidance on what we
should be developing towards.

1392
01:01:29,730 --> 01:01:31,617
PROFESSOR: Thank you.

1393
01:01:31,617 --> 01:01:34,718
[APPLAUSE]

1394
01:01:34,718 --> 01:01:35,593
Sparkling Redemption.

1395
01:01:43,559 --> 01:01:44,850
AUDIENCE: Sparkling Redemption.

1396
01:01:44,850 --> 01:01:46,570
We basically just
opened up Google Docs

1397
01:01:46,570 --> 01:01:48,930
and made a whole bunch
of Excel spreadsheets.

1398
01:01:48,930 --> 01:01:51,510
I think we're kind of
trying to use Scrum Do

1399
01:01:51,510 --> 01:01:53,270
and see how that
works, but we figured

1400
01:01:53,270 --> 01:01:55,420
it'd be best to just
kind of finish the thing

1401
01:01:55,420 --> 01:01:57,000
first, and then
take a look at that.

1402
01:01:57,000 --> 01:01:59,740
So no thoughts there yet.

1403
01:01:59,740 --> 01:02:02,500
I guess we basically
just took a look

1404
01:02:02,500 --> 01:02:04,590
at what we wanted to
get done by Wednesday,

1405
01:02:04,590 --> 01:02:07,260
and what we wanted to get
done by the end of the week,

1406
01:02:07,260 --> 01:02:10,330
and then broke that
down into the tasks,

1407
01:02:10,330 --> 01:02:12,670
and then worked with that.

1408
01:02:12,670 --> 01:02:17,200
I guess estimation
was-- it wasn't too bad.

1409
01:02:17,200 --> 01:02:19,444
Because some of us have
worked with Phaser before,

1410
01:02:19,444 --> 01:02:20,860
but there was also
a lot of things

1411
01:02:20,860 --> 01:02:23,345
where we realized oh, well,
assuming x is finished first,

1412
01:02:23,345 --> 01:02:24,970
then y would be really
straightforward.

1413
01:02:24,970 --> 01:02:27,560
But do we count x's
time inside of y?

1414
01:02:27,560 --> 01:02:29,520
Well maybe, but
maybe not really.

1415
01:02:29,520 --> 01:02:33,293
So that was as complicated
as it got, I think.

1416
01:02:33,293 --> 01:02:34,766
PROFESSOR: Thank you.

1417
01:02:34,766 --> 01:02:37,703
[APPLAUSE]

1418
01:02:37,703 --> 01:02:38,203
Blundermans.

1419
01:02:45,568 --> 01:02:47,780
AUDIENCE: So for
us, we started out

1420
01:02:47,780 --> 01:02:50,720
with a fairly detailed plan.

1421
01:02:50,720 --> 01:02:54,210
And we used Asana, which
is multi-player to-do list.

1422
01:02:54,210 --> 01:02:56,530
So, similar to Scrum.

1423
01:02:56,530 --> 01:03:00,080
But ultimately, our
entire team more or less

1424
01:03:00,080 --> 01:03:02,230
got sick over the weekend,
and we didn't actually

1425
01:03:02,230 --> 01:03:03,510
get much work done.

1426
01:03:03,510 --> 01:03:05,790
So we can't speak
to exactly how good

1427
01:03:05,790 --> 01:03:08,991
are estimates would have been,
or how useful our plans would

1428
01:03:08,991 --> 01:03:09,490
be.

1429
01:03:09,490 --> 01:03:12,270
So all the planning in
the world doesn't help

1430
01:03:12,270 --> 01:03:14,494
if your entire team is in bed.

1431
01:03:14,494 --> 01:03:15,490
PROFESSOR: Yep.

1432
01:03:15,490 --> 01:03:16,984
Thank you.

1433
01:03:16,984 --> 01:03:19,970
[APPLAUSE]

1434
01:03:20,470 --> 01:03:21,466
Blind Aliens.

1435
01:03:27,442 --> 01:03:30,640
AUDIENCE: So our team used
primarily Google Docs.

1436
01:03:30,640 --> 01:03:33,150
What we did was we had
our product backlog.

1437
01:03:33,150 --> 01:03:36,300
And we were a little confused
about the product backlog.

1438
01:03:36,300 --> 01:03:38,310
So we made it way too detailed.

1439
01:03:38,310 --> 01:03:40,560
But that really
helped with this.

1440
01:03:40,560 --> 01:03:43,500
So we ended up copying and
pasting our product backlog

1441
01:03:43,500 --> 01:03:46,100
into our sprint task
list, deleting everything

1442
01:03:46,100 --> 01:03:47,230
we'd already finished.

1443
01:03:47,230 --> 01:03:50,490
And then adding based
on what we had done.

1444
01:03:50,490 --> 01:03:52,460
And we found that because
we were further along

1445
01:03:52,460 --> 01:03:55,080
in our project, it was
really easy to tell

1446
01:03:55,080 --> 01:03:56,820
what needed more
work, and to get

1447
01:03:56,820 --> 01:03:58,250
the tasks more
detailed and better

1448
01:03:58,250 --> 01:04:02,238
estimates, just because we
had done a lot of already.

1449
01:04:02,238 --> 01:04:13,439
[APPLAUSE]

1450
01:04:13,439 --> 01:04:16,330
AUDIENCE: So we started out
planning on using Trello,

1451
01:04:16,330 --> 01:04:19,320
but did the product
backlog in Google Docs.

1452
01:04:19,320 --> 01:04:21,720
And since it's sort of this
information repeated twice,

1453
01:04:21,720 --> 01:04:23,750
we just stopped using
Trello, and ended up

1454
01:04:23,750 --> 01:04:25,151
using Google Docs anyway.

1455
01:04:25,151 --> 01:04:27,400
And that sort of helped us
out now, because all we did

1456
01:04:27,400 --> 01:04:30,007
was sort the things in
Google Docs by priority.

1457
01:04:30,007 --> 01:04:32,590
So we looked at the things that
were highest priority so we're

1458
01:04:32,590 --> 01:04:34,940
doing this week, and then
we just sort of thought

1459
01:04:34,940 --> 01:04:35,630
about each one.

1460
01:04:35,630 --> 01:04:36,590
How can we break this down?

1461
01:04:36,590 --> 01:04:37,800
What are the specific tasks?

1462
01:04:37,800 --> 01:04:38,680
You started working on this.

1463
01:04:38,680 --> 01:04:39,670
What's left to do here?

1464
01:04:39,670 --> 01:04:43,549
And then we put that into
the sprint task list.

1465
01:04:43,549 --> 01:04:45,016
PROFESSOR: Thank you.

1466
01:04:45,016 --> 01:04:46,483
[APPLAUSE]

1467
01:04:54,307 --> 01:04:57,250
AUDIENCE: So we've been using
Google Docs from the beginning.

1468
01:04:57,250 --> 01:04:59,050
We decided to not
use any other site,

1469
01:04:59,050 --> 01:05:01,300
because we had already started
working on Google Docs.

1470
01:05:01,300 --> 01:05:03,470
And it's worked out
pretty well for us.

1471
01:05:03,470 --> 01:05:06,100
We were able to take
our product backlog

1472
01:05:06,100 --> 01:05:09,500
and take the highest priority
that hadn't been completed yet,

1473
01:05:09,500 --> 01:05:12,030
and just split them up
into a finer detail task

1474
01:05:12,030 --> 01:05:14,850
that we can use for
the sprint task list.

1475
01:05:14,850 --> 01:05:17,410
And I think that that
worked fine for us.

1476
01:05:17,410 --> 01:05:21,199
It helped us really scope out
how much time we had-- helped

1477
01:05:21,199 --> 01:05:22,740
us reevaluate how
much time we needed

1478
01:05:22,740 --> 01:05:26,310
to complete the task
that we had to complete.

1479
01:05:26,310 --> 01:05:29,229
That is going to
help us for planning

1480
01:05:29,229 --> 01:05:30,270
for the rest of the week.

1481
01:05:30,270 --> 01:05:32,798
PROFESSOR: Thank you.

1482
01:05:32,798 --> 01:05:34,774
[APPLAUSE]

1483
01:05:36,750 --> 01:05:39,812
All right, so I have in fact, as
we say, iterate on everything.

1484
01:05:39,812 --> 01:05:41,270
I've iterated on
this presentation.

1485
01:05:41,270 --> 01:05:42,490
And been changing
the order of it.

1486
01:05:42,490 --> 01:05:44,280
So it may be I get
confused a couple of times.

1487
01:05:44,280 --> 01:05:44,779
I hope not.

1488
01:05:44,779 --> 01:05:46,730
We'll see.

1489
01:05:46,730 --> 01:05:52,220
We're going to talk a little bit
about high level and low level

1490
01:05:52,220 --> 01:05:52,840
here.

1491
01:05:52,840 --> 01:05:54,381
But as we said, in
this class we want

1492
01:05:54,381 --> 01:05:56,600
to iterate on as to the
every process you might use.

1493
01:05:56,600 --> 01:05:58,040
This is how you
control your team.

1494
01:05:58,040 --> 01:05:59,260
This is how your game works.

1495
01:05:59,260 --> 01:06:00,070
Everything.

1496
01:06:00,070 --> 01:06:02,420
And this is actually
not a bad philosophy

1497
01:06:02,420 --> 01:06:04,260
to do everything in
your life, that you

1498
01:06:04,260 --> 01:06:06,550
might want to consider
trying stuff, fixing

1499
01:06:06,550 --> 01:06:09,660
what doesn't work, embracing
what does work, and moving on.

1500
01:06:09,660 --> 01:06:13,230
But this also applies to
how you write your code.

1501
01:06:13,230 --> 01:06:16,130
And I can talk about-- on a
high level and a low level.

1502
01:06:16,130 --> 01:06:18,220
The where you put
your parentheses,

1503
01:06:18,220 --> 01:06:21,300
and exactly what kinds of
variables you use is a process.

1504
01:06:21,300 --> 01:06:24,430
And you make decisions on
that basis every moment

1505
01:06:24,430 --> 01:06:25,750
that you're coding.

1506
01:06:25,750 --> 01:06:28,430
And it's a really good idea
to think about what you did

1507
01:06:28,430 --> 01:06:31,440
and how well it worked
for you, or someone else.

1508
01:06:31,440 --> 01:06:33,450
And this is the kind
of thing that maybe

1509
01:06:33,450 --> 01:06:34,950
in your early
programming career you

1510
01:06:34,950 --> 01:06:36,510
don't want to think
about too much,

1511
01:06:36,510 --> 01:06:37,860
because just getting
the stupid thing to work

1512
01:06:37,860 --> 01:06:39,319
in the first place
is kind of hard.

1513
01:06:39,319 --> 01:06:41,901
But I'm going to try to convince
you that it's worth your time

1514
01:06:41,901 --> 01:06:43,420
to get these habits
going, so it's

1515
01:06:43,420 --> 01:06:45,420
easier for you in the
future to debug your code,

1516
01:06:45,420 --> 01:06:48,519
or someone else's code.

1517
01:06:48,519 --> 01:06:51,060
So I want to talk a little bit,
very briefly, about something

1518
01:06:51,060 --> 01:06:53,810
I mentioned in the
review on the lecture

1519
01:06:53,810 --> 01:06:57,620
on game engines, which is
that all software sucks.

1520
01:06:57,620 --> 01:07:00,740
And it sucks in different
ways and all that, right?

1521
01:07:00,740 --> 01:07:05,040
Well, the problem with this
is is that yours does too.

1522
01:07:05,040 --> 01:07:07,380
Your software is going
to have bugs in it.

1523
01:07:07,380 --> 01:07:10,530
And your job is to
try to make that

1524
01:07:10,530 --> 01:07:11,792
happen as little as possible.

1525
01:07:11,792 --> 01:07:14,000
You want your software to
suck as little as possible.

1526
01:07:17,220 --> 01:07:19,474
Now we also talked
about one reason

1527
01:07:19,474 --> 01:07:21,140
we use a game engine
is just so that you

1528
01:07:21,140 --> 01:07:22,870
write less code overall.

1529
01:07:22,870 --> 01:07:24,660
You spend less time doing that.

1530
01:07:24,660 --> 01:07:27,243
That's because everything that
you do when you're running code

1531
01:07:27,243 --> 01:07:28,616
is slow.

1532
01:07:28,616 --> 01:07:33,650
And in particular,
debugging is the slow part.

1533
01:07:33,650 --> 01:07:35,229
It's not too hard
to write new code,

1534
01:07:35,229 --> 01:07:37,270
but it's actually pretty
hard to go into old code

1535
01:07:37,270 --> 01:07:38,479
and fix what happens.

1536
01:07:38,479 --> 01:07:40,770
At it varies, depending on
the complexity of your task,

1537
01:07:40,770 --> 01:07:44,286
but generally speaking,
when you've written a bug,

1538
01:07:44,286 --> 01:07:45,660
later, you have
to spend the time

1539
01:07:45,660 --> 01:07:47,810
to figure out that there was a
bug, figure out where it was,

1540
01:07:47,810 --> 01:07:49,934
and then you actually have
to fix the stupid thing.

1541
01:07:49,934 --> 01:07:52,470
And that is actually where most
of your time is going to go,

1542
01:07:52,470 --> 01:07:53,928
when you're trying
to develop code.

1543
01:07:57,510 --> 01:07:59,340
So again, figure
out the problem,

1544
01:07:59,340 --> 01:08:01,390
and then change the
code to fix your bugs.

1545
01:08:01,390 --> 01:08:04,120
But I acclaim that most of the
time, figuring out the problem

1546
01:08:04,120 --> 01:08:05,435
is more of your time.

1547
01:08:05,435 --> 01:08:07,560
Now this isn't true for
the small bugs, when you're

1548
01:08:07,560 --> 01:08:08,340
typing something
at your computer,

1549
01:08:08,340 --> 01:08:10,340
and it doesn't work when
you compile it or whatever,

1550
01:08:10,340 --> 01:08:10,890
and it runs.

1551
01:08:10,890 --> 01:08:12,310
You go back and
fix it right away.

1552
01:08:12,310 --> 01:08:14,090
Yeah, that part of
debugging is not so much

1553
01:08:14,090 --> 01:08:14,750
figuring out the problem.

1554
01:08:14,750 --> 01:08:15,834
Because you just wrote it.

1555
01:08:15,834 --> 01:08:16,833
It's fresh in your mind.

1556
01:08:16,833 --> 01:08:18,160
You know what's going on there.

1557
01:08:18,160 --> 01:08:21,260
But if it's been a couple of
days or a couple of weeks,

1558
01:08:21,260 --> 01:08:23,710
then actually the hard
part and the slow part,

1559
01:08:23,710 --> 01:08:25,970
is figuring out what went wrong.

1560
01:08:28,529 --> 01:08:31,066
And so one of the
things that you

1561
01:08:31,066 --> 01:08:33,149
need to think about when
you're writing your code,

1562
01:08:33,149 --> 01:08:34,740
is you want to make it
as simple as possible

1563
01:08:34,740 --> 01:08:37,281
so that you're less likely to
write a bug in the first place.

1564
01:08:37,281 --> 01:08:40,340
Or once you've written
a bug, it sticks out.

1565
01:08:40,340 --> 01:08:42,514
It's easier to see.

1566
01:08:42,514 --> 01:08:44,180
And the important
thing to remember here

1567
01:08:44,180 --> 01:08:45,763
is that all this
code you have written

1568
01:08:45,763 --> 01:08:47,800
is not as easy to read
as you think it is.

1569
01:08:50,410 --> 01:08:55,240
And the right way to do this is
to make it as easy as possible.

1570
01:08:55,240 --> 01:08:57,802
And the way I like to think
about it, at least today,

1571
01:08:57,802 --> 01:09:00,010
is to make it require as
little knowledge as possible

1572
01:09:00,010 --> 01:09:02,342
to figure out what's
going on in your code.

1573
01:09:02,342 --> 01:09:04,300
If you use some really
fancy language features,

1574
01:09:04,300 --> 01:09:05,790
that's really cool, and
it feel like you're really

1575
01:09:05,790 --> 01:09:06,779
smart when you're doing it.

1576
01:09:06,779 --> 01:09:08,695
But a week later you
back to look at that code

1577
01:09:08,695 --> 01:09:11,270
to try to figure out, I don't
even know what I did there.

1578
01:09:11,270 --> 01:09:14,710
And heaven help you if someone
else tries to read your code.

1579
01:09:14,710 --> 01:09:18,000
So ideally, you don't want to
go too obscure into the computer

1580
01:09:18,000 --> 01:09:19,350
language fancy features.

1581
01:09:19,350 --> 01:09:22,054
You don't want to go too much
into your subject matter.

1582
01:09:22,054 --> 01:09:23,514
But there are
exceptions to this.

1583
01:09:23,514 --> 01:09:25,430
If for example, you work
on a very specialized

1584
01:09:25,430 --> 01:09:26,950
piece of software
where everyone has

1585
01:09:26,950 --> 01:09:31,380
to have an arrow engineering
astro degree to actually work

1586
01:09:31,380 --> 01:09:34,227
on the project, you can assume
some level of competency there.

1587
01:09:34,227 --> 01:09:36,060
But generally speaking,
in game development,

1588
01:09:36,060 --> 01:09:37,894
and most application
development,

1589
01:09:37,894 --> 01:09:40,060
you want to assume was
little knowledge as possible,

1590
01:09:40,060 --> 01:09:41,609
so that when you want
to debug your code,

1591
01:09:41,609 --> 01:09:43,692
you can look at the little
part of the code you're

1592
01:09:43,692 --> 01:09:47,340
at right now, and see if you
can fit what's going on there.

1593
01:09:47,340 --> 01:09:50,450
If possible, you want to assume
no knowledge on the part of who

1594
01:09:50,450 --> 01:09:52,652
was reading your code.

1595
01:09:52,652 --> 01:09:54,860
And I'm going to talk a
little bit about why that is.

1596
01:09:56,865 --> 01:09:59,240
This is a useful thing to
think about for user interfaces

1597
01:09:59,240 --> 01:10:00,800
or really any problem solving.

1598
01:10:00,800 --> 01:10:03,564
Humans can't hold that much
in their brains at once.

1599
01:10:03,564 --> 01:10:04,980
And if you're
trying to write code

1600
01:10:04,980 --> 01:10:07,950
that requires you to think about
10 different things at once,

1601
01:10:07,950 --> 01:10:10,980
you're in trouble, because
humans really don't do that.

1602
01:10:13,414 --> 01:10:15,080
Now generally we get
around this problem

1603
01:10:15,080 --> 01:10:16,320
with what's called chunking.

1604
01:10:16,320 --> 01:10:20,640
So when you started with math,
you thought about the number

1605
01:10:20,640 --> 01:10:23,130
five wasn't even
a numeral to you.

1606
01:10:23,130 --> 01:10:25,510
It was five objects.

1607
01:10:25,510 --> 01:10:27,800
But you couldn't really
wrap your brain around 12,

1608
01:10:27,800 --> 01:10:29,509
because you can't
look at 12 objects

1609
01:10:29,509 --> 01:10:31,300
and think oh, I understand
what that means.

1610
01:10:31,300 --> 01:10:33,425
But as soon as you practice
with your numbers more,

1611
01:10:33,425 --> 01:10:36,432
you begin to think of
number 12 as a unit.

1612
01:10:36,432 --> 01:10:37,890
It's not 12 things,
it's one thing.

1613
01:10:37,890 --> 01:10:40,247
It's the concept of 12, and
that's really useful to you.

1614
01:10:40,247 --> 01:10:42,080
And then you started
working through algebra

1615
01:10:42,080 --> 01:10:42,996
and you got variables.

1616
01:10:42,996 --> 01:10:45,850
And now you're using calculus,
and all the other cool things.

1617
01:10:45,850 --> 01:10:47,490
You talk about vectors in math.

1618
01:10:47,490 --> 01:10:49,852
A vector represents three
numbers, or a direction

1619
01:10:49,852 --> 01:10:51,310
or position in
space, but you don't

1620
01:10:51,310 --> 01:10:52,560
think about all three numbers.

1621
01:10:52,560 --> 01:10:54,266
And you certainly
don't think that 35

1622
01:10:54,266 --> 01:10:55,640
is one of those
numbers, and that

1623
01:10:55,640 --> 01:10:57,420
means that there are 35 things.

1624
01:10:57,420 --> 01:10:59,140
Your brain isn't
wasting time on that.

1625
01:10:59,140 --> 01:11:01,179
Instead your brain is
thinking, it's a vector,

1626
01:11:01,179 --> 01:11:01,970
it's a point space.

1627
01:11:01,970 --> 01:11:03,134
That's all I need to know.

1628
01:11:03,134 --> 01:11:05,050
So your brain is ignoring
a lot of information

1629
01:11:05,050 --> 01:11:08,209
by clumping a bunch of
information into one spot.

1630
01:11:08,209 --> 01:11:10,250
I often use phone numbers
as an example for this.

1631
01:11:10,250 --> 01:11:12,120
And it's an
increasingly poor thing

1632
01:11:12,120 --> 01:11:13,930
to use, because
I bet most of you

1633
01:11:13,930 --> 01:11:16,880
don't memorize phone numbers,
because why would you?

1634
01:11:16,880 --> 01:11:18,880
But when they started
[INAUDIBLE] phone numbers,

1635
01:11:18,880 --> 01:11:20,546
there are three parts
to a phone number.

1636
01:11:20,546 --> 01:11:25,830
First part is an area code, the
second part is a sub area code.

1637
01:11:25,830 --> 01:11:27,610
The third part is
the four digits

1638
01:11:27,610 --> 01:11:30,950
that are more unique, right.

1639
01:11:30,950 --> 01:11:34,549
It's really hard to
remember those 10 numbers.

1640
01:11:34,549 --> 01:11:36,340
But actually, once you
learn the area code,

1641
01:11:36,340 --> 01:11:37,631
the area code is three numbers.

1642
01:11:37,631 --> 01:11:39,890
You think of it as one number.

1643
01:11:39,890 --> 01:11:42,740
Boston is mostly 617.

1644
01:11:42,740 --> 01:11:44,740
The second set of numbers
is also three numbers.

1645
01:11:44,740 --> 01:11:46,050
You clump that as well.

1646
01:11:46,050 --> 01:11:48,035
And the last four numbers, yeah,
you have to memorize those.

1647
01:11:48,035 --> 01:11:49,993
But basically instead of
remembering 10 things,

1648
01:11:49,993 --> 01:11:52,490
you have to remember six things.

1649
01:11:52,490 --> 01:11:54,490
The four numbers and
then the two prefixes.

1650
01:11:57,920 --> 01:12:01,290
And another problem with coding
is that as you keep doing it,

1651
01:12:01,290 --> 01:12:03,410
you're making decisions
constantly in your coding.

1652
01:12:03,410 --> 01:12:04,390
What's the right way to do this?

1653
01:12:04,390 --> 01:12:05,530
What's the right variable
you're going to use?

1654
01:12:05,530 --> 01:12:06,714
Et cetera, et cetera.

1655
01:12:06,714 --> 01:12:08,130
And as you do this,
you get tired.

1656
01:12:08,130 --> 01:12:10,129
Humans only have so much
decision making in them

1657
01:12:10,129 --> 01:12:11,974
before they need a break.

1658
01:12:11,974 --> 01:12:13,390
So a couple of
things we can do is

1659
01:12:13,390 --> 01:12:14,870
we want to reduce
the amount of things

1660
01:12:14,870 --> 01:12:16,830
you have to remember while
you're looking at your code,

1661
01:12:16,830 --> 01:12:18,530
and we want to reduce
the number of decisions

1662
01:12:18,530 --> 01:12:19,870
you're going to have to make.

1663
01:12:19,870 --> 01:12:22,074
And to some extent, although
I'm not really clear

1664
01:12:22,074 --> 01:12:23,490
on a psychological
basis for this,

1665
01:12:23,490 --> 01:12:26,260
I'm going to make a crazy
claim that figuring something

1666
01:12:26,260 --> 01:12:28,761
out and deciding what this
thing must mean is a decision.

1667
01:12:28,761 --> 01:12:31,010
So even if you're just trying
to figure out something,

1668
01:12:31,010 --> 01:12:32,770
that also is a
burden on your brain.

1669
01:12:32,770 --> 01:12:34,520
And what you want to
do is keep your brain

1670
01:12:34,520 --> 01:12:37,890
alert and hopping as much as you
can, for as long as possible.

1671
01:12:37,890 --> 01:12:43,550
And to do that again, we want to
simplify your code if you can.

1672
01:12:43,550 --> 01:12:47,450
So to go back here, simplicity--
when I say simplicity,

1673
01:12:47,450 --> 01:12:49,435
I mean you want fewer
things to think about.

1674
01:12:49,435 --> 01:12:51,060
Should be easy to
read the code, so you

1675
01:12:51,060 --> 01:12:52,430
don't have to memorize
what the code is doing.

1676
01:12:52,430 --> 01:12:53,888
You can just quickly
glance and get

1677
01:12:53,888 --> 01:12:55,810
a reminder of what it's doing.

1678
01:12:55,810 --> 01:12:57,501
You have fewer bugs
because there's

1679
01:12:57,501 --> 01:12:58,500
just fewer moving parts.

1680
01:12:58,500 --> 01:13:00,947
Fewer things to go wrong.

1681
01:13:00,947 --> 01:13:03,030
I'm going to say this
hopefully a couple of times,

1682
01:13:03,030 --> 01:13:06,835
but a short variable name is
not simpler, it's just shorter.

1683
01:13:10,330 --> 01:13:12,840
If you start thinking about
what you spend time doing when

1684
01:13:12,840 --> 01:13:15,380
you're writing code, and
trying to get something done,

1685
01:13:15,380 --> 01:13:17,901
what takes the most time?

1686
01:13:17,901 --> 01:13:20,400
I'm willing to bet it's probably
going to be debugging part,

1687
01:13:20,400 --> 01:13:22,020
but maybe you think
it's going to be getting

1688
01:13:22,020 --> 01:13:24,150
the stupid thing to compile in
the first place or whatever,

1689
01:13:24,150 --> 01:13:25,500
but I'm willing to
bet almost none of you

1690
01:13:25,500 --> 01:13:27,830
think that your typing speed
is the thing slowing down

1691
01:13:27,830 --> 01:13:29,067
your coding.

1692
01:13:29,067 --> 01:13:30,900
If only I could type
80 characters a minute,

1693
01:13:30,900 --> 01:13:33,030
I could double my coding speed.

1694
01:13:33,030 --> 01:13:35,200
It doesn't work that way.

1695
01:13:35,200 --> 01:13:37,664
You do a lot of thinking, and
just a little bit of typing.

1696
01:13:37,664 --> 01:13:39,580
So if your variable name
is 12 characters long

1697
01:13:39,580 --> 01:13:43,440
instead of four characters
long, that is not cost you time.

1698
01:13:43,440 --> 01:13:45,550
It just costing you
eight keystrokes.

1699
01:13:45,550 --> 01:13:47,220
And in a modern
development environment,

1700
01:13:47,220 --> 01:13:48,010
you've got auto complete.

1701
01:13:48,010 --> 01:13:49,468
You type the first
four characters,

1702
01:13:49,468 --> 01:13:51,520
you hit control space,
and you get all 12, hey.

1703
01:13:51,520 --> 01:13:53,853
You can't even claim that
you've saved eight characters,

1704
01:13:53,853 --> 01:13:55,680
you've only saved six.

1705
01:13:55,680 --> 01:13:59,060
So anyway, I'm going to
talk about that a lot,

1706
01:13:59,060 --> 01:14:01,320
because I believe that
the longer variable

1707
01:14:01,320 --> 01:14:06,500
names are really useful cues to
remind you what you're doing.

1708
01:14:06,500 --> 01:14:08,630
And one of my favorite
things to talk about

1709
01:14:08,630 --> 01:14:11,500
is write once, read never code.

1710
01:14:11,500 --> 01:14:13,020
Who here has used Perl?

1711
01:14:13,020 --> 01:14:15,130
Anyone?

1712
01:14:15,130 --> 01:14:17,130
Have you tried to read
other people's Perl code?

1713
01:14:19,900 --> 01:14:20,400
Yeah.

1714
01:14:20,400 --> 01:14:22,770
Why would you try?

1715
01:14:22,770 --> 01:14:26,336
Have you tried reading
your own Perl code?

1716
01:14:26,336 --> 01:14:26,835
He goes, no.

1717
01:14:29,339 --> 01:14:29,880
That's right.

1718
01:14:29,880 --> 01:14:30,880
You just write it again.

1719
01:14:30,880 --> 01:14:31,560
Absolutely.

1720
01:14:31,560 --> 01:14:33,185
So, Perl if you're
not familiar with it

1721
01:14:33,185 --> 01:14:36,120
is this cool scripting language
that's not used as much now,

1722
01:14:36,120 --> 01:14:39,090
but it was once the
open source darling.

1723
01:14:39,090 --> 01:14:42,650
PHIP is kind of modern
equivalent of, my god,

1724
01:14:42,650 --> 01:14:45,177
don't try to read that code.

1725
01:14:45,177 --> 01:14:47,510
Perl had the nice feature
where pretty much every symbol

1726
01:14:47,510 --> 01:14:49,694
on your keyboard has a meaning.

1727
01:14:49,694 --> 01:14:51,360
And if you want to
do something, there's

1728
01:14:51,360 --> 01:14:52,984
probably three
different ways to do it,

1729
01:14:52,984 --> 01:14:55,677
with three different obscure
characters on your keyboard.

1730
01:14:55,677 --> 01:14:58,010
Worse, each of those characters
has a different meaning,

1731
01:14:58,010 --> 01:15:00,480
depending on what
you're using it on.

1732
01:15:00,480 --> 01:15:04,630
But this is an example
of APL code, which

1733
01:15:04,630 --> 01:15:06,800
a stands for A
Programming Language

1734
01:15:06,800 --> 01:15:09,240
developed in the late
'60s, early '70s.

1735
01:15:09,240 --> 01:15:13,580
And it's really painful
because in APL not only

1736
01:15:13,580 --> 01:15:15,110
does every character
on the keyboard

1737
01:15:15,110 --> 01:15:18,200
have meaning, they've
minted special keyboards

1738
01:15:18,200 --> 01:15:20,370
with an extra three
characters per key,

1739
01:15:20,370 --> 01:15:22,570
so that you could
have more characters.

1740
01:15:22,570 --> 01:15:25,807
And this is awesome if you think
of writing code as if piece

1741
01:15:25,807 --> 01:15:27,807
of paper with your pencil
and you're doing math,

1742
01:15:27,807 --> 01:15:30,160
and you're writing fancy
integral symbols, and this

1743
01:15:30,160 --> 01:15:31,930
and that, sure.

1744
01:15:31,930 --> 01:15:34,472
It's handy in math to chunk
those concepts this way.

1745
01:15:34,472 --> 01:15:35,930
But for coding,
generally speaking,

1746
01:15:35,930 --> 01:15:37,800
we're stuck on our
alphanumeric keyboard

1747
01:15:37,800 --> 01:15:38,990
with a couple of symbols.

1748
01:15:38,990 --> 01:15:42,050
And I advise you to use as few
of those symbols as possible.

1749
01:15:42,050 --> 01:15:46,100
Try to stick with your
language if you can.

1750
01:15:46,100 --> 01:15:47,550
All right.

1751
01:15:47,550 --> 01:15:51,541
Who here thinks that you write
enough comments in your code?

1752
01:15:51,541 --> 01:15:52,040
Wow!

1753
01:15:52,040 --> 01:15:52,770
Some of you do.

1754
01:15:52,770 --> 01:15:56,570
But almost none of you-- maybe
a quarter of you are like, yeah,

1755
01:15:56,570 --> 01:15:57,707
I'm proud of my comments.

1756
01:15:57,707 --> 01:15:59,290
It's cool to be proud
of your comments

1757
01:15:59,290 --> 01:16:00,248
if you're writing them.

1758
01:16:00,248 --> 01:16:04,090
And if you're not writing them,
don't be so proud of them.

1759
01:16:04,090 --> 01:16:06,750
But sometimes I see comments
that are just duplicating

1760
01:16:06,750 --> 01:16:07,890
what the code is saying.

1761
01:16:07,890 --> 01:16:10,000
If your if statement says,
if x is less than 5--

1762
01:16:10,000 --> 01:16:12,230
don't put a comment up there
that says if x is less than 5

1763
01:16:12,230 --> 01:16:12,771
do something.

1764
01:16:12,771 --> 01:16:13,920
That's a waste of time.

1765
01:16:13,920 --> 01:16:15,510
I can see that in your code.

1766
01:16:15,510 --> 01:16:18,120
But I want to know why you
care if x is less than 5.

1767
01:16:18,120 --> 01:16:23,220
That's the kind of comment I
would like to see in your code.

1768
01:16:23,220 --> 01:16:24,940
And we'll get to this
a little bit later,

1769
01:16:24,940 --> 01:16:26,960
but I also talk about longer
variable names, longer function

1770
01:16:26,960 --> 01:16:27,580
names.

1771
01:16:27,580 --> 01:16:30,130
Those are useful ways to
dodge writing comments

1772
01:16:30,130 --> 01:16:33,540
if they are correct.

1773
01:16:33,540 --> 01:16:35,500
But really quite
frankly, if you're

1774
01:16:35,500 --> 01:16:37,140
trying to figure
out gosh, I don't

1775
01:16:37,140 --> 01:16:39,355
know if I should comment
this or not, write one.

1776
01:16:39,355 --> 01:16:40,480
It's not going to hurt you.

1777
01:16:44,550 --> 01:16:47,790
So here's an example.

1778
01:16:47,790 --> 01:16:51,700
These comments don't mimic
the code, but what they do do

1779
01:16:51,700 --> 01:16:56,172
is they tell the story of what
the code is actually doing.

1780
01:16:56,172 --> 01:16:57,630
Random aside, font
is actually very

1781
01:16:57,630 --> 01:16:59,210
important with your editor.

1782
01:16:59,210 --> 01:17:02,089
Make sure you use a fixed
width font because pretty much

1783
01:17:02,089 --> 01:17:02,880
all programmers do.

1784
01:17:02,880 --> 01:17:05,850
And sometimes you use spacing to
have everything line up nicely,

1785
01:17:05,850 --> 01:17:07,560
and you want to have that
be crystal clear to anyone

1786
01:17:07,560 --> 01:17:08,440
else using your code.

1787
01:17:11,680 --> 01:17:13,680
But there's another way to this.

1788
01:17:13,680 --> 01:17:14,780
So this is code.

1789
01:17:14,780 --> 01:17:15,975
You can figure it out.

1790
01:17:15,975 --> 01:17:17,100
Go ahead and figure it out.

1791
01:17:22,530 --> 01:17:24,250
There's no rocket
science going on here.

1792
01:17:24,250 --> 01:17:25,934
We're using the
Pythagorean Theorem

1793
01:17:25,934 --> 01:17:28,350
to calculate a distance, and
make sure that if it's small,

1794
01:17:28,350 --> 01:17:30,040
we return 50.

1795
01:17:30,040 --> 01:17:31,490
There's nothing hard here.

1796
01:17:31,490 --> 01:17:33,490
A programmer can
figure this out,

1797
01:17:33,490 --> 01:17:35,920
but the programmer shouldn't
have to figure this out.

1798
01:17:35,920 --> 01:17:37,250
And that's my argument.

1799
01:17:37,250 --> 01:17:39,601
If you takes you-- I don't
know, maybe you're great

1800
01:17:39,601 --> 01:17:41,600
and it takes you two
seconds to figure that out.

1801
01:17:41,600 --> 01:17:42,950
Maybe it takes you 30
seconds to figure that out.

1802
01:17:42,950 --> 01:17:44,200
It doesn't really matter.

1803
01:17:44,200 --> 01:17:46,200
It should take you less
than that if the code

1804
01:17:46,200 --> 01:17:47,324
has been written correctly.

1805
01:17:49,740 --> 01:17:53,200
So for example, I'm just looking
at the 900 to 30 times 30.

1806
01:17:53,200 --> 01:17:53,700
Because why?

1807
01:17:53,700 --> 01:17:54,784
The compiler doesn't care.

1808
01:17:54,784 --> 01:17:56,158
It's a little bit
easier to read.

1809
01:17:56,158 --> 01:17:58,505
You can say if the distance
is less than 30, as opposed

1810
01:17:58,505 --> 01:18:00,380
to, if the distance
squared is less than 900.

1811
01:18:00,380 --> 01:18:01,796
AUDIENCE: And it's also the bug.

1812
01:18:01,796 --> 01:18:03,037
This also has a bug.

1813
01:18:03,037 --> 01:18:04,370
PROFESSOR: This does have a bug.

1814
01:18:04,370 --> 01:18:06,100
Good catch.

1815
01:18:06,100 --> 01:18:07,200
There's a bug here.

1816
01:18:07,200 --> 01:18:09,520
This code doesn't work.

1817
01:18:09,520 --> 01:18:14,290
Because we're saying y0 minus
1 instead of y0 minus y1.

1818
01:18:14,290 --> 01:18:16,730
So there's a better
way of doing that.

1819
01:18:16,730 --> 01:18:18,920
This is even easier to read.

1820
01:18:18,920 --> 01:18:20,897
We are using a vector instead.

1821
01:18:20,897 --> 01:18:22,730
The vector class has
some internal knowledge

1822
01:18:22,730 --> 01:18:24,230
of what it needs
to attract vectors,

1823
01:18:24,230 --> 01:18:25,750
and what the length
of a vector is.

1824
01:18:25,750 --> 01:18:32,350
Not only is this less bug prone,
but it's just easier to read.

1825
01:18:32,350 --> 01:18:35,906
And that bug that you
caught there can't happen.

1826
01:18:35,906 --> 01:18:37,530
Now this code is a
little bit cheating,

1827
01:18:37,530 --> 01:18:38,810
because I used v for the name.

1828
01:18:38,810 --> 01:18:43,220
So you can guess that they're
vectors, but that's fine.

1829
01:18:43,220 --> 01:18:44,251
Here's comments.

1830
01:18:44,251 --> 01:18:45,250
Basically the same code.

1831
01:18:45,250 --> 01:18:47,665
I'm saying, hey,
here's some context.

1832
01:18:51,590 --> 01:18:53,230
This is a lot more code.

1833
01:18:53,230 --> 01:18:55,240
In some ways it's harder read.

1834
01:18:55,240 --> 01:18:57,440
In some ways it's
easier to read.

1835
01:18:57,440 --> 01:18:58,110
That's one of the
things that you're

1836
01:18:58,110 --> 01:18:59,901
going to have to figure
out for yourselves.

1837
01:18:59,901 --> 01:19:02,240
What coding styles
make sense for you?

1838
01:19:02,240 --> 01:19:05,900
Obviously, simpler is
a subjective question.

1839
01:19:05,900 --> 01:19:07,470
But I kind of like
the style of code

1840
01:19:07,470 --> 01:19:09,220
because what it does
is it means that even

1841
01:19:09,220 --> 01:19:12,110
if you don't comment your code,
your code still is commented.

1842
01:19:12,110 --> 01:19:14,397
Because you can read this
and know what's going on.

1843
01:19:14,397 --> 01:19:15,980
More importantly--
and this is the one

1844
01:19:15,980 --> 01:19:18,940
I've change since the last
year I gave this presentation.

1845
01:19:18,940 --> 01:19:20,410
I thought that the
comments saying

1846
01:19:20,410 --> 01:19:23,010
why, and then the code that did
it was probably the better way

1847
01:19:23,010 --> 01:19:23,380
to go.

1848
01:19:23,380 --> 01:19:25,380
But a friend of mine
pretty quickly convinced me

1849
01:19:25,380 --> 01:19:28,480
that actually as codes get
maintained for a year or so,

1850
01:19:28,480 --> 01:19:30,990
you might change the code and
forget to change the comment.

1851
01:19:30,990 --> 01:19:34,685
And this actually happens a
lot in real software projects.

1852
01:19:34,685 --> 01:19:36,310
With the kind of
commenting or the kind

1853
01:19:36,310 --> 01:19:39,050
of self documenting code
that I'm using here,

1854
01:19:39,050 --> 01:19:40,270
that can't happen.

1855
01:19:40,270 --> 01:19:43,020
If you change the code,
you change the comment.

1856
01:19:43,020 --> 01:19:43,520
It's innate.

1857
01:19:43,520 --> 01:19:45,270
They're intrinsincally
linked because they

1858
01:19:45,270 --> 01:19:46,100
are the same thing.

1859
01:19:46,100 --> 01:19:48,253
If you can do this, it
actually helps a lot.

1860
01:19:54,380 --> 01:19:56,672
So I'm going to go through
a variety of tips and tricks

1861
01:19:56,672 --> 01:19:58,046
and things that
might make things

1862
01:19:58,046 --> 01:19:59,550
a little bit easier to read.

1863
01:19:59,550 --> 01:20:01,010
But before I do
that I want to talk

1864
01:20:01,010 --> 01:20:06,334
to you a little bit about to why
and who it is you're helping.

1865
01:20:06,334 --> 01:20:08,500
So a while back, I was
complaining to my grandmother

1866
01:20:08,500 --> 01:20:10,160
that wow, you know,
last year I made

1867
01:20:10,160 --> 01:20:12,220
a bunch of stupid decisions.

1868
01:20:12,220 --> 01:20:14,340
I didn't do this right,
I didn't do that right.

1869
01:20:14,340 --> 01:20:16,760
I'm so much smarter now this
year than I was last year.

1870
01:20:16,760 --> 01:20:18,620
It's amazing.

1871
01:20:18,620 --> 01:20:21,040
My grandma said, yeah,
I feel that way too.

1872
01:20:21,040 --> 01:20:22,640
All the time.

1873
01:20:22,640 --> 01:20:24,860
She was 84.

1874
01:20:24,860 --> 01:20:30,450
And I thought oh no, when I'm 83
I'm still going to be a moron.

1875
01:20:30,450 --> 01:20:32,370
So one of the people
that you're writing

1876
01:20:32,370 --> 01:20:34,826
code for-- one of the people
who will be reading your code

1877
01:20:34,826 --> 01:20:36,200
is not other people
on your team,

1878
01:20:36,200 --> 01:20:38,180
although they're very
important, but it's you.

1879
01:20:38,180 --> 01:20:40,620
You will read your code later.

1880
01:20:40,620 --> 01:20:42,260
Have any of you
looked back at code

1881
01:20:42,260 --> 01:20:44,452
you wrote six months ago yet?

1882
01:20:44,452 --> 01:20:46,660
You're early in your career,
so not many of you have.

1883
01:20:46,660 --> 01:20:48,300
But I'm willing to
bet when you look back

1884
01:20:48,300 --> 01:20:50,280
at the code you wrote six months
ago you think yourself a couple

1885
01:20:50,280 --> 01:20:50,780
things.

1886
01:20:50,780 --> 01:20:54,800
One, wow, I was an idiot.

1887
01:20:54,800 --> 01:20:57,020
And two, you're going
to think to yourself,

1888
01:20:57,020 --> 01:20:59,440
I could write this better now.

1889
01:20:59,440 --> 01:21:01,290
And three, you're
probably also thinking

1890
01:21:01,290 --> 01:21:03,360
even if the code works,
the algorithm is solid,

1891
01:21:03,360 --> 01:21:05,922
this is decent, it
could be more readable.

1892
01:21:05,922 --> 01:21:07,380
Maybe you're not
thinking that yet.

1893
01:21:07,380 --> 01:21:11,240
I want you to start
thinking that because you're

1894
01:21:11,240 --> 01:21:13,100
going to forget the
code that you write.

1895
01:21:13,100 --> 01:21:14,808
And again, when you're
just starting out,

1896
01:21:14,808 --> 01:21:16,310
that seems impossible.

1897
01:21:16,310 --> 01:21:18,372
That you can't forget
code that you just wrote.

1898
01:21:18,372 --> 01:21:20,830
But I guarantee you after you've
been writing code for five

1899
01:21:20,830 --> 01:21:22,327
years or more, a
lot, you're going

1900
01:21:22,327 --> 01:21:24,410
to discover that you don't
remember what you wrote

1901
01:21:24,410 --> 01:21:27,329
yesterday, or last
hour, as well as

1902
01:21:27,329 --> 01:21:29,620
now when you're just learning
and getting deep into it,

1903
01:21:29,620 --> 01:21:31,716
you remember a lot more
than you're going to.

1904
01:21:31,716 --> 01:21:33,090
But keep in mind
that experience.

1905
01:21:33,090 --> 01:21:34,080
And you go back to
your code and you

1906
01:21:34,080 --> 01:21:35,265
don't remember what
you wrote, that's

1907
01:21:35,265 --> 01:21:37,120
the experience your
teammates have every time

1908
01:21:37,120 --> 01:21:37,920
they look at your code.

1909
01:21:37,920 --> 01:21:38,795
They didn't write it.

1910
01:21:38,795 --> 01:21:40,670
They cannot remember it.

1911
01:21:40,670 --> 01:21:44,220
Your code is a communication
opportunity to talk your team.

1912
01:21:44,220 --> 01:21:48,840
To let them know what it
is that your code does.

1913
01:21:48,840 --> 01:21:52,160
So one way to make code more
readable, shorter functions.

1914
01:21:52,160 --> 01:21:54,010
You hear this
sometimes, all of us

1915
01:21:54,010 --> 01:21:57,344
are eventually write
that 500-line procedure

1916
01:21:57,344 --> 01:21:59,260
that does this, then
that, then the next thing

1917
01:21:59,260 --> 01:22:00,070
to the next thing.

1918
01:22:00,070 --> 01:22:02,111
We all do it, because it's
the easy way to do it.

1919
01:22:02,111 --> 01:22:04,745
You think, I'm going to do this
thing, so I do step 1, step 2,

1920
01:22:04,745 --> 01:22:06,840
and you march on through.

1921
01:22:06,840 --> 01:22:08,112
It's reasonable.

1922
01:22:08,112 --> 01:22:10,570
It's a way to get things done,
especially when your work is

1923
01:22:10,570 --> 01:22:11,357
in progress.

1924
01:22:11,357 --> 01:22:13,440
But if you ever want to
go back and fix that code,

1925
01:22:13,440 --> 01:22:15,398
and now you have to figure
out what pretty much

1926
01:22:15,398 --> 01:22:16,690
all 500 lines are doing.

1927
01:22:16,690 --> 01:22:18,785
And that's kind of dangerous.

1928
01:22:18,785 --> 01:22:20,410
The easiest thing I
can recommend there

1929
01:22:20,410 --> 01:22:24,010
is really if it is a step 1,
step 2, step 3 kind of thing,

1930
01:22:24,010 --> 01:22:26,020
why not divide steps
and sub functions?

1931
01:22:26,020 --> 01:22:29,049
The subfunction may only get
called once, but that's OK.

1932
01:22:29,049 --> 01:22:30,590
The reason this
helps you is twofold.

1933
01:22:30,590 --> 01:22:31,860
One, it gives you a nice name.

1934
01:22:31,860 --> 01:22:33,730
For this section of
the code is where

1935
01:22:33,730 --> 01:22:37,440
I am going to tell all the
planets to do build spaceships

1936
01:22:37,440 --> 01:22:38,654
this turn.

1937
01:22:38,654 --> 01:22:39,820
I make that a function call.

1938
01:22:39,820 --> 01:22:43,360
I don't have to worry about
what's inside that function

1939
01:22:43,360 --> 01:22:46,040
if I'm trying to
debug a war mechanic.

1940
01:22:46,040 --> 01:22:48,275
Because probably, the
part where all planets

1941
01:22:48,275 --> 01:22:51,820
are building spaceships isn't
relevant to the gigantic space

1942
01:22:51,820 --> 01:22:53,790
battle somewhere else.

1943
01:22:53,790 --> 01:22:55,950
But 2, when you
subfunction this,

1944
01:22:55,950 --> 01:22:58,075
inside that subfunction
you are guaranteed

1945
01:22:58,075 --> 01:23:01,040
that the local variables there
are unimportant for everything

1946
01:23:01,040 --> 01:23:02,170
in the big function.

1947
01:23:02,170 --> 01:23:04,900
The scope is such that they
can't affect the big functions.

1948
01:23:04,900 --> 01:23:06,000
They are local variables.

1949
01:23:06,000 --> 01:23:07,250
You don't to worry about that.

1950
01:23:07,250 --> 01:23:10,020
So this is a tiny couple
little class of bug

1951
01:23:10,020 --> 01:23:12,240
that you can kind of dodge
by something as simple

1952
01:23:12,240 --> 01:23:13,900
as subdividing a function.

1953
01:23:13,900 --> 01:23:16,020
Two-- and this is the
other important thing--

1954
01:23:16,020 --> 01:23:18,690
you've got this function, you
strip it down so hopefully you

1955
01:23:18,690 --> 01:23:20,190
can see it on a
page in your editor,

1956
01:23:20,190 --> 01:23:22,744
and you can read in English
kind of, what it's doing.

1957
01:23:22,744 --> 01:23:23,910
You see here the five steps.

1958
01:23:23,910 --> 01:23:25,029
There they are.

1959
01:23:25,029 --> 01:23:26,070
It's a little bit easier.

1960
01:23:26,070 --> 01:23:28,278
And that's kind of a simple,
straightforward example,

1961
01:23:28,278 --> 01:23:29,870
but it's that way
of thinking again,

1962
01:23:29,870 --> 01:23:31,420
that I want you to think about.

1963
01:23:31,420 --> 01:23:33,550
If you ask five programmers,
what's the right thing to do?

1964
01:23:33,550 --> 01:23:34,780
They're all going to
give different answers.

1965
01:23:34,780 --> 01:23:35,751
And that's fine.

1966
01:23:35,751 --> 01:23:37,250
But the thing I
want you start doing

1967
01:23:37,250 --> 01:23:39,019
is thinking about
what is it that you

1968
01:23:39,019 --> 01:23:40,310
think is the right thing to do?

1969
01:23:40,310 --> 01:23:43,137
Why would you consider doing
it this way versus that way?

1970
01:23:43,137 --> 01:23:45,470
And if you just write the
code and don't think about it,

1971
01:23:45,470 --> 01:23:47,470
you're not going to get
better as quickly as you

1972
01:23:47,470 --> 01:23:50,132
will if you think about why
you wrote the code that way,

1973
01:23:50,132 --> 01:23:51,340
and how it's working for you.

1974
01:23:54,550 --> 01:23:57,100
Here's another fine example.

1975
01:23:57,100 --> 01:23:58,790
Making wrong code look wrong.

1976
01:23:58,790 --> 01:24:03,170
This is perfectly valid code
unless I make my variable names

1977
01:24:03,170 --> 01:24:04,650
a little more descriptive.

1978
01:24:04,650 --> 01:24:06,684
And then you discover
that that's wrong code.

1979
01:24:06,684 --> 01:24:07,600
That code is terrible.

1980
01:24:11,820 --> 01:24:13,770
Degrees times radians
is a classic mistake.

1981
01:24:13,770 --> 01:24:17,950
Centimeters and inches
has destroyed Mars rovers.

1982
01:24:17,950 --> 01:24:22,450
Milliseconds, kilometers,
and miles per hour.

1983
01:24:22,450 --> 01:24:24,950
That's probably not
going to work so well.

1984
01:24:24,950 --> 01:24:27,970
And these are actually--
you say, I never do that.

1985
01:24:27,970 --> 01:24:32,470
But again, I kid you not, we
have lost billions of dollars

1986
01:24:32,470 --> 01:24:35,440
to unit conversions because
people didn't do this.

1987
01:24:35,440 --> 01:24:36,820
It's going to be
annoying to you,

1988
01:24:36,820 --> 01:24:38,236
when you're typing
it in, perhaps.

1989
01:24:38,236 --> 01:24:40,410
But I guarantee you, you'll
be safer if you do it.

1990
01:24:44,307 --> 01:24:45,140
Again, random stuff.

1991
01:24:45,140 --> 01:24:46,410
You've probably heard all this.

1992
01:24:46,410 --> 01:24:47,405
And we you're doing
games, you get

1993
01:24:47,405 --> 01:24:49,230
a chance to really
experience it firsthand.

1994
01:24:49,230 --> 01:24:51,229
Try to avoid sticking
numbers deep in your code.

1995
01:24:51,229 --> 01:24:52,030
No magic numbers.

1996
01:24:52,030 --> 01:24:53,905
You want to stick it in
a variable somewhere.

1997
01:24:53,905 --> 01:24:55,580
This has a couple good features.

1998
01:24:55,580 --> 01:24:57,460
One of the biggest is, you've
got someone else on your team

1999
01:24:57,460 --> 01:24:59,080
can easily look up that
number and change it.

2000
01:24:59,080 --> 01:25:00,746
They don't have to
find it in your code.

2001
01:25:00,746 --> 01:25:03,240
They can just look at your
list of variables somewhere,

2002
01:25:03,240 --> 01:25:05,156
and figure it out.

2003
01:25:05,156 --> 01:25:06,530
Immunity, it's
even more awesome,

2004
01:25:06,530 --> 01:25:09,497
because you can just go to the
editor and change it around.

2005
01:25:09,497 --> 01:25:11,330
Also, you can change
it globally everywhere.

2006
01:25:11,330 --> 01:25:12,937
If the number 50
is magical, great.

2007
01:25:12,937 --> 01:25:14,520
But call it something
else so that you

2008
01:25:14,520 --> 01:25:17,871
can change it to 51 when
you're tweaking your game plan.

2009
01:25:17,871 --> 01:25:20,120
I've talked with this before,
and I will talk about it

2010
01:25:20,120 --> 01:25:21,790
again if I get half the chance.

2011
01:25:21,790 --> 01:25:25,490
You want longer variable names
that say exactly what they are.

2012
01:25:25,490 --> 01:25:28,200
You don't want to have to guess.

2013
01:25:28,200 --> 01:25:29,650
They should be pronouncable.

2014
01:25:29,650 --> 01:25:31,820
And this isn't true for
everyone, but most people,

2015
01:25:31,820 --> 01:25:35,620
will tend to in their mind, to
say a variable name out loud.

2016
01:25:35,620 --> 01:25:37,840
And so if it's a bunch
of random consonants

2017
01:25:37,840 --> 01:25:41,531
that don't go anywhere, it's
a little bit harder to read.

2018
01:25:41,531 --> 01:25:43,030
If they look similar,
you don't want

2019
01:25:43,030 --> 01:25:46,710
to have a typo
kill your project.

2020
01:25:46,710 --> 01:25:48,350
Spell them correctly.

2021
01:25:48,350 --> 01:25:50,210
And this is actually
really important,

2022
01:25:50,210 --> 01:25:51,720
especially in
interpreted language

2023
01:25:51,720 --> 01:25:55,800
that just doesn't do anything
except running at run time.

2024
01:25:55,800 --> 01:25:57,420
In Python, for
example, I believe,

2025
01:25:57,420 --> 01:25:59,753
if you declare a variable
that's never been seen before,

2026
01:25:59,753 --> 01:26:01,450
it probably has a valid value.

2027
01:26:01,450 --> 01:26:01,950
No.

2028
01:26:01,950 --> 01:26:02,580
OK, good.

2029
01:26:02,580 --> 01:26:03,790
I'm glad that's true.

2030
01:26:03,790 --> 01:26:04,290
JavaScript.

2031
01:26:04,290 --> 01:26:06,130
That's what I'm thinking.

2032
01:26:06,130 --> 01:26:07,830
But JavaScript--
be very careful,

2033
01:26:07,830 --> 01:26:09,705
especially if you're
using Phaser JavaScript.

2034
01:26:09,705 --> 01:26:12,950
If you mistype the name, it's 0.

2035
01:26:12,950 --> 01:26:13,960
That's no good.

2036
01:26:13,960 --> 01:26:16,104
More and more modern
languages are rejecting that.

2037
01:26:16,104 --> 01:26:18,520
But the other thing is just
it's easier for your teammates

2038
01:26:18,520 --> 01:26:19,330
to know how to spell it.

2039
01:26:19,330 --> 01:26:20,370
If you all agree on a spelling.

2040
01:26:20,370 --> 01:26:22,120
And if you're all going
to agree on a spelling,

2041
01:26:22,120 --> 01:26:23,911
you might as well agree
on the correct one.

2042
01:26:25,855 --> 01:26:28,480
And then reusing a variable name
is also a little bit dangerous

2043
01:26:28,480 --> 01:26:29,560
sometimes.

2044
01:26:29,560 --> 01:26:31,640
If you're exiting a
loop, and you've maybe

2045
01:26:31,640 --> 01:26:33,306
failed to initialize
the thing properly.

2046
01:26:33,306 --> 01:26:34,902
You reuse a variable
name elsewhere.

2047
01:26:34,902 --> 01:26:36,360
You got this weird
value coming in,

2048
01:26:36,360 --> 01:26:37,818
and that's a bug
waiting to happen.

2049
01:26:37,818 --> 01:26:40,730
And it'll be kind
of hard to find.

2050
01:26:40,730 --> 01:26:41,460
Function Names.

2051
01:26:41,460 --> 01:26:42,930
All the same rules
basically apply.

2052
01:26:42,930 --> 01:26:45,180
You want to have it be
distinctive, spelled correctly,

2053
01:26:45,180 --> 01:26:46,612
you want them to
say what they do.

2054
01:26:46,612 --> 01:26:49,070
It's tempting sometimes, to
make your function name really,

2055
01:26:49,070 --> 01:26:50,040
really short.

2056
01:26:50,040 --> 01:26:51,600
Again, that doesn't
speed you up.

2057
01:26:51,600 --> 01:26:53,308
If a function is
longer, you get a chance

2058
01:26:53,308 --> 01:26:54,885
to read what it actually does.

2059
01:26:54,885 --> 01:26:57,010
But the other thing about
function names-- and this

2060
01:26:57,010 --> 01:26:59,080
is even more true than it is
for other parts of coding--

2061
01:26:59,080 --> 01:27:01,580
is that your function name tells
your other programmers what

2062
01:27:01,580 --> 01:27:03,344
the heck you just did.

2063
01:27:03,344 --> 01:27:04,260
I wrote this function.

2064
01:27:04,260 --> 01:27:04,920
Well, what does it do?

2065
01:27:04,920 --> 01:27:06,128
Well, read the function name.

2066
01:27:06,128 --> 01:27:07,120
It's right there.

2067
01:27:07,120 --> 01:27:08,010
That's ideal.

2068
01:27:08,010 --> 01:27:09,580
You can't always pull that off.

2069
01:27:09,580 --> 01:27:11,830
And when your function does
something more complicated

2070
01:27:11,830 --> 01:27:16,259
than you can describe in
four, maybe five words,

2071
01:27:16,259 --> 01:27:18,050
then you need a lot of
comments to describe

2072
01:27:18,050 --> 01:27:19,200
what that function is doing.

2073
01:27:19,200 --> 01:27:21,325
Ideally, your function
should be simpler than that,

2074
01:27:21,325 --> 01:27:22,260
if you can manage it.

2075
01:27:25,020 --> 01:27:28,150
By the way, I took to mention
variable names and links,

2076
01:27:28,150 --> 01:27:30,335
and a lot of you are
probably thinking right now,

2077
01:27:30,335 --> 01:27:31,793
yeah, a longer
variable name sounds

2078
01:27:31,793 --> 01:27:33,650
like a good idea in principle,
but I don't want to type that.

2079
01:27:33,650 --> 01:27:35,060
It would slow me
down to read it.

2080
01:27:35,060 --> 01:27:38,170
There's actually been
research done on this topic.

2081
01:27:38,170 --> 01:27:42,340
8 to 20 letters on average, is
often a marker for good code

2082
01:27:42,340 --> 01:27:43,990
that works with fewer bugs.

2083
01:27:43,990 --> 01:27:45,850
So I'm not talking
a little bit longer.

2084
01:27:45,850 --> 01:27:48,530
If you can push
it, push it harder

2085
01:27:48,530 --> 01:27:50,570
to be as long as you can stand.

2086
01:27:50,570 --> 01:27:54,070
And then you'll be a little
bit happier with that.

2087
01:27:54,070 --> 01:27:57,710
If you are coding in
VI or Punch Card still,

2088
01:27:57,710 --> 01:28:00,760
you could complain about
a 20-letter variable name,

2089
01:28:00,760 --> 01:28:01,854
but you aren't.

2090
01:28:01,854 --> 01:28:03,770
You're using a modern
development environment,

2091
01:28:03,770 --> 01:28:04,895
with auto complete, I hope.

2092
01:28:08,210 --> 01:28:10,060
Variable scope and names.

2093
01:28:10,060 --> 01:28:12,090
Ideally, and this is a
thing we strive to do,

2094
01:28:12,090 --> 01:28:14,620
and don't always succeed at,
you should name your variables

2095
01:28:14,620 --> 01:28:17,590
so that you can tell by looking
at them where they come from.

2096
01:28:17,590 --> 01:28:19,260
By which I mean is
it a global variable?

2097
01:28:19,260 --> 01:28:20,218
Is it a local variable?

2098
01:28:20,218 --> 01:28:21,960
Is it an argument
to the function?

2099
01:28:21,960 --> 01:28:22,860
That kind of thing.

2100
01:28:22,860 --> 01:28:25,460
You can sometimes do this by
prefixing, or post fixing,

2101
01:28:25,460 --> 01:28:27,470
or camel casing, or
not camel casing.

2102
01:28:27,470 --> 01:28:28,630
That kind of thing.

2103
01:28:28,630 --> 01:28:30,640
It doesn't matter
which system you use,

2104
01:28:30,640 --> 01:28:33,656
as long as you're
mostly consistent.

2105
01:28:33,656 --> 01:28:35,780
Trying to be consistent
among different programmers

2106
01:28:35,780 --> 01:28:37,980
is often difficult, because
everyone will horribly

2107
01:28:37,980 --> 01:28:40,500
disagree as to what
the correct answer is.

2108
01:28:40,500 --> 01:28:42,960
But if you can try to sort of
remove that from your brains

2109
01:28:42,960 --> 01:28:45,760
and say, actually it doesn't
matter what it is this time,

2110
01:28:45,760 --> 01:28:47,499
I just need to know
what you're doing.

2111
01:28:47,499 --> 01:28:48,540
That's the important bit.

2112
01:28:51,790 --> 01:28:53,030
Parallel rays.

2113
01:28:53,030 --> 01:28:54,480
These are free arrays.

2114
01:28:54,480 --> 01:28:57,412
And number 3 in each
array is related.

2115
01:28:57,412 --> 01:28:58,870
This is something
that you're going

2116
01:28:58,870 --> 01:29:02,770
to find yourself very tempted to
do a lot, especially in a game.

2117
01:29:02,770 --> 01:29:04,220
And I recommend against it.

2118
01:29:04,220 --> 01:29:05,999
Even if you only have
two parallel arrays,

2119
01:29:05,999 --> 01:29:07,790
I recommend making a
container classic that

2120
01:29:07,790 --> 01:29:09,740
contains both pieces
of data, and have

2121
01:29:09,740 --> 01:29:11,310
them stick in one array.

2122
01:29:11,310 --> 01:29:13,736
Just because you're going to
get bit sometime by having

2123
01:29:13,736 --> 01:29:14,670
these arrays get out of synch.

2124
01:29:14,670 --> 01:29:16,790
You just want to avoid
that if you possibly can.

2125
01:29:20,120 --> 01:29:21,269
Order of Operations.

2126
01:29:21,269 --> 01:29:23,310
There's an expression up
there, which is probably

2127
01:29:23,310 --> 01:29:26,014
legal code in most languages.

2128
01:29:26,014 --> 01:29:28,180
And we are taught in algebra
that we should memorize

2129
01:29:28,180 --> 01:29:30,960
the order of operation so we
know what gets multiplied when,

2130
01:29:30,960 --> 01:29:31,870
and all this.

2131
01:29:31,870 --> 01:29:33,350
But in computer language
we've got a lot more,

2132
01:29:33,350 --> 01:29:35,766
we've got incrementation, we've
got raise to the power of,

2133
01:29:35,766 --> 01:29:38,560
we've got modulo, we've
got all this crazy stuff.

2134
01:29:38,560 --> 01:29:41,990
And my argument is don't.

2135
01:29:41,990 --> 01:29:44,242
Why waste brain
space on memorizing

2136
01:29:44,242 --> 01:29:46,450
the order of operations for
the eight different kinds

2137
01:29:46,450 --> 01:29:48,720
operations you have, when
you can just use parentheses

2138
01:29:48,720 --> 01:29:50,770
and remove all doubt.

2139
01:29:50,770 --> 01:29:53,670
Plus, you could also even
divide that-- I'd divide that up

2140
01:29:53,670 --> 01:29:55,690
into a bunch of
statements, actually.

2141
01:29:55,690 --> 01:29:57,410
There's no reason to
keep it like that.

2142
01:29:57,410 --> 01:29:58,890
There's no way that someone
looks at that expression

2143
01:29:58,890 --> 01:30:00,650
and thinks, this is
the most intuitive way

2144
01:30:00,650 --> 01:30:02,420
to understand this.

2145
01:30:02,420 --> 01:30:04,779
If you're writing on
paper in math class,

2146
01:30:04,779 --> 01:30:07,070
you might find that because
you can use two dimensions,

2147
01:30:07,070 --> 01:30:10,400
you actually can make your
equation more intuitive.

2148
01:30:10,400 --> 01:30:13,094
But in code, you mostly
only have the one dimension.

2149
01:30:13,094 --> 01:30:14,510
And so it's kind
of hard to really

2150
01:30:14,510 --> 01:30:15,790
make your math intuitive.

2151
01:30:15,790 --> 01:30:21,692
So I would put extra effort
into just split it up.

2152
01:30:21,692 --> 01:30:24,340
I also mentioned this last time,
I'm going to mention it again.

2153
01:30:24,340 --> 01:30:25,173
It's very important.

2154
01:30:25,173 --> 01:30:27,260
Warnings should always
be treated as errors.

2155
01:30:31,150 --> 01:30:33,930
I can could repeat it again,
but basically every new warning

2156
01:30:33,930 --> 01:30:35,770
is a hint something
might be wrong.

2157
01:30:35,770 --> 01:30:38,049
And if you let your build
be cluttered warnings,

2158
01:30:38,049 --> 01:30:40,340
you will not notice when the
important warning pops up.

2159
01:30:40,340 --> 01:30:42,580
And you can lose hours
to that, just because the

2160
01:30:42,580 --> 01:30:43,830
build wasn't at zero warnings.

2161
01:30:47,320 --> 01:30:49,640
Backwards Conditionals.

2162
01:30:49,640 --> 01:30:52,590
Which of these looks wrong?

2163
01:30:52,590 --> 01:30:54,310
The second one looks wrong.

2164
01:30:54,310 --> 01:30:54,810
I agree.

2165
01:30:54,810 --> 01:30:57,712
The second one totally looks
wrong, and yet it's useful.

2166
01:30:57,712 --> 01:30:59,170
Because what happens
if you mistype

2167
01:30:59,170 --> 01:31:01,766
the equal to equal sign?

2168
01:31:01,766 --> 01:31:03,390
If you mistype the
equal to equal sign,

2169
01:31:03,390 --> 01:31:06,652
that second one doesn't compile.

2170
01:31:06,652 --> 01:31:08,110
Depends on your
language of course.

2171
01:31:08,110 --> 01:31:10,151
But generally speaking,
it's a handy little trick

2172
01:31:10,151 --> 01:31:14,080
that I find useful, and everyone
else I know thinks is terrible.

2173
01:31:14,080 --> 01:31:15,959
So don't necessarily
use it, but try

2174
01:31:15,959 --> 01:31:18,500
to find tricks like this that
cause to be the case, that when

2175
01:31:18,500 --> 01:31:21,330
you mistyped your code, you
get a compile error instead

2176
01:31:21,330 --> 01:31:22,620
of a bug in your code.

2177
01:31:22,620 --> 01:31:25,368
AUDIENCE: Do you think
what the signal equals

2178
01:31:25,368 --> 01:31:26,985
might be a client warning?

2179
01:31:26,985 --> 01:31:29,090
PROFESSOR: It will be
a warning, absolutely.

2180
01:31:29,090 --> 01:31:31,440
Which is an even better
reason to not to go down

2181
01:31:31,440 --> 01:31:32,770
to zero warnings, right?

2182
01:31:32,770 --> 01:31:34,770
Doesn't help you if it's
a warning that you just

2183
01:31:34,770 --> 01:31:36,286
let go by.

2184
01:31:36,286 --> 01:31:37,410
And it should be a warning.

2185
01:31:37,410 --> 01:31:38,100
I'm glad they added that.

2186
01:31:38,100 --> 01:31:39,470
When I start programing,
it wasn't a warning.

2187
01:31:39,470 --> 01:31:40,386
Wasn't that wonderful?

2188
01:31:45,320 --> 01:31:47,360
I mentioned splitting
up the math.

2189
01:31:47,360 --> 01:31:49,790
I think that that first
thing is, you can read it.

2190
01:31:49,790 --> 01:31:50,955
You can figure it out.

2191
01:31:50,955 --> 01:31:53,080
I think that the second
thing might be a little bit

2192
01:31:53,080 --> 01:31:55,930
more comprehensible.

2193
01:31:55,930 --> 01:31:57,310
Again, it depends
on who you are.

2194
01:32:00,810 --> 01:32:02,390
This is one that
I'm emphatic about.

2195
01:32:02,390 --> 01:32:04,690
I mentioned order of
operations before.

2196
01:32:04,690 --> 01:32:05,860
Bar minus minus.

2197
01:32:05,860 --> 01:32:06,680
That's fancy.

2198
01:32:06,680 --> 01:32:09,330
In some languages, and I
assume most of the modern ones

2199
01:32:09,330 --> 01:32:10,850
these days, bar
minus minus means

2200
01:32:10,850 --> 01:32:14,650
do the math, and then
decrement bar by 1.

2201
01:32:14,650 --> 01:32:17,730
If I'd said minus minus bar, I'd
have meant decrement bar by 1,

2202
01:32:17,730 --> 01:32:19,180
then do the math.

2203
01:32:19,180 --> 01:32:20,180
And this is pretty cool.

2204
01:32:20,180 --> 01:32:22,230
It's this nice little
language trick.

2205
01:32:22,230 --> 01:32:24,690
But if you don't happen
to know what that means,

2206
01:32:24,690 --> 01:32:27,330
you just confuse your
fellow programmer

2207
01:32:27,330 --> 01:32:28,929
with your language trick.

2208
01:32:28,929 --> 01:32:30,470
That second thing
is perfectly clear.

2209
01:32:30,470 --> 01:32:31,730
You know exactly what happens.

2210
01:32:31,730 --> 01:32:32,230
Do

2211
01:32:32,230 --> 01:32:34,665
The math, then
decrement the variable.

2212
01:32:34,665 --> 01:32:36,290
And if you really
want to get pedantic,

2213
01:32:36,290 --> 01:32:38,900
I guess you could say
bar equals bar minus 1.

2214
01:32:38,900 --> 01:32:41,430
But you have to draw
the line somewhere.

2215
01:32:44,540 --> 01:32:48,890
I'm a fan of Booleans
being asking a question.

2216
01:32:48,890 --> 01:32:53,530
Like the Boolean purple
probably means is purple.

2217
01:32:53,530 --> 01:32:58,660
The Boolean hungry probably
would mean are you hungry.

2218
01:32:58,660 --> 01:33:01,550
But the Boolean desk
might not mean anything.

2219
01:33:01,550 --> 01:33:04,020
But in any event, try
to make your Boolean

2220
01:33:04,020 --> 01:33:07,580
into a question that has an
unambiguously yes, no answer.

2221
01:33:07,580 --> 01:33:08,354
Which way is true?

2222
01:33:08,354 --> 01:33:09,145
Which way is false?

2223
01:33:11,770 --> 01:33:13,960
Status is a
particularly bad one,

2224
01:33:13,960 --> 01:33:16,300
because I don't know
what that means.

2225
01:33:16,300 --> 01:33:17,730
Is status true good?

2226
01:33:17,730 --> 01:33:19,730
Is status true mean that
something bad happened?

2227
01:33:19,730 --> 01:33:23,440
I don't know without some help.

2228
01:33:23,440 --> 01:33:26,060
You've probably heard this
before, mysterious constant,

2229
01:33:26,060 --> 01:33:28,240
don't do it.

2230
01:33:28,240 --> 01:33:30,260
Ideally, if you can define
it in your language,

2231
01:33:30,260 --> 01:33:31,210
you get an error.

2232
01:33:31,210 --> 01:33:33,660
When you mistype it,
and that's much better.

2233
01:33:33,660 --> 01:33:36,010
Mysterious string constants
is particularly the worst.

2234
01:33:36,010 --> 01:33:39,640
And you're going to be very
tempted to do it in JavaScript.

2235
01:33:39,640 --> 01:33:41,810
But you should probably
have a defined of some kind

2236
01:33:41,810 --> 01:33:45,560
at the top, so you
don't get that problem.

2237
01:33:45,560 --> 01:33:49,740
This is a language construct
which is very handy,

2238
01:33:49,740 --> 01:33:53,000
but I recommend
using it sparingly.

2239
01:33:53,000 --> 01:33:55,174
If you are asking
a question-- if you

2240
01:33:55,174 --> 01:33:56,590
want to set a
variable to a value,

2241
01:33:56,590 --> 01:33:58,690
it's often very convenient
to do this syntax.

2242
01:33:58,690 --> 01:34:02,030
But really, you don't
want to ever nest these.

2243
01:34:02,030 --> 01:34:04,430
If you nest them it becomes
unreadable gobbledygook.

2244
01:34:04,430 --> 01:34:06,310
And if your expressions
become complicated,

2245
01:34:06,310 --> 01:34:08,480
it also becomes
unreadable gobbledygook.

2246
01:34:08,480 --> 01:34:10,470
Again, I'm not saying
you can't figure it out,

2247
01:34:10,470 --> 01:34:12,030
because I'm confident
that you can.

2248
01:34:12,030 --> 01:34:13,900
But why do you want
your future you

2249
01:34:13,900 --> 01:34:15,790
to have to spend 30
seconds to a minute,

2250
01:34:15,790 --> 01:34:16,540
figuring out what
the heck you were

2251
01:34:16,540 --> 01:34:18,120
saying instead of two
seconds figuring out

2252
01:34:18,120 --> 01:34:18,995
what you were saying?

2253
01:34:22,110 --> 01:34:23,700
Goto.

2254
01:34:23,700 --> 01:34:26,419
We are told that goto is
evil all the time, always.

2255
01:34:26,419 --> 01:34:28,710
I claim it's not always evil,
but you should be careful

2256
01:34:28,710 --> 01:34:29,736
when you use it.

2257
01:34:29,736 --> 01:34:31,235
It's particularly
useful when you're

2258
01:34:31,235 --> 01:34:33,850
exiting a horrible set
of nested if statements.

2259
01:34:33,850 --> 01:34:37,170
But the main reason
goto is evil,

2260
01:34:37,170 --> 01:34:39,290
is because of a thing
called proximity.

2261
01:34:39,290 --> 01:34:41,930
Which is that you should
use things near each other

2262
01:34:41,930 --> 01:34:43,010
in the code.

2263
01:34:43,010 --> 01:34:45,550
If I declare a variable,
and it's two screen pages

2264
01:34:45,550 --> 01:34:47,990
up from when I use it, that's
kind of a difficult thing

2265
01:34:47,990 --> 01:34:49,172
to figure out.

2266
01:34:49,172 --> 01:34:51,130
That's one reason to keep
your functions short.

2267
01:34:51,130 --> 01:34:52,950
But instead, if I can
clump it together,

2268
01:34:52,950 --> 01:34:55,470
I'm less likely to make
simple little errors.

2269
01:34:55,470 --> 01:34:58,430
Right here, I'm doing the
same thing to x and y,

2270
01:34:58,430 --> 01:34:59,550
and I'm interleaving it.

2271
01:34:59,550 --> 01:35:01,800
Because I'm thinking of it
as, I want to prepare them,

2272
01:35:01,800 --> 01:35:04,040
I want to calculate
it, I want to print it.

2273
01:35:04,040 --> 01:35:05,620
But it's a little
bit easier, I would

2274
01:35:05,620 --> 01:35:07,720
say, to debug and
think about it,

2275
01:35:07,720 --> 01:35:09,870
if you treat each
one separately.

2276
01:35:09,870 --> 01:35:12,270
And if you get a lot of these,
write a loop or something.

2277
01:35:12,270 --> 01:35:16,480
There's no reason to
actually type it all out.

2278
01:35:16,480 --> 01:35:18,700
All I'm saying is
keep it simple.

2279
01:35:18,700 --> 01:35:21,590
As simple as you possibly
can, so that later,

2280
01:35:21,590 --> 01:35:24,110
when you go back to it, you
can figure it out quickly.

2281
01:35:27,917 --> 01:35:30,250
You're going to very tempted
to make complicated systems

2282
01:35:30,250 --> 01:35:32,520
in your prototype games,
even though you're

2283
01:35:32,520 --> 01:35:35,730
game spec is changing,
probably daily.

2284
01:35:35,730 --> 01:35:38,294
So you might want to be a
little bit cautious about that.

2285
01:35:38,294 --> 01:35:40,210
Rather than making a
complicated system, solve

2286
01:35:40,210 --> 01:35:43,727
the problem you have today, and
then maybe two days from now,

2287
01:35:43,727 --> 01:35:45,310
when you know for
sure you're actually

2288
01:35:45,310 --> 01:35:47,710
doing that, you might want
to put more effort into it.

2289
01:35:47,710 --> 01:35:49,710
This is advice that's not
good for all projects,

2290
01:35:49,710 --> 01:35:51,750
but it is good for
very short projects.

2291
01:35:51,750 --> 01:35:53,974
It's tempting to create
a complicated system that

2292
01:35:53,974 --> 01:35:55,140
will do everything you need.

2293
01:35:55,140 --> 01:35:57,014
And it's tempting to
create one solution that

2294
01:35:57,014 --> 01:35:59,560
will solve all of your woes,
but you might very well

2295
01:35:59,560 --> 01:36:02,059
be borrowing trouble and solving
a problem that you're never

2296
01:36:02,059 --> 01:36:02,710
going to have.

2297
01:36:02,710 --> 01:36:05,220
So given that you're probably
talking about fast iteration.

2298
01:36:05,220 --> 01:36:07,240
Your game is changing
all the time.

2299
01:36:07,240 --> 01:36:11,530
Don't-- and this is counter
to my architectural design

2300
01:36:11,530 --> 01:36:14,100
thoughts-- but don't
design too much,

2301
01:36:14,100 --> 01:36:17,920
because you're going to
change it all anyway.

2302
01:36:17,920 --> 01:36:20,050
Other things that cause
bugs are recursion.

2303
01:36:20,050 --> 01:36:21,010
Recursion is awesome.

2304
01:36:21,010 --> 01:36:22,060
Recursion is fun.

2305
01:36:22,060 --> 01:36:24,285
Recursion is really
hard to debug.

2306
01:36:24,285 --> 01:36:25,910
Try debugging someone
else's recursion,

2307
01:36:25,910 --> 01:36:26,870
and you'll be very sad.

2308
01:36:26,870 --> 01:36:30,060
To try debugging two things
that call each, other sadder.

2309
01:36:30,060 --> 01:36:34,130
And it looks really cool,
but I recommend don't do it.

2310
01:36:34,130 --> 01:36:36,220
Similarly, optimizing.

2311
01:36:36,220 --> 01:36:37,340
Wait.

2312
01:36:37,340 --> 01:36:40,450
You think you know what
slow and what's fast.

2313
01:36:40,450 --> 01:36:43,350
Chances are, you don't.

2314
01:36:43,350 --> 01:36:46,130
If your development
system has a nice profile,

2315
01:36:46,130 --> 01:36:48,230
it'll tell you exactly
where the bottlenecks are,

2316
01:36:48,230 --> 01:36:49,840
exactly why your code is slow.

2317
01:36:49,840 --> 01:36:52,580
Wait for that, and fix
the actual problems.

2318
01:36:52,580 --> 01:36:55,091
Don't waste time chasing ghosts.

2319
01:36:55,091 --> 01:36:56,590
Particularly this
happens a lot when

2320
01:36:56,590 --> 01:36:59,380
you're trying to do some code,
and you're thinking oh, this

2321
01:36:59,380 --> 01:37:00,400
is really important.

2322
01:37:00,400 --> 01:37:03,060
It ends up being
called once per second.

2323
01:37:03,060 --> 01:37:06,150
Well, once per second in
computer time is never.

2324
01:37:06,150 --> 01:37:07,740
So don't bother optimizing that.

2325
01:37:07,740 --> 01:37:09,989
But the nice thing here is
that a profile can tell you

2326
01:37:09,989 --> 01:37:13,290
what you need to actually fix.

2327
01:37:13,290 --> 01:37:15,830
I've mentioned fixed treat
warnings as errors before.

2328
01:37:15,830 --> 01:37:18,780
I'll mention it again, probably.

2329
01:37:18,780 --> 01:37:21,490
But similarly, you want to fix
a bug as soon as you find it,

2330
01:37:21,490 --> 01:37:23,830
if it's in your head.

2331
01:37:23,830 --> 01:37:26,130
Don't think oh, that
bug is easy to fix,

2332
01:37:26,130 --> 01:37:28,810
I'll get to before
the end of the sprint.

2333
01:37:28,810 --> 01:37:30,660
Because you might
not remember it

2334
01:37:30,660 --> 01:37:32,847
four days from now as
clearly as you do right now.

2335
01:37:32,847 --> 01:37:34,430
Also, if you've just
written the code,

2336
01:37:34,430 --> 01:37:36,604
it's much, much easier for
you to actually fix it,

2337
01:37:36,604 --> 01:37:38,520
because it's all much
more fresh in your mind.

2338
01:37:41,100 --> 01:37:45,360
Strongly consider not fixing
bugs that don't matter.

2339
01:37:45,360 --> 01:37:48,010
And this is a tough one because
I just contradicted myself

2340
01:37:48,010 --> 01:37:49,260
by saying fix them right away.

2341
01:37:49,260 --> 01:37:51,990
And I'm telling you
sometimes don't fix them.

2342
01:37:51,990 --> 01:37:54,570
But basically, if fixing the
bug is going to cost a lot time,

2343
01:37:54,570 --> 01:37:57,430
and it's not going to
improve your game enough,

2344
01:37:57,430 --> 01:37:59,350
then consider leaving it.

2345
01:37:59,350 --> 01:38:00,725
That's going to
be a thing you'll

2346
01:38:00,725 --> 01:38:02,683
have to talk about with
other people your team.

2347
01:38:02,683 --> 01:38:05,470
But hey.

2348
01:38:05,470 --> 01:38:08,900
So for example, if you've
got every j in your text

2349
01:38:08,900 --> 01:38:12,202
renders green for some reason.

2350
01:38:12,202 --> 01:38:14,410
And to fix that, you need
to go into the font library

2351
01:38:14,410 --> 01:38:15,560
and do some crazy code.

2352
01:38:15,560 --> 01:38:17,690
Well don't.

2353
01:38:17,690 --> 01:38:19,900
Claim it's a feature.

2354
01:38:19,900 --> 01:38:22,127
J's are green.

2355
01:38:22,127 --> 01:38:23,960
Obviously, if you're
doing Microsoft Office,

2356
01:38:23,960 --> 01:38:24,950
you can't do that.

2357
01:38:24,950 --> 01:38:26,340
But we aren't.

2358
01:38:26,340 --> 01:38:27,690
We're doing games.

2359
01:38:27,690 --> 01:38:30,560
So we can cheat like that.

2360
01:38:30,560 --> 01:38:31,350
Use a debugger.

2361
01:38:31,350 --> 01:38:33,290
If you do not yet know
how to use a debugger,

2362
01:38:33,290 --> 01:38:37,480
take advantage of this class
to learn how to use a debugger.

2363
01:38:37,480 --> 01:38:39,320
I can't really say
more about that.

2364
01:38:39,320 --> 01:38:39,909
Do it.

2365
01:38:39,909 --> 01:38:42,450
When you're also try to figure
out a bug, talk to a teammate.

2366
01:38:42,450 --> 01:38:43,920
Even if your
teammate has no clue

2367
01:38:43,920 --> 01:38:47,130
about your part of the code,
the act of putting into thoughts

2368
01:38:47,130 --> 01:38:49,850
and words, this is what
my system is doing,

2369
01:38:49,850 --> 01:38:52,230
will, a good third of
the time, cause you

2370
01:38:52,230 --> 01:38:54,210
to realize where the bug is.

2371
01:38:54,210 --> 01:38:56,132
It's kind of silly,
but it totally works.

2372
01:38:56,132 --> 01:38:58,340
So if someone comes to you
on your team and says hey,

2373
01:38:58,340 --> 01:38:58,940
I need help.

2374
01:38:58,940 --> 01:38:59,680
You're like cool.

2375
01:38:59,680 --> 01:39:00,910
I'll listen to your problem.

2376
01:39:00,910 --> 01:39:02,800
And they talk to for
15 minutes, and then

2377
01:39:02,800 --> 01:39:06,790
say, I got it, and walk
away, don't feel useless.

2378
01:39:06,790 --> 01:39:08,620
You just saved them an hour.

2379
01:39:08,620 --> 01:39:09,840
And it cost you 15 minutes.

2380
01:39:09,840 --> 01:39:11,820
And that's a bargain.

2381
01:39:11,820 --> 01:39:13,320
And don't feel
embarrassed about it,

2382
01:39:13,320 --> 01:39:16,850
if you're the person
talking about your bug.

2383
01:39:16,850 --> 01:39:17,670
It's great.

2384
01:39:17,670 --> 01:39:19,628
They may ask you questions
that are irrelevant,

2385
01:39:19,628 --> 01:39:20,800
and you're like, no, no.

2386
01:39:20,800 --> 01:39:22,110
That's OK too.

2387
01:39:22,110 --> 01:39:23,270
You have to explain it.

2388
01:39:23,270 --> 01:39:27,880
That orders it in your head, and
then you can solve the problem.

2389
01:39:27,880 --> 01:39:29,450
And then of course, take a walk.

2390
01:39:29,450 --> 01:39:32,660
I have solved more bugs going to
get my lunch, or in the shower

2391
01:39:32,660 --> 01:39:34,900
in the morning, or whatever,
than I have at my desk,

2392
01:39:34,900 --> 01:39:35,620
I would say.

2393
01:39:35,620 --> 01:39:37,790
At least more tough ones.

2394
01:39:37,790 --> 01:39:40,440
Binary search is a thing that's
kind of hard to describe.

2395
01:39:40,440 --> 01:39:42,190
But rather than
necessarily saying,

2396
01:39:42,190 --> 01:39:43,940
this could be the
problem, I'll test that.

2397
01:39:43,940 --> 01:39:45,680
This could be the
problem, I'll test it.

2398
01:39:45,680 --> 01:39:48,566
If you can do a test that
says, well, roughly half

2399
01:39:48,566 --> 01:39:50,690
of the potential problems
that could cause this bug

2400
01:39:50,690 --> 01:39:52,640
are over here, and half
of them are over here,

2401
01:39:52,640 --> 01:39:54,306
and I can do one test
that won't tell me

2402
01:39:54,306 --> 01:39:57,360
where the bug is, but will
eliminate this entire tree,

2403
01:39:57,360 --> 01:39:59,790
that's a good test to do.

2404
01:39:59,790 --> 01:40:05,490
You can quickly narrow in on
where your bug actually is.

2405
01:40:05,490 --> 01:40:08,440
And this one happens a lot
too, with beginner programmers.

2406
01:40:08,440 --> 01:40:15,750
If your bug goes away, it
probably hasn't gone away.

2407
01:40:15,750 --> 01:40:17,260
It's just hiding now.

2408
01:40:17,260 --> 01:40:20,120
So be sure you know
why the bug went away.

2409
01:40:20,120 --> 01:40:22,950
If it's the green j's, you might
not need to worry about it.

2410
01:40:22,950 --> 01:40:25,200
But even then, you might
want to think about it.

2411
01:40:25,200 --> 01:40:26,620
Because you thought you knew
what the green j's were,

2412
01:40:26,620 --> 01:40:28,420
and they went away,
and you didn't fix it,

2413
01:40:28,420 --> 01:40:29,970
but who knows what's
going on here.

2414
01:40:29,970 --> 01:40:31,880
It's worth putting a little
bit of time in to make sure

2415
01:40:31,880 --> 01:40:34,171
that it isn't some serious
bug hiding under the covers.

2416
01:40:36,084 --> 01:40:37,750
I'm not going into
source control again.

2417
01:40:37,750 --> 01:40:39,416
We've already done a
little bit of that.

2418
01:40:41,225 --> 01:40:43,670
You need to do source control.

2419
01:40:43,670 --> 01:40:46,130
If it all possible,
everyone on the team

2420
01:40:46,130 --> 01:40:48,860
should be able to just get
the code and do a build.

2421
01:40:48,860 --> 01:40:51,460
That should be as hard is it is.

2422
01:40:51,460 --> 01:40:54,427
And on that realm, daily
builds are awesome.

2423
01:40:54,427 --> 01:40:56,260
If you can afford to,
have some on your team

2424
01:40:56,260 --> 01:40:59,790
whose job it is, once a
day, midnight, pick a time,

2425
01:40:59,790 --> 01:41:01,590
do a get, a fresh
get, do a build,

2426
01:41:01,590 --> 01:41:04,220
make sure everything works.

2427
01:41:04,220 --> 01:41:05,940
This sort of forces
all the programmers

2428
01:41:05,940 --> 01:41:08,650
on the team to sort of be
more careful about making sure

2429
01:41:08,650 --> 01:41:09,760
their code works.

2430
01:41:09,760 --> 01:41:11,210
And also if something
gets checked

2431
01:41:11,210 --> 01:41:12,780
and it breaks
everything horribly,

2432
01:41:12,780 --> 01:41:15,634
you know about it right
away, not three days later.

2433
01:41:15,634 --> 01:41:17,800
There are automated tools
that will do this for you.

2434
01:41:17,800 --> 01:41:19,820
At least they'll check
the compilations step.

2435
01:41:19,820 --> 01:41:21,400
That might not check that
makes sure everything is still

2436
01:41:21,400 --> 01:41:22,640
working, but, you know.

2437
01:41:22,640 --> 01:41:25,042
It gets there a lot.

2438
01:41:25,042 --> 01:41:25,750
Coding Standards.

2439
01:41:25,750 --> 01:41:28,710
Why we use them.

2440
01:41:28,710 --> 01:41:29,822
We like tidy code.

2441
01:41:29,822 --> 01:41:32,030
And obviously, the braces
go in one place or another.

2442
01:41:32,030 --> 01:41:35,420
Those are terrible reasons
to have coding standards.

2443
01:41:35,420 --> 01:41:38,410
Instead, these are the reasons
that I like a little bit more.

2444
01:41:38,410 --> 01:41:41,680
Which is my code--
don't touch my code.

2445
01:41:41,680 --> 01:41:42,930
Well, you're on the same team.

2446
01:41:42,930 --> 01:41:45,210
I'm going to touch your code if
I need to, and it's midnight,

2447
01:41:45,210 --> 01:41:47,043
and you're asleep and
I need to fix the big.

2448
01:41:47,043 --> 01:41:48,290
That's the way it is.

2449
01:41:48,290 --> 01:41:49,650
You shouldn't be mad about that.

2450
01:41:49,650 --> 01:41:51,209
We're trying to fix the game.

2451
01:41:51,209 --> 01:41:53,500
The fact that that you wrote
the first pass in the code

2452
01:41:53,500 --> 01:41:56,910
doesn't really matter.

2453
01:41:56,910 --> 01:41:58,650
And then, of course
decision fatigue

2454
01:41:58,650 --> 01:41:59,690
is a thing I mentioned earlier.

2455
01:41:59,690 --> 01:42:01,180
We talk about what
variable names to use,

2456
01:42:01,180 --> 01:42:03,170
and what algorithm to
use, or this or that.

2457
01:42:03,170 --> 01:42:04,750
We got plenty of
decisions to make.

2458
01:42:04,750 --> 01:42:06,580
Where you put your
curly braces should not

2459
01:42:06,580 --> 01:42:10,170
be something you waste
time stressing about.

2460
01:42:10,170 --> 01:42:12,100
If you have a coding
standard, use that.

2461
01:42:12,100 --> 01:42:14,550
If you don't have a coding
standard, be consistent.

2462
01:42:14,550 --> 01:42:16,240
If you're modifying
someone else's code,

2463
01:42:16,240 --> 01:42:18,570
stick with their
coding standard.

2464
01:42:18,570 --> 01:42:20,880
Because if nothing else,
when you do the check in,

2465
01:42:20,880 --> 01:42:22,000
it will look like
the entire file

2466
01:42:22,000 --> 01:42:24,166
has changed just because
you changed the indentation

2467
01:42:24,166 --> 01:42:24,666
strategy.

2468
01:42:24,666 --> 01:42:26,165
And that's not very
useful if I want

2469
01:42:26,165 --> 01:42:27,430
to know what changes you made.

2470
01:42:27,430 --> 01:42:29,531
I'd much rather have a
minimal set of changes

2471
01:42:29,531 --> 01:42:31,030
that I can look
through and see what

2472
01:42:31,030 --> 01:42:34,420
the actual meaningful
changes you made were.

2473
01:42:34,420 --> 01:42:36,320
And of course, easy to read.

2474
01:42:36,320 --> 01:42:36,980
Easy to debug.

2475
01:42:39,196 --> 01:42:40,820
A lot of things I've
been talking about

2476
01:42:40,820 --> 01:42:42,660
are things you can
read a lot more about.

2477
01:42:42,660 --> 01:42:44,659
There are people that
have written serious books

2478
01:42:44,659 --> 01:42:48,170
on the topic of making your code
as easy to read as possible.

2479
01:42:48,170 --> 01:42:50,650
Steve McConnell
in particular, is

2480
01:42:50,650 --> 01:42:53,080
at this point-- his
books are older,

2481
01:42:53,080 --> 01:42:54,700
but they're still
perfectly valid.

2482
01:42:54,700 --> 01:42:56,660
Because the science
of writing code

2483
01:42:56,660 --> 01:42:58,030
has not really changed much.

2484
01:42:58,030 --> 01:43:00,640
Joel Spolsky also has
a much easier to read

2485
01:43:00,640 --> 01:43:04,430
set of blog posts that talk
about this kind of thing.

2486
01:43:04,430 --> 01:43:06,710
It's much more
accessible and it's free.

2487
01:43:06,710 --> 01:43:10,790
And he's the person who--
his company is behind Trello.

2488
01:43:10,790 --> 01:43:15,420
Which kind of indicates that
his method of thinking kind of

2489
01:43:15,420 --> 01:43:19,220
matches with our
method of thinking.

2490
01:43:19,220 --> 01:43:23,100
There's a lot more things to
think about in these realms,

2491
01:43:23,100 --> 01:43:24,850
in terms of ways to
make your code easier.

2492
01:43:24,850 --> 01:43:26,850
But again, I want to go
back to the core concept

2493
01:43:26,850 --> 01:43:27,840
we talked about before.

2494
01:43:27,840 --> 01:43:30,190
You're going to have a couple
projects during the semester

2495
01:43:30,190 --> 01:43:31,600
where you're going to see
a bunch of different coding

2496
01:43:31,600 --> 01:43:32,200
styles.

2497
01:43:32,200 --> 01:43:33,390
Yours and other people's.

2498
01:43:33,390 --> 01:43:35,060
Yours might even change over
the course of the semester,

2499
01:43:35,060 --> 01:43:36,240
and that's good.

2500
01:43:36,240 --> 01:43:38,890
But you should include, perhaps
as part of your post mortem

2501
01:43:38,890 --> 01:43:41,080
process, what
kinds of things did

2502
01:43:41,080 --> 01:43:42,410
you like in the code you saw.

2503
01:43:42,410 --> 01:43:44,691
What can you pull into
your coding style that

2504
01:43:44,691 --> 01:43:46,440
is going to make your
code easier to read,

2505
01:43:46,440 --> 01:43:48,310
or easier to debug?

2506
01:43:48,310 --> 01:43:50,810
And maybe you can try to
influence other people

2507
01:43:50,810 --> 01:43:52,700
to write prettier code.

2508
01:43:52,700 --> 01:43:55,390
You're not always going to
agree what pretty code is.

2509
01:43:55,390 --> 01:43:56,849
Try to let that go
when it happens.

2510
01:43:56,849 --> 01:43:59,223
The important thing is you
should think about what you're

2511
01:43:59,223 --> 01:44:01,180
seeing, so that after
your project is over,

2512
01:44:01,180 --> 01:44:02,580
you are better
programmer for it.

2513
01:44:05,280 --> 01:44:09,720
And I think at this point,
unless you have any questions,

2514
01:44:09,720 --> 01:44:12,550
we'll go on to have this project
time with the remaining 15

2515
01:44:12,550 --> 01:44:13,910
minutes.

2516
01:44:13,910 --> 01:44:17,120
[CHATTER]