|
1 | 1 | # What are anti-patterns? |
2 | 2 |
|
3 | | -Anti-patterns describe common mistakes or indicators of potential problems in code. |
| 3 | +Anti-patterns describe common mistakes or indicators of problems in code. |
4 | 4 | They are also known as "code smells". |
5 | 5 |
|
6 | | -The goal of these guides is to document known anti-patterns found in Elixir software |
7 | | -and teach developers how to identify them and their limitations. If an existing piece |
| 6 | +The goal of these guides is to document potential anti-patterns found in Elixir software |
| 7 | +and teach developers how to identify them and their pitfalls. If an existing piece |
8 | 8 | of code matches an anti-pattern, it does not mean your code must be rewritten. |
9 | | -No codebase is free of anti-patterns and one should not aim to remove all |
10 | | -anti-patterns of a codebase. The goal is to promote a discussion of potential |
11 | | -pitfalls and provide alternatives into consideration. |
| 9 | +Sometimes, even if a snippet matches a potential anti-pattern and its limitations, |
| 10 | +it may be the best approach to the problem at hand. No codebase is free of anti-patterns |
| 11 | +and one should not aim to remove all of them. |
12 | 12 |
|
13 | 13 | The anti-patterns in these guides are broken into 4 main categories: |
14 | 14 |
|
@@ -36,6 +36,8 @@ Each anti-pattern is documented using the following structure: |
36 | 36 | * **Refactoring:** Ways to change your code to improve its qualities. Examples of refactored |
37 | 37 | code are presented to illustrate these changes. |
38 | 38 |
|
| 39 | +An additional section with "Additional Remarks" may be provided. Those may include known scenarios where the anti-pattern does not apply. |
| 40 | + |
39 | 41 | The initial catalog of anti-patterns was proposed by Lucas Vegi and Marco Tulio Valente, from [ASERG/DCC/UFMG](http://aserg.labsoft.dcc.ufmg.br/). For more info, see [Understanding Code Smells in Elixir Functional Language](https://github.com/lucasvegi/Elixir-Code-Smells/blob/main/etc/2023-emse-code-smells-elixir.pdf) and [the associated code repository](https://github.com/lucasvegi/Elixir-Code-Smells). |
40 | 42 |
|
41 | 43 | Additionally, the Security Working Group of the [Erlang Ecosystem Foundation](https://erlef.github.io/security-wg/) publishes [documents with security resources and best-practices of both Erlang and Elixir, including detailed guides for web applications](https://erlef.github.io/security-wg/). |
0 commit comments