Skip to content

Commit 06fd647

Browse files
author
William Kennedy
committed
Updating content about packaging.
1 parent fa2f40a commit 06fd647

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

courses/ultimate/language/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ This is a class for any intermediate-level developer who has some experience wit
2121
[Interfaces](../../../topics/interfaces/README.md) |
2222
[Embedding](../../../topics/embedding/README.md)
2323

24-
#### Exporting
25-
[Exporting](../../../topics/exporting/README.md)
24+
#### Packaging / Exporting
25+
[Packaging/Exporting](../../../topics/exporting/README.md)
2626

2727
#### Nature of Types
2828
[Receiver Choices](../../../topics/receiver_choices/README.md)

topics/arrays/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Arrays are a special data structure in Go that allow us to allocate contiguous b
55
## Notes
66

77
* If you don't understand the data, you don't understand the problem.
8+
* If you don't understand the cost of solving the problem, you can't reason about the problem.
89
* If you don't understand the hardware, you can't reason about the cost of solving the problem.
910

1011
* Arrays are fixed length data structures that can't change.

topics/exporting/README.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Exporting
1+
## Packaging / Exporting
22

33
Packages contain the basic unit of compiled code. They define a scope for the indentifiers that are declared within them. Learning how to package our code is vital because exported identifiers become part of the packages API. Stable and useable API's are incredibily important.
44

@@ -27,68 +27,67 @@ _I think that the real problem with C is that it doesn't give you enough mechani
2727

2828
## Package Design
2929

30-
**Sandi Metz : Less - The Path to Better Design:**
31-
https://vimeo.com/26330100
30+
#### Mike Action : Data-Oriented Design and C++
31+
https://www.youtube.com/watch?v=rX0ItVEVjHc
3232

3333
* If you don't understand the data you are working with, you don't understand the problem you are trying to solve.
3434

35-
* Every problem is a data transformation problem at heart and each function, method and workflow must focus on implementing their specific data transformation.
36-
37-
* If your data is changing, your problem is changing.
38-
39-
* When your problem is changing, the data transformations you have implemented need to change.
40-
41-
* You must do your best to guess what data could change over time and consider how these changes will affect the software.
42-
43-
* Uncertainty about the data is not a license to guess but a directive to decouple.
44-
45-
* In many languages folders are used to organize code, in Go folders are used to organize API's (packages).
46-
47-
* Packages in Go provide API boundaries that should focus on solving one specific problem or a highly focused group of problems.
35+
* If you don't understand the cost of solving the problem, you can't reason about the problem.
4836

49-
* You must understand how changes to the data for a particular package affects the other packages that depend on it.
37+
* If you don't understand the hardware, you can't reason about the cost of solving the problem.
5038

51-
* Recognizing and minimizing cascading changes across different packages is a way to architect adaptability and stability in your software.
39+
* Solving problems you don't have, creates more problems you now do.
5240

53-
* When dependencies between packages are weakened and the coupling loosened, cascading changes are minimized and stability is improved.
41+
* Every problem is a data transformation problem at heart and each function, method and workflow must focus on implementing their specific data transformation.
5442

55-
* Decoupling means reducing the amount of intimate knowledge packages must have about each other to be used together.
43+
* If your data is changing, your problem is changing.
5644

57-
* Interfaces provide the highest form of decoupling when the concrete types used to implement them can remain opaque.
45+
* When your problem is changing, the data transformations you have implemented need to change.
5846

59-
**Scott Myers : The Most Important Design Guideline:**
47+
#### Scott Myers : The Most Important Design Guideline
6048
https://www.youtube.com/watch?v=5tg1ONG18H8
6149

6250
* Make Interfaces easy to use correctly and hard to use incorrectly.
6351

6452
* Principle of least astonishment.
65-
6653
* Keep the expectation clear, allows users to guess correctly.
67-
6854
* Take advantage of what people already know.
69-
7055
* Behavior should maintain a level of expectation.
7156

7257
* Choose good names.
73-
7458
* Names are the interface.
75-
7659
* Give a lot of thought to the names you use.
7760

7861
* Be consistent.
7962

8063
* Document before using.
81-
8264
* Test driven design.
83-
8465
* This is identify problems early on.
8566

8667
* Try to minimize user mistakes with the API.
87-
8868
* Trying to constrain values can create readability issues.
89-
9069
* Minimize choices.
9170

71+
#### Decoupling Guidelines For Go
72+
73+
* In many languages folders are used to organize code, in Go folders are used to organize API's (packages).
74+
75+
* Packages in Go provide API boundaries that should focus on solving one specific problem or a highly focused group of problems.
76+
77+
* You must do your best to guess what data could change over time and consider how these changes will affect the software.
78+
79+
* Uncertainty about the data is not a license to guess but a directive to decouple.
80+
81+
* You must understand how changes to the data for a particular package affects the other packages that depend on it.
82+
83+
* Recognizing and minimizing cascading changes across different packages is a way to architect adaptability and stability in your software.
84+
85+
* When dependencies between packages are weakened and the coupling loosened, cascading changes are minimized and stability is improved.
86+
87+
* Decoupling means reducing the amount of intimate knowledge packages must have about each other to be used together.
88+
89+
* Interfaces provide the highest form of decoupling when the concrete types used to implement them can remain opaque.
90+
9291
## Code Review
9392

9493
[Declare and access exported identifiers](example1/example1.go)

0 commit comments

Comments
 (0)