0:03
all right thank you uh so glad to be
0:05
all right thank you uh so glad to be
0:06
all right thank you uh so glad to be here everyone uh my name is David and
0:08
here everyone uh my name is David and
0:08
here everyone uh my name is David and I'm from uh Nigeria and I'm going to be
0:11
I'm from uh Nigeria and I'm going to be
0:11
I'm from uh Nigeria and I'm going to be talking or speaking to this community
0:14
talking or speaking to this community
0:14
talking or speaking to this community about uh best practices for writing
0:17
about uh best practices for writing
0:17
about uh best practices for writing clean and maintainable
0:20
clean and maintainable
0:20
clean and maintainable quot um all right um so a quick overview
0:23
quot um all right um so a quick overview
0:23
quot um all right um so a quick overview of the presentation um first I would be
0:27
of the presentation um first I would be
0:27
of the presentation um first I would be looking at the importance uh of clean
0:30
looking at the importance uh of clean
0:30
looking at the importance uh of clean and maintainable cod and Then followed
0:33
and maintainable cod and Then followed
0:33
and maintainable cod and Then followed by definition of what Cod smell is and
0:37
by definition of what Cod smell is and
0:37
by definition of what Cod smell is and listing of uh common code smells uh or
0:42
listing of uh common code smells uh or
0:42
listing of uh common code smells uh or issues as it were and then three uh the
0:45
issues as it were and then three uh the
0:45
issues as it were and then three uh the next item would be refactoring or
0:47
next item would be refactoring or
0:47
next item would be refactoring or looking at refactoring concept and uh
0:50
looking at refactoring concept and uh
0:51
looking at refactoring concept and uh techniques uh to fixing our cat smells
0:54
techniques uh to fixing our cat smells
0:55
techniques uh to fixing our cat smells uh next by that I will quickly touch on
0:57
uh next by that I will quickly touch on
0:57
uh next by that I will quickly touch on uh Team culture and influence on
1:01
uh Team culture and influence on
1:01
uh Team culture and influence on practices that could H clean and
1:04
practices that could H clean and
1:04
practices that could H clean and maintainable code and finally uh key uh
1:08
maintainable code and finally uh key uh
1:08
maintainable code and finally uh key uh principles I'll be looking at key
1:10
principles I'll be looking at key
1:10
principles I'll be looking at key principles for writing clean and
1:12
principles for writing clean and
1:12
principles for writing clean and maintainable code
1:15
maintainable code um to help uh developers across the
1:18
um to help uh developers across the
1:18
um to help uh developers across the world uh to improve uh or deliver or
1:21
world uh to improve uh or deliver or
1:22
world uh to improve uh or deliver or right train and maintainable codes all
1:24
right train and maintainable codes all
1:24
right train and maintainable codes all right quick one uh so why are caim and
1:27
right quick one uh so why are caim and
1:27
right quick one uh so why are caim and maintainable codes are crucial
1:30
maintainable codes are crucial
1:30
maintainable codes are crucial first and just basically I like to Deep
1:33
first and just basically I like to Deep
1:33
first and just basically I like to Deep dive into the key
1:35
dive into the key net uh then the first thing is that
1:38
net uh then the first thing is that
1:38
net uh then the first thing is that clean and maintainable codes are crocher
1:40
clean and maintainable codes are crocher
1:40
clean and maintainable codes are crocher because it makes the buing and en
1:43
because it makes the buing and en
1:43
because it makes the buing and en enhancement of quotes very very easy I
1:47
enhancement of quotes very very easy I
1:47
enhancement of quotes very very easy I mean uh easier to read um easy to
1:50
mean uh easier to read um easy to
1:50
mean uh easier to read um easy to understand um making it simpler to
1:53
understand um making it simpler to
1:53
understand um making it simpler to identify and fix SPS uh also in that
1:57
identify and fix SPS uh also in that
1:57
identify and fix SPS uh also in that same line it also helps with educe the
2:00
same line it also helps with educe the
2:00
same line it also helps with educe the time and effort uh required to debug and
2:04
time and effort uh required to debug and
2:04
time and effort uh required to debug and enhance
2:06
enhance Cod and secondly it's quicker I mean it
2:10
Cod and secondly it's quicker I mean it
2:10
Cod and secondly it's quicker I mean it h fter development Cycles um or makes
2:14
h fter development Cycles um or makes
2:14
h fter development Cycles um or makes development Cycles very fast uh it also
2:18
development Cycles very fast uh it also
2:18
development Cycles very fast uh it also makes um or contributes to faster
2:21
makes um or contributes to faster
2:21
makes um or contributes to faster resolution of issues uh typically you
2:25
resolution of issues uh typically you
2:25
resolution of issues uh typically you run into bgs and you imagine that
2:27
run into bgs and you imagine that
2:27
run into bgs and you imagine that someone else uh needs to jump in
2:30
someone else uh needs to jump in
2:30
someone else uh needs to jump in reviewing that code in order to quickly
2:32
reviewing that code in order to quickly
2:32
reviewing that code in order to quickly fix the bug the issues a clean and
2:35
fix the bug the issues a clean and
2:35
fix the bug the issues a clean and maintainable code is a sure Foundation
2:38
maintainable code is a sure Foundation
2:38
maintainable code is a sure Foundation to ensuring that bgs are or issues are
2:42
to ensuring that bgs are or issues are
2:42
to ensuring that bgs are or issues are easy to resolve and fast to resolve uh
2:45
easy to resolve and fast to resolve uh
2:45
easy to resolve and fast to resolve uh thirdly it improves uh team
2:48
thirdly it improves uh team
2:48
thirdly it improves uh team collaboration um by team collaboration I
2:50
collaboration um by team collaboration I
2:50
collaboration um by team collaboration I mean it helps teams to easily understand
2:52
mean it helps teams to easily understand
2:52
mean it helps teams to easily understand each other's work and also as a result
2:55
each other's work and also as a result
2:55
each other's work and also as a result of that it facilitates contribution or
2:58
of that it facilitates contribution or
2:58
of that it facilitates contribution or Insight um
3:00
Insight um it also enables more effective P
3:03
it also enables more effective P
3:03
it also enables more effective P programming and code reviews uh fourth
3:06
programming and code reviews uh fourth
3:06
programming and code reviews uh fourth one or fourth item is uh it contributes
3:09
one or fourth item is uh it contributes
3:09
one or fourth item is uh it contributes to scalability and adaptability meaning
3:12
to scalability and adaptability meaning
3:12
to scalability and adaptability meaning that it makes it easier to scale and
3:15
that it makes it easier to scale and
3:15
that it makes it easier to scale and adapt to new uh requirement as first
3:18
adapt to new uh requirement as first
3:18
adapt to new uh requirement as first possible and the last one that I like to
3:20
possible and the last one that I like to
3:20
possible and the last one that I like to touch on uh regarding the importance of
3:23
touch on uh regarding the importance of
3:23
touch on uh regarding the importance of clean anical code is that clean and
3:26
clean anical code is that clean and
3:26
clean anical code is that clean and meical codes had the code quality
3:29
meical codes had the code quality
3:29
meical codes had the code quality reliability which is one of the essence
3:32
reliability which is one of the essence
3:32
reliability which is one of the essence or reason why we are
3:34
or reason why we are here okay so what is Cote
3:38
here okay so what is Cote
3:38
here okay so what is Cote smell code smells are indicators of
3:41
smell code smells are indicators of
3:42
smell code smells are indicators of potential problems in the code that say
3:44
potential problems in the code that say
3:44
potential problems in the code that say for instance why not necessarily box in
3:47
for instance why not necessarily box in
3:48
for instance why not necessarily box in in out of themselves uh but they suggest
3:51
in out of themselves uh but they suggest
3:51
in out of themselves uh but they suggest deeper issues that could in the
3:54
deeper issues that could in the
3:54
deeper issues that could in the readability
3:56
readability maintainability scalability and some of
3:58
maintainability scalability and some of
3:58
maintainability scalability and some of those uh benefits or importance that I
4:02
those uh benefits or importance that I
4:02
those uh benefits or importance that I shared earlier on in the previous slide
4:05
shared earlier on in the previous slide
4:05
shared earlier on in the previous slide um and so basically uh they are not
4:08
um and so basically uh they are not
4:08
um and so basically uh they are not necessarily box but they could end up
4:12
necessarily box but they could end up
4:12
necessarily box but they could end up readability maintainability and
4:14
readability maintainability and
4:14
readability maintainability and scalability of uh
4:17
scalability of uh software so quot smell um some of the
4:21
software so quot smell um some of the
4:21
software so quot smell um some of the quot smells or common quote smells uh
4:24
quot smells or common quote smells uh
4:24
quot smells or common quote smells uh for instance uh comment that
4:27
for instance uh comment that
4:27
for instance uh comment that is too much comment May indicate that
4:31
is too much comment May indicate that
4:31
is too much comment May indicate that code the code in itself is not quite
4:34
code the code in itself is not quite
4:34
code the code in itself is not quite clear enough
4:37
clear enough um uh which typically leads to say for
4:40
um uh which typically leads to say for
4:40
um uh which typically leads to say for example having to you know excessively
4:43
example having to you know excessively
4:43
example having to you know excessively hard comment in order to help whoever is
4:45
hard comment in order to help whoever is
4:45
hard comment in order to help whoever is going to read or rewrite or refactor at
4:49
going to read or rewrite or refactor at
4:49
going to read or rewrite or refactor at dat of time or even improving by the
4:52
dat of time or even improving by the
4:52
dat of time or even improving by the same person to understand what has been
4:55
same person to understand what has been
4:55
same person to understand what has been written um secondly
4:57
written um secondly it cot well a common common type of code
5:01
it cot well a common common type of code
5:01
it cot well a common common type of code smell the next one is duplicated code uh
5:05
smell the next one is duplicated code uh
5:05
smell the next one is duplicated code uh this is identical or very similar code
5:08
this is identical or very similar code
5:08
this is identical or very similar code that exist in more than one place um
5:14
within a code base uh the problem with
5:18
within a code base uh the problem with
5:18
within a code base uh the problem with this is that it increases maintenance
5:21
this is that it increases maintenance
5:21
this is that it increases maintenance effort because changes needed uh often
5:25
effort because changes needed uh often
5:25
effort because changes needed uh often times needs to be made uh to multiple
5:29
times needs to be made uh to multiple
5:29
times needs to be made uh to multiple places where the codes have been
5:32
places where the codes have been
5:32
places where the codes have been duplicated the third common Cod smell is
5:36
duplicated the third common Cod smell is
5:36
duplicated the third common Cod smell is long method uh meaning methods that are
5:39
long method uh meaning methods that are
5:39
long method uh meaning methods that are excessively long and they try to do too
5:42
excessively long and they try to do too
5:43
excessively long and they try to do too much at once or pack together the
5:45
much at once or pack together the
5:45
much at once or pack together the problem with this um long method um is
5:51
problem with this um long method um is
5:51
problem with this um long method um is that it's harder to understand and it's
5:53
that it's harder to understand and it's
5:53
that it's harder to understand and it's harder to maintain and also t uh the
5:58
harder to maintain and also t uh the
5:58
harder to maintain and also t uh the fourth item or the fourth common cot
6:00
fourth item or the fourth common cot
6:00
fourth item or the fourth common cot smell is large class right um You have
6:05
smell is large class right um You have
6:05
smell is large class right um You have too many
6:06
too many responsibilities uh and contains too
6:10
responsibilities uh and contains too
6:10
responsibilities uh and contains too much quote in the class uh and this I
6:15
much quote in the class uh and this I
6:15
much quote in the class uh and this I mean as reaching here the the problem is
6:17
mean as reaching here the the problem is
6:17
mean as reaching here the the problem is that this violates the single
6:19
that this violates the single
6:19
that this violates the single responsibility principle uh making the
6:22
responsibility principle uh making the
6:22
responsibility principle uh making the class harder to manage the fifth I uh
6:27
class harder to manage the fifth I uh
6:27
class harder to manage the fifth I uh common Cotes mod um here is
6:31
common Cotes mod um here is
6:31
common Cotes mod um here is refused request that is a subass that
6:35
refused request that is a subass that
6:35
refused request that is a subass that doesn't use all of the inherited methods
6:38
doesn't use all of the inherited methods
6:38
doesn't use all of the inherited methods and properties and the problem with this
6:40
and properties and the problem with this
6:41
and properties and the problem with this is that for instance or the way you
6:43
is that for instance or the way you
6:43
is that for instance or the way you could identify this is that it's
6:45
could identify this is that it's
6:45
could identify this is that it's possibly going to indicate a possible
6:47
possibly going to indicate a possible
6:47
possibly going to indicate a possible incorrect
6:48
incorrect inheritant uh relationship type uh there
6:52
inheritant uh relationship type uh there
6:52
inheritant uh relationship type uh there are some other Cote uh smells orp or
6:55
are some other Cote uh smells orp or
6:55
are some other Cote uh smells orp or common common Cote smells others are for
6:58
common common Cote smells others are for
6:58
common common Cote smells others are for instance Divergent change uh shortgun
7:01
instance Divergent change uh shortgun
7:01
instance Divergent change uh shortgun surgery um speculative generality and so
7:05
surgery um speculative generality and so
7:05
surgery um speculative generality and so on you could potentially excuse me uh
7:08
on you could potentially excuse me uh
7:08
on you could potentially excuse me uh look some of these uh other ones up um
7:12
look some of these uh other ones up um
7:12
look some of these uh other ones up um to gain uh to gain more insight into
7:16
to gain uh to gain more insight into
7:16
to gain uh to gain more insight into them uh next is identifying and
7:20
them uh next is identifying and
7:20
them uh next is identifying and analyzing Cod smells uh so for example
7:23
analyzing Cod smells uh so for example
7:23
analyzing Cod smells uh so for example in order to basically um understand or
7:28
in order to basically um understand or
7:28
in order to basically um understand or identify uh
7:30
identify uh coat smells in a cat base uh one of the
7:33
coat smells in a cat base uh one of the
7:33
coat smells in a cat base uh one of the things that you could potentially use
7:35
things that you could potentially use
7:35
things that you could potentially use because it could be quite challenging as
7:37
because it could be quite challenging as
7:37
because it could be quite challenging as you may have seen in the previous slide
7:39
you may have seen in the previous slide
7:39
you may have seen in the previous slide it could be quite challenging to
7:42
it could be quite challenging to
7:42
it could be quite challenging to sport um and so the way to or one easy
7:47
sport um and so the way to or one easy
7:47
sport um and so the way to or one easy way to particularly approach this would
7:49
way to particularly approach this would
7:49
way to particularly approach this would be to use uh automated tools uh for
7:53
be to use uh automated tools uh for
7:53
be to use uh automated tools uh for example static code
7:56
example static code analyis um and some other tools like
7:58
analyis um and some other tools like
7:59
analyis um and some other tools like that that help identify common Cod some
8:02
that that help identify common Cod some
8:02
that that help identify common Cod some some of these TOS are like for instance
8:04
some of these TOS are like for instance
8:04
some of these TOS are like for instance um Reaper uh even pin link py links
8:09
um Reaper uh even pin link py links
8:09
um Reaper uh even pin link py links could help facilitate um automation of
8:13
could help facilitate um automation of
8:13
could help facilitate um automation of identification of uh an analysis of
8:15
identification of uh an analysis of
8:16
identification of uh an analysis of codes SS and then code review uh
8:19
codes SS and then code review uh
8:19
codes SS and then code review uh particularly or majorly manually I mean
8:22
particularly or majorly manually I mean
8:22
particularly or majorly manually I mean been done manually through peer review
8:25
been done manually through peer review
8:25
been done manually through peer review um for instance you have a colleague or
8:27
um for instance you have a colleague or
8:27
um for instance you have a colleague or more senior or engineer on the on on the
8:29
more senior or engineer on the on on the
8:29
more senior or engineer on the on on the team uh we taking a look at the code uh
8:34
team uh we taking a look at the code uh
8:34
team uh we taking a look at the code uh could potentially uh you know spot some
8:36
could potentially uh you know spot some
8:36
could potentially uh you know spot some of those uh smelly Cod and I mean
8:40
of those uh smelly Cod and I mean
8:41
of those uh smelly Cod and I mean without without necessarily using a tool
8:43
without without necessarily using a tool
8:43
without without necessarily using a tool um or that the tool might actually miss
8:46
um or that the tool might actually miss
8:46
um or that the tool might actually miss in
8:48
in Exel all right so the next is I haven't
8:51
Exel all right so the next is I haven't
8:51
Exel all right so the next is I haven't understood um what code smells are or
8:56
understood um what code smells are or
8:56
understood um what code smells are or the issues that could impact um
8:59
the issues that could impact um
8:59
the issues that could impact um the ability to or delivery of uh or
9:02
the ability to or delivery of uh or
9:02
the ability to or delivery of uh or writing of clean and maintainable code
9:05
writing of clean and maintainable code
9:05
writing of clean and maintainable code uh the next would be how do we now
9:07
uh the next would be how do we now
9:07
uh the next would be how do we now refactor haven't understood how to
9:09
refactor haven't understood how to
9:09
refactor haven't understood how to identify those and the approach is
9:12
identify those and the approach is
9:12
identify those and the approach is basically refactoring um which is the
9:15
basically refactoring um which is the
9:15
basically refactoring um which is the process of
9:17
process of restructuring existing uh codes without
9:21
restructuring existing uh codes without
9:21
restructuring existing uh codes without changing its external uh behavior that
9:24
changing its external uh behavior that
9:24
changing its external uh behavior that is not necessarily modifying the
9:28
is not necessarily modifying the
9:28
is not necessarily modifying the functionality um that the code was built
9:31
functionality um that the code was built
9:31
functionality um that the code was built to
9:32
to perform and so uh so what are the
9:35
perform and so uh so what are the
9:35
perform and so uh so what are the refactoring techniques uh we have for
9:38
refactoring techniques uh we have for
9:38
refactoring techniques uh we have for instance extract method that is the
9:41
instance extract method that is the
9:41
instance extract method that is the breaking down of a long method into
9:44
breaking down of a long method into
9:44
breaking down of a long method into smaller more focused methods I wish um
9:48
smaller more focused methods I wish um
9:48
smaller more focused methods I wish um if this was a workshop section I I
9:51
if this was a workshop section I I
9:51
if this was a workshop section I I possibly would have been able to give
9:53
possibly would have been able to give
9:53
possibly would have been able to give dive into practical uh showcasing some
9:57
dive into practical uh showcasing some
9:57
dive into practical uh showcasing some of these uh techniques however uh we
10:00
of these uh techniques however uh we
10:00
of these uh techniques however uh we could you know take some of this Insight
10:03
could you know take some of this Insight
10:03
could you know take some of this Insight up uh and in various thems look them up
10:06
up uh and in various thems look them up
10:06
up uh and in various thems look them up or consider them and see how they work
10:09
or consider them and see how they work
10:09
or consider them and see how they work in real life so the next one is uh the
10:12
in real life so the next one is uh the
10:13
in real life so the next one is uh the move method that is moving a method of
10:15
move method that is moving a method of
10:15
move method that is moving a method of field to a more appropriate class this
10:19
field to a more appropriate class this
10:19
field to a more appropriate class this is possibly some something that
10:22
is possibly some something that
10:22
is possibly some something that we uh subtly do or knowingly do um or
10:26
we uh subtly do or knowingly do um or
10:26
we uh subtly do or knowingly do um or sometimes do or that some people already
10:28
sometimes do or that some people already
10:29
sometimes do or that some people already do
10:29
do uh basically moving a method um or field
10:32
uh basically moving a method um or field
10:32
uh basically moving a method um or field to a more appropriate class could
10:34
to a more appropriate class could
10:34
to a more appropriate class could particularly help um you know remove
10:38
particularly help um you know remove
10:38
particularly help um you know remove smelly coat or fix smelly Coates
10:41
smelly coat or fix smelly Coates
10:41
smelly coat or fix smelly Coates particularly related to say for example
10:43
particularly related to say for example
10:44
particularly related to say for example lung lung method one of those uh
10:49
lung lung method one of those uh
10:49
lung lung method one of those uh third technique here is renaming
10:53
third technique here is renaming
10:53
third technique here is renaming variables basically changing variable
10:55
variables basically changing variable
10:55
variables basically changing variable names to more meaningful
10:57
names to more meaningful
10:57
names to more meaningful ones um
11:00
ones um with so this particularly you know helps
11:02
with so this particularly you know helps
11:02
with so this particularly you know helps to say for example fix or reduce or
11:05
to say for example fix or reduce or
11:05
to say for example fix or reduce or potentially impact uh say for instance
11:09
potentially impact uh say for instance
11:09
potentially impact uh say for instance um the number of comments that needs to
11:11
um the number of comments that needs to
11:11
um the number of comments that needs to be made or put into a code base and then
11:15
be made or put into a code base and then
11:15
be made or put into a code base and then the fourth item here is introducing
11:18
the fourth item here is introducing
11:18
the fourth item here is introducing parameter object that is
11:21
parameter object that is
11:21
parameter object that is replacing long parameter with a single
11:25
replacing long parameter with a single
11:25
replacing long parameter with a single object parameter uh by basically using
11:28
object parameter uh by basically using
11:28
object parameter uh by basically using um
11:31
cles uh the next item here is uh Team
11:35
cles uh the next item here is uh Team
11:35
cles uh the next item here is uh Team culture and practices and understanding
11:38
culture and practices and understanding
11:38
culture and practices and understanding how they could impact for example the
11:41
how they could impact for example the
11:41
how they could impact for example the writing of clean and maintainable cult
11:44
writing of clean and maintainable cult
11:44
writing of clean and maintainable cult and the first um item that I have here
11:47
and the first um item that I have here
11:47
and the first um item that I have here for
11:48
for consideration is encouragement of best
11:52
consideration is encouragement of best
11:52
consideration is encouragement of best practices meaning um that is it's
11:56
practices meaning um that is it's
11:56
practices meaning um that is it's imperative for us uh product engineering
12:00
imperative for us uh product engineering
12:00
imperative for us uh product engineering teams or software engineering teams to
12:02
teams or software engineering teams to
12:03
teams or software engineering teams to have a culture to ensure that there is a
12:06
have a culture to ensure that there is a
12:06
have a culture to ensure that there is a culture that
12:07
culture that emphasizes uh the importance of best
12:10
emphasizes uh the importance of best
12:10
emphasizes uh the importance of best practices for example whether during
12:12
practices for example whether during
12:12
practices for example whether during standup meetings or during reviews uh
12:15
standup meetings or during reviews uh
12:15
standup meetings or during reviews uh quot review sessions or whatever time uh
12:18
quot review sessions or whatever time uh
12:18
quot review sessions or whatever time uh but it it has to be uilt into the
12:22
but it it has to be uilt into the
12:22
but it it has to be uilt into the culture right from your on boarding of a
12:25
culture right from your on boarding of a
12:25
culture right from your on boarding of a new team member such that the person
12:27
new team member such that the person
12:27
new team member such that the person coming in to join the team
12:29
coming in to join the team
12:29
coming in to join the team understands um the emphasis or the
12:32
understands um the emphasis or the
12:32
understands um the emphasis or the characteristics or the quality or the
12:34
characteristics or the quality or the
12:34
characteristics or the quality or the values that the theme are precisely um
12:38
values that the theme are precisely um
12:38
values that the theme are precisely um holds in terms of um so for example
12:41
holds in terms of um so for example
12:41
holds in terms of um so for example writing PL and maintainable cod uh also
12:45
writing PL and maintainable cod uh also
12:45
writing PL and maintainable cod uh also in addition to that I have
12:48
in addition to that I have
12:48
in addition to that I have um uh peer peer programming and
12:51
um uh peer peer programming and
12:51
um uh peer peer programming and continuous integration that leads to
12:54
continuous integration that leads to
12:54
continuous integration that leads to higher code quality so encouraging best
12:58
higher code quality so encouraging best
12:58
higher code quality so encouraging best practices
12:59
practices potentially helps uh improve code
13:02
potentially helps uh improve code
13:02
potentially helps uh improve code reviews peer programming continuous
13:05
reviews peer programming continuous
13:05
reviews peer programming continuous integration and potentially could lead
13:08
integration and potentially could lead
13:08
integration and potentially could lead to higher code
13:10
to higher code quality next is the collaboration and
13:14
quality next is the collaboration and
13:14
quality next is the collaboration and communication that is this could
13:16
communication that is this could
13:16
communication that is this could potentially facilitate open and
13:18
potentially facilitate open and
13:18
potentially facilitate open and effective communication within the
13:21
effective communication within the
13:21
effective communication within the team uh and potentially fer
13:24
team uh and potentially fer
13:24
team uh and potentially fer collaboration allowing the team to share
13:27
collaboration allowing the team to share
13:27
collaboration allowing the team to share knowledge identify issu issues early and
13:30
knowledge identify issu issues early and
13:30
knowledge identify issu issues early and work together to fix or to find the best
13:33
work together to fix or to find the best
13:33
work together to fix or to find the best solutions to an issue uh third item here
13:37
solutions to an issue uh third item here
13:37
solutions to an issue uh third item here is accountability and ownership um
13:41
is accountability and ownership um
13:41
is accountability and ownership um basically encouraging the team to take
13:43
basically encouraging the team to take
13:43
basically encouraging the team to take ownership of their code and this in
13:48
ownership of their code and this in
13:48
ownership of their code and this in itself can potentially make individuals
13:51
itself can potentially make individuals
13:51
itself can potentially make individuals more likely to care about its quality
13:54
more likely to care about its quality
13:55
more likely to care about its quality right from the get go and the third item
13:58
right from the get go and the third item
13:58
right from the get go and the third item here is adoption which is somewhat
14:01
here is adoption which is somewhat
14:01
here is adoption which is somewhat similar to the first item that I have
14:03
similar to the first item that I have
14:03
similar to the first item that I have listed here but uh basically emphasizing
14:07
listed here but uh basically emphasizing
14:07
listed here but uh basically emphasizing that there is Need for our adherance to
14:10
that there is Need for our adherance to
14:10
that there is Need for our adherance to coding standards so whatever standards
14:14
coding standards so whatever standards
14:14
coding standards so whatever standards are adopted within um a team uh which
14:17
are adopted within um a team uh which
14:17
are adopted within um a team uh which forms part of the best practices for the
14:19
forms part of the best practices for the
14:19
forms part of the best practices for the team it's imperative to ensure that
14:23
team it's imperative to ensure that
14:23
team it's imperative to ensure that there is monitoring and adherance to
14:26
there is monitoring and adherance to
14:26
there is monitoring and adherance to that coding uh so engineering managers
14:30
that coding uh so engineering managers
14:30
that coding uh so engineering managers needs to take a particular
14:31
needs to take a particular
14:31
needs to take a particular responsibility for ensuring that this
14:35
responsibility for ensuring that this
14:35
responsibility for ensuring that this this some of the things that are
14:37
this some of the things that are
14:37
this some of the things that are identified as best practices um have
14:40
identified as best practices um have
14:40
identified as best practices um have been monitored and been done according
14:42
been monitored and been done according
14:42
been monitored and been done according to the coding uh standards
14:47
to the coding uh standards
14:47
to the coding uh standards up all right so
14:50
up all right so the next item here is the key principles
14:54
the next item here is the key principles
14:54
the next item here is the key principles for writing clean and maintainable cod
14:58
for writing clean and maintainable cod
14:58
for writing clean and maintainable cod and the first first here is um like I
15:03
and the first first here is um like I
15:03
and the first first here is um like I mentioned uh this could form like
15:07
mentioned uh this could form like
15:07
mentioned uh this could form like um like part of the best practices or
15:10
um like part of the best practices or
15:10
um like part of the best practices or things to put into the best practices or
15:13
things to put into the best practices or
15:13
things to put into the best practices or code for best practices and the first
15:16
code for best practices and the first
15:16
code for best practices and the first first thing that I have here is um the
15:20
first thing that I have here is um the
15:20
first thing that I have here is um the keep it simple uh stupid right um it's
15:24
keep it simple uh stupid right um it's
15:24
keep it simple uh stupid right um it's an acronym
15:26
an acronym uh excuse me it's uh the acronym is keys
15:31
uh excuse me it's uh the acronym is keys
15:31
uh excuse me it's uh the acronym is keys right and it basically means uh that we
15:33
right and it basically means uh that we
15:34
right and it basically means uh that we need to ensure that we strive for
15:37
need to ensure that we strive for
15:37
need to ensure that we strive for Simplicity in our coding uh by avoiding
15:41
Simplicity in our coding uh by avoiding
15:41
Simplicity in our coding uh by avoiding unnecessary complexity in the coding and
15:44
unnecessary complexity in the coding and
15:44
unnecessary complexity in the coding and the benefit of this is that it
15:47
the benefit of this is that it
15:47
the benefit of this is that it simplifies the coding process in itself
15:50
simplifies the coding process in itself
15:50
simplifies the coding process in itself uh it helps to deliver simple code that
15:54
uh it helps to deliver simple code that
15:54
uh it helps to deliver simple code that is easier to read uh easier to
15:57
is easier to read uh easier to
15:57
is easier to read uh easier to understand and easier to
16:00
understand and easier to
16:00
understand and easier to maintain and also in addition to those
16:03
maintain and also in addition to those
16:03
maintain and also in addition to those it also helps to avoid over engineering
16:06
it also helps to avoid over engineering
16:06
it also helps to avoid over engineering Solutions and Implement straightforward
16:09
Solutions and Implement straightforward
16:09
Solutions and Implement straightforward uh logic this is this is uh like an
16:12
uh logic this is this is uh like an
16:12
uh logic this is this is uh like an umbrella
16:13
umbrella principle um that every team needs to
16:17
principle um that every team needs to
16:17
principle um that every team needs to ensure that it's in the toolbox uh along
16:22
ensure that it's in the toolbox uh along
16:22
ensure that it's in the toolbox uh along with some other set of principles for
16:25
with some other set of principles for
16:25
with some other set of principles for that could go into the best practices um
16:28
that could go into the best practices um
16:28
that could go into the best practices um that will be
16:30
that will be adopted the next item here is uh dry
16:33
adopted the next item here is uh dry
16:33
adopted the next item here is uh dry which means don't repeat yourself uh
16:36
which means don't repeat yourself uh
16:36
which means don't repeat yourself uh basically focuses on avoiding
16:38
basically focuses on avoiding
16:38
basically focuses on avoiding duplication of codes um whether it's a
16:43
duplication of codes um whether it's a
16:43
duplication of codes um whether it's a method or whether it's a function uh
16:46
method or whether it's a function uh
16:46
method or whether it's a function uh maybe not necessary function but you
16:48
maybe not necessary function but you
16:48
maybe not necessary function but you know methods um and and and functions
16:52
know methods um and and and functions
16:52
know methods um and and and functions themselves uh basically to
16:55
themselves uh basically to
16:55
themselves uh basically to avoid excuse me uh this could help avoid
16:58
avoid excuse me uh this could help avoid
16:59
avoid excuse me uh this could help avoid duplicating code by
17:01
duplicating code by abstracting out common
17:04
abstracting out common
17:04
abstracting out common functionality into re reusable
17:07
functionality into re reusable
17:07
functionality into re reusable components and it also helps to reduce
17:11
components and it also helps to reduce
17:11
components and it also helps to reduce redundancy uh making the code base
17:13
redundancy uh making the code base
17:13
redundancy uh making the code base easier to maintain and less PR to error
17:17
easier to maintain and less PR to error
17:17
easier to maintain and less PR to error for instance um you have the same block
17:20
for instance um you have the same block
17:20
for instance um you have the same block of code that is used in multiple places
17:23
of code that is used in multiple places
17:23
of code that is used in multiple places refactoring it into a single method of
17:25
refactoring it into a single method of
17:25
refactoring it into a single method of function can that can be called
17:29
function can that can be called
17:29
function can that can be called from different locations could help fix
17:32
from different locations could help fix
17:32
from different locations could help fix or could help align the te with don't
17:36
or could help align the te with don't
17:36
or could help align the te with don't repeat um yourself or avoid duplication
17:38
repeat um yourself or avoid duplication
17:38
repeat um yourself or avoid duplication of
17:40
of code um then the next item uh next key
17:45
code um then the next item uh next key
17:45
code um then the next item uh next key principle here is yag that is if you
17:49
principle here is yag that is if you
17:49
principle here is yag that is if you aren't going to need it don't had
17:53
aren't going to need it don't had
17:53
aren't going to need it don't had it uh really um
17:57
it uh really um so this principle basically you know
18:00
so this principle basically you know
18:00
so this principle basically you know teaches or helps or could help team to
18:04
teaches or helps or could help team to
18:04
teaches or helps or could help team to avoid Harding unnecessarily excuse me
18:07
avoid Harding unnecessarily excuse me
18:07
avoid Harding unnecessarily excuse me unnecessary
18:09
unnecessary functionality uh to a code base uh
18:13
functionality uh to a code base uh
18:13
functionality uh to a code base uh except and until when it is actually
18:16
except and until when it is actually
18:16
except and until when it is actually necessary um and basically just just
18:20
necessary um and basically just just
18:20
necessary um and basically just just Implement uh fatures and functionalities
18:23
Implement uh fatures and functionalities
18:23
Implement uh fatures and functionalities that are necessary that are necessary at
18:26
that are necessary that are necessary at
18:26
that are necessary that are necessary at the moment of deployment and not those
18:30
the moment of deployment and not those
18:30
the moment of deployment and not those that we think might be needed in future
18:33
that we think might be needed in future
18:33
that we think might be needed in future this is particularly important because
18:35
this is particularly important because
18:35
this is particularly important because for instance when you are doing uh let's
18:38
for instance when you are doing uh let's
18:38
for instance when you are doing uh let's say tracability
18:40
say tracability um of requirement of validation of
18:44
um of requirement of validation of
18:44
um of requirement of validation of requirement uh this could potentially
18:47
requirement uh this could potentially
18:47
requirement uh this could potentially impact U that ability to validate or or
18:51
impact U that ability to validate or or
18:51
impact U that ability to validate or or say for example going to developing Tex
18:55
say for example going to developing Tex
18:55
say for example going to developing Tex cases appropriately appropriate for
18:58
cases appropriately appropriate for
18:58
cases appropriately appropriate for valid dating that specific requirements
19:01
valid dating that specific requirements
19:01
valid dating that specific requirements have been
19:03
have been met next is the solid principles uh
19:07
met next is the solid principles uh
19:07
met next is the solid principles uh which has quite a number of subsets and
19:11
which has quite a number of subsets and
19:11
which has quite a number of subsets and on that list of the subset of solid
19:14
on that list of the subset of solid
19:14
on that list of the subset of solid principles um is that first um set five
19:19
principles um is that first um set five
19:19
principles um is that first um set five excuse me
19:21
excuse me U single responsibility principle uh
19:24
U single responsibility principle uh
19:24
U single responsibility principle uh which states that a class should have
19:28
which states that a class should have
19:28
which states that a class should have one only one reason to change meaning it
19:31
one only one reason to change meaning it
19:31
one only one reason to change meaning it should have only one job or
19:35
should have only one job or
19:35
should have only one job or responsibility nothing more nothing
19:38
responsibility nothing more nothing
19:38
responsibility nothing more nothing less next is um open and closed
19:41
less next is um open and closed
19:41
less next is um open and closed principle and it basically states that
19:44
principle and it basically states that
19:44
principle and it basically states that the software
19:46
the software entities should be open for extension
19:50
entities should be open for extension
19:50
entities should be open for extension but closed for
19:52
but closed for modification um
19:54
modification um Lis Lov substitution principle uh this
19:58
Lis Lov substitution principle uh this
19:58
Lis Lov substitution principle uh this states that objects in a program should
20:02
states that objects in a program should
20:02
states that objects in a program should be replaceable with instances of their
20:07
be replaceable with instances of their
20:07
be replaceable with instances of their subtypes without authoring the
20:09
subtypes without authoring the
20:09
subtypes without authoring the correctness of the
20:12
correctness of the program uh next is the interface
20:14
program uh next is the interface
20:14
program uh next is the interface segregation principle basically states
20:17
segregation principle basically states
20:17
segregation principle basically states that clients should not be forced to
20:20
that clients should not be forced to
20:20
that clients should not be forced to depend on interfaces they do not use and
20:24
depend on interfaces they do not use and
20:24
depend on interfaces they do not use and lastly on this list is um
20:28
lastly on this list is um
20:28
lastly on this list is um the last last item on this list is
20:31
the last last item on this list is
20:31
the last last item on this list is dependency inversion principle and this
20:34
dependency inversion principle and this
20:34
dependency inversion principle and this basically states that high level modules
20:36
basically states that high level modules
20:36
basically states that high level modules should not depend on lowlevel modules uh
20:40
should not depend on lowlevel modules uh
20:40
should not depend on lowlevel modules uh meaning both should depend on their
20:43
meaning both should depend on their
20:43
meaning both should depend on their respective
20:44
respective abstractions
20:46
abstractions right uh some other key principles are
20:50
right uh some other key principles are
20:50
right uh some other key principles are modularity which is breaking down the
20:53
modularity which is breaking down the
20:53
modularity which is breaking down the code into smaller self-contained modules
20:56
code into smaller self-contained modules
20:56
code into smaller self-contained modules uh making the code base more man
20:59
uh making the code base more man
20:59
uh making the code base more man reable and easier to
21:02
reable and easier to
21:02
reable and easier to test uh other other other key principles
21:06
test uh other other other key principles
21:06
test uh other other other key principles that could be adapted uh encapsulation
21:09
that could be adapted uh encapsulation
21:10
that could be adapted uh encapsulation and testability possibly or potentially
21:12
and testability possibly or potentially
21:12
and testability possibly or potentially some that we currently already have in
21:15
some that we currently already have in
21:15
some that we currently already have in our tool set and part that has formed
21:19
our tool set and part that has formed
21:19
our tool set and part that has formed part of um what we use in our everyday
21:23
part of um what we use in our everyday
21:23
part of um what we use in our everyday practice but this are some some of the
21:26
practice but this are some some of the
21:26
practice but this are some some of the key principles that I think would basic
21:29
key principles that I think would basic
21:29
key principles that I think would basic could significantly impact and improve
21:32
could significantly impact and improve
21:32
could significantly impact and improve um writing of clean and maintainable CT
21:39
um so this leads me potentially to the
21:44
um so this leads me potentially to the
21:44
um so this leads me potentially to the end of uh the focus on this uh
21:49
end of uh the focus on this uh
21:49
end of uh the focus on this uh presentation um so kick quick take away
21:53
presentation um so kick quick take away
21:53
presentation um so kick quick take away we've looked at the importance of
21:56
we've looked at the importance of
21:56
we've looked at the importance of um looked at importance of uh clean and
22:01
um looked at importance of uh clean and
22:01
um looked at importance of uh clean and maintainable cod um we're seeing that it
22:06
maintainable cod um we're seeing that it
22:06
maintainable cod um we're seeing that it could potentially impact or help us
22:08
could potentially impact or help us
22:08
could potentially impact or help us improve the Bain and enhancement of
22:11
improve the Bain and enhancement of
22:11
improve the Bain and enhancement of quotes uh particularly making it easier
22:13
quotes uh particularly making it easier
22:14
quotes uh particularly making it easier to read and understand uh Al also touch
22:17
to read and understand uh Al also touch
22:17
to read and understand uh Al also touch on on the ability to make it simpler to
22:21
on on the ability to make it simpler to
22:21
on on the ability to make it simpler to identify and fix uh BS um also worthy of
22:26
identify and fix uh BS um also worthy of
22:26
identify and fix uh BS um also worthy of note is that it uh it could potentially
22:29
note is that it uh it could potentially
22:29
note is that it uh it could potentially reduce uh the time and effort required
22:32
reduce uh the time and effort required
22:32
reduce uh the time and effort required to debug and enhance uh the code uh also
22:36
to debug and enhance uh the code uh also
22:37
to debug and enhance uh the code uh also it has potential to you
22:39
it has potential to you
22:39
it has potential to you know increase the development uh excuse
22:42
know increase the development uh excuse
22:42
know increase the development uh excuse me speed up the development cycle and
22:45
me speed up the development cycle and
22:45
me speed up the development cycle and increase or you know resolution of um or
22:50
increase or you know resolution of um or
22:50
increase or you know resolution of um or faster lead to leads to faster
22:53
faster lead to leads to faster
22:53
faster lead to leads to faster resolution of
22:55
resolution of issues um important also
22:58
issues um important also
22:59
issues um important also I mean one of one of the key things that
23:00
I mean one of one of the key things that
23:00
I mean one of one of the key things that is also important to take away is that
23:03
is also important to take away is that
23:03
is also important to take away is that it improves the team collaboration
23:06
it improves the team collaboration
23:06
it improves the team collaboration particularly helping team to easily
23:08
particularly helping team to easily
23:08
particularly helping team to easily understand each
23:10
understand each other's um work um and particularly
23:14
other's um work um and particularly
23:14
other's um work um and particularly hidden the ability to uh you know
23:18
hidden the ability to uh you know
23:18
hidden the ability to uh you know have um colleagues or or peer review um
23:23
have um colleagues or or peer review um
23:23
have um colleagues or or peer review um I mean contribute to the code review um
23:27
I mean contribute to the code review um
23:27
I mean contribute to the code review um through peer review or during
23:29
through peer review or during
23:29
through peer review or during review uh finally it also could um you
23:33
review uh finally it also could um you
23:33
review uh finally it also could um you know Aid scalability and M
23:36
know Aid scalability and M
23:36
know Aid scalability and M maintainability um which is also
23:38
maintainability um which is also
23:38
maintainability um which is also critical to ensuring
23:41
critical to ensuring
23:41
critical to ensuring that uh we are able to deliver uh clean
23:44
that uh we are able to deliver uh clean
23:45
that uh we are able to deliver uh clean and maintainable
23:46
and maintainable cat um I also touch on cat smell uh
23:49
cat um I also touch on cat smell uh
23:49
cat um I also touch on cat smell uh defined what cat smell is listed common
23:52
defined what cat smell is listed common
23:52
defined what cat smell is listed common cot smell um but I don't want to go into
23:56
cot smell um but I don't want to go into
23:56
cot smell um but I don't want to go into all of those um we could you know
23:59
all of those um we could you know
23:59
all of those um we could you know take uh watch watch the video um later
24:02
take uh watch watch the video um later
24:02
take uh watch watch the video um later on to to you know deep dive into some of
24:05
on to to you know deep dive into some of
24:05
on to to you know deep dive into some of the concept already thought particularly
24:08
the concept already thought particularly
24:08
the concept already thought particularly uh regarding the types of common C
24:11
uh regarding the types of common C
24:11
uh regarding the types of common C smells and then and how to identify L of
24:14
smells and then and how to identify L of
24:14
smells and then and how to identify L of those I also touch on refactoring um
24:17
those I also touch on refactoring um
24:17
those I also touch on refactoring um which is
24:18
which is basically uh how to improve
24:22
basically uh how to improve
24:22
basically uh how to improve um identify and improve Cod smells and I
24:28
um identify and improve Cod smells and I
24:28
um identify and improve Cod smells and I also touch on team culture and influence
24:31
also touch on team culture and influence
24:31
also touch on team culture and influence on practices and finally which was the
24:34
on practices and finally which was the
24:34
on practices and finally which was the last Slide the last slide before I move
24:37
last Slide the last slide before I move
24:38
last Slide the last slide before I move to this uh the key principles for
24:40
to this uh the key principles for
24:40
to this uh the key principles for writing clean and maintainable cod
24:44
writing clean and maintainable cod
24:44
writing clean and maintainable cod and this leads me to the end of uh my
24:49
and this leads me to the end of uh my
24:49
and this leads me to the end of uh my presentation thank you
24:52
presentation thank you
24:52
presentation thank you [Music]