@@ -7,16 +7,37 @@ This document is an attempt to get the team on the same page about the refactori
77 * Make the code easier to deal with.
88 * Ease the addition (or update) of features.
99
10+ * Remove technical limitation
11+ * Maintainability: Clean code / SOLID philosophy
12+ * Make it easier to understand
13+ * [ The Pony philosophy] ( https://www.ponylang.io/discover/#the-pony-philosophy )
14+
1015## How?
1116* Defined how we can reach that goal.
12- * Which techniques? More domain-oriented and less "algorithmic".
17+ * Which techniques?
18+ * More domain-oriented and less "algorithmic". ` order.IsUncrossed() ` instead of ` order.offet < -1 `
19+ * avoid graph style code, more like tree structure.
20+ * SOLID
21+ * clean code
22+ * avoid coupling: Better interfaces, or event driven packages.
1323* Defined critical code path for maximum impact.
14- * Identify the hottest path of code change.
24+ * Identify the hottest path of code change :
25+ * compare results with cyclomatic complexity (` gocyclo ` ).
26+ * rate of changes of the code and files
27+ * number of import inside a file -> reveal a code smell ?
1528* Defined medium to share the knowledge.
1629 * Create workshops on specific problems to find a solution, and be on the same page.
1730 * Save our decisions into a file.
31+ * Use external articles on the matter. file with "do this" and "don't do this".
1832
1933## When?
34+
35+ Be discussed before being addressed.
36+
37+ Verify the test coverage (coverage is not everything) before refactor.
38+
39+ Beware of refactoring scope to not go too far, and cause conflict.
40+
2041### Opportunistic refactoring
2142It's done along the way.
2243
@@ -43,3 +64,10 @@ Basically, the boy scout's rule.
4364
4465* How to avoid overlapping with someone else?
4566* Into the same PR as the one of the feature or a different one?
67+
68+ ## Planing
69+
70+ 1 . find a tool to highlight hot code path
71+ 2 . Bootstrap files for coding style, convention and stuff.
72+ 3 . Find the biggest offenders and start from there to build our guideline.
73+ 4 . ` golangci ` : Use linters to get more insight on smells.
0 commit comments