@@ -19,7 +19,7 @@ Easy structuring of a project means it is also easy
19
19
to do it poorly. Some signs of a poorly structured project
20
20
include:
21
21
22
- - Multiple and messy circular dependencies: If your classes
22
+ - Multiple and messy circular dependencies: if your classes
23
23
Table and Chair in furn.py need to import Carpenter from workers.py
24
24
to answer a question such as table.isdoneby(),
25
25
and if conversely the class Carpenter needs to import Table and Chair,
@@ -28,13 +28,13 @@ include:
28
28
fragile hacks such has using import statements inside
29
29
methods or functions.
30
30
31
- - Hidden coupling: Each and every change in Table's implementation
31
+ - Hidden coupling: each and every change in Table's implementation
32
32
breaks 20 tests in unrelated test cases because it breaks Carpenter's code,
33
33
which requires very careful surgery to adapt the change. This means
34
34
you have too many assumptions about Table in Carpenter's code or the
35
35
reverse.
36
36
37
- - Heavy usage of global state or context: Instead of explicitly
37
+ - Heavy usage of global state or context: instead of explicitly
38
38
passing ``(height, width, type, wood) `` to each other, Table
39
39
and Carpenter rely on global variables that can be modified
40
40
and are modified on the fly by different agents. You need to
@@ -43,14 +43,14 @@ include:
43
43
template code is also modifying this context, messing with
44
44
table dimensions.
45
45
46
- - Spaghetti code: Multiple pages of nested if clauses and for loops
46
+ - Spaghetti code: multiple pages of nested if clauses and for loops
47
47
with a lot of copy-pasted procedural code and no
48
- proper segmentation are known as spaghetti code. Python's
48
+ proper segmentation are known as spaghetti code. Python's
49
49
meaningful indentation (one of its most controversial features) make
50
50
it very hard to maintain this kind of code. So the good news is that
51
51
you might not see too much of it.
52
52
53
- - Ravioli code is more likely in Python: It consists of hundreds of
53
+ - Ravioli code is more likely in Python: it consists of hundreds of
54
54
similar little pieces of logic, often classes or objects, without
55
55
proper structure. If you never can remember if you have to use
56
56
FurnitureTable, AssetTable or Table, or even TableNew for your
0 commit comments