Slide 1

Slide 1 text

Никита Соболев github.com/sobolevn 1

Slide 2

Slide 2 text

sobolevn.me 2

Slide 3

Slide 3 text

>_ X Просто и сложно 3

Slide 4

Slide 4 text

4

Slide 5

Slide 5 text

Почти всегда "плохой" = "сложный" 5

Slide 6

Slide 6 text

6

Slide 7

Slide 7 text

Какой же код на самом деле сложный? 7

Slide 8

Slide 8 text

"Я не знаю, что делает функция на 500 строк, но могу сразу сказать, что она слишком сложная" – Неизвестный автор 8

Slide 9

Slide 9 text

Метрики против ощущений 9

Slide 10

Slide 10 text

>_ X Структурная сложность 10

Slide 11

Slide 11 text

Цикломатическая сложность или McCabe complexity 11

Slide 12

Slide 12 text

M = E − N + 2P M = цикломатическая сложность, E = количество рёбер в графе, N = количество узлов в графе, P = количество компонент связности. 12

Slide 13

Slide 13 text

9 − 8 + 2 × 1 = 3 13

Slide 14

Slide 14 text

int sumOfPrimes(int max) { // +1 int total = 0; OUT: for (int i = 1; i <= max; ++i) { for (int j = 2; j < i; ++j) { if (i % j == 0) { continue OUT; } } total += i; } return total; } 14

Slide 15

Slide 15 text

int sumOfPrimes(int max) { // +1 int total = 0; OUT: for (int i = 1; i <= max; ++i) { // +1 for (int j = 2; j < i; ++j) { if (i % j == 0) { continue OUT; } } total += i; } return total; } 15

Slide 16

Slide 16 text

int sumOfPrimes(int max) { // +1 int total = 0; OUT: for (int i = 1; i <= max; ++i) { // +1 for (int j = 2; j < i; ++j) { // +1 if (i % j == 0) { continue OUT; } } total += i; } return total; } 16

Slide 17

Slide 17 text

int sumOfPrimes(int max) { // +1 int total = 0; OUT: for (int i = 1; i <= max; ++i) { // +1 for (int j = 2; j < i; ++j) { // +1 if (i % j == 0) { // +1 continue OUT; } } total += i; } return total; } // Cyclomatic Complexity 4 17

Slide 18

Slide 18 text

Реализации > https://github.com/pycqa/mccabe > https://github.com/rubik/radon > https://github.com/tonybaloney/ wily > https://github.com/PyCQA/pylint > https://github.com/wemake- services/wemake-python-styleguide 18

Slide 19

Slide 19 text

Когнитивная сложность 19

Slide 20

Slide 20 text

Могут ли ваш код читать люди? 20

Slide 21

Slide 21 text

String getWords(int number) { // +1 switch (number) { case 1: // +1 return "one"; case 2: // +1 return "a couple"; case 3: // +1 return "several"; default: return "lots"; } } // Cyclomatic Complexity 4 21

Slide 22

Slide 22 text

int sumOfPrimes(int max) { // +1 int total = 0; OUT: for (int i = 1; i <= max; ++i) { // +1 for (int j = 2; j < i; ++j) { // +1 if (i % j == 0) { // +1 continue OUT; } } total += i; } return total; } // Cyclomatic Complexity 4 22

Slide 23

Slide 23 text

Метрики против ощущений 23

Slide 24

Slide 24 text

G. Ann Campbell sonarsource.com/docs/CognitiveComplexity.pdf 24

Slide 25

Slide 25 text

25

Slide 26

Slide 26 text

> Increment when there is a break in the linear (top-to-bottom, left- to-right) flow of the code 25

Slide 27

Slide 27 text

> Increment when there is a break in the linear (top-to-bottom, left- to-right) flow of the code > Increment when structures that break the flow are nested 25

Slide 28

Slide 28 text

> Increment when there is a break in the linear (top-to-bottom, left- to-right) flow of the code > Increment when structures that break the flow are nested > Ignore "shorthand" structures that readably condense multiple lines of code into one 25

Slide 29

Slide 29 text

// Cyclomatic Cognitive String getWords(int number) { // +1 switch (number) { // +1 case 1: // +1 return "one"; case 2: // +1 return "a couple"; default: // +1 return "lots"; } } // =4 =1 26

Slide 30

Slide 30 text

// Cyc Cog int sumOfPrimes(int max) { // +1 int total = 0; OUT: for (int i = 1; i <= max; ++i) { // +1 +1 for (int j = 2; j < i; ++j) { // +1 +2 (nesting=1) if (i % j == 0) { // +1 +3 (nesting=2) continue OUT; // +1 } } total += i; } return total; } // =4 =7 27

Slide 31

Slide 31 text

String getWords(int number) { switch (number) { case 1: return "one"; case 2: return "a couple"; case 3: return "several"; default: return "lots"; } } Просто 28

Slide 32

Slide 32 text

int sumOfPrimes(int max) { int total = 0; OUT: for (int i = 1; i <= max; ++i) { for (int j = 2; j < i; ++j) { if (i % j == 0) { continue OUT; } } total += i; } return total; } Сложно 29

Slide 33

Slide 33 text

Ужасно! 30

Slide 34

Slide 34 text

Реализации > https://github.com/Melevir/ cognitive_complexity > https://github.com/wemake- services/wemake-python-styleguide 31

Slide 35

Slide 35 text

Jones complexity 32

Slide 36

Slide 36 text

print(name_with_meaning, second_name_with_meaning, third) print(first * 5.323 * 2, trans(*matrix), show(matrix, 2)) 33

Slide 37

Slide 37 text

AST 34

Slide 38

Slide 38 text

print(name_with_meaning, second_name_with_meaning, third) 35

Slide 39

Slide 39 text

<_ast.Module> ┗━ body ┣━ [0] <_ast.Expr> ┃ ┗━ value: <_ast.Call> ┃ ┣━ args ┃ ┃ ┣━ [0] <_ast.Name> ┃ ┃ ┃ ┗━ id: first_long_name_with_meaning ┃ ┃ ┣━ [1] <_ast.Name> ┃ ┃ ┃ ┗━ id: second_very_long_name_with_meaning ┃ ┃ ┗━ [2] <_ast.Name> ┃ ┃ ┗━ id: third ┃ ┗━ func: <_ast.Name> ┃ ┗━ id: print 36

Slide 40

Slide 40 text

<_ast.Module> ┗━ body ┣━ [0] <_ast.Expr> ┃ ┗━ value: <_ast.Call> ┃ ┣━ args ┃ ┃ ┣━ [0] <_ast.Name> ┃ ┃ ┃ ┗━ id: first_long_name_with_meaning ┃ ┃ ┣━ [1] <_ast.Name> ┃ ┃ ┃ ┗━ id: second_very_long_name_with_meaning ┃ ┃ ┗━ [2] <_ast.Name> ┃ ┃ ┗━ id: third ┃ ┗━ func: <_ast.Name> ┃ ┗━ id: print 37

Slide 41

Slide 41 text

<_ast.Module> ┗━ body ┣━ [0] <_ast.Expr> ┃ ┗━ value: <_ast.Call> ┃ ┣━ args ┃ ┃ ┣━ [0] <_ast.Name> ┃ ┃ ┃ ┗━ id: first_long_name_with_meaning ┃ ┃ ┣━ [1] <_ast.Name> ┃ ┃ ┃ ┗━ id: second_very_long_name_with_meaning ┃ ┃ ┗━ [2] <_ast.Name> ┃ ┃ ┗━ id: third ┃ ┗━ func: <_ast.Name> ┃ ┗━ id: print 38

Slide 42

Slide 42 text

<_ast.Module> ┗━ body ┣━ [0] <_ast.Expr> ┃ ┗━ value: <_ast.Call> ┃ ┣━ args ┃ ┃ ┣━ [0] <_ast.Name> ┃ ┃ ┃ ┗━ id: first_long_name_with_meaning ┃ ┃ ┣━ [1] <_ast.Name> ┃ ┃ ┃ ┗━ id: second_very_long_name_with_meaning ┃ ┃ ┗━ [2] <_ast.Name> ┃ ┃ ┗━ id: third ┃ ┗━ func: <_ast.Name> ┃ ┗━ id: print 39

Slide 43

Slide 43 text

<_ast.Module> ┗━ body ┣━ [0] <_ast.Expr> ┃ ┗━ value: <_ast.Call> ┃ ┣━ args ┃ ┃ ┣━ [0] <_ast.Name> ┃ ┃ ┃ ┗━ id: first_long_name_with_meaning ┃ ┃ ┣━ [1] <_ast.Name> ┃ ┃ ┃ ┗━ id: second_very_long_name_with_meaning ┃ ┃ ┗━ [2] <_ast.Name> ┃ ┃ ┗━ id: third ┃ ┗━ func: <_ast.Name> ┃ ┗━ id: print 40

Slide 44

Slide 44 text

print(first * 5.323 * 2, trans(*matrix), show(matrix, 2)) 41

Slide 45

Slide 45 text

<_ast.Module> ┗━ body ┗━ [1] <_ast.Expr> ┗━ value: <_ast.Call> ┣━ args ┃ ┣━ [0] <_ast.BinOp> ┃ ┃ ┣━ left: <_ast.BinOp> ┃ ┃ ┃ ┣━ left: <_ast.Name> ┃ ┃ ┃ ┃ ┗━ id: first ┃ ┃ ┃ ┣━ op: <_ast.Mult> ┃ ┃ ┃ ┗━ right: <_ast.Constant> ┃ ┃ ┃ ┗━ value: 5 ┃ ┃ ┣━ op: <_ast.Add> ┃ ┃ ┗━ right: <_ast.BinOp> ┃ ┃ ┣━ left: <_ast.Attribute> ┃ ┃ ┃ ┣━ attr: pi ┃ ┃ ┃ ┗━ value: <_ast.Name> ┃ ┃ ┃ ┗━ id: math ┃ ┃ ┣━ op: <_ast.Mult> ┃ ┃ ┗━ right: <_ast.Constant> ┃ ┃ ┗━ value: 2 ┃ ┣━ [1] <_ast.Call> ┃ ┃ ┣━ args ┃ ┃ ┃ ┗━ [0] <_ast.Starred> ┃ ┃ ┃ ┗━ value: <_ast.Name> ┃ ┃ ┃ ┗━ id: matrix ┃ ┃ ┗━ func: <_ast.Attribute> ┃ ┃ ┗━ value: <_ast.Name> ┃ ┃ ┗━ id: matrix ┃ ┗━ [2] <_ast.Call> ┃ ┣━ args ┃ ┃ ┣━ [0] <_ast.Name> ┃ ┃ ┃ ┗━ id: matrix ┃ ┃ ┗━ [1] <_ast.Constant> ┃ ┃ ┗━ value: 2 ┃ ┗━ func: <_ast.Attribute> ┃ ┣━ attr: show ┃ ┗━ value: <_ast.Name> ┃ ┗━ id: display ┗━ func: <_ast.Name> ┗━ id: print 42

Slide 46

Slide 46 text

Реализации > https://github.com/Miserlou/ JonesComplexity > https://github.com/wemake- services/wemake-python-styleguide 43

Slide 47

Slide 47 text

Длина строки – метрика сложности, 80 лучше всего 44

Slide 48

Slide 48 text

Мы разобрались со строчками! 45

Slide 49

Slide 49 text

>_ X Синтаксическая сложность 46

Slide 50

Slide 50 text

Метрики сложности структур языка 47

Slide 51

Slide 51 text

Структуры > OverusedExpressionViolation > OverusedStringViolation > TooLongYieldTupleViolation > TooLongCompareViolation > TooLongTryBodyViolation > TooDeepAccessViolation > TooLongCallChainViolation > TooDeepNestingViolation > TooManyConditionsViolation > TooManyElifsViolation > TooManyForsInComprehensionViolation > TooManyExceptCasesViolation 48

Slide 52

Slide 52 text

Функции > TooManyLocalsViolation > TooManyArgumentsViolation > TooManyReturnsViolation > TooManyExpressionsViolation > TooManyDecoratorsViolation > TooManyAwaitsViolation > TooManyAssertsViolation 49

Slide 53

Slide 53 text

Классы > TooManyMethodsViolation > TooManyBaseClassesViolation > TooManyDecoratorsViolation > TooManyPublicAttributesViolation 50

Slide 54

Slide 54 text

Модули > TooManyImportsViolation > TooManyImportedNamesViolation > TooManyModuleMembersViolation > JonesScoreViolation > CognitiveModuleComplexityViolation 51

Slide 55

Slide 55 text

Модули > TooManyImportsViolation > TooManyImportedNamesViolation 52

Slide 56

Slide 56 text

53

Slide 57

Slide 57 text

sobolevn.me/2019/10/complexity-waterfall 54

Slide 58

Slide 58 text

Процесс: 55

Slide 59

Slide 59 text

Процесс: > Пишем простые блоки кода 55

Slide 60

Slide 60 text

Процесс: > Пишем простые блоки кода > В какой-то момент сложность переполняется 55

Slide 61

Slide 61 text

Процесс: > Пишем простые блоки кода > В какой-то момент сложность переполняется > Рефакторим 55

Slide 62

Slide 62 text

Реализации > https://github.com/wemake- services/wemake-python-styleguide 56

Slide 63

Slide 63 text

Sobolev's complexity or debug complexity * Original idea by Tin Marković 57

Slide 64

Slide 64 text

Сложность, ломающая возможность навигации 58

Slide 65

Slide 65 text

getattr(your_object, your_property) some.__dict__[key] type('Name', (cls,), properties) raise ValueError() yield async / await globals()[some_var] *args, **kwargs metaclass= 59

Slide 66

Slide 66 text

Реализации > https://github.com/wemake- services/wemake-python-styleguide (WIP 0.15) 60

Slide 67

Slide 67 text

Не все можно измерить. Однако 61

Slide 68

Slide 68 text

>_ X Концептуальная сложность 62

Slide 69

Slide 69 text

Что такое монада? 63

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

-- the type of monad m data m a = ... -- return takes a value and embeds it in the monad. return :: a -> m a -- bind is a function that combines m a with a computation -- monad instance m b (>>=) :: m a -> (a -> m b) -> m b

Slide 73

Slide 73 text

def fetch_user_profile(user_id: int) -> IOResultE['User']: return flow( user_id, _make_request, IOResult.lift_result(bind(_parse_json)), ) @impure_safe def _make_request(user_id: int) -> requests.Response: response = requests.get('/users/{0}'.format(user_id)) response.raise_for_status() return response @safe def _parse_json(response: requests.Response) -> 'User': return response.json() 67

Slide 74

Slide 74 text

А как насчет типизированного функционального внедрения зависимостей? sobolevn.me/2020/02/typed-functional-dependency-injection 68

Slide 75

Slide 75 text

А как насчет функциональных объектов? sobolevn.me/2019/03/enforcing-srp 69

Slide 76

Slide 76 text

"Любую архитектурную проблему можно решить добавлением еще одного слоя абстракции" – Неизвестный автор 70

Slide 77

Slide 77 text

"Кроме проблемы количества слоев абстракции" – Тот же автор 71

Slide 78

Slide 78 text

Что делать? 72

Slide 79

Slide 79 text

Что делать? > Учить людей! 72

Slide 80

Slide 80 text

Что делать? > Учить людей! > Страдать 72

Slide 81

Slide 81 text

>_ X Доменная сложность 73

Slide 82

Slide 82 text

Насколько сложна ваша предметная область? 74

Slide 83

Slide 83 text

Насколько сложна ваша предметная область? > Порог входа 74

Slide 84

Slide 84 text

Насколько сложна ваша предметная область? > Порог входа > Термины и их количество 74

Slide 85

Slide 85 text

Насколько сложна ваша предметная область? > Порог входа > Термины и их количество > Процессы 74

Slide 86

Slide 86 text

Насколько сложна ваша предметная область? > Порог входа > Термины и их количество > Процессы > Правила 74

Slide 87

Slide 87 text

Насколько сложна ваша предметная область? > Порог входа > Термины и их количество > Процессы > Правила > Варианты использования 74

Slide 88

Slide 88 text

Создание общего языка и терминов 75

Slide 89

Slide 89 text

76

Slide 90

Slide 90 text

Визуализация процессов 77

Slide 91

Slide 91 text

78

Slide 92

Slide 92 text

79

Slide 93

Slide 93 text

80

Slide 94

Slide 94 text

Создание правил 81

Slide 95

Slide 95 text

Type Driven Development 82

Slide 96

Slide 96 text

sum : (single : Bool) -> isSingleton single -> Nat sum True x = x sum False [] = 0 sum False (x :: xs) = x + sum False xs 83

Slide 97

Slide 97 text

84

Slide 98

Slide 98 text

НО В ПИТОНЕ НЕТ ТИПОВ 85

Slide 99

Slide 99 text

int + int = int 86

Slide 100

Slide 100 text

В ПИТОНЕ ЕСТЬ ТИПЫ 87

Slide 101

Slide 101 text

Callable[[List[int]], List[str]] 88

Slide 102

Slide 102 text

Callable[[List[int]], List[str]] • Выбросит ли она исключение? 88

Slide 103

Slide 103 text

Callable[[List[int]], List[str]] • Выбросит ли она исключение? • Является ли она чистой? 88

Slide 104

Slide 104 text

Callable[[List[int]], List[str]] • Выбросит ли она исключение? • Является ли она чистой? • Будет ли добиться в базу или http? 88

Slide 105

Slide 105 text

Callable[[List[int]], List[str]] 89

Slide 106

Slide 106 text

Callable[[List[int]], List[str]] • Выбросит ли она исключение? Да? Result[List[int], Exception] 89

Slide 107

Slide 107 text

Callable[[List[int]], List[str]] • Выбросит ли она исключение? Да? Result[List[int], Exception] • Является ли она нечистой? Да? IO[List[int]] 89

Slide 108

Slide 108 text

Callable[[List[int]], List[str]] • Выбросит ли она исключение? Да? Result[List[int], Exception] • Является ли она нечистой? Да? IO[List[int]] • Все вместе? Конечно! IO[Result[List[int], Exception]] 89

Slide 109

Slide 109 text

def fetch_user_profile(user_id: int) -> IOResultE['User']: return flow( user_id, _make_request, IOResult.lift_result(bind(_parse_json)), ) @impure_safe def _make_request(user_id: int) -> requests.Response: response = requests.get('/users/{0}'.format(user_id)) response.raise_for_status() return response @safe def _parse_json(response: requests.Response) -> 'User': return response.json() 90

Slide 110

Slide 110 text

def fetch_user_profile(user_id: int) -> IOResultE['User']: def _make_request( user_id: int, ) -> IOResultE[requests.Response]: response = requests.get('/users/{0}'.format(user_id)) response.raise_for_status() return response def _parse_json( response: requests.Response, ) -> ResultE['User']: return response.json() 91

Slide 111

Slide 111 text

def fetch_user_profile(user_id: int) -> IOResultE['User']: return flow( user_id, _make_request, IOResult.lift_result(bind(_parse_json)), ) @impure_safe def _make_request(user_id: int) -> requests.Response: response = requests.get('/users/{0}'.format(user_id)) response.raise_for_status() return response @safe def _parse_json(response: requests.Response) -> 'User': return response.json() 92

Slide 112

Slide 112 text

def fetch_user_profile(user_id: int) -> IOResultE['User']: return flow( user_id, _make_request, IOResult.lift_result(bind(_parse_json)), ) @impure_safe def _make_request(user_id: int) -> requests.Response: response = requests.get('/users/{0}'.format(user_id)) response.raise_for_status() return response @safe def _parse_json(response: requests.Response) -> 'User': return response.json() 93

Slide 113

Slide 113 text

dry-python/returns Делаем неявное – явным 94

Slide 114

Slide 114 text

Contract Driven Development 95

Slide 115

Slide 115 text

values := << 1, 2, 4, 8 >> -- Sum of (index * values [index]). across values as i from sum := 0 loop sum := sum + i.cursor_index * i.item end 96

Slide 116

Slide 116 text

eiffel.org 97

Slide 117

Slide 117 text

@deal.pre(lambda *args: all(arg > 0 for arg in args)) @deal.post(lambda result: result > 5) def sum_positive(*args): return sum(args) sum_positive(1, 2, 3, 4) # 10 sum_positive(1, 2, -3, 4) # PreContractError: sum_positive(1, 2) # PostContractError: 98

Slide 118

Slide 118 text

@deal.inv(lambda post: post.likes >= 0) class Post: likes = 0 post = Post() post.likes = 10 post.likes = -10 # InvContractError: 99

Slide 119

Slide 119 text

import deal deal.module_load(deal.silent) print(1) # contract violation! 100

Slide 120

Slide 120 text

https://github.com/ life4/deal 101

Slide 121

Slide 121 text

Layer Driven Development

Slide 122

Slide 122 text

Слои 103

Slide 123

Slide 123 text

Слои 104

Slide 124

Slide 124 text

[importlinter] root_package = django_project include_external_packages = True [importlinter:contract:layers] name = Layered architecture of our linter type = layers containers = django_project layers = urls views forms models logic 105

Slide 125

Slide 125 text

[importlinter] root_package = django_project include_external_packages = True [importlinter:contract:layers] name = Layered architecture of our linter type = layers containers = django_project layers = urls views forms models logic 106

Slide 126

Slide 126 text

[importlinter] root_package = django_project include_external_packages = True [importlinter:contract:layers] name = Layered architecture of our linter type = layers containers = django_project layers = urls views forms models logic 107

Slide 127

Slide 127 text

[importlinter] root_package = django_project include_external_packages = True [importlinter:contract:layers] name = Layered architecture of our linter type = layers containers = django_project layers = urls views forms models logic 108

Slide 128

Slide 128 text

[importlinter] root_package = django_project include_external_packages = True [importlinter:contract:layers] name = Layered architecture of our linter type = layers containers = django_project layers = urls views forms models logic 109

Slide 129

Slide 129 text

Независимость 110

Slide 130

Slide 130 text

[importlinter:contract:violation-independence] name = Independence contract for violations type = independence modules = django_project.billing_app django_project.auth_app django_project.orders_app django_project.statistics_app 111

Slide 131

Slide 131 text

[importlinter:contract:violation-independence] name = Independence contract for violations type = independence modules = django_project.billing_app django_project.auth_app django_project.orders_app django_project.statistics_app 112

Slide 132

Slide 132 text

[importlinter:contract:violation-independence] name = Independence contract for violations type = independence modules = django_project.billing_app django_project.auth_app django_project.orders_app django_project.statistics_app 113

Slide 133

Slide 133 text

Непротекающие абстракции 114

Slide 134

Slide 134 text

[importlinter:contract:api-restrictions] name = Forbids to import anything from dependencies type = forbidden source_modules = django_project.logic forbidden_modules = # Important direct and indirect dependencies: django rest_framework 115

Slide 135

Slide 135 text

[importlinter:contract:api-restrictions] name = Forbids to import anything from dependencies type = forbidden source_modules = django_project.logic forbidden_modules = # Important direct and indirect dependencies: django rest_framework 116

Slide 136

Slide 136 text

[importlinter:contract:api-restrictions] name = Forbids to import anything from dependencies type = forbidden source_modules = django_project.logic forbidden_modules = # Important direct and indirect dependencies: django rest_framework 117

Slide 137

Slide 137 text

[importlinter:contract:api-restrictions] name = Forbids to import anything from dependencies type = forbidden source_modules = django_project.logic forbidden_modules = # Important direct and indirect dependencies: django rest_framework 118

Slide 138

Slide 138 text

Можно писать свои контракты

Slide 139

Slide 139 text

Описание вариантов использование и тестирование их корректности 120

Slide 140

Slide 140 text

sobolevn.me/2019/02/engineering-guide- to-user-stories 121

Slide 141

Slide 141 text

pypi.org/project/pytest-bdd 122

Slide 142

Slide 142 text

Документация 123

Slide 143

Slide 143 text

Что делать то? > Использовать DDD > Строить чистую архитектуру > Следить за качеством абстракций > Документировать и создавать обучающие материалы 124

Slide 144

Slide 144 text

>_ X Сложность интерпретации 125

Slide 145

Slide 145 text

Flamegraph показывает, насколько сложно вашему интерпретатору 126

Slide 146

Slide 146 text

127

Slide 147

Slide 147 text

128

Slide 148

Slide 148 text

Реализации > https://docs.python.org/3/library/ profile.html > https://github.com/benfred/py-spy 129

Slide 149

Slide 149 text

>_ X Инфраструктурная сложность 130

Slide 150

Slide 150 text

Что есть наша инфраструктура? 131

Slide 151

Slide 151 text

Что есть наша инфраструктура? > Количество зависимостей 131

Slide 152

Slide 152 text

Что есть наша инфраструктура? > Количество зависимостей > Количество интеграций 131

Slide 153

Slide 153 text

Что есть наша инфраструктура? > Количество зависимостей > Количество интеграций > Количество микросервисов 131

Slide 154

Slide 154 text

Что есть наша инфраструктура? > Количество зависимостей > Количество интеграций > Количество микросервисов > Тип инфраструктуры 131

Slide 155

Slide 155 text

132

Slide 156

Slide 156 text

133

Slide 157

Slide 157 text

No content

Slide 158

Slide 158 text

No content

Slide 159

Slide 159 text

135

Slide 160

Slide 160 text

>_ X Выводы 136

Slide 161

Slide 161 text

Сегодня мы многое поняли

Slide 162

Slide 162 text

Сложность окружает нас везде! 138

Slide 163

Slide 163 text

Человек не может следить за метриками сложности – они скрыты! 139

Slide 164

Slide 164 text

Автоматизируйте! 140

Slide 165

Slide 165 text

И позвольте человеку следить за корректностью работы автоматики! 141

Slide 166

Slide 166 text

Победите сложность! 142

Slide 167

Slide 167 text

Полезные ссылки 143

Slide 168

Slide 168 text

Полезные ссылки > sobolevn.me/2019/10/complexity- waterfall 143

Slide 169

Slide 169 text

Полезные ссылки > sobolevn.me/2019/10/complexity- waterfall > github.com/wemake-services/wemake- python-styleguide 143

Slide 170

Slide 170 text

Полезные ссылки > sobolevn.me/2019/10/complexity- waterfall > github.com/wemake-services/wemake- python-styleguide > wemake-python-stylegui.de/en/latest/ pages/usage/violations/complexity.html 143

Slide 171

Slide 171 text

Полезные ссылки > sobolevn.me/2019/10/complexity- waterfall > github.com/wemake-services/wemake- python-styleguide > wemake-python-stylegui.de/en/latest/ pages/usage/violations/complexity.html > sobolevn.me/2019/02/python-exceptions- considered-an-antipattern 143

Slide 172

Slide 172 text

Полезные ссылки > sobolevn.me/2019/10/complexity- waterfall > github.com/wemake-services/wemake- python-styleguide > wemake-python-stylegui.de/en/latest/ pages/usage/violations/complexity.html > sobolevn.me/2019/02/python-exceptions- considered-an-antipattern > github.com/dry-python/returns 143

Slide 173

Slide 173 text

sobolevn.me Вопросы? github.com/sobolevn 144