Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Cohesion and Coupling: Write BETTER PYTHON CODE Part 1

Автор: ArjanCodes

Загружено: 2021-01-22

Просмотров: 227328

Описание:

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide.

Writing code, especially in larger software projects can be very challenging. In this video, I'm going to cover cohesion and coupling to help you write better code. I'll go through a Python program in detail and I'll show you how to write code that has low coupling and strong cohesion. Coupling and Cohesion are part of the GRASP principles of object-oriented design, as proposed by Craig Larman in his book (see below for a link).

Here are a few books about software design that might interest you:
Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, by Craig Larman: https://amzn.to/364wgLb
Design Patterns: Elements of Reusable Object-Oriented Software, by the Gang of Four: https://amzn.to/39451Cv

🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/


You can find the code I worked on in this episode in my GitHub repository: https://github.com/arjancodes/betterp...

All parts in this series:
Part 1: Cohesion and coupling -    • Cohesion and Coupling: Write BETTER PYTHON...  
Part 2: Dependency inversion -    • Dependency Inversion: Write BETTER PYTHON ...  
Part 3: The strategy pattern -    • The Strategy Pattern: Write BETTER PYTHON ...  
Part 4: The observer pattern -    • Observer Pattern Tutorial: I NEVER Knew Ev...  
Part 5: Unit testing and code coverage -    • 100% CODE COVERAGE - Think You're Done? Th...  
Part 6: Template method and bridge -    • Two UNDERRATED Design Patterns 💡 Write BET...  
Part 7: Exception handling -    • Exception Handling Tips in Python ⚠ Write ...  
Part 7b: Monadic error handling -    • Monadic Error Handling in Python ⚠ Write B...  
Part 8: Software architecture -    • Why You Should Think About SOFTWARE ARCHIT...  
Part 9: SOLID principles -    • Uncle Bob’s SOLID Principles Made Easy 🍀 -...  
Part 10: Object creation patterns -    • QUESTIONABLE Object Creation Patterns in P...  

Chapters:
0:00 Introduction
0:47 What is cohesion?
1:37 What is coupling?
3:59 Code example intro
6:39 Analyzing the code
7:56 Information expert
11:19 Reducing coupling
16:32 Improving cohesion
22:40 Recap
25:37 Outro

If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

Cohesion and Coupling: Write BETTER PYTHON CODE Part 1

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Dependency Inversion: Write BETTER PYTHON CODE Part 2

Dependency Inversion: Write BETTER PYTHON CODE Part 2

7 Things You Didn’t Know Dataclasses Could Do

7 Things You Didn’t Know Dataclasses Could Do

Solid Programming - No Thanks

Solid Programming - No Thanks

Почему ваш код не соответствует Python (и как это исправить)

Почему ваш код не соответствует Python (и как это исправить)

Графический API не имеет значения

Графический API не имеет значения

7 Python Code Smells to AVOID at All Costs

7 Python Code Smells to AVOID at All Costs

Протоколы и ABC в Python — когда какой использовать?

Протоколы и ABC в Python — когда какой использовать?

Coupling and Cohesion Explained

Coupling and Cohesion Explained

Я ненавижу длинные цепочки If-Elif: этот шаблон проектирования решил эту проблему раз и навсегда

Я ненавижу длинные цепочки If-Elif: этот шаблон проектирования решил эту проблему раз и навсегда

Декораторы Python — наглядное объяснение

Декораторы Python — наглядное объяснение

Avoid These BAD Practices in Python OOP

Avoid These BAD Practices in Python OOP

Кто пишет код лучше всех? Сравнил GPT‑5.2, Opus 4.5, Sonnet 4.5, Gemini 3, Qwen 3 Max, Kimi, GLM

Кто пишет код лучше всех? Сравнил GPT‑5.2, Opus 4.5, Sonnet 4.5, Gemini 3, Qwen 3 Max, Kimi, GLM

The Right Way to Use AI for Writing Maintainable Code

The Right Way to Use AI for Writing Maintainable Code

The Strategy Pattern: Write BETTER PYTHON CODE Part 3

The Strategy Pattern: Write BETTER PYTHON CODE Part 3

Румынская математическая олимпиада

Румынская математическая олимпиада

Why You Should Think Twice Before Using Returns in Python

Why You Should Think Twice Before Using Returns in Python

Пожалуй, главное заблуждение об электричестве [Veritasium]

Пожалуй, главное заблуждение об электричестве [Veritasium]

The Windows 11 Disaster That's Killing Microsoft

The Windows 11 Disaster That's Killing Microsoft

Я удалил ';' из C

Я удалил ';' из C

Хватит всё жестко кодировать: используйте внедрение зависимостей

Хватит всё жестко кодировать: используйте внедрение зависимостей

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com