0:03
this is code reviews are useless or or
0:06
this is code reviews are useless or or
0:06
this is code reviews are useless or or maybe I should be a little bit fairer
0:08
maybe I should be a little bit fairer
0:08
maybe I should be a little bit fairer and say code reviews are mostly useless
0:11
and say code reviews are mostly useless
0:11
and say code reviews are mostly useless we are at code quality conference 2024
0:13
we are at code quality conference 2024
0:13
we are at code quality conference 2024 it's Thursday June 27th my name is James
0:16
it's Thursday June 27th my name is James
0:16
it's Thursday June 27th my name is James Powell you can follow me on LinkedIn
0:18
Powell you can follow me on LinkedIn
0:18
Powell you can follow me on LinkedIn there's also a QR code that you'll see
0:19
there's also a QR code that you'll see
0:19
there's also a QR code that you'll see in the presentation with a couple of
0:20
in the presentation with a couple of
0:20
in the presentation with a couple of links to some of our
0:23
links to some of our materials there's one disclaimer I want
0:25
materials there's one disclaimer I want
0:25
materials there's one disclaimer I want to share with you before we get started
0:28
to share with you before we get started
0:28
to share with you before we get started first I'm going to share with you a
0:29
first I'm going to share with you a
0:29
first I'm going to share with you a couple of very strong opinions about the
0:31
couple of very strong opinions about the
0:31
couple of very strong opinions about the process of code of code review and how
0:33
process of code of code review and how
0:33
process of code of code review and how we conceptualize code quality and where
0:37
we conceptualize code quality and where
0:37
we conceptualize code quality and where I choose to include examples they're
0:39
I choose to include examples they're
0:39
I choose to include examples they're going to be python examples and I know a
0:40
going to be python examples and I know a
0:40
going to be python examples and I know a lot of you are C programmers but I think
0:43
lot of you are C programmers but I think
0:43
lot of you are C programmers but I think you'll be able to squint a little bit
0:44
you'll be able to squint a little bit
0:44
you'll be able to squint a little bit and get a sense for what we're aiming
0:47
and get a sense for what we're aiming
0:47
and get a sense for what we're aiming for here's the question upon us are code
0:50
for here's the question upon us are code
0:50
for here's the question upon us are code reviews an a useful activity or are they
0:52
reviews an a useful activity or are they
0:52
reviews an a useful activity or are they completely useless and it's my view that
0:54
completely useless and it's my view that
0:54
completely useless and it's my view that they're pretty much useless here's my
0:56
they're pretty much useless here's my
0:57
they're pretty much useless here's my proof I'll start with a little bit of
0:58
proof I'll start with a little bit of
0:58
proof I'll start with a little bit of evidence my first piece of evidence is
1:02
evidence my first piece of evidence is
1:02
evidence my first piece of evidence is you've all had this experience where you
1:04
you've all had this experience where you
1:04
you've all had this experience where you were part of a code review and the
1:06
were part of a code review and the
1:06
were part of a code review and the change itself was five lines of code
1:08
change itself was five lines of code
1:08
change itself was five lines of code long and people litigated every single
1:11
long and people litigated every single
1:11
long and people litigated every single minute detail of that code change they
1:15
minute detail of that code change they
1:15
minute detail of that code change they said oh in pep 8 there's supposed to be
1:17
said oh in pep 8 there's supposed to be
1:17
said oh in pep 8 there's supposed to be two spaces between Class definitions oh
1:20
two spaces between Class definitions oh
1:20
two spaces between Class definitions oh you need to write this in this slight
1:22
you need to write this in this slight
1:22
you need to write this in this slight way over here oh don't use a
1:23
way over here oh don't use a
1:23
way over here oh don't use a comprehension or do use a comprehension
1:25
comprehension or do use a comprehension
1:25
comprehension or do use a comprehension and it became a long arduous process and
1:28
and it became a long arduous process and
1:28
and it became a long arduous process and then maybe a week later or 2 weeks later
1:30
then maybe a week later or 2 weeks later
1:30
then maybe a week later or 2 weeks later you were part of a code review where the
1:32
you were part of a code review where the
1:32
you were part of a code review where the change was more significant 10,000 lines
1:34
change was more significant 10,000 lines
1:34
change was more significant 10,000 lines of code and the response you got was
1:36
of code and the response you got was
1:36
of code and the response you got was looks good okay fine and you might think
1:39
looks good okay fine and you might think
1:39
looks good okay fine and you might think if code reviews are an actual useful
1:42
if code reviews are an actual useful
1:42
if code reviews are an actual useful real process surely the 10,000 line of
1:45
real process surely the 10,000 line of
1:45
real process surely the 10,000 line of code code review would be a much more
1:47
code code review would be a much more
1:47
code code review would be a much more engaged activity than the five line of
1:48
engaged activity than the five line of
1:48
engaged activity than the five line of code code review surely if we're
1:50
code code review surely if we're
1:50
code code review surely if we're litigating every single line in a five
1:52
litigating every single line in a five
1:53
litigating every single line in a five line of code change then there must be a
1:54
line of code change then there must be a
1:54
line of code change then there must be a lot that we can say about a 10,000 line
1:56
lot that we can say about a 10,000 line
1:56
lot that we can say about a 10,000 line of code change and yet in practice this
1:58
of code change and yet in practice this
1:58
of code change and yet in practice this doesn't seem to be the case
2:00
doesn't seem to be the case
2:00
doesn't seem to be the case the other piece of evidence I'll share
2:02
the other piece of evidence I'll share
2:02
the other piece of evidence I'll share with you is if we think of code reviews
2:04
with you is if we think of code reviews
2:04
with you is if we think of code reviews as a process by which we can assess the
2:07
as a process by which we can assess the
2:07
as a process by which we can assess the quality of some code and determine
2:09
quality of some code and determine
2:09
quality of some code and determine whether that code is ready for inclusion
2:12
whether that code is ready for inclusion
2:12
whether that code is ready for inclusion in some production system then well why
2:16
in some production system then well why
2:16
in some production system then well why do we need such a detailed code review
2:18
do we need such a detailed code review
2:18
do we need such a detailed code review process code quality is very easy to
2:21
process code quality is very easy to
2:21
process code quality is very easy to assess in fact I can tell you in the
2:24
assess in fact I can tell you in the
2:24
assess in fact I can tell you in the span of no more than one sentence the
2:26
span of no more than one sentence the
2:27
span of no more than one sentence the difference between good code and bad
2:28
difference between good code and bad
2:28
difference between good code and bad code as I have seen this in almost every
2:30
code as I have seen this in almost every
2:30
code as I have seen this in almost every code review I've been a part of and you
2:32
code review I've been a part of and you
2:32
code review I've been a part of and you can say the same thing we don't need
2:34
can say the same thing we don't need
2:34
can say the same thing we don't need books on what constitutes better code
2:36
books on what constitutes better code
2:36
books on what constitutes better code quality cleaner code we don't need long
2:39
quality cleaner code we don't need long
2:39
quality cleaner code we don't need long detailed arguments good code is code I
2:41
detailed arguments good code is code I
2:41
detailed arguments good code is code I wrote and bad code is code you wrote and
2:44
wrote and bad code is code you wrote and
2:44
wrote and bad code is code you wrote and unfortunately in a lot of code reviews
2:45
unfortunately in a lot of code reviews
2:45
unfortunately in a lot of code reviews this seems to be how it plays out and so
2:49
this seems to be how it plays out and so
2:49
this seems to be how it plays out and so given these two pieces of evidence I
2:50
given these two pieces of evidence I
2:50
given these two pieces of evidence I assert that code reviews are completely
2:52
assert that code reviews are completely
2:52
assert that code reviews are completely useless that's my proof however because
2:55
useless that's my proof however because
2:55
useless that's my proof however because we're at a code quality conference I
2:57
we're at a code quality conference I
2:57
we're at a code quality conference I think it makes sense that we should take
2:58
think it makes sense that we should take
2:58
think it makes sense that we should take a step back and we should should
2:59
a step back and we should should
2:59
a step back and we should should litigate these points a little bit more
3:02
litigate these points a little bit more
3:02
litigate these points a little bit more delicately we should go through each one
3:04
delicately we should go through each one
3:04
delicately we should go through each one of these points and really get a better
3:05
of these points and really get a better
3:05
of these points and really get a better understanding for well our code reviews
3:07
understanding for well our code reviews
3:07
understanding for well our code reviews useless inherently or is it a
3:09
useless inherently or is it a
3:09
useless inherently or is it a consequence of the surrounding
3:12
consequence of the surrounding
3:12
consequence of the surrounding environment why is it the case that a
3:14
environment why is it the case that a
3:14
environment why is it the case that a 10,000 line of code code review is
3:16
10,000 line of code code review is
3:16
10,000 line of code code review is considered to be a burden why is it the
3:19
considered to be a burden why is it the
3:19
considered to be a burden why is it the case that when you see that five line of
3:20
case that when you see that five line of
3:20
case that when you see that five line of code code review and it's Friday and
3:22
code code review and it's Friday and
3:22
code code review and it's Friday and it's 3 p.m. leading into a 3-day weekend
3:25
it's 3 p.m. leading into a 3-day weekend
3:25
it's 3 p.m. leading into a 3-day weekend you say well you know I only got two
3:27
you say well you know I only got two
3:27
you say well you know I only got two more hours I might as well site chapter
3:29
more hours I might as well site chapter
3:29
more hours I might as well site chapter inverse for all of things that are wrong
3:31
inverse for all of things that are wrong
3:31
inverse for all of things that are wrong in the small code review and really
3:33
in the small code review and really
3:33
in the small code review and really Grill the junior programmer who
3:34
Grill the junior programmer who
3:34
Grill the junior programmer who submitted it to me And yet when you get
3:36
submitted it to me And yet when you get
3:36
submitted it to me And yet when you get the 10,000 line code review you say you
3:38
the 10,000 line code review you say you
3:38
the 10,000 line code review you say you know it's it's 3M leading into a
3:41
know it's it's 3M leading into a
3:41
know it's it's 3M leading into a three-day weekend is this really what I
3:42
three-day weekend is this really what I
3:42
three-day weekend is this really what I want to be doing is this really where I
3:45
want to be doing is this really where I
3:45
want to be doing is this really where I want to spend my effort and you say
3:47
want to spend my effort and you say
3:47
want to spend my effort and you say looks good let me just head off early
3:50
looks good let me just head off early
3:50
looks good let me just head off early well if it's the case that the code
3:51
well if it's the case that the code
3:51
well if it's the case that the code review is seen as a burden then it's
3:54
review is seen as a burden then it's
3:54
review is seen as a burden then it's likely the case that's not a
3:55
likely the case that's not a
3:55
likely the case that's not a particularly useful process if you're
3:56
particularly useful process if you're
3:56
particularly useful process if you're regretting code reviews if you look at
3:58
regretting code reviews if you look at
3:58
regretting code reviews if you look at all of the work that you to do as part
4:00
all of the work that you to do as part
4:00
all of the work that you to do as part of a code review and it's something that
4:01
of a code review and it's something that
4:01
of a code review and it's something that you don't look forward to it's not an
4:03
you don't look forward to it's not an
4:03
you don't look forward to it's not an opportunity for improvement then it's
4:06
opportunity for improvement then it's
4:06
opportunity for improvement then it's probably the case that we're approaching
4:08
probably the case that we're approaching
4:08
probably the case that we're approaching this wrong if we think about code
4:10
this wrong if we think about code
4:10
this wrong if we think about code reviews and especially long code reviews
4:12
reviews and especially long code reviews
4:12
reviews and especially long code reviews as things that require a lot of reading
4:14
as things that require a lot of reading
4:14
as things that require a lot of reading or a lot of context or a lot of effort
4:16
or a lot of context or a lot of effort
4:16
or a lot of context or a lot of effort well it's definitely the case to 10,000
4:17
well it's definitely the case to 10,000
4:17
well it's definitely the case to 10,000 lines of code you need to read through
4:19
lines of code you need to read through
4:19
lines of code you need to read through every single line there you need to have
4:21
every single line there you need to have
4:21
every single line there you need to have all the implicit context of every change
4:22
all the implicit context of every change
4:23
all the implicit context of every change that was made it's a huge amount of
4:24
that was made it's a huge amount of
4:24
that was made it's a huge amount of effort and you're left asking yourself
4:27
effort and you're left asking yourself
4:27
effort and you're left asking yourself why what's the point well I think that
4:30
why what's the point well I think that
4:30
why what's the point well I think that code reviews are often rendered useless
4:32
code reviews are often rendered useless
4:32
code reviews are often rendered useless as a consequence of contextual factors
4:36
as a consequence of contextual factors
4:36
as a consequence of contextual factors specifically cultural factors in an
4:38
specifically cultural factors in an
4:38
specifically cultural factors in an organization that is to say with the
4:40
organization that is to say with the
4:40
organization that is to say with the lack of a culture of training a culture
4:43
lack of a culture of training a culture
4:43
lack of a culture of training a culture of learning a culture of knowledge and a
4:45
of learning a culture of knowledge and a
4:45
of learning a culture of knowledge and a culture of quality it is very difficult
4:47
culture of quality it is very difficult
4:48
culture of quality it is very difficult to make code reviews a useful practice
4:51
to make code reviews a useful practice
4:51
to make code reviews a useful practice let me go through each one of these one
4:53
let me go through each one of these one
4:53
let me go through each one of these one one by one and give you a sense of what
4:54
one by one and give you a sense of what
4:54
one by one and give you a sense of what I mean so what do we mean when we talk
4:56
I mean so what do we mean when we talk
4:56
I mean so what do we mean when we talk about a culture of training well here's
4:59
about a culture of training well here's
4:59
about a culture of training well here's an example
5:00
an example let's say you have that five line of
5:02
let's say you have that five line of
5:02
let's say you have that five line of code code review and in that there is
5:04
code code review and in that there is
5:04
code code review and in that there is two lines that look something like this
5:06
two lines that look something like this
5:06
two lines that look something like this I said they would be python examples
5:08
I said they would be python examples
5:08
I said they would be python examples here and the person reviewing your code
5:10
here and the person reviewing your code
5:10
here and the person reviewing your code looks at that and says no I don't like
5:12
looks at that and says no I don't like
5:12
looks at that and says no I don't like that syntax that's too too new for me I
5:15
that syntax that's too too new for me I
5:15
that syntax that's too too new for me I I really didn't Learn Python after
5:16
I really didn't Learn Python after
5:16
I really didn't Learn Python after python 3.6 so the equal sign and the F
5:18
python 3.6 so the equal sign and the F
5:18
python 3.6 so the equal sign and the F string is something I'm not familiar
5:20
string is something I'm not familiar
5:20
string is something I'm not familiar with I don't like it you know figure out
5:22
with I don't like it you know figure out
5:22
with I don't like it you know figure out how to rewrite that and the exercise
5:25
how to rewrite that and the exercise
5:25
how to rewrite that and the exercise turns into one of those guess what I'm
5:26
turns into one of those guess what I'm
5:26
turns into one of those guess what I'm thinking types of exercises which are
5:28
thinking types of exercises which are
5:28
thinking types of exercises which are extraordinarily frustra tring you say
5:30
extraordinarily frustra tring you say
5:31
extraordinarily frustra tring you say you know if you don't like the way that
5:32
you know if you don't like the way that
5:32
you know if you don't like the way that I wrote my code if you're not a fan of
5:34
I wrote my code if you're not a fan of
5:34
I wrote my code if you're not a fan of the stylistic choices I've made don't
5:36
the stylistic choices I've made don't
5:36
the stylistic choices I've made don't make me guess what stylistic choices you
5:39
make me guess what stylistic choices you
5:39
make me guess what stylistic choices you would make why don't you just accept it
5:41
would make why don't you just accept it
5:41
would make why don't you just accept it if it's functionally correct and then go
5:42
if it's functionally correct and then go
5:42
if it's functionally correct and then go fix it yourself you can submit your own
5:46
fix it yourself you can submit your own
5:46
fix it yourself you can submit your own PR with any changes that you want the
5:49
PR with any changes that you want the
5:49
PR with any changes that you want the guess what I'm thinking style of code
5:50
guess what I'm thinking style of code
5:50
guess what I'm thinking style of code review is definitely one that all of us
5:52
review is definitely one that all of us
5:52
review is definitely one that all of us have experienced the one that we
5:53
have experienced the one that we
5:53
have experienced the one that we definitely want to avoid what might be a
5:55
definitely want to avoid what might be a
5:55
definitely want to avoid what might be a more pleasant experience is the let me
5:57
more pleasant experience is the let me
5:57
more pleasant experience is the let me show you how I'd like it to be
5:58
show you how I'd like it to be
5:58
show you how I'd like it to be experienced and and if it's the case
6:00
experienced and and if it's the case
6:00
experienced and and if it's the case that the code review isn't a well you
6:01
that the code review isn't a well you
6:01
that the code review isn't a well you wrote the code in this way but let me
6:03
wrote the code in this way but let me
6:03
wrote the code in this way but let me show you the style that we use in our
6:04
show you the style that we use in our
6:04
show you the style that we use in our codebase let me show you the practices
6:07
codebase let me show you the practices
6:07
codebase let me show you the practices that we have or let me show you what
6:09
that we have or let me show you what
6:09
that we have or let me show you what constitutes consistency across all of
6:11
constitutes consistency across all of
6:11
constitutes consistency across all of the other code that's been written well
6:13
the other code that's been written well
6:13
the other code that's been written well maybe that's a better code review
6:14
maybe that's a better code review
6:14
maybe that's a better code review practice they might say you know what
6:17
practice they might say you know what
6:17
practice they might say you know what instead of that comprehension write this
6:18
instead of that comprehension write this
6:18
instead of that comprehension write this as a for Loop in this formulation you
6:20
as a for Loop in this formulation you
6:20
as a for Loop in this formulation you know saving yourself one line of code
6:22
know saving yourself one line of code
6:22
know saving yourself one line of code really doesn't benefit anybody and just
6:25
really doesn't benefit anybody and just
6:25
really doesn't benefit anybody and just using syntax because it's there is
6:27
using syntax because it's there is
6:27
using syntax because it's there is definitely not a benefit however what's
6:29
definitely not a benefit however what's
6:29
definitely not a benefit however what's missing here is the culture of training
6:32
missing here is the culture of training
6:32
missing here is the culture of training when we see things in a code review we
6:33
when we see things in a code review we
6:34
when we see things in a code review we really need to use these as an
6:35
really need to use these as an
6:35
really need to use these as an opportunity to train especially Junior
6:37
opportunity to train especially Junior
6:37
opportunity to train especially Junior programmers in what is acceptable within
6:39
programmers in what is acceptable within
6:39
programmers in what is acceptable within our organization what approaches that we
6:41
our organization what approaches that we
6:41
our organization what approaches that we want to use and how to use these tools
6:43
want to use and how to use these tools
6:43
want to use and how to use these tools better a better form of code review
6:45
better a better form of code review
6:45
better a better form of code review should be let me explain to you how I'd
6:47
should be let me explain to you how I'd
6:47
should be let me explain to you how I'd like it to be done let me explain to you
6:49
like it to be done let me explain to you
6:49
like it to be done let me explain to you the foundational concepts for why it is
6:51
the foundational concepts for why it is
6:51
the foundational concepts for why it is the way things are done the way they are
6:53
the way things are done the way they are
6:53
the way things are done the way they are and so in the case of this oneline
6:56
and so in the case of this oneline
6:56
and so in the case of this oneline complaint we could say well you know
6:58
complaint we could say well you know
6:58
complaint we could say well you know what if we think a little bit about how
6:59
what if we think a little bit about how
6:59
what if we think a little bit about how python Works a comprehension is supposed
7:02
python Works a comprehension is supposed
7:02
python Works a comprehension is supposed to express to the reader of this code
7:04
to express to the reader of this code
7:04
to express to the reader of this code that it's building something in this
7:06
that it's building something in this
7:06
that it's building something in this case a list comprehension built a list
7:08
case a list comprehension built a list
7:08
case a list comprehension built a list whereas a for Loop is to express to the
7:09
whereas a for Loop is to express to the
7:09
whereas a for Loop is to express to the reader that it's performing an action
7:12
reader that it's performing an action
7:12
reader that it's performing an action and if we think about the change that
7:13
and if we think about the change that
7:13
and if we think about the change that you had you were printing things to the
7:14
you had you were printing things to the
7:14
you had you were printing things to the screen you're not building something
7:16
screen you're not building something
7:16
screen you're not building something you're building a list of nonone values
7:17
you're building a list of nonone values
7:17
you're building a list of nonone values nobody wants to use that you're actually
7:19
nobody wants to use that you're actually
7:19
nobody wants to use that you're actually performing an action and through this
7:21
performing an action and through this
7:21
performing an action and through this explanation we can share with them not
7:23
explanation we can share with them not
7:23
explanation we can share with them not only why it is that the code that
7:25
only why it is that the code that
7:25
only why it is that the code that they've submitted is unacceptable but
7:27
they've submitted is unacceptable but
7:27
they've submitted is unacceptable but also what they can do to generalize that
7:29
also what they can do to generalize that
7:29
also what they can do to generalize that learning to make sure that they approach
7:32
learning to make sure that they approach
7:32
learning to make sure that they approach the problem better next time instead of
7:34
the problem better next time instead of
7:34
the problem better next time instead of always trying to guess what it is you
7:35
always trying to guess what it is you
7:36
always trying to guess what it is you want until they've figured out how to
7:37
want until they've figured out how to
7:37
want until they've figured out how to mimic you they can understand the core
7:39
mimic you they can understand the core
7:39
mimic you they can understand the core principles that you're using in order to
7:41
principles that you're using in order to
7:41
principles that you're using in order to deliberate whether this code is good or
7:42
deliberate whether this code is good or
7:42
deliberate whether this code is good or bad and if it's the case that such
7:44
bad and if it's the case that such
7:44
bad and if it's the case that such principles do not exist maybe you're
7:46
principles do not exist maybe you're
7:46
principles do not exist maybe you're just nitpicking and maybe it's the case
7:48
just nitpicking and maybe it's the case
7:48
just nitpicking and maybe it's the case that as part of the code review process
7:50
that as part of the code review process
7:50
that as part of the code review process you shouldn't really be nitpicking these
7:52
you shouldn't really be nitpicking these
7:52
you shouldn't really be nitpicking these small stylistic
7:53
small stylistic details now some of you might try to
7:55
details now some of you might try to
7:55
details now some of you might try to take it maybe a little bit of a step
7:57
take it maybe a little bit of a step
7:57
take it maybe a little bit of a step further and say oh well in an even
7:59
further and say oh well in an even
7:59
further and say oh well in an even better organization could we make this a
8:02
better organization could we make this a
8:02
better organization could we make this a discussion where we discuss how
8:03
discussion where we discuss how
8:03
discussion where we discuss how something should be done rather than
8:05
something should be done rather than
8:05
something should be done rather than having the code reviewer explain to the
8:07
having the code reviewer explain to the
8:07
having the code reviewer explain to the person under review and unfortunately I
8:09
person under review and unfortunately I
8:09
person under review and unfortunately I do think that that is likely to be
8:10
do think that that is likely to be
8:11
do think that that is likely to be unrealistic especially in the case of
8:12
unrealistic especially in the case of
8:12
unrealistic especially in the case of Junior programmers it is very much the
8:14
Junior programmers it is very much the
8:14
Junior programmers it is very much the case that as part of a code review
8:15
case that as part of a code review
8:15
case that as part of a code review process where we are establishing that
8:17
process where we are establishing that
8:17
process where we are establishing that there is some hierarchy there's one
8:18
there is some hierarchy there's one
8:18
there is some hierarchy there's one person who reviews and one person who is
8:19
person who reviews and one person who is
8:19
person who reviews and one person who is being reviewed even in the case of a
8:21
being reviewed even in the case of a
8:21
being reviewed even in the case of a peer code review and it's very likely to
8:23
peer code review and it's very likely to
8:23
peer code review and it's very likely to be the case that if it's a junior code
8:25
be the case that if it's a junior code
8:25
be the case that if it's a junior code review well the junior might be missing
8:28
review well the junior might be missing
8:28
review well the junior might be missing some of the important content or this
8:30
some of the important content or this
8:30
some of the important content or this important perspective it's often the
8:31
important perspective it's often the
8:31
important perspective it's often the case that we see Junior programmers will
8:33
case that we see Junior programmers will
8:33
case that we see Junior programmers will say oh you know what let's just fix
8:35
say oh you know what let's just fix
8:35
say oh you know what let's just fix everything and you say well hold on a
8:36
everything and you say well hold on a
8:36
everything and you say well hold on a second we tried that 10 years ago you
8:38
second we tried that 10 years ago you
8:38
second we tried that 10 years ago you know that's not quite the direction the
8:39
know that's not quite the direction the
8:39
know that's not quite the direction the business is taking right now there's a
8:40
business is taking right now there's a
8:40
business is taking right now there's a lot of details that they may need to
8:42
lot of details that they may need to
8:42
lot of details that they may need to know in order to be able to effectively
8:45
know in order to be able to effectively
8:45
know in order to be able to effectively process what something should look like
8:47
process what something should look like
8:47
process what something should look like and so I think it is appropriate even
8:49
and so I think it is appropriate even
8:49
and so I think it is appropriate even within a culture of training to still be
8:51
within a culture of training to still be
8:51
within a culture of training to still be a little bit prescriptive about this is
8:53
a little bit prescriptive about this is
8:53
a little bit prescriptive about this is what we want rather than having to make
8:55
what we want rather than having to make
8:55
what we want rather than having to make every single part of this discussion
8:56
every single part of this discussion
8:56
every single part of this discussion since it is unlikely that some some some
9:00
since it is unlikely that some some some
9:00
since it is unlikely that some some some code reviews would actually be able to
9:01
code reviews would actually be able to
9:01
code reviews would actually be able to turn into a discussion where both sides
9:03
turn into a discussion where both sides
9:03
turn into a discussion where both sides have equal say in how the code will look
9:06
have equal say in how the code will look
9:06
have equal say in how the code will look now there are some cases where when we
9:08
now there are some cases where when we
9:08
now there are some cases where when we take a look at code reviews we can see
9:10
take a look at code reviews we can see
9:10
take a look at code reviews we can see that there's a lot of nuance that needs
9:12
that there's a lot of nuance that needs
9:12
that there's a lot of nuance that needs to be added there and this is important
9:14
to be added there and this is important
9:14
to be added there and this is important in that culture of training the reason
9:15
in that culture of training the reason
9:15
in that culture of training the reason we want to train people is because we
9:16
we want to train people is because we
9:16
we want to train people is because we don't want them to just memorize
9:18
don't want them to just memorize
9:18
don't want them to just memorize formulations we like or to rely on
9:20
formulations we like or to rely on
9:20
formulations we like or to rely on standards documents oh it's already
9:22
standards documents oh it's already
9:22
standards documents oh it's already documented here this is how we write our
9:24
documented here this is how we write our
9:24
documented here this is how we write our code because for example if we rely on
9:26
code because for example if we rely on
9:26
code because for example if we rely on pep eight which is largely an erone ly
9:29
pep eight which is largely an erone ly
9:29
pep eight which is largely an erone ly assumed to be a standardized way to
9:31
assumed to be a standardized way to
9:31
assumed to be a standardized way to write python it's not it's how python
9:34
write python it's not it's how python
9:34
write python it's not it's how python largely should mostly be written if
9:35
largely should mostly be written if
9:35
largely should mostly be written if you're contributing to python itself or
9:37
you're contributing to python itself or
9:37
you're contributing to python itself or the python standard Library it will give
9:39
the python standard Library it will give
9:39
the python standard Library it will give us some guidance where that guidance is
9:40
us some guidance where that guidance is
9:40
us some guidance where that guidance is wrong for example pep8 says if we want
9:42
wrong for example pep8 says if we want
9:43
wrong for example pep8 says if we want to determine if a structure is empty or
9:44
to determine if a structure is empty or
9:44
to determine if a structure is empty or not we shouldn't use the first two
9:46
not we shouldn't use the first two
9:46
not we shouldn't use the first two formulations checking the length we
9:47
formulations checking the length we
9:47
formulations checking the length we should use the last formulation just
9:49
should use the last formulation just
9:49
should use the last formulation just converting this thing to a Boolean value
9:51
converting this thing to a Boolean value
9:51
converting this thing to a Boolean value but this is actually bad advice because
9:53
but this is actually bad advice because
9:53
but this is actually bad advice because if we have a list yeah sure this if
9:55
if we have a list yeah sure this if
9:55
if we have a list yeah sure this if Clause the code contained within will be
9:57
Clause the code contained within will be
9:57
Clause the code contained within will be triggered if this thing is not empty but
9:59
triggered if this thing is not empty but
9:59
triggered if this thing is not empty but if we have a numpy and Dr array this
10:01
if we have a numpy and Dr array this
10:01
if we have a numpy and Dr array this codee's going to break it's going to
10:02
codee's going to break it's going to
10:02
codee's going to break it's going to raise an exception it's going to tell us
10:03
raise an exception it's going to tell us
10:03
raise an exception it's going to tell us that the truth value of an array with
10:04
that the truth value of an array with
10:04
that the truth value of an array with more than one element is ambiguous the
10:07
more than one element is ambiguous the
10:07
more than one element is ambiguous the guidance that pep 8 gives us is not
10:08
guidance that pep 8 gives us is not
10:08
guidance that pep 8 gives us is not correct guidance in this per in this
10:10
correct guidance in this per in this
10:10
correct guidance in this per in this case in fact one of the other
10:11
case in fact one of the other
10:11
case in fact one of the other formulations would be more nearly
10:13
formulations would be more nearly
10:13
formulations would be more nearly correct now as you can see we're
10:15
correct now as you can see we're
10:15
correct now as you can see we're beginning to enter a very delicate
10:17
beginning to enter a very delicate
10:17
beginning to enter a very delicate territory because there's an enormous
10:18
territory because there's an enormous
10:18
territory because there's an enormous amount of nuance to this if we think
10:20
amount of nuance to this if we think
10:20
amount of nuance to this if we think about the difference between a list and
10:21
about the difference between a list and
10:21
about the difference between a list and a numpy and Dray in Python well a list
10:24
a numpy and Dray in Python well a list
10:24
a numpy and Dray in Python well a list is some potentially nested grouped
10:26
is some potentially nested grouped
10:26
is some potentially nested grouped collection of elements whereas A numpy
10:27
collection of elements whereas A numpy
10:27
collection of elements whereas A numpy and D is a mathematical structure so if
10:29
and D is a mathematical structure so if
10:29
and D is a mathematical structure so if we go back to this this area of
10:31
we go back to this this area of
10:32
we go back to this this area of disagreement in our code reviews pep at
10:33
disagreement in our code reviews pep at
10:33
disagreement in our code reviews pep at the guide that we want to stick to or
10:35
the guide that we want to stick to or
10:35
the guide that we want to stick to or not and we say well well this line of
10:37
not and we say well well this line of
10:37
not and we say well well this line of code here that's following Pepe is
10:39
code here that's following Pepe is
10:40
code here that's following Pepe is asking does this list this container of
10:42
asking does this list this container of
10:42
asking does this list this container of entities have any stuff in it whereas if
10:45
entities have any stuff in it whereas if
10:45
entities have any stuff in it whereas if we were already have an MP and D array
10:47
we were already have an MP and D array
10:47
we were already have an MP and D array this is
10:48
this is asking if this were to work does this
10:50
asking if this were to work does this
10:50
asking if this were to work does this thing have dimensions that's not a very
10:52
thing have dimensions that's not a very
10:52
thing have dimensions that's not a very meaningful question to ask for an NP and
10:54
meaningful question to ask for an NP and
10:54
meaningful question to ask for an NP and d and of course any subsequent operation
10:56
d and of course any subsequent operation
10:56
d and of course any subsequent operation that we perform on that NP and D will
10:58
that we perform on that NP and D will
10:58
that we perform on that NP and D will not broadcast you obviously the
11:00
not broadcast you obviously the
11:00
not broadcast you obviously the broadcasting rules Won't Let You
11:01
broadcasting rules Won't Let You
11:01
broadcasting rules Won't Let You broadcast against something with no
11:02
broadcast against something with no
11:02
broadcast against something with no dimensions and so it's unlikely that you
11:04
dimensions and so it's unlikely that you
11:04
dimensions and so it's unlikely that you would see code that looks like this in
11:06
would see code that looks like this in
11:06
would see code that looks like this in generalized numerical Computing
11:08
generalized numerical Computing
11:08
generalized numerical Computing analytical or machine learning code and
11:10
analytical or machine learning code and
11:10
analytical or machine learning code and so the Nuance here is you know pep baate
11:13
so the Nuance here is you know pep baate
11:13
so the Nuance here is you know pep baate is wrong strictly but it's actually
11:15
is wrong strictly but it's actually
11:15
is wrong strictly but it's actually mostly right in terms of how we use
11:17
mostly right in terms of how we use
11:17
mostly right in terms of how we use these things and no simple sloganeering
11:21
these things and no simple sloganeering
11:21
these things and no simple sloganeering no simple oneline message write it this
11:24
no simple oneline message write it this
11:24
no simple oneline message write it this way is going to be able to provide that
11:26
way is going to be able to provide that
11:26
way is going to be able to provide that context and that opportunity for growth
11:28
context and that opportunity for growth
11:28
context and that opportunity for growth for somebody who's under review this
11:30
for somebody who's under review this
11:30
for somebody who's under review this context is important to how we do our
11:33
context is important to how we do our
11:33
context is important to how we do our work and it makes everything that we do
11:35
work and it makes everything that we do
11:35
work and it makes everything that we do in our work much richer it makes our
11:38
in our work much richer it makes our
11:38
in our work much richer it makes our understanding of the problem domain and
11:39
understanding of the problem domain and
11:39
understanding of the problem domain and the tools that we use far greater and it
11:41
the tools that we use far greater and it
11:41
the tools that we use far greater and it allows us to use these tools more
11:43
allows us to use these tools more
11:43
allows us to use these tools more effectively in terms of using them in a
11:45
effectively in terms of using them in a
11:45
effectively in terms of using them in a more efficient way and also using them
11:47
more efficient way and also using them
11:47
more efficient way and also using them in a more precise way and in a culture
11:50
in a more precise way and in a culture
11:50
in a more precise way and in a culture of training we have that discussion we
11:51
of training we have that discussion we
11:52
of training we have that discussion we have that larger context of well why is
11:54
have that larger context of well why is
11:54
have that larger context of well why is it the way that we might do these things
11:55
it the way that we might do these things
11:56
it the way that we might do these things now in some cases we may cut it short
11:57
now in some cases we may cut it short
11:57
now in some cases we may cut it short because we don't want to spend two weeks
11:59
because we don't want to spend two weeks
11:59
because we don't want to spend two weeks teaching somebody every one of the
12:01
teaching somebody every one of the
12:01
teaching somebody every one of the necessary details behind why we do
12:03
necessary details behind why we do
12:03
necessary details behind why we do things in one place in some cases we
12:05
things in one place in some cases we
12:05
things in one place in some cases we might simplify these but we should
12:06
might simplify these but we should
12:06
might simplify these but we should always have some willingness to kind of
12:09
always have some willingness to kind of
12:09
always have some willingness to kind of say okay you know this is why things are
12:11
say okay you know this is why things are
12:11
say okay you know this is why things are the way they are I'm willing to show
12:12
the way they are I'm willing to show
12:12
the way they are I'm willing to show that to you and we might then simplify
12:15
that to you and we might then simplify
12:15
that to you and we might then simplify these in the form of General guidances
12:18
these in the form of General guidances
12:18
these in the form of General guidances but we shouldn't confuse those guidances
12:19
but we shouldn't confuse those guidances
12:19
but we shouldn't confuse those guidances for the training process we might
12:20
for the training process we might
12:20
for the training process we might provide a guidance like well Library
12:22
provide a guidance like well Library
12:22
provide a guidance like well Library code in which the user out of
12:24
code in which the user out of
12:24
code in which the user out of convenience might provide an unpay that
12:26
convenience might provide an unpay that
12:26
convenience might provide an unpay that represents a collection of elements
12:27
represents a collection of elements
12:27
represents a collection of elements should be handled slightly differently
12:28
should be handled slightly differently
12:28
should be handled slightly differently than Library code which uses a nump and
12:30
than Library code which uses a nump and
12:30
than Library code which uses a nump and d as a mathematical structure and in
12:32
d as a mathematical structure and in
12:32
d as a mathematical structure and in some cases we might we might go against
12:34
some cases we might we might go against
12:34
some cases we might we might go against pep eight in other cases we might not
12:36
pep eight in other cases we might not
12:36
pep eight in other cases we might not and through that context even if those
12:39
and through that context even if those
12:39
and through that context even if those lines of code find themselves excised
12:42
lines of code find themselves excised
12:42
lines of code find themselves excised from the codebase one pull request later
12:45
from the codebase one pull request later
12:45
from the codebase one pull request later the code review process is still a very
12:46
the code review process is still a very
12:46
the code review process is still a very useful one because both parties have had
12:48
useful one because both parties have had
12:48
useful one because both parties have had an opportunity to communicate or to
12:50
an opportunity to communicate or to
12:50
an opportunity to communicate or to learn more about the underlying
12:53
learn more about the underlying
12:53
learn more about the underlying Technologies and the underlying system
12:55
Technologies and the underlying system
12:55
Technologies and the underlying system irrespective of whether the code that
12:56
irrespective of whether the code that
12:56
irrespective of whether the code that they've written is code that will be
12:58
they've written is code that will be
12:58
they've written is code that will be included in the fin product or not other
13:00
included in the fin product or not other
13:00
included in the fin product or not other guidance you might provide is to be
13:02
guidance you might provide is to be
13:02
guidance you might provide is to be aware that EQ may not compose with bu
13:04
aware that EQ may not compose with bu
13:04
aware that EQ may not compose with bu and Python and these are cases where you
13:06
and Python and these are cases where you
13:06
and Python and these are cases where you might give somebody some guidance on
13:08
might give somebody some guidance on
13:08
might give somebody some guidance on errors that they might see for example
13:09
errors that they might see for example
13:09
errors that they might see for example if you had some code like if X's equals
13:11
if you had some code like if X's equals
13:11
if you had some code like if X's equals y's in Python you didn't know what x's
13:13
y's in Python you didn't know what x's
13:13
y's in Python you didn't know what x's and y's are which is very much a library
13:15
and y's are which is very much a library
13:15
and y's are which is very much a library concern not really a user code concern
13:17
concern not really a user code concern
13:17
concern not really a user code concern well this is actually strictly wrong and
13:19
well this is actually strictly wrong and
13:19
well this is actually strictly wrong and in fact you even see this incorrectly in
13:21
in fact you even see this incorrectly in
13:21
in fact you even see this incorrectly in the python standard Library cases where
13:23
the python standard Library cases where
13:23
the python standard Library cases where you might for example try to create an
13:25
you might for example try to create an
13:25
you might for example try to create an enum value that represents cardinal
13:27
enum value that represents cardinal
13:27
enum value that represents cardinal directions and you might want these to
13:28
directions and you might want these to
13:28
directions and you might want these to be the offset that's an R an r squar and
13:31
be the offset that's an R an r squar and
13:31
be the offset that's an R an r squar and if you try and create an enum where the
13:32
if you try and create an enum where the
13:32
if you try and create an enum where the values are nump and D arrays somewhere
13:34
values are nump and D arrays somewhere
13:34
values are nump and D arrays somewhere in the code you see something looks like
13:36
in the code you see something looks like
13:36
in the code you see something looks like this and you get the truth value of
13:37
this and you get the truth value of
13:37
this and you get the truth value of array with more than one element is
13:38
array with more than one element is
13:38
array with more than one element is ambiguous use any or all and it breaks I
13:40
ambiguous use any or all and it breaks I
13:40
ambiguous use any or all and it breaks I actually brought this up to a python
13:42
actually brought this up to a python
13:42
actually brought this up to a python core developer and they gave me the
13:43
core developer and they gave me the
13:43
core developer and they gave me the feedback that numpy is wrong let's go
13:45
feedback that numpy is wrong let's go
13:45
feedback that numpy is wrong let's go change numpy and this is why in some
13:47
change numpy and this is why in some
13:47
change numpy and this is why in some cases we may need to be willing to have
13:50
cases we may need to be willing to have
13:50
cases we may need to be willing to have the conversation but also say well hold
13:52
the conversation but also say well hold
13:53
the conversation but also say well hold on a second we're not going to read
13:54
on a second we're not going to read
13:55
on a second we're not going to read numpy numpy was
13:56
numpy numpy was created now almost 18 years ago it's
14:00
created now almost 18 years ago it's
14:00
created now almost 18 years ago it's very unlikely that we can make such a
14:02
very unlikely that we can make such a
14:02
very unlikely that we can make such a substantive change and with the
14:04
substantive change and with the
14:04
substantive change and with the perspective of knowing that these tools
14:06
perspective of knowing that these tools
14:06
perspective of knowing that these tools are so wides spread we have to sometimes
14:08
are so wides spread we have to sometimes
14:08
are so wides spread we have to sometimes just accept that things are the way they
14:10
just accept that things are the way they
14:10
just accept that things are the way they are but we should never shy away from
14:12
are but we should never shy away from
14:12
are but we should never shy away from part of that culture of training people
14:14
part of that culture of training people
14:14
part of that culture of training people to at least give them a little bit of
14:15
to at least give them a little bit of
14:16
to at least give them a little bit of context and a little bit of
14:17
context and a little bit of
14:17
context and a little bit of understanding for why things are the way
14:18
understanding for why things are the way
14:18
understanding for why things are the way they are so what is a culture of
14:20
they are so what is a culture of
14:20
they are so what is a culture of training well a culture of training is
14:22
training well a culture of training is
14:22
training well a culture of training is instilling in People a sense of
14:23
instilling in People a sense of
14:23
instilling in People a sense of deliberateness that the actions that we
14:25
deliberateness that the actions that we
14:25
deliberateness that the actions that we take are deliberate choices we're not
14:27
take are deliberate choices we're not
14:27
take are deliberate choices we're not just writing the code for the sake of WR
14:29
just writing the code for the sake of WR
14:29
just writing the code for the sake of WR the code but we make choices in every
14:30
the code but we make choices in every
14:31
the code but we make choices in every single line of code that we make and
14:32
single line of code that we make and
14:32
single line of code that we make and there's some reasoning behind it even if
14:34
there's some reasoning behind it even if
14:34
there's some reasoning behind it even if it's the case that we don't relitigate
14:36
it's the case that we don't relitigate
14:36
it's the case that we don't relitigate that reasoning every single time or we
14:37
that reasoning every single time or we
14:37
that reasoning every single time or we don't explicate that reasoning every
14:39
don't explicate that reasoning every
14:39
don't explicate that reasoning every single time it is a willingness to share
14:41
single time it is a willingness to share
14:42
single time it is a willingness to share knowledge understanding that the code
14:43
knowledge understanding that the code
14:43
knowledge understanding that the code review process is an opportunity for you
14:44
review process is an opportunity for you
14:44
review process is an opportunity for you to share knowledge it's a training
14:45
to share knowledge it's a training
14:45
to share knowledge it's a training opportunity for you to work with your co
14:47
opportunity for you to work with your co
14:47
opportunity for you to work with your co co colleagues even in a peer rview and
14:49
co colleagues even in a peer rview and
14:49
co colleagues even in a peer rview and to share with them why is that things
14:51
to share with them why is that things
14:51
to share with them why is that things are the way they are it is not an
14:53
are the way they are it is not an
14:53
are the way they are it is not an opportunity for you merely to denigrate
14:55
opportunity for you merely to denigrate
14:55
opportunity for you merely to denigrate or to say you know this codee's not good
14:57
or to say you know this codee's not good
14:57
or to say you know this codee's not good enough try and make it better make it as
14:59
enough try and make it better make it as
14:59
enough try and make it better make it as good as I want it make it to my
15:01
good as I want it make it to my
15:01
good as I want it make it to my satisfaction a culture of training is
15:04
satisfaction a culture of training is
15:04
satisfaction a culture of training is seeing that code review is a mechanism
15:06
seeing that code review is a mechanism
15:06
seeing that code review is a mechanism and one of the most important and most
15:07
and one of the most important and most
15:07
and one of the most important and most common mechanisms by which we share this
15:09
common mechanisms by which we share this
15:09
common mechanisms by which we share this knowledge and hopefully capturing and
15:12
knowledge and hopefully capturing and
15:12
knowledge and hopefully capturing and recording shared knowledge in a code
15:14
recording shared knowledge in a code
15:14
recording shared knowledge in a code review this is one thing that you can
15:15
review this is one thing that you can
15:15
review this is one thing that you can see from failed code review processes
15:17
see from failed code review processes
15:17
see from failed code review processes well does anybody ever go back to
15:19
well does anybody ever go back to
15:19
well does anybody ever go back to previous reviews and look through them
15:21
previous reviews and look through them
15:21
previous reviews and look through them to understand why decisions were made
15:23
to understand why decisions were made
15:23
to understand why decisions were made one way or the other if it's the case
15:25
one way or the other if it's the case
15:25
one way or the other if it's the case that they don't then it's likely that
15:26
that they don't then it's likely that
15:26
that they don't then it's likely that the code review process is useless
15:29
the code review process is useless
15:29
the code review process is useless now let's talk about a culture of
15:31
now let's talk about a culture of
15:31
now let's talk about a culture of learning because here we can see another
15:33
learning because here we can see another
15:33
learning because here we can see another place where cultural misalignment will
15:36
place where cultural misalignment will
15:36
place where cultural misalignment will lead to a code review process that is
15:37
lead to a code review process that is
15:37
lead to a code review process that is not particularly useful in your
15:39
not particularly useful in your
15:39
not particularly useful in your organization here's an example we I do a
15:42
organization here's an example we I do a
15:42
organization here's an example we I do a lot of corporate training as part of my
15:43
lot of corporate training as part of my
15:43
lot of corporate training as part of my work we do a lot of Consulting we do a
15:44
work we do a lot of Consulting we do a
15:44
work we do a lot of Consulting we do a lot of corporate training and as part of
15:45
lot of corporate training and as part of
15:45
lot of corporate training and as part of corporate training especially in Python
15:47
corporate training especially in Python
15:47
corporate training especially in Python we want to teach people not only how to
15:49
we want to teach people not only how to
15:49
we want to teach people not only how to use Python but how to use Python the way
15:52
use Python but how to use Python the way
15:52
use Python but how to use Python the way that it was designed to be used unlike
15:55
that it was designed to be used unlike
15:55
that it was designed to be used unlike many other tools that are very non
15:57
many other tools that are very non
15:57
many other tools that are very non opinionated about how to be used C++ is
16:00
opinionated about how to be used C++ is
16:00
opinionated about how to be used C++ is a great example you know every
16:02
a great example you know every
16:02
a great example you know every organization uses their own unique
16:04
organization uses their own unique
16:04
organization uses their own unique subset of the C++ functionality and says
16:06
subset of the C++ functionality and says
16:06
subset of the C++ functionality and says these are the things you should use and
16:07
these are the things you should use and
16:07
these are the things you should use and then these are the things you should
16:08
then these are the things you should
16:08
then these are the things you should never touch and then the next place you
16:10
never touch and then the next place you
16:10
never touch and then the next place you you work on a C++ code base they reverse
16:13
you work on a C++ code base they reverse
16:13
you work on a C++ code base they reverse the things you should never use and the
16:14
the things you should never use and the
16:14
the things you should never use and the things you should always use whereas in
16:16
things you should always use whereas in
16:16
things you should always use whereas in Python it's a much more holistically
16:18
Python it's a much more holistically
16:18
Python it's a much more holistically designed language and there's a
16:19
designed language and there's a
16:19
designed language and there's a particular opinionated way to go about
16:21
particular opinionated way to go about
16:21
particular opinionated way to go about using Python and being a good python
16:23
using Python and being a good python
16:23
using Python and being a good python programmer is understanding that that
16:25
programmer is understanding that that
16:25
programmer is understanding that that way is relatively consistent across all
16:28
way is relatively consistent across all
16:28
way is relatively consistent across all uses of python at least all good uses of
16:29
uses of python at least all good uses of
16:30
uses of python at least all good uses of python one case of that is encouraging
16:32
python one case of that is encouraging
16:32
python one case of that is encouraging people in Python to use iteration
16:34
people in Python to use iteration
16:34
people in Python to use iteration helpers so you provide them with some
16:36
helpers so you provide them with some
16:36
helpers so you provide them with some code that looks like this that's looking
16:37
code that looks like this that's looking
16:37
code that looks like this that's looking at some values and it's looking at these
16:38
at some values and it's looking at these
16:38
at some values and it's looking at these values piece-wise it's trying to
16:39
values piece-wise it's trying to
16:40
values piece-wise it's trying to determine what's the pairwise difference
16:41
determine what's the pairwise difference
16:41
determine what's the pairwise difference you know from -2 to 94 that changed by
16:44
you know from -2 to 94 that changed by
16:44
you know from -2 to 94 that changed by 96 from 94 to 7 and you ask them is this
16:47
96 from 94 to 7 and you ask them is this
16:47
96 from 94 to 7 and you ask them is this code readable is this code
16:48
code readable is this code
16:48
code readable is this code understandable and maybe they might say
16:52
understandable and maybe they might say
16:52
understandable and maybe they might say well not really but I can rewrite that
16:54
well not really but I can rewrite that
16:54
well not really but I can rewrite that code very slightly I can make the code
16:56
code very slightly I can make the code
16:56
code very slightly I can make the code look like this and so it's a little bit
16:57
look like this and so it's a little bit
16:57
look like this and so it's a little bit easier to see that we're looking at
16:58
easier to see that we're looking at
16:58
easier to see that we're looking at previous values and current values
17:00
previous values and current values
17:00
previous values and current values offset by one and we're looking at
17:01
offset by one and we're looking at
17:01
offset by one and we're looking at overlapping windows but what you really
17:03
overlapping windows but what you really
17:03
overlapping windows but what you really want to teach them is well in Python
17:06
want to teach them is well in Python
17:06
want to teach them is well in Python there are iteration helpers things in
17:07
there are iteration helpers things in
17:07
there are iteration helpers things in the built-in like Zip and enumerate or
17:09
the built-in like Zip and enumerate or
17:09
the built-in like Zip and enumerate or things in the iter tools module and
17:10
things in the iter tools module and
17:10
things in the iter tools module and instead of all of these other
17:11
instead of all of these other
17:11
instead of all of these other contortions we have direct ways in which
17:14
contortions we have direct ways in which
17:14
contortions we have direct ways in which to write some code that very very
17:17
to write some code that very very
17:17
to write some code that very very clearly expresses the idea look at
17:19
clearly expresses the idea look at
17:19
clearly expresses the idea look at things in overlapping pairs look at the
17:21
things in overlapping pairs look at the
17:21
things in overlapping pairs look at the previous value and the current value
17:22
previous value and the current value
17:22
previous value and the current value then the next previous value and the
17:23
then the next previous value and the
17:23
then the next previous value and the next current value with all of that
17:25
next current value with all of that
17:25
next current value with all of that without all of that administrative noise
17:27
without all of that administrative noise
17:27
without all of that administrative noise of managing that Loop state
17:29
of managing that Loop state
17:29
of managing that Loop state now when we show that to people what
17:32
now when we show that to people what
17:32
now when we show that to people what often happens is you know we ask is this
17:34
often happens is you know we ask is this
17:34
often happens is you know we ask is this better code a a and by a metric of how
17:37
better code a a and by a metric of how
17:37
better code a a and by a metric of how many lines of code it is it's shorter
17:40
many lines of code it is it's shorter
17:41
many lines of code it is it's shorter but a lot of people very legitimately
17:43
but a lot of people very legitimately
17:43
but a lot of people very legitimately say you know what the earlier
17:44
say you know what the earlier
17:45
say you know what the earlier formulations are what I'm more used to
17:46
formulations are what I'm more used to
17:46
formulations are what I'm more used to from writing code in C or C++ or Java
17:49
from writing code in C or C++ or Java
17:49
from writing code in C or C++ or Java I've never used iteration helpers it's a
17:51
I've never used iteration helpers it's a
17:51
I've never used iteration helpers it's a very pythonic approach for solving
17:53
very pythonic approach for solving
17:53
very pythonic approach for solving problems and as a consequence I'm a
17:55
problems and as a consequence I'm a
17:55
problems and as a consequence I'm a little bit more comfortable with the
17:56
little bit more comfortable with the
17:56
little bit more comfortable with the other approaches even if maybe you're
17:58
other approaches even if maybe you're
17:58
other approaches even if maybe you're saying that they're not better in fact
18:00
saying that they're not better in fact
18:00
saying that they're not better in fact we even get feedback that says things
18:02
we even get feedback that says things
18:02
we even get feedback that says things like yeah sure that's great that's the
18:05
like yeah sure that's great that's the
18:05
like yeah sure that's great that's the way to do it on python but I kind of
18:07
way to do it on python but I kind of
18:07
way to do it on python but I kind of have to know what iter tools. pairwise
18:10
have to know what iter tools. pairwise
18:10
have to know what iter tools. pairwise is and that it exists and as a
18:13
is and that it exists and as a
18:13
is and that it exists and as a consequence well we try and say well you
18:15
consequence well we try and say well you
18:15
consequence well we try and say well you know if you're learning about python
18:16
know if you're learning about python
18:16
know if you're learning about python then you ought to learn about Python and
18:18
then you ought to learn about Python and
18:18
then you ought to learn about Python and this is the opportunity for you to learn
18:19
this is the opportunity for you to learn
18:19
this is the opportunity for you to learn that these things exist and how to use
18:21
that these things exist and how to use
18:21
that these things exist and how to use them and I share with them a very
18:24
them and I share with them a very
18:24
them and I share with them a very genuine rubric that I use for
18:26
genuine rubric that I use for
18:26
genuine rubric that I use for determining what I should include in my
18:28
determining what I should include in my
18:28
determining what I should include in my code and for answering that question of
18:30
code and for answering that question of
18:30
code and for answering that question of is this code too complex or not is this
18:33
is this code too complex or not is this
18:33
is this code too complex or not is this code worth putting in front of a junior
18:35
code worth putting in front of a junior
18:35
code worth putting in front of a junior person or not because you know anytime
18:37
person or not because you know anytime
18:37
person or not because you know anytime somebody says to me I I don't use fancy
18:40
somebody says to me I I don't use fancy
18:40
somebody says to me I I don't use fancy features that my co-workers may not know
18:41
features that my co-workers may not know
18:41
features that my co-workers may not know maybe they're all Junior that feels too
18:43
maybe they're all Junior that feels too
18:43
maybe they're all Junior that feels too wishy-washy and too subjective for me to
18:46
wishy-washy and too subjective for me to
18:46
wishy-washy and too subjective for me to really be able to say oh this is code
18:48
really be able to say oh this is code
18:48
really be able to say oh this is code that's acceptable and this is code
18:49
that's acceptable and this is code
18:49
that's acceptable and this is code that's not acceptable and so I
18:52
that's not acceptable and so I
18:52
that's not acceptable and so I understand because originally when we
18:53
understand because originally when we
18:53
understand because originally when we show this examples iter tools. pair wise
18:55
show this examples iter tools. pair wise
18:55
show this examples iter tools. pair wise didn't exist so we show this to them in
18:56
didn't exist so we show this to them in
18:57
didn't exist so we show this to them in the context of an N wise that we
18:58
the context of an N wise that we
18:58
the context of an N wise that we structed ourselves and we and we get
19:00
structed ourselves and we and we get
19:00
structed ourselves and we and we get where you know if you actually have to
19:02
where you know if you actually have to
19:02
where you know if you actually have to look at how all of this stuff works it
19:03
look at how all of this stuff works it
19:03
look at how all of this stuff works it gets a little bit confusing but I think
19:07
gets a little bit confusing but I think
19:07
gets a little bit confusing but I think in a code review you know complexity can
19:10
in a code review you know complexity can
19:10
in a code review you know complexity can be boiled down to a fairly simple rubric
19:12
be boiled down to a fairly simple rubric
19:12
be boiled down to a fairly simple rubric that we can litigate I think that what's
19:15
that we can litigate I think that what's
19:15
that we can litigate I think that what's fair game in code is anything that takes
19:18
fair game in code is anything that takes
19:18
fair game in code is anything that takes me less than 90 seconds to explain to
19:20
me less than 90 seconds to explain to
19:20
me less than 90 seconds to explain to somebody or takes me less than 5 seconds
19:22
somebody or takes me less than 5 seconds
19:22
somebody or takes me less than 5 seconds to explain to somebody or takes me less
19:24
to explain to somebody or takes me less
19:24
to explain to somebody or takes me less than the space of one cocktail napkin to
19:27
than the space of one cocktail napkin to
19:27
than the space of one cocktail napkin to write out an explanation and if I can
19:29
write out an explanation and if I can
19:29
write out an explanation and if I can explain something under these under
19:32
explain something under these under
19:32
explain something under these under these three restrictions then maybe it's
19:33
these three restrictions then maybe it's
19:33
these three restrictions then maybe it's at a sufficient level of complexity to
19:36
at a sufficient level of complexity to
19:36
at a sufficient level of complexity to be included and maybe we can remove the
19:38
be included and maybe we can remove the
19:38
be included and maybe we can remove the subjectivity of an argument is this too
19:39
subjectivity of an argument is this too
19:39
subjectivity of an argument is this too complex or not and in the case of it
19:42
complex or not and in the case of it
19:42
complex or not and in the case of it tools. pawise I can do that ER tools.
19:44
tools. pawise I can do that ER tools.
19:44
tools. pawise I can do that ER tools. pairwise looks at something you could
19:45
pairwise looks at something you could
19:45
pairwise looks at something you could iterate over in overlapping Windows here
19:47
iterate over in overlapping Windows here
19:47
iterate over in overlapping Windows here I could write this on a cocktail napkin
19:49
I could write this on a cocktail napkin
19:49
I could write this on a cocktail napkin and I can explain this in two sentences
19:50
and I can explain this in two sentences
19:50
and I can explain this in two sentences and 30 seconds what it
19:52
and 30 seconds what it
19:52
and 30 seconds what it does but if we think about the
19:55
does but if we think about the
19:55
does but if we think about the generalized problem lurking behind all
19:57
generalized problem lurking behind all
19:57
generalized problem lurking behind all of this really seems to be the case is a
20:01
of this really seems to be the case is a
20:01
of this really seems to be the case is a lot of people look at code and they say
20:03
lot of people look at code and they say
20:03
lot of people look at code and they say I don't like that code and in my code
20:05
I don't like that code and in my code
20:05
I don't like that code and in my code review I'm going to express my
20:07
review I'm going to express my
20:07
review I'm going to express my displeasure on this code I don't like it
20:09
displeasure on this code I don't like it
20:09
displeasure on this code I don't like it it's too complicated they might even
20:12
it's too complicated they might even
20:12
it's too complicated they might even pejoratively say it's stupid because
20:14
pejoratively say it's stupid because
20:14
pejoratively say it's stupid because it's too complicated and I know they
20:15
it's too complicated and I know they
20:15
it's too complicated and I know they might say that because I know I've said
20:17
might say that because I know I've said
20:17
might say that because I know I've said that before I've looked at some code and
20:19
that before I've looked at some code and
20:19
that before I've looked at some code and said oh I hate this I hate this with all
20:21
said oh I hate this I hate this with all
20:21
said oh I hate this I hate this with all of my being it's far too complicated but
20:23
of my being it's far too complicated but
20:23
of my being it's far too complicated but what I really meant was I hate this with
20:25
what I really meant was I hate this with
20:25
what I really meant was I hate this with all of my being because I don't already
20:28
all of my being because I don't already
20:28
all of my being because I don't already know it
20:29
know it I I hate this with all of my being
20:31
I I hate this with all of my being
20:31
I I hate this with all of my being because well I'm not getting older I
20:32
because well I'm not getting older I
20:32
because well I'm not getting older I sure am feeling older these days and I'm
20:35
sure am feeling older these days and I'm
20:35
sure am feeling older these days and I'm actually kind of scared of being left
20:36
actually kind of scared of being left
20:36
actually kind of scared of being left behind I'm scared of being confronted
20:37
behind I'm scared of being confronted
20:37
behind I'm scared of being confronted with things that I don't know and I'm
20:39
with things that I don't know and I'm
20:39
with things that I don't know and I'm not already familiar with I I'm used to
20:42
not already familiar with I I'm used to
20:42
not already familiar with I I'm used to the way that python used to be written
20:43
the way that python used to be written
20:43
the way that python used to be written 10 years ago and I'm kind of scared
20:45
10 years ago and I'm kind of scared
20:45
10 years ago and I'm kind of scared because the ways that people are writing
20:46
because the ways that people are writing
20:46
because the ways that people are writing it these ways are very different and I
20:48
it these ways are very different and I
20:48
it these ways are very different and I know that happens because it happens to
20:50
know that happens because it happens to
20:50
know that happens because it happens to me all the time well when we think about
20:53
me all the time well when we think about
20:53
me all the time well when we think about a culture of learning distinct from a
20:55
a culture of learning distinct from a
20:55
a culture of learning distinct from a culture of training this is one of the
20:57
culture of training this is one of the
20:58
culture of training this is one of the important and critical aspects of an
20:59
important and critical aspects of an
20:59
important and critical aspects of an effective code review culture
21:01
effective code review culture
21:01
effective code review culture specifically a culture of learning is
21:03
specifically a culture of learning is
21:03
specifically a culture of learning is understanding that learning never stops
21:05
understanding that learning never stops
21:05
understanding that learning never stops I know every single day I might not look
21:07
I know every single day I might not look
21:07
I know every single day I might not look older but I feel older and I understand
21:09
older but I feel older and I understand
21:09
older but I feel older and I understand that you know for all of the years that
21:11
that you know for all of the years that
21:11
that you know for all of the years that I've spent learning all of my tools it
21:13
I've spent learning all of my tools it
21:13
I've spent learning all of my tools it could very well be the case that
21:15
could very well be the case that
21:15
could very well be the case that tomorrow python goes away and I need to
21:17
tomorrow python goes away and I need to
21:18
tomorrow python goes away and I need to learn I need to learn rust rust goes
21:21
learn I need to learn rust rust goes
21:21
learn I need to learn rust rust goes away and I need to learn Zig Zig goes
21:23
away and I need to learn Zig Zig goes
21:23
away and I need to learn Zig Zig goes away and I need to learn the next thing
21:24
away and I need to learn the next thing
21:24
away and I need to learn the next thing and I should be aware of and come to
21:26
and I should be aware of and come to
21:26
and I should be aware of and come to terms with an idea that the learning
21:28
terms with an idea that the learning
21:28
terms with an idea that the learning never stops it's a consistent thing it's
21:30
never stops it's a consistent thing it's
21:30
never stops it's a consistent thing it's a constant thing as part of our work
21:32
a constant thing as part of our work
21:32
a constant thing as part of our work that there are things that I'm not going
21:34
that there are things that I'm not going
21:34
that there are things that I'm not going to know and it's okay that there's
21:35
to know and it's okay that there's
21:35
to know and it's okay that there's things that I'm not going to know and
21:36
things that I'm not going to know and
21:36
things that I'm not going to know and there's things even within my area of
21:39
there's things even within my area of
21:39
there's things even within my area of expertise that I won't know and it's a
21:41
expertise that I won't know and it's a
21:41
expertise that I won't know and it's a very human thing for me to especially
21:44
very human thing for me to especially
21:44
very human thing for me to especially with my co-workers kind of brush off and
21:45
with my co-workers kind of brush off and
21:45
with my co-workers kind of brush off and say oh yeah that was added recently oh
21:48
say oh yeah that was added recently oh
21:48
say oh yeah that was added recently oh yeah I knew that even if I didn't know
21:49
yeah I knew that even if I didn't know
21:50
yeah I knew that even if I didn't know that and that's a human failing and it's
21:52
that and that's a human failing and it's
21:52
that and that's a human failing and it's a fault that I am aware that I have but
21:54
a fault that I am aware that I have but
21:54
a fault that I am aware that I have but it's something which when I take a step
21:56
it's something which when I take a step
21:56
it's something which when I take a step back and I say well you know what I'm
21:57
back and I say well you know what I'm
21:57
back and I say well you know what I'm not going to know everything thing
21:58
not going to know everything thing
21:58
not going to know everything thing there's always going to be some detail I
21:59
there's always going to be some detail I
21:59
there's always going to be some detail I don't know this is an opportunity for me
22:01
don't know this is an opportunity for me
22:01
don't know this is an opportunity for me to learn something new a culture of
22:03
to learn something new a culture of
22:03
to learn something new a culture of learning is understanding that the
22:04
learning is understanding that the
22:05
learning is understanding that the learning process is not always easy even
22:07
learning process is not always easy even
22:07
learning process is not always easy even in fields where you have expertise it
22:09
in fields where you have expertise it
22:09
in fields where you have expertise it can be very difficult it can be very
22:10
can be very difficult it can be very
22:10
can be very difficult it can be very intimidating but it's worth doing no
22:12
intimidating but it's worth doing no
22:12
intimidating but it's worth doing no matter what in fact if we think about it
22:14
matter what in fact if we think about it
22:15
matter what in fact if we think about it continuous Improvement continuous
22:16
continuous Improvement continuous
22:16
continuous Improvement continuous learning is our responsibility it's
22:18
learning is our responsibility it's
22:18
learning is our responsibility it's worth doing no matter how difficult how
22:20
worth doing no matter how difficult how
22:20
worth doing no matter how difficult how intimidating even though it's something
22:22
intimidating even though it's something
22:22
intimidating even though it's something that never stops and even though I'm
22:25
that never stops and even though I'm
22:25
that never stops and even though I'm only going to discover more things that
22:27
only going to discover more things that
22:27
only going to discover more things that I don't know in fact some people may go
22:30
I don't know in fact some people may go
22:30
I don't know in fact some people may go so far as to say that learning is above
22:33
so far as to say that learning is above
22:33
so far as to say that learning is above all other human Pursuits that it is the
22:35
all other human Pursuits that it is the
22:35
all other human Pursuits that it is the greatest human Pursuit and honestly I
22:37
greatest human Pursuit and honestly I
22:37
greatest human Pursuit and honestly I wouldn't go that far I would however say
22:40
wouldn't go that far I would however say
22:40
wouldn't go that far I would however say that knowledge and the S the the the
22:43
that knowledge and the S the the the
22:43
that knowledge and the S the the the search for knowledge is genuinely above
22:45
search for knowledge is genuinely above
22:45
search for knowledge is genuinely above all other human Pursuits which leads us
22:48
all other human Pursuits which leads us
22:48
all other human Pursuits which leads us into a culture of knowledge and one
22:50
into a culture of knowledge and one
22:50
into a culture of knowledge and one thing that is critically missing and
22:52
thing that is critically missing and
22:52
thing that is critically missing and unfortunately one thing that unlike a
22:54
unfortunately one thing that unlike a
22:54
unfortunately one thing that unlike a culture of learning and unlike a culture
22:55
culture of learning and unlike a culture
22:55
culture of learning and unlike a culture of teaching where we can try through
22:58
of teaching where we can try through
22:58
of teaching where we can try through some liberate process develop these the
22:59
some liberate process develop these the
22:59
some liberate process develop these the culture of knowledge is actually quite
23:01
culture of knowledge is actually quite
23:01
culture of knowledge is actually quite difficult to instill in an organization
23:03
difficult to instill in an organization
23:03
difficult to instill in an organization if it's not already present here's what
23:05
if it's not already present here's what
23:05
if it's not already present here's what we mean by a culture of knowledge well
23:07
we mean by a culture of knowledge well
23:07
we mean by a culture of knowledge well one of my biggest pet peeves when we're
23:09
one of my biggest pet peeves when we're
23:09
one of my biggest pet peeves when we're talking about design decisions in a
23:11
talking about design decisions in a
23:11
talking about design decisions in a design or code review is when people say
23:13
design or code review is when people say
23:13
design or code review is when people say things like it's a series of trade-offs
23:16
things like it's a series of trade-offs
23:16
things like it's a series of trade-offs okay yeah but what in life isn't a
23:18
okay yeah but what in life isn't a
23:18
okay yeah but what in life isn't a series of trade-offs everything's a
23:19
series of trade-offs everything's a
23:20
series of trade-offs everything's a series of trade-offs that added no
23:21
series of trade-offs that added no
23:21
series of trade-offs that added no knowledge no information or when they
23:23
knowledge no information or when they
23:23
knowledge no information or when they say well use this feature under these
23:26
say well use this feature under these
23:26
say well use this feature under these circumstances or you say when do you use
23:29
circumstances or you say when do you use
23:29
circumstances or you say when do you use a generator versus a generator co-
23:30
a generator versus a generator co-
23:30
a generator versus a generator co- routine versus some other feature in
23:31
routine versus some other feature in
23:31
routine versus some other feature in Python they say it depends and I'm just
23:33
Python they say it depends and I'm just
23:33
Python they say it depends and I'm just thinking yeah it depends on what the
23:36
thinking yeah it depends on what the
23:36
thinking yeah it depends on what the knowledge here is giving me some
23:37
knowledge here is giving me some
23:37
knowledge here is giving me some guidance for how to methodically apply
23:40
guidance for how to methodically apply
23:40
guidance for how to methodically apply some theoretical constructs to reach an
23:42
some theoretical constructs to reach an
23:42
some theoretical constructs to reach an end goal not to just give me some Pat
23:44
end goal not to just give me some Pat
23:44
end goal not to just give me some Pat statement saying I don't know it depends
23:46
statement saying I don't know it depends
23:46
statement saying I don't know it depends sometimes it's this way sometimes it's
23:47
sometimes it's this way sometimes it's
23:47
sometimes it's this way sometimes it's the other way and carving out within
23:50
the other way and carving out within
23:50
the other way and carving out within what is often times a holy unknowable
23:53
what is often times a holy unknowable
23:53
what is often times a holy unknowable field the regions of knowledge that we
23:55
field the regions of knowledge that we
23:55
field the regions of knowledge that we can Sur you can find another thing that
23:58
can Sur you can find another thing that
23:58
can Sur you can find another thing that is are a humongous pet peeve for me is
24:00
is are a humongous pet peeve for me is
24:00
is are a humongous pet peeve for me is when I see circumstances where people
24:03
when I see circumstances where people
24:03
when I see circumstances where people are Rel litigating in the sense that it
24:07
are Rel litigating in the sense that it
24:07
are Rel litigating in the sense that it is an interesting controversial
24:09
is an interesting controversial
24:09
is an interesting controversial questions questions that are ultimately
24:11
questions questions that are ultimately
24:11
questions questions that are ultimately and utterly meaningless and are in fact
24:14
and utterly meaningless and are in fact
24:14
and utterly meaningless and are in fact not controversial and not particularly
24:15
not controversial and not particularly
24:15
not controversial and not particularly interesting but are instead almost and
24:18
interesting but are instead almost and
24:18
interesting but are instead almost and completely obvious in their answer once
24:20
completely obvious in their answer once
24:20
completely obvious in their answer once you understand some foundational Theory
24:22
you understand some foundational Theory
24:22
you understand some foundational Theory or some foundational knowledge I
24:24
or some foundational knowledge I
24:24
or some foundational knowledge I recently saw online some people going
24:26
recently saw online some people going
24:26
recently saw online some people going back and forth on should they parse the
24:27
back and forth on should they parse the
24:27
back and forth on should they parse the output of Less in a shell script and I
24:30
output of Less in a shell script and I
24:30
output of Less in a shell script and I just I just thought this is hours of
24:32
just I just thought this is hours of
24:32
just I just thought this is hours of human effort and the answer is so
24:34
human effort and the answer is so
24:34
human effort and the answer is so blindingly obvious this is not an
24:36
blindingly obvious this is not an
24:36
blindingly obvious this is not an interesting or controversial question
24:38
interesting or controversial question
24:38
interesting or controversial question that should be getting that much
24:39
that should be getting that much
24:39
that should be getting that much attention it's really just a
24:41
attention it's really just a
24:41
attention it's really just a understanding of the Core Concepts and
24:42
understanding of the Core Concepts and
24:43
understanding of the Core Concepts and then application of those Core Concepts
24:44
then application of those Core Concepts
24:44
then application of those Core Concepts and then we move on with their life but
24:46
and then we move on with their life but
24:46
and then we move on with their life but to give you an example I want to show
24:47
to give you an example I want to show
24:47
to give you an example I want to show you a little bit of code that I was
24:49
you a little bit of code that I was
24:49
you a little bit of code that I was looking at recently a representative
24:50
looking at recently a representative
24:50
looking at recently a representative example that came up in some code review
24:52
example that came up in some code review
24:52
example that came up in some code review that has an enormously subtle bug this
24:54
that has an enormously subtle bug this
24:54
that has an enormously subtle bug this is one of the most subtle bugs that I've
24:57
is one of the most subtle bugs that I've
24:57
is one of the most subtle bugs that I've seen in code in a while and probably the
24:59
seen in code in a while and probably the
24:59
seen in code in a while and probably the only case where we would make use of a
25:01
only case where we would make use of a
25:01
only case where we would make use of a fairly recent feature that was added in
25:03
fairly recent feature that was added in
25:03
fairly recent feature that was added in I want to say python 3.7 or 3.8 that
25:05
I want to say python 3.7 or 3.8 that
25:05
I want to say python 3.7 or 3.8 that otherwise doesn't have a lot of use
25:07
otherwise doesn't have a lot of use
25:07
otherwise doesn't have a lot of use cases you're not going to be able to
25:08
cases you're not going to be able to
25:08
cases you're not going to be able to spot the bug but you can at least get a
25:10
spot the bug but you can at least get a
25:10
spot the bug but you can at least get a sense of what this code does the
25:12
sense of what this code does the
25:12
sense of what this code does the person's using some kind of functional
25:13
person's using some kind of functional
25:13
person's using some kind of functional programming in Python to write a
25:15
programming in Python to write a
25:15
programming in Python to write a function that performs or calls another
25:16
function that performs or calls another
25:16
function that performs or calls another function some number of times and allows
25:18
function some number of times and allows
25:18
function some number of times and allows you to pass in vartic positional
25:20
you to pass in vartic positional
25:20
you to pass in vartic positional arguments vartic keyword arguments that
25:21
arguments vartic keyword arguments that
25:21
arguments vartic keyword arguments that are just forwarded through and the bug
25:24
are just forwarded through and the bug
25:24
are just forwarded through and the bug here is a design flaw the first two
25:27
here is a design flaw the first two
25:27
here is a design flaw the first two arguments need to be pass position only
25:29
arguments need to be pass position only
25:29
arguments need to be pass position only because if they're not pass positionally
25:31
because if they're not pass positionally
25:31
because if they're not pass positionally only then if the function that is then
25:34
only then if the function that is then
25:34
only then if the function that is then being repeated here contains or has an
25:37
being repeated here contains or has an
25:37
being repeated here contains or has an argument called n that argument n cannot
25:40
argument called n that argument n cannot
25:40
argument called n that argument n cannot be passed by key without an ambiguity
25:42
be passed by key without an ambiguity
25:42
be passed by key without an ambiguity between wait wait was that the N that
25:44
between wait wait was that the N that
25:44
between wait wait was that the N that I'm passing to the function that I'm
25:46
I'm passing to the function that I'm
25:46
I'm passing to the function that I'm calling or is that the end that I'm
25:47
calling or is that the end that I'm
25:47
calling or is that the end that I'm passing to represent the number of times
25:49
passing to represent the number of times
25:49
passing to represent the number of times I'm calling that function and that
25:51
I'm calling that function and that
25:51
I'm calling that function and that ambiguity means that the first of these
25:53
ambiguity means that the first of these
25:53
ambiguity means that the first of these two calls will work but the second one
25:55
two calls will work but the second one
25:55
two calls will work but the second one won't and it's a very hard bug to find
25:58
won't and it's a very hard bug to find
25:58
won't and it's a very hard bug to find unless you know how to look for it
26:00
unless you know how to look for it
26:00
unless you know how to look for it unless you dig on to the underlying
26:02
unless you dig on to the underlying
26:02
unless you dig on to the underlying Theory now if we take a look at this we
26:04
Theory now if we take a look at this we
26:04
Theory now if we take a look at this we could actually go a little bit further
26:05
could actually go a little bit further
26:05
could actually go a little bit further and say you know what we shouldn't be
26:07
and say you know what we shouldn't be
26:07
and say you know what we shouldn't be doing this eagerly we shouldn't be
26:08
doing this eagerly we shouldn't be
26:08
doing this eagerly we shouldn't be collecting this in a list because who
26:09
collecting this in a list because who
26:09
collecting this in a list because who knows if the end user really wants to
26:10
knows if the end user really wants to
26:10
knows if the end user really wants to collect this list we should make this a
26:12
collect this list we should make this a
26:12
collect this list we should make this a generator and and just yield these and
26:14
generator and and just yield these and
26:14
generator and and just yield these and you know if we're making this a
26:15
you know if we're making this a
26:15
you know if we're making this a generator why not just represent this as
26:17
generator why not just represent this as
26:17
generator why not just represent this as an infinite sequence of function calls
26:19
an infinite sequence of function calls
26:19
an infinite sequence of function calls and then give them the ability to
26:21
and then give them the ability to
26:21
and then give them the ability to control modalities externally because
26:22
control modalities externally because
26:22
control modalities externally because what if they want to be able to run this
26:24
what if they want to be able to run this
26:24
what if they want to be able to run this function until it gets a particular
26:25
function until it gets a particular
26:25
function until it gets a particular output which they wouldn't do in the
26:27
output which they wouldn't do in the
26:27
output which they wouldn't do in the first formulation without adding
26:28
first formulation without adding
26:28
first formulation without adding modalities and so instead we should
26:30
modalities and so instead we should
26:30
modalities and so instead we should write this as an infinite Loop and then
26:31
write this as an infinite Loop and then
26:31
write this as an infinite Loop and then use it tools. I slice or it tools. take
26:34
use it tools. I slice or it tools. take
26:34
use it tools. I slice or it tools. take while in order to control the modality
26:36
while in order to control the modality
26:36
while in order to control the modality of when it stops and if we're doing that
26:38
of when it stops and if we're doing that
26:38
of when it stops and if we're doing that maybe we shouldn't even do this in the
26:39
maybe we shouldn't even do this in the
26:39
maybe we shouldn't even do this in the first place we should just let them
26:40
first place we should just let them
26:40
first place we should just let them write our list comprehension or a
26:41
write our list comprehension or a
26:41
write our list comprehension or a generator expression if they want and
26:43
generator expression if they want and
26:43
generator expression if they want and this function doesn't even need to exist
26:45
this function doesn't even need to exist
26:45
this function doesn't even need to exist often times the use of core theory that
26:49
often times the use of core theory that
26:49
often times the use of core theory that has been derived by really searching for
26:51
has been derived by really searching for
26:51
has been derived by really searching for the knowledge the meaning behind the
26:53
the knowledge the meaning behind the
26:53
the knowledge the meaning behind the structures that we write leads to code
26:55
structures that we write leads to code
26:55
structures that we write leads to code reviews that look like this where we
26:56
reviews that look like this where we
26:56
reviews that look like this where we start by litigating small details in a
27:00
start by litigating small details in a
27:00
start by litigating small details in a useful sense because it gives us an
27:01
useful sense because it gives us an
27:01
useful sense because it gives us an opportunity to better understand some of
27:02
opportunity to better understand some of
27:02
opportunity to better understand some of the constraints that we're operating
27:03
the constraints that we're operating
27:03
the constraints that we're operating under and some of the details of our
27:05
under and some of the details of our
27:05
under and some of the details of our tools and then melts away the complexity
27:07
tools and then melts away the complexity
27:07
tools and then melts away the complexity until we discover oh actually we didn't
27:09
until we discover oh actually we didn't
27:09
until we discover oh actually we didn't even to do this at all this this thing
27:11
even to do this at all this this thing
27:11
even to do this at all this this thing didn't have to exist the code review is
27:12
didn't have to exist the code review is
27:12
didn't have to exist the code review is moot we shouldn't even be going in this
27:14
moot we shouldn't even be going in this
27:15
moot we shouldn't even be going in this direction but I want to back up a little
27:16
direction but I want to back up a little
27:16
direction but I want to back up a little bit to the original bug and the original
27:19
bit to the original bug and the original
27:19
bit to the original bug and the original bug is probably one of the most obvious
27:21
bug is probably one of the most obvious
27:21
bug is probably one of the most obvious bugs and yet appears all over the place
27:24
bugs and yet appears all over the place
27:24
bugs and yet appears all over the place throughout the design of so many tools
27:26
throughout the design of so many tools
27:26
throughout the design of so many tools it's a classical inband versus out of
27:28
it's a classical inband versus out of
27:28
it's a classical inband versus out of Bandon coding problem where if we think
27:31
Bandon coding problem where if we think
27:31
Bandon coding problem where if we think about what an inband and coding is it's
27:33
about what an inband and coding is it's
27:33
about what an inband and coding is it's any case that we could describe as
27:34
any case that we could describe as
27:34
any case that we could describe as having a single Channel through which
27:36
having a single Channel through which
27:36
having a single Channel through which we're encoding distinct data or distinct
27:38
we're encoding distinct data or distinct
27:38
we're encoding distinct data or distinct data and metadata whereas outof band
27:40
data and metadata whereas outof band
27:40
data and metadata whereas outof band would mean using distinct channels for
27:42
would mean using distinct channels for
27:42
would mean using distinct channels for encoding data and
27:44
encoding data and metadata and whether we're talking about
27:47
metadata and whether we're talking about
27:47
metadata and whether we're talking about two data signals or we're talking about
27:49
two data signals or we're talking about
27:49
two data signals or we're talking about a data and metadata signal really just
27:51
a data and metadata signal really just
27:51
a data and metadata signal really just comes down to the the case but it really
27:53
comes down to the the case but it really
27:53
comes down to the the case but it really is do we need to encode two things in
27:55
is do we need to encode two things in
27:55
is do we need to encode two things in the space of one or do we keep them
27:56
the space of one or do we keep them
27:56
the space of one or do we keep them separate and this is a problem that
27:58
separate and this is a problem that
27:58
separate and this is a problem that shows up all over the place in very
28:01
shows up all over the place in very
28:01
shows up all over the place in very distinct manifestations and yet is
28:04
distinct manifestations and yet is
28:04
distinct manifestations and yet is underlying the same problem for example
28:06
underlying the same problem for example
28:06
underlying the same problem for example all of you have written a shell script
28:07
all of you have written a shell script
28:07
all of you have written a shell script somewhere that used find in order to
28:10
somewhere that used find in order to
28:10
somewhere that used find in order to find the files that existed on disk and
28:13
find the files that existed on disk and
28:13
find the files that existed on disk and then you said oh I want to do an
28:14
then you said oh I want to do an
28:14
then you said oh I want to do an operation on each one of these files so
28:16
operation on each one of these files so
28:16
operation on each one of these files so you pipe that to exarc let me find out
28:18
you pipe that to exarc let me find out
28:18
you pipe that to exarc let me find out how much disk space is being used by
28:20
how much disk space is being used by
28:20
how much disk space is being used by each of these files except one of the
28:22
each of these files except one of the
28:22
each of these files except one of the files has a space in its name and this
28:25
files has a space in its name and this
28:25
files has a space in its name and this blows up in your face and if you went to
28:27
blows up in your face and if you went to
28:27
blows up in your face and if you went to your user users and you said well just
28:29
your user users and you said well just
28:29
your user users and you said well just don't have spaces in the names of your
28:31
don't have spaces in the names of your
28:31
don't have spaces in the names of your files that's probably the wrong answer
28:33
files that's probably the wrong answer
28:33
files that's probably the wrong answer because you made a mistake here and the
28:35
because you made a mistake here and the
28:35
because you made a mistake here and the mistake in the design of this is an
28:37
mistake in the design of this is an
28:37
mistake in the design of this is an inband encoding mistake fundamentally if
28:39
inband encoding mistake fundamentally if
28:39
inband encoding mistake fundamentally if we think about how the system shell
28:41
we think about how the system shell
28:41
we think about how the system shell works on Linux well shell scripting on
28:44
works on Linux well shell scripting on
28:44
works on Linux well shell scripting on Linux has a single binary Channel by
28:47
Linux has a single binary Channel by
28:47
Linux has a single binary Channel by which it transmits all information
28:49
which it transmits all information
28:49
which it transmits all information between processes the standard out on
28:51
between processes the standard out on
28:51
between processes the standard out on one side and the standard in the other
28:52
one side and the standard in the other
28:52
one side and the standard in the other side and as a consequence the connection
28:55
side and as a consequence the connection
28:55
side and as a consequence the connection between find and xargs needs to trans
28:58
between find and xargs needs to trans
28:58
between find and xargs needs to trans MIT over that single binary channel two
29:00
MIT over that single binary channel two
29:00
MIT over that single binary channel two pieces of information the names of the
29:02
pieces of information the names of the
29:02
pieces of information the names of the file and the delimiters between the
29:04
file and the delimiters between the
29:04
file and the delimiters between the files the standard on on these systems
29:08
files the standard on on these systems
29:08
files the standard on on these systems the standard with these tools is to
29:09
the standard with these tools is to
29:10
the standard with these tools is to space separate these or to new line
29:11
space separate these or to new line
29:11
space separate these or to new line separate these and so we have an
29:13
separate these and so we have an
29:13
separate these and so we have an ambiguity is the space a space
29:16
ambiguity is the space a space
29:16
ambiguity is the space a space separating the different file names
29:18
separating the different file names
29:18
separating the different file names metadata or is that space part of the
29:21
metadata or is that space part of the
29:21
metadata or is that space part of the file name data classical inband encoding
29:24
file name data classical inband encoding
29:24
file name data classical inband encoding ambiguity and every time we see an
29:27
ambiguity and every time we see an
29:27
ambiguity and every time we see an inband cting ambiguity there's pretty
29:29
inband cting ambiguity there's pretty
29:29
inband cting ambiguity there's pretty much the same approaches that we take to
29:30
much the same approaches that we take to
29:30
much the same approaches that we take to disambiguate that in the case of this we
29:32
disambiguate that in the case of this we
29:32
disambiguate that in the case of this we can either partition we can prefix we
29:34
can either partition we can prefix we
29:34
can either partition we can prefix we can escape or quote all zero in on
29:36
can escape or quote all zero in on
29:36
can escape or quote all zero in on partitioning what that generally means
29:38
partitioning what that generally means
29:38
partitioning what that generally means is you partition the space of values and
29:39
is you partition the space of values and
29:39
is you partition the space of values and indicate that some values can only ever
29:41
indicate that some values can only ever
29:41
indicate that some values can only ever be data and some values can only ever be
29:43
be data and some values can only ever be
29:43
be data and some values can only ever be metadata in which case for the shell
29:45
metadata in which case for the shell
29:45
metadata in which case for the shell scripting example will you say uh
29:48
scripting example will you say uh
29:48
scripting example will you say uh backslash and a null bite can never
29:49
backslash and a null bite can never
29:49
backslash and a null bite can never appear in a file name on Linux a
29:52
appear in a file name on Linux a
29:52
appear in a file name on Linux a backslash may be able to appear in a
29:53
backslash may be able to appear in a
29:53
backslash may be able to appear in a file name on other file systems but as
29:55
file name on other file systems but as
29:55
file name on other file systems but as far as I know there are no file systems
29:57
far as I know there are no file systems
29:57
far as I know there are no file systems ever that that allow a null bite to
29:59
ever that that allow a null bite to
29:59
ever that that allow a null bite to appear in the file name which means if
30:01
appear in the file name which means if
30:01
appear in the file name which means if we delimit them if we partition the
30:02
we delimit them if we partition the
30:02
we delimit them if we partition the space of all the characters that we have
30:04
space of all the characters that we have
30:04
space of all the characters that we have in that singular Channel such that
30:05
in that singular Channel such that
30:06
in that singular Channel such that anything that's not a null bite is data
30:07
anything that's not a null bite is data
30:07
anything that's not a null bite is data and anything that is a null bite is
30:09
and anything that is a null bite is
30:09
and anything that is a null bite is metadata the delimiter well we can
30:12
metadata the delimiter well we can
30:12
metadata the delimiter well we can actually unambiguously delimit these
30:14
actually unambiguously delimit these
30:14
actually unambiguously delimit these file names if we take a look at the
30:16
file names if we take a look at the
30:16
file names if we take a look at the actual tools we use we'll see that they
30:17
actual tools we use we'll see that they
30:17
actual tools we use we'll see that they implement this find has a print zero
30:18
implement this find has a print zero
30:18
implement this find has a print zero argument XRS has A- zero argument and
30:21
argument XRS has A- zero argument and
30:21
argument XRS has A- zero argument and we've solved the problem but the point
30:23
we've solved the problem but the point
30:23
we've solved the problem but the point of this example is not to show you how
30:25
of this example is not to show you how
30:25
of this example is not to show you how to fix a shell scripting problem but to
30:26
to fix a shell scripting problem but to
30:26
to fix a shell scripting problem but to show you where Foundation knowledge ends
30:28
show you where Foundation knowledge ends
30:28
show you where Foundation knowledge ends up being much more powerful than you
30:30
up being much more powerful than you
30:30
up being much more powerful than you think and why the search for
30:32
think and why the search for
30:32
think and why the search for foundational knowledge is a critical
30:33
foundational knowledge is a critical
30:33
foundational knowledge is a critical thing in your code review process
30:34
thing in your code review process
30:34
thing in your code review process because if we think about things like
30:36
because if we think about things like
30:36
because if we think about things like floating Point numbers i e 754 and we
30:39
floating Point numbers i e 754 and we
30:39
floating Point numbers i e 754 and we look at all the bit patterns of our i e
30:41
look at all the bit patterns of our i e
30:41
look at all the bit patterns of our i e 754 we will see that certain bit
30:43
754 we will see that certain bit
30:43
754 we will see that certain bit patterns have been carved out some
30:46
patterns have been carved out some
30:46
patterns have been carved out some represent actual values and some
30:47
represent actual values and some
30:47
represent actual values and some represent metadata Infinities nans and
30:50
represent metadata Infinities nans and
30:50
represent metadata Infinities nans and payload n and as a consequence i e 754
30:53
payload n and as a consequence i e 754
30:53
payload n and as a consequence i e 754 floating Point has an inband
30:55
floating Point has an inband
30:55
floating Point has an inband partitioning where it can partition this
30:57
partitioning where it can partition this
30:57
partitioning where it can partition this is actually ual data and this is
30:58
is actually ual data and this is
30:58
is actually ual data and this is metadata specifically Nan representing
31:00
metadata specifically Nan representing
31:00
metadata specifically Nan representing the absence of a measurement which is
31:02
the absence of a measurement which is
31:03
the absence of a measurement which is why if we happen to be Panda users one
31:05
why if we happen to be Panda users one
31:05
why if we happen to be Panda users one of the things that we've almost
31:06
of the things that we've almost
31:06
of the things that we've almost certainly run into in earlier versions
31:08
certainly run into in earlier versions
31:08
certainly run into in earlier versions of pandas was if we had a pandas series
31:10
of pandas was if we had a pandas series
31:10
of pandas was if we had a pandas series a pandas data frame or even a pandas
31:11
a pandas data frame or even a pandas
31:11
a pandas data frame or even a pandas array and we wanted to represent there
31:13
array and we wanted to represent there
31:13
array and we wanted to represent there was missing data we could do that if
31:15
was missing data we could do that if
31:15
was missing data we could do that if it's floating Point data because
31:16
it's floating Point data because
31:16
it's floating Point data because floating Point has that partitioning but
31:18
floating Point has that partitioning but
31:18
floating Point has that partitioning but we couldn't do that if it was integer
31:19
we couldn't do that if it was integer
31:20
we couldn't do that if it was integer data because integer data well how do we
31:21
data because integer data well how do we
31:22
data because integer data well how do we distinguish is a zero value an actual
31:23
distinguish is a zero value an actual
31:24
distinguish is a zero value an actual zero or a zero representing something
31:25
zero or a zero representing something
31:25
zero or a zero representing something that's missing and as a consequence we
31:27
that's missing and as a consequence we
31:27
that's missing and as a consequence we need either some sort of inband
31:30
need either some sort of inband
31:30
need either some sort of inband disambiguation mechanism of which there
31:31
disambiguation mechanism of which there
31:31
disambiguation mechanism of which there really isn't a good one or we need an
31:33
really isn't a good one or we need an
31:33
really isn't a good one or we need an outof band encoding and we could think
31:35
outof band encoding and we could think
31:35
outof band encoding and we could think about how an capital I N64 D type in a
31:39
about how an capital I N64 D type in a
31:39
about how an capital I N64 D type in a pandas in pandas is that out of Bandon
31:42
pandas in pandas is that out of Bandon
31:42
pandas in pandas is that out of Bandon coding it's something very similar to a
31:43
coding it's something very similar to a
31:43
coding it's something very similar to a numpy mast array which represents the
31:46
numpy mast array which represents the
31:46
numpy mast array which represents the missing values separate from the values
31:48
missing values separate from the values
31:48
missing values separate from the values themselves it's a classical outof band
31:49
themselves it's a classical outof band
31:49
themselves it's a classical outof band encoding and despite being in a
31:52
encoding and despite being in a
31:52
encoding and despite being in a completely different domain with a
31:54
completely different domain with a
31:54
completely different domain with a completely different programming
31:55
completely different programming
31:55
completely different programming language this is literally the exact
31:57
language this is literally the exact
31:57
language this is literally the exact same problem the inband and coding
31:59
same problem the inband and coding
31:59
same problem the inband and coding ambiguity problem and the mechanisms by
32:00
ambiguity problem and the mechanisms by
32:00
ambiguity problem and the mechanisms by which we disambiguate either within an
32:02
which we disambiguate either within an
32:02
which we disambiguate either within an inband and coding or the reasoning by
32:04
inband and coding or the reasoning by
32:04
inband and coding or the reasoning by which we push ourselves towards an out
32:05
which we push ourselves towards an out
32:05
which we push ourselves towards an out of Bandon coding a as the shell
32:07
of Bandon coding a as the shell
32:07
of Bandon coding a as the shell scripting example two very different
32:08
scripting example two very different
32:08
scripting example two very different domains two very different problems end
32:11
domains two very different problems end
32:11
domains two very different problems end up being the underlying same problem
32:14
up being the underlying same problem
32:14
up being the underlying same problem that you can unify and take from
32:16
that you can unify and take from
32:16
that you can unify and take from something that's relatively
32:17
something that's relatively
32:17
something that's relatively controversial to something that's just
32:18
controversial to something that's just
32:18
controversial to something that's just oh yeah this's an ined En coding
32:19
oh yeah this's an ined En coding
32:19
oh yeah this's an ined En coding ambiguity here are our choices and
32:21
ambiguity here are our choices and
32:21
ambiguity here are our choices and methodically work through them in fact
32:23
methodically work through them in fact
32:23
methodically work through them in fact even if we look at the design of
32:25
even if we look at the design of
32:25
even if we look at the design of different tools like for example our
32:27
different tools like for example our
32:27
different tools like for example our system path on on Linux which is colon
32:30
system path on on Linux which is colon
32:30
system path on on Linux which is colon separated or tools like Docker where if
32:32
separated or tools like Docker where if
32:32
separated or tools like Docker where if you're mounting a volume on Docker you
32:34
you're mounting a volume on Docker you
32:34
you're mounting a volume on Docker you have the source and the destination
32:36
have the source and the destination
32:36
have the source and the destination separated by a colon when you look at
32:38
separated by a colon when you look at
32:38
separated by a colon when you look at this you say well that's going to be an
32:40
this you say well that's going to be an
32:40
this you say well that's going to be an inandon coding ambiguity because what if
32:41
inandon coding ambiguity because what if
32:41
inandon coding ambiguity because what if there's a colon in the directory name
32:45
there's a colon in the directory name
32:45
there's a colon in the directory name well if there is a colon in the
32:46
well if there is a colon in the
32:46
well if there is a colon in the directory name you can't mount it in a
32:49
directory name you can't mount it in a
32:49
directory name you can't mount it in a Docker container Docker a tool that was
32:52
Docker container Docker a tool that was
32:52
Docker container Docker a tool that was written very recently by very
32:54
written very recently by very
32:54
written very recently by very knowledgeable people has exactly the
32:56
knowledgeable people has exactly the
32:56
knowledgeable people has exactly the same flaw as all these other tools
32:57
same flaw as all these other tools
32:58
same flaw as all these other tools because we didn't search for that
32:59
because we didn't search for that
32:59
because we didn't search for that foundational knowledge explicate that
33:01
foundational knowledge explicate that
33:01
foundational knowledge explicate that foundational knowledge and bring that to
33:02
foundational knowledge and bring that to
33:02
foundational knowledge and bring that to light because once you see these
33:04
light because once you see these
33:04
light because once you see these problems you can never unse them and
33:06
problems you can never unse them and
33:06
problems you can never unse them and then you look at the design of better
33:07
then you look at the design of better
33:07
then you look at the design of better tools tools like BP and you say oh
33:09
tools tools like BP and you say oh
33:09
tools tools like BP and you say oh that's why BP has separate Arguments for
33:12
that's why BP has separate Arguments for
33:12
that's why BP has separate Arguments for the source and the destination when
33:14
the source and the destination when
33:14
the source and the destination when you're doing a a mounting here because
33:17
you're doing a a mounting here because
33:17
you're doing a a mounting here because there's an out abandon coding that is
33:19
there's an out abandon coding that is
33:19
there's an out abandon coding that is created by the shells by the Shell's uh
33:22
created by the shells by the Shell's uh
33:22
created by the shells by the Shell's uh globbing mechanism and the shell
33:23
globbing mechanism and the shell
33:23
globbing mechanism and the shell delineating these into different
33:25
delineating these into different
33:25
delineating these into different arguments of your arcv
33:28
arguments of your arcv
33:28
arguments of your arcv when you find that foundational
33:29
when you find that foundational
33:29
when you find that foundational knowledge it's very much the case that
33:30
knowledge it's very much the case that
33:30
knowledge it's very much the case that once you see these things you can never
33:32
once you see these things you can never
33:32
once you see these things you can never unsee them and this is the value of
33:33
unsee them and this is the value of
33:33
unsee them and this is the value of finding that foundational knowledge this
33:35
finding that foundational knowledge this
33:35
finding that foundational knowledge this is the value of making your code review
33:37
is the value of making your code review
33:37
is the value of making your code review processes a an opportunity to search for
33:39
processes a an opportunity to search for
33:40
processes a an opportunity to search for that knowledge itself so that you're not
33:41
that knowledge itself so that you're not
33:41
that knowledge itself so that you're not just litigating some tiny detail about
33:44
just litigating some tiny detail about
33:44
just litigating some tiny detail about one piece of code in one system at one
33:47
one piece of code in one system at one
33:47
one piece of code in one system at one point in time but searching for
33:48
point in time but searching for
33:48
point in time but searching for knowledge that tells you about all
33:51
knowledge that tells you about all
33:51
knowledge that tells you about all instances of patterns similar like that
33:53
instances of patterns similar like that
33:53
instances of patterns similar like that across all projects across all time it
33:57
across all projects across all time it
33:57
across all projects across all time it is often the case that the the search
33:59
is often the case that the the search
33:59
is often the case that the the search for that foundational knowledge that
34:00
for that foundational knowledge that
34:00
for that foundational knowledge that foundational underlying Theory takes
34:02
foundational underlying Theory takes
34:02
foundational underlying Theory takes things that were once controversial
34:03
things that were once controversial
34:03
things that were once controversial questions that turned into Flores in
34:05
questions that turned into Flores in
34:05
questions that turned into Flores in your code review process with one person
34:06
your code review process with one person
34:06
your code review process with one person saying one thing the other person saying
34:08
saying one thing the other person saying
34:08
saying one thing the other person saying the other thing and everybody collecting
34:10
the other thing and everybody collecting
34:10
the other thing and everybody collecting evidence on both sides but nobody coming
34:12
evidence on both sides but nobody coming
34:12
evidence on both sides but nobody coming to a conclusion and it turns them into
34:14
to a conclusion and it turns them into
34:14
to a conclusion and it turns them into just obvious answers here's the here's
34:17
just obvious answers here's the here's
34:17
just obvious answers here's the here's the methodical approach for
34:19
the methodical approach for
34:19
the methodical approach for understanding this problem it leads to
34:20
understanding this problem it leads to
34:20
understanding this problem it leads to these conclusions maybe both people were
34:22
these conclusions maybe both people were
34:22
these conclusions maybe both people were right if we take a look at it through
34:24
right if we take a look at it through
34:24
right if we take a look at it through this lens and through this framework the
34:26
this lens and through this framework the
34:26
this lens and through this framework the underlying theory is of often lurking in
34:28
underlying theory is of often lurking in
34:28
underlying theory is of often lurking in plain sight and yet there seems to be
34:30
plain sight and yet there seems to be
34:30
plain sight and yet there seems to be this resistance in the code review
34:31
this resistance in the code review
34:31
this resistance in the code review process to really dig into what that
34:32
process to really dig into what that
34:32
process to really dig into what that underlying theory is for example one of
34:36
underlying theory is for example one of
34:36
underlying theory is for example one of the other hugely controversial things
34:39
the other hugely controversial things
34:39
the other hugely controversial things that I see all over the place that comes
34:41
that I see all over the place that comes
34:41
that I see all over the place that comes up in code reviews all the time and yet
34:43
up in code reviews all the time and yet
34:43
up in code reviews all the time and yet it's not a particularly controversial
34:44
it's not a particularly controversial
34:44
it's not a particularly controversial question is in this code review should
34:47
question is in this code review should
34:47
question is in this code review should this thing be a function and people say
34:48
this thing be a function and people say
34:49
this thing be a function and people say things like slogans don't repeat
34:50
things like slogans don't repeat
34:50
things like slogans don't repeat yourself any time you're in a code
34:52
yourself any time you're in a code
34:52
yourself any time you're in a code review and you're not talking about some
34:54
review and you're not talking about some
34:54
review and you're not talking about some foundational knowledge you're not
34:55
foundational knowledge you're not
34:55
foundational knowledge you're not searching for that foundational Theory
34:57
searching for that foundational Theory
34:57
searching for that foundational Theory but you're instead relying on simple
34:59
but you're instead relying on simple
34:59
but you're instead relying on simple slogans there's a very good chance that
35:01
slogans there's a very good chance that
35:01
slogans there's a very good chance that you're misleading yourself because there
35:03
you're misleading yourself because there
35:04
you're misleading yourself because there is theory behind this we don't have to
35:05
is theory behind this we don't have to
35:05
is theory behind this we don't have to rely on silly things like don't repeat
35:07
rely on silly things like don't repeat
35:07
rely on silly things like don't repeat yourself we could reach back to theory
35:09
yourself we could reach back to theory
35:09
yourself we could reach back to theory that already exists like the theory of
35:10
that already exists like the theory of
35:10
that already exists like the theory of normalization where in the theory of
35:13
normalization where in the theory of
35:13
normalization where in the theory of database normalization there's a topic
35:15
database normalization there's a topic
35:15
database normalization there's a topic of why we why we normalized and one of
35:18
of why we why we normalized and one of
35:18
of why we why we normalized and one of the reasons we normalized to eliminate
35:19
the reasons we normalized to eliminate
35:19
the reasons we normalized to eliminate update anomalies you know you perform an
35:21
update anomalies you know you perform an
35:21
update anomalies you know you perform an update in one part of the system but
35:22
update in one part of the system but
35:22
update in one part of the system but that update doesn't flow to another part
35:23
that update doesn't flow to another part
35:24
that update doesn't flow to another part of the system you update somebody's
35:25
of the system you update somebody's
35:25
of the system you update somebody's address in this table but the mail still
35:26
address in this table but the mail still
35:26
address in this table but the mail still goes to the wrong address because there
35:28
goes to the wrong address because there
35:28
goes to the wrong address because there was another system and that leads us to
35:30
was another system and that leads us to
35:30
was another system and that leads us to say oh oh the way we do that is we
35:31
say oh oh the way we do that is we
35:31
say oh oh the way we do that is we create a single source of Truth well if
35:33
create a single source of Truth well if
35:33
create a single source of Truth well if we think of what a function is a
35:34
we think of what a function is a
35:34
we think of what a function is a function is a single source of truth
35:36
function is a single source of truth
35:36
function is a single source of truth it's a single implementation of some me
35:39
it's a single implementation of some me
35:39
it's a single implementation of some me some mechanism such that if that
35:41
some mechanism such that if that
35:41
some mechanism such that if that mechanism changes it changes in one
35:43
mechanism changes it changes in one
35:43
mechanism changes it changes in one place there's no risk of update anomaly
35:45
place there's no risk of update anomaly
35:45
place there's no risk of update anomaly well that's really what a function is
35:47
well that's really what a function is
35:47
well that's really what a function is and all of these arguments back and
35:49
and all of these arguments back and
35:49
and all of these arguments back and forth should this be our function or not
35:50
forth should this be our function or not
35:50
forth should this be our function or not some of they may be legitimate but in
35:52
some of they may be legitimate but in
35:52
some of they may be legitimate but in many cases we're just dancing around the
35:54
many cases we're just dancing around the
35:54
many cases we're just dancing around the underlying theory of normalization the
35:56
underlying theory of normalization the
35:56
underlying theory of normalization the underlying theory of rep repetition
35:58
underlying theory of rep repetition
35:58
underlying theory of rep repetition being either coincidental two pieces of
36:00
being either coincidental two pieces of
36:00
being either coincidental two pieces of code just happen to be the same at some
36:02
code just happen to be the same at some
36:02
code just happen to be the same at some point in time or intentional two pieces
36:04
point in time or intentional two pieces
36:04
point in time or intentional two pieces of code are the same because they must
36:06
of code are the same because they must
36:06
of code are the same because they must always move in Tandem and they must
36:08
always move in Tandem and they must
36:08
always move in Tandem and they must always be the same if we dig just a
36:11
always be the same if we dig just a
36:11
always be the same if we dig just a little bit beneath existing theory of
36:14
little bit beneath existing theory of
36:14
little bit beneath existing theory of normalization we can discover that
36:16
normalization we can discover that
36:16
normalization we can discover that there's just one tiny amendment to this
36:18
there's just one tiny amendment to this
36:18
there's just one tiny amendment to this the idea that repetition could be
36:20
the idea that repetition could be
36:20
the idea that repetition could be coincidental that two pieces of code
36:22
coincidental that two pieces of code
36:22
coincidental that two pieces of code that look the same might just happen to
36:24
that look the same might just happen to
36:24
that look the same might just happen to look the same because at some point in
36:25
look the same because at some point in
36:25
look the same because at some point in time somebody wanted them to be the same
36:27
time somebody wanted them to be the same
36:27
time somebody wanted them to be the same but they could rightfully and very
36:29
but they could rightfully and very
36:29
but they could rightfully and very readily diverge or two pieces of code
36:32
readily diverge or two pieces of code
36:32
readily diverge or two pieces of code must always be the same and if one
36:34
must always be the same and if one
36:34
must always be the same and if one changes the other must change if you
36:36
changes the other must change if you
36:36
changes the other must change if you have intentional repetition then you
36:39
have intentional repetition then you
36:39
have intentional repetition then you unify and you definitely want to write a
36:40
unify and you definitely want to write a
36:40
unify and you definitely want to write a function if you have coincidental
36:43
function if you have coincidental
36:43
function if you have coincidental repetition then it's likely that you've
36:45
repetition then it's likely that you've
36:45
repetition then it's likely that you've assessed it to be coincidental
36:47
assessed it to be coincidental
36:47
assessed it to be coincidental repetition by assessing that it's likely
36:49
repetition by assessing that it's likely
36:49
repetition by assessing that it's likely to diverge over time which means that
36:51
to diverge over time which means that
36:51
to diverge over time which means that managing that Divergence over time will
36:53
managing that Divergence over time will
36:53
managing that Divergence over time will cause modalities to sprawl in the code
36:55
cause modalities to sprawl in the code
36:55
cause modalities to sprawl in the code likely deep in the code then requiring
36:57
likely deep in the code then requiring
36:58
likely deep in the code then requiring to revalidate things the two pieces of
36:59
to revalidate things the two pieces of
36:59
to revalidate things the two pieces of code just happen to be the same at one
37:01
code just happen to be the same at one
37:01
code just happen to be the same at one point in time somebody changes this but
37:03
point in time somebody changes this but
37:03
point in time somebody changes this but they've already been unified into a
37:04
they've already been unified into a
37:04
they've already been unified into a function so somebody add a keyword
37:05
function so somebody add a keyword
37:06
function so somebody add a keyword argument to this function but they have
37:07
argument to this function but they have
37:07
argument to this function but they have to thread that keyword argument three
37:08
to thread that keyword argument three
37:08
to thread that keyword argument three functions deep they have to retest
37:10
functions deep they have to retest
37:10
functions deep they have to retest almost the entire framework to make sure
37:12
almost the entire framework to make sure
37:12
almost the entire framework to make sure this didn't disrupt anybody else's work
37:14
this didn't disrupt anybody else's work
37:14
this didn't disrupt anybody else's work and in this case we can see a deliberate
37:17
and in this case we can see a deliberate
37:17
and in this case we can see a deliberate piece of found Theory that's not
37:19
piece of found Theory that's not
37:19
piece of found Theory that's not particularly formalized that gives us
37:22
particularly formalized that gives us
37:22
particularly formalized that gives us methodical guidance as part of our code
37:24
methodical guidance as part of our code
37:24
methodical guidance as part of our code review process for what we should do
37:27
review process for what we should do
37:27
review process for what we should do removing all of the subjectivity and all
37:29
removing all of the subjectivity and all
37:30
removing all of the subjectivity and all of the controversy the unnatural
37:32
of the controversy the unnatural
37:32
of the controversy the unnatural unnecessary controversy that might arise
37:34
unnecessary controversy that might arise
37:34
unnecessary controversy that might arise all of the flamor that might arise as
37:36
all of the flamor that might arise as
37:36
all of the flamor that might arise as this what is a culture of knowledge well
37:38
this what is a culture of knowledge well
37:38
this what is a culture of knowledge well a culture of knowledge is about avoiding
37:40
a culture of knowledge is about avoiding
37:40
a culture of knowledge is about avoiding these intellectual shortcuts avoiding
37:42
these intellectual shortcuts avoiding
37:42
these intellectual shortcuts avoiding these slogans always be willing to ask
37:44
these slogans always be willing to ask
37:44
these slogans always be willing to ask why when somebody says don't repeat
37:46
why when somebody says don't repeat
37:46
why when somebody says don't repeat yourself say well actually I do repeat
37:49
yourself say well actually I do repeat
37:49
yourself say well actually I do repeat myself sometimes and sometimes I do that
37:51
myself sometimes and sometimes I do that
37:51
myself sometimes and sometimes I do that and it's worthwhile why is it that I'm
37:53
and it's worthwhile why is it that I'm
37:53
and it's worthwhile why is it that I'm not taking my own advice self-reflect
37:56
not taking my own advice self-reflect
37:56
not taking my own advice self-reflect and try and figure out well maybe I'm
37:59
and try and figure out well maybe I'm
37:59
and try and figure out well maybe I'm right I'm just phrasing this wrong don't
38:02
right I'm just phrasing this wrong don't
38:02
right I'm just phrasing this wrong don't repeat
38:03
repeat yourself intentionally but do repeat
38:06
yourself intentionally but do repeat
38:06
yourself intentionally but do repeat yourself
38:07
yourself coincidentally always dig for knowledge
38:10
coincidentally always dig for knowledge
38:10
coincidentally always dig for knowledge and that knowledge and know that that
38:11
and that knowledge and know that that
38:11
and that knowledge and know that that knowledge is often hiding in plain sight
38:13
knowledge is often hiding in plain sight
38:13
knowledge is often hiding in plain sight even though it may take you a while to
38:14
even though it may take you a while to
38:14
even though it may take you a while to dig for it when you take a look at a
38:16
dig for it when you take a look at a
38:16
dig for it when you take a look at a code riew really ask
38:17
code riew really ask
38:17
code riew really ask yourself what is the reasoning behind
38:21
yourself what is the reasoning behind
38:21
yourself what is the reasoning behind the advice that I'm given and is this
38:23
the advice that I'm given and is this
38:23
the advice that I'm given and is this generalized reasoning how do I collect
38:25
generalized reasoning how do I collect
38:25
generalized reasoning how do I collect all the evidence across all of the
38:26
all the evidence across all of the
38:26
all the evidence across all of the things that I do or don't do and unify
38:29
things that I do or don't do and unify
38:29
things that I do or don't do and unify those into One Singular piece of theory
38:31
those into One Singular piece of theory
38:31
those into One Singular piece of theory how we go about doing this is actually
38:33
how we go about doing this is actually
38:33
how we go about doing this is actually quite difficult and I can't really give
38:34
quite difficult and I can't really give
38:34
quite difficult and I can't really give you a lot of advice for how to develop
38:36
you a lot of advice for how to develop
38:36
you a lot of advice for how to develop this culture of knowledge or how to
38:37
this culture of knowledge or how to
38:37
this culture of knowledge or how to build that knowledge but I can give you
38:38
build that knowledge but I can give you
38:38
build that knowledge but I can give you one critical
38:40
one critical pointer typically the education that
38:43
pointer typically the education that
38:43
pointer typically the education that most programmers are subjected to is
38:46
most programmers are subjected to is
38:46
most programmers are subjected to is wholly quantitative they are hired for
38:48
wholly quantitative they are hired for
38:48
wholly quantitative they are hired for their quantitative skill they are hired
38:50
their quantitative skill they are hired
38:50
their quantitative skill they are hired because they did well in computer
38:51
because they did well in computer
38:51
because they did well in computer science courses in engineering courses
38:53
science courses in engineering courses
38:53
science courses in engineering courses in math courses in courses of that
38:56
in math courses in courses of that
38:56
in math courses in courses of that nature and they don't understand that
38:59
nature and they don't understand that
38:59
nature and they don't understand that knowledge can take many forms including
39:01
knowledge can take many forms including
39:02
knowledge can take many forms including non-quantifiable forms there is such
39:05
non-quantifiable forms there is such
39:05
non-quantifiable forms there is such thing as qualified objective knowledge
39:08
thing as qualified objective knowledge
39:08
thing as qualified objective knowledge and understanding that sometimes while
39:10
and understanding that sometimes while
39:10
and understanding that sometimes while we may not be able to say everything
39:13
we may not be able to say everything
39:13
we may not be able to say everything definitively about a particular question
39:16
definitively about a particular question
39:16
definitively about a particular question we may not be able to enumerate facts
39:18
we may not be able to enumerate facts
39:18
we may not be able to enumerate facts and figures or create formula we can
39:20
and figures or create formula we can
39:20
and figures or create formula we can still form formulate
39:23
still form formulate
39:23
still form formulate rigorous
39:25
rigorous thorough arguments about something
39:28
thorough arguments about something
39:28
thorough arguments about something making use of qualif qualified knowledge
39:30
making use of qualif qualified knowledge
39:30
making use of qualif qualified knowledge one thing that I would strongly
39:32
one thing that I would strongly
39:32
one thing that I would strongly encourage every programmer who went
39:34
encourage every programmer who went
39:34
encourage every programmer who went through a science technology engineering
39:37
through a science technology engineering
39:37
through a science technology engineering or mathematical background is take
39:39
or mathematical background is take
39:39
or mathematical background is take liberal arts classes learn about history
39:43
liberal arts classes learn about history
39:43
liberal arts classes learn about history learn about literature learn about art
39:45
learn about literature learn about art
39:45
learn about literature learn about art because the kinds of reasoning that are
39:47
because the kinds of reasoning that are
39:47
because the kinds of reasoning that are used in those fields are very foreign to
39:50
used in those fields are very foreign to
39:50
used in those fields are very foreign to us but they are part of the key to
39:52
us but they are part of the key to
39:53
us but they are part of the key to understanding the fundamental
39:54
understanding the fundamental
39:54
understanding the fundamental epistemology that allows us to really
39:56
epistemology that allows us to really
39:56
epistemology that allows us to really search for knowledge and perform code
39:59
search for knowledge and perform code
40:00
search for knowledge and perform code reviews that are not just litigating
40:01
reviews that are not just litigating
40:01
reviews that are not just litigating tiny details or relying on shortcuts or
40:05
tiny details or relying on shortcuts or
40:05
tiny details or relying on shortcuts or slogans finally one thing that we are
40:08
slogans finally one thing that we are
40:08
slogans finally one thing that we are often missing that leads to code reviews
40:09
often missing that leads to code reviews
40:10
often missing that leads to code reviews not being particularly useful is a
40:11
not being particularly useful is a
40:11
not being particularly useful is a culture of quality and just like the
40:13
culture of quality and just like the
40:13
culture of quality and just like the culture of knowledge it's very difficult
40:15
culture of knowledge it's very difficult
40:15
culture of knowledge it's very difficult for us to instill a culture of quality
40:16
for us to instill a culture of quality
40:16
for us to instill a culture of quality where none exists it's difficult for us
40:18
where none exists it's difficult for us
40:18
where none exists it's difficult for us to create rules or create guidances or
40:21
to create rules or create guidances or
40:21
to create rules or create guidances or write memos that say everybody focus on
40:24
write memos that say everybody focus on
40:24
write memos that say everybody focus on quality if that culture of quality
40:26
quality if that culture of quality
40:26
quality if that culture of quality doesn't exist I'm not sure how we create
40:27
doesn't exist I'm not sure how we create
40:27
doesn't exist I'm not sure how we create it but I do know that I've seen it exist
40:29
it but I do know that I've seen it exist
40:29
it but I do know that I've seen it exist in some places and I've seen it fail to
40:31
in some places and I've seen it fail to
40:31
in some places and I've seen it fail to exist in some places but before we talk
40:33
exist in some places but before we talk
40:33
exist in some places but before we talk about the cultural quality one important
40:35
about the cultural quality one important
40:35
about the cultural quality one important thing we should ask ourselves is does
40:37
thing we should ask ourselves is does
40:37
thing we should ask ourselves is does code quality really matter because many
40:40
code quality really matter because many
40:40
code quality really matter because many of you are going to say yes of course it
40:42
of you are going to say yes of course it
40:42
of you are going to say yes of course it matters bad code quality leads to bad
40:44
matters bad code quality leads to bad
40:44
matters bad code quality leads to bad code that has security faults that leads
40:46
code that has security faults that leads
40:46
code that has security faults that leads to you losing money that leads to you
40:48
to you losing money that leads to you
40:48
to you losing money that leads to you losing customers but some of you are
40:50
losing customers but some of you are
40:50
losing customers but some of you are also going to say well actually I have
40:52
also going to say well actually I have
40:52
also going to say well actually I have some colleagues and they work at a
40:54
some colleagues and they work at a
40:54
some colleagues and they work at a company and their code is atrocious and
40:57
company and their code is atrocious and
40:57
company and their code is atrocious and yet they make money hand over fist in
41:00
yet they make money hand over fist in
41:00
yet they make money hand over fist in fact between you and me we do quite a
41:03
fact between you and me we do quite a
41:03
fact between you and me we do quite a bit of Consulting at some very big tech
41:05
bit of Consulting at some very big tech
41:05
bit of Consulting at some very big tech companies in the US and you may be
41:08
companies in the US and you may be
41:08
companies in the US and you may be surprised to learn that at some of the
41:10
surprised to learn that at some of the
41:10
surprised to learn that at some of the top tech companies the code quality is
41:12
top tech companies the code quality is
41:12
top tech companies the code quality is not that good and they still make money
41:15
not that good and they still make money
41:15
not that good and they still make money hands over fist and if you were to give
41:18
hands over fist and if you were to give
41:18
hands over fist and if you were to give me the choice between having $1 billion
41:21
me the choice between having $1 billion
41:21
me the choice between having $1 billion or really good
41:22
or really good code I'm not sure that I would pick the
41:25
code I'm not sure that I would pick the
41:25
code I'm not sure that I would pick the really good code and so maybe we should
41:28
really good code and so maybe we should
41:28
really good code and so maybe we should ask the question does code quality
41:29
ask the question does code quality
41:29
ask the question does code quality really matter well to a particular
41:31
really matter well to a particular
41:31
really matter well to a particular audience to who does code quality matter
41:33
audience to who does code quality matter
41:33
audience to who does code quality matter to
41:34
to employers well you almost certainly have
41:37
employers well you almost certainly have
41:37
employers well you almost certainly have seen circumstances where a colleague of
41:39
seen circumstances where a colleague of
41:39
seen circumstances where a colleague of yours doesn't really know what they're
41:40
yours doesn't really know what they're
41:40
yours doesn't really know what they're doing but is able to talk very
41:42
doing but is able to talk very
41:42
doing but is able to talk very convincing and they're able to get a job
41:44
convincing and they're able to get a job
41:44
convincing and they're able to get a job and it's very difficult to measure code
41:46
and it's very difficult to measure code
41:46
and it's very difficult to measure code quality in an interview circumstance so
41:49
quality in an interview circumstance so
41:50
quality in an interview circumstance so maybe it's the case that two employers
41:51
maybe it's the case that two employers
41:51
maybe it's the case that two employers they kind of want a proxy for code
41:52
they kind of want a proxy for code
41:52
they kind of want a proxy for code quality but but also they kind of want
41:54
quality but but also they kind of want
41:54
quality but but also they kind of want somebody who will just do what they're
41:55
somebody who will just do what they're
41:55
somebody who will just do what they're told and will just ship
41:58
told and will just ship
41:58
told and will just ship features does code quality matter to the
42:00
features does code quality matter to the
42:00
features does code quality matter to the market you know we could say that if
42:02
market you know we could say that if
42:02
market you know we could say that if there's poor code quality that leads to
42:04
there's poor code quality that leads to
42:04
there's poor code quality that leads to security issues and security issues lead
42:05
security issues and security issues lead
42:05
security issues and security issues lead to bad press you might lose customers
42:07
to bad press you might lose customers
42:07
to bad press you might lose customers but the unfortunate truth about security
42:09
but the unfortunate truth about security
42:09
but the unfortunate truth about security issues is a lot of companies have had
42:12
issues is a lot of companies have had
42:12
issues is a lot of companies have had some very embarrassing security
42:16
some very embarrassing security
42:16
some very embarrassing security circumstances and don't seem to have
42:18
circumstances and don't seem to have
42:18
circumstances and don't seem to have lost much money at all maybe a temporary
42:20
lost much money at all maybe a temporary
42:20
lost much money at all maybe a temporary dip and they recover from that and so
42:23
dip and they recover from that and so
42:23
dip and they recover from that and so often times if we look at the market we
42:24
often times if we look at the market we
42:24
often times if we look at the market we can say you know quality does seem to
42:27
can say you know quality does seem to
42:27
can say you know quality does seem to matter there are better Goods that do
42:28
matter there are better Goods that do
42:28
matter there are better Goods that do better than worse Goods there are better
42:30
better than worse Goods there are better
42:30
better than worse Goods there are better design products that do better than
42:31
design products that do better than
42:31
design products that do better than worse design products there's also a lot
42:33
worse design products there's also a lot
42:33
worse design products there's also a lot of junk out there that seems to do very
42:35
of junk out there that seems to do very
42:35
of junk out there that seems to do very well so it's not certain to me whether
42:36
well so it's not certain to me whether
42:36
well so it's not certain to me whether or not code quality can be said to
42:40
or not code quality can be said to
42:40
or not code quality can be said to uniformly be of importance to the market
42:42
uniformly be of importance to the market
42:42
uniformly be of importance to the market or not that does it matter to the
42:44
or not that does it matter to the
42:44
or not that does it matter to the project well I would say yes but often
42:48
project well I would say yes but often
42:48
project well I would say yes but often times when I'm working on a project I'm
42:50
times when I'm working on a project I'm
42:50
times when I'm working on a project I'm working to a certain standard I'm
42:51
working to a certain standard I'm
42:51
working to a certain standard I'm working under certain deadlines and I
42:53
working under certain deadlines and I
42:53
working under certain deadlines and I know that the project evolves over time
42:55
know that the project evolves over time
42:55
know that the project evolves over time so I know if I ship bad code today it
42:57
so I know if I ship bad code today it
42:57
so I know if I ship bad code today it may probably be the case in 3 months I'm
42:59
may probably be the case in 3 months I'm
42:59
may probably be the case in 3 months I'm going to rewrite it anyway so why should
43:01
going to rewrite it anyway so why should
43:01
going to rewrite it anyway so why should I put all that effort into shipping the
43:02
I put all that effort into shipping the
43:02
I put all that effort into shipping the best thing I possibly can knowing that
43:04
best thing I possibly can knowing that
43:04
best thing I possibly can knowing that it's going to be Rewritten does it
43:06
it's going to be Rewritten does it
43:06
it's going to be Rewritten does it matter to my colleagues well I don't
43:07
matter to my colleagues well I don't
43:07
matter to my colleagues well I don't want to be cleaning after I don't want
43:09
want to be cleaning after I don't want
43:09
want to be cleaning after I don't want to be chasing after somebody else's code
43:11
to be chasing after somebody else's code
43:11
to be chasing after somebody else's code and trying to clean up after that so I
43:12
and trying to clean up after that so I
43:12
and trying to clean up after that so I guess it kind of does but but also it's
43:14
guess it kind of does but but also it's
43:14
guess it kind of does but but also it's the case that you know a lot of the code
43:15
the case that you know a lot of the code
43:15
the case that you know a lot of the code that I write is really not that
43:16
that I write is really not that
43:16
that I write is really not that important and as long as it's
43:17
important and as long as it's
43:17
important and as long as it's functionally correct if it's a little
43:19
functionally correct if it's a little
43:19
functionally correct if it's a little bit sloppy you know that just kind of
43:21
bit sloppy you know that just kind of
43:21
bit sloppy you know that just kind of fix it if there's a bug we'll fix it I
43:23
fix it if there's a bug we'll fix it I
43:23
fix it if there's a bug we'll fix it I think when we talk about quality and I
43:25
think when we talk about quality and I
43:25
think when we talk about quality and I think the key to a culture of quality is
43:27
think the key to a culture of quality is
43:27
think the key to a culture of quality is really asking ourselves does quality
43:30
really asking ourselves does quality
43:30
really asking ourselves does quality matter to you and for all of the other
43:33
matter to you and for all of the other
43:33
matter to you and for all of the other audiences sometimes it matters sometimes
43:35
audiences sometimes it matters sometimes
43:35
audiences sometimes it matters sometimes it doesn't and we can find evidence and
43:37
it doesn't and we can find evidence and
43:37
it doesn't and we can find evidence and arguments that it does matter or it
43:38
arguments that it does matter or it
43:38
arguments that it does matter or it doesn't matter and we can find very
43:39
doesn't matter and we can find very
43:39
doesn't matter and we can find very compelling arguments both ways but when
43:42
compelling arguments both ways but when
43:42
compelling arguments both ways but when I think about it deep in my heart
43:45
I think about it deep in my heart
43:45
I think about it deep in my heart quality matters to me I want to do my
43:47
quality matters to me I want to do my
43:47
quality matters to me I want to do my work to a standard I want to do that
43:49
work to a standard I want to do that
43:49
work to a standard I want to do that work to a standard that I think I can
43:51
work to a standard that I think I can
43:51
work to a standard that I think I can achieve and I want to push that standard
43:53
achieve and I want to push that standard
43:53
achieve and I want to push that standard forward and if I don't do good quality
43:55
forward and if I don't do good quality
43:55
forward and if I don't do good quality work I don't feel like I have done a
43:57
work I don't feel like I have done a
43:57
work I don't feel like I have done a good job and I don't feel good about
43:59
good job and I don't feel good about
43:59
good job and I don't feel good about myself and I think that if we're talking
44:01
myself and I think that if we're talking
44:01
myself and I think that if we're talking about a culture of quality and if we're
44:02
about a culture of quality and if we're
44:02
about a culture of quality and if we're talking about caring about quality it
44:04
talking about caring about quality it
44:04
talking about caring about quality it really is something that has to be built
44:06
really is something that has to be built
44:06
really is something that has to be built culturally from within you need to find
44:08
culturally from within you need to find
44:08
culturally from within you need to find people who fundamentally care about
44:10
people who fundamentally care about
44:10
people who fundamentally care about doing good work for the sake of doing
44:12
doing good work for the sake of doing
44:12
doing good work for the sake of doing good work so when we talk about a
44:14
good work so when we talk about a
44:14
good work so when we talk about a culture of quality well you know it's
44:16
culture of quality well you know it's
44:16
culture of quality well you know it's about working to a standard and wanting
44:18
about working to a standard and wanting
44:18
about working to a standard and wanting to head us set a high standard for
44:20
to head us set a high standard for
44:20
to head us set a high standard for yourself now if we think about it in the
44:23
yourself now if we think about it in the
44:23
yourself now if we think about it in the absence of such a culture of quality in
44:26
absence of such a culture of quality in
44:26
absence of such a culture of quality in the absence of a culture of knowledge or
44:28
the absence of a culture of knowledge or
44:28
the absence of a culture of knowledge or a culture of learning or a culture of
44:29
a culture of learning or a culture of
44:29
a culture of learning or a culture of training what are we really doing in a
44:31
training what are we really doing in a
44:31
training what are we really doing in a code review in fact I would argue that
44:33
code review in fact I would argue that
44:33
code review in fact I would argue that in those
44:34
in those circumstances code
44:36
circumstances code review probably is
44:39
review probably is useless I'm James Powell thank you all
44:41
useless I'm James Powell thank you all
44:41
useless I'm James Powell thank you all for joining me for this presentation
44:42
for joining me for this presentation
44:42
for joining me for this presentation it's been an absolute pleasure
44:45
it's been an absolute pleasure
44:45
it's been an absolute pleasure [Music]