about summary refs log tree commit diff
path: root/usth/ICT2.7/P4L5 Software Refactoring Subtitles/21 - Bad Smells - lang_en_vs4.srt
blob: 240d37ba209d0dfc27caf5e56d0fa2af46fec619 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
1
00:00:00,070 --> 00:00:03,450
The concept of bad smells. What are bad smells? Well, we

2
00:00:03,450 --> 00:00:06,700
mentioned earlier that refactoring is typically applied when there is something

3
00:00:06,700 --> 00:00:09,130
that does not look right, does not feel right in the

4
00:00:09,130 --> 00:00:12,260
code. And that's exactly what bad smells are. Bad smells, or

5
00:00:12,260 --> 00:00:15,320
code smells if you wish, are symptoms in the code of

6
00:00:15,320 --> 00:00:18,868
a program that might indicate deeper problems. So there might be

7
00:00:18,868 --> 00:00:21,775
parts of my system, classes in my systems, that just don't

8
00:00:21,775 --> 00:00:25,309
smell right, and it feels like there's, there might be something wrong

9
00:00:25,309 --> 00:00:29,010
with them. And if you are an experienced developer just like Brad,

10
00:00:29,010 --> 00:00:31,320
you'll be able to figure out there is something wrong with the

11
00:00:31,320 --> 00:00:33,950
classes. You'll be able to smell that there's something wrong and you'll

12
00:00:33,950 --> 00:00:36,880
do something about it. And I want to mention one more, just to make

13
00:00:36,880 --> 00:00:39,270
sure that we're all on the same page here. That these bad

14
00:00:39,270 --> 00:00:43,070
smells are usually not bugs and don't prevent the program from functioning. They

15
00:00:43,070 --> 00:00:46,190
however indicate weaknesses in the design of the system that might cause

16
00:00:46,190 --> 00:00:48,480
problems during maintenance. In other words,

17
00:00:48,480 --> 00:00:50,440
they might make the code less maintainable,

18
00:00:50,440 --> 00:00:53,650
harder to understand, and so on. Just like refactorings,

19
00:00:53,650 --> 00:00:56,610
there's also many possible different bad smells. So what

20
00:00:56,610 --> 00:00:59,160
I'm providing here is just a possible list of

21
00:00:59,160 --> 00:01:02,190
some very common bad smells. And you can find plenty

22
00:01:02,190 --> 00:01:04,349
of information on this online. So what I want

23
00:01:04,349 --> 00:01:06,910
to do next is just to cover before finishing the

24
00:01:06,910 --> 00:01:08,700
lesson a few of those to show you some

25
00:01:08,700 --> 00:01:11,140
examples of smells and what you can do about them.