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: amzn.to/364wgLb
- Design Patterns: Elements of Reusable Object-Oriented Software, by the Gang of Four: amzn.to/39451Cv
💡Here's my FREE 7-step guide to help you consistently design great software: arjancodes.com/designguide.
🎓 Courses:
The Software Designer Mindset: www.arjancodes.com/mindset
The Software Designer Mindset Team Packages: www.arjancodes.com/sas
The Software Architect Mindset: Pre-register now! www.arjancodes.com/architect
Next Level Python: Become a Python Expert: www.arjancodes.com/next-level-python
The 30-Day Design Challenge: www.arjancodes.com/30ddc
🛒 GEAR & RECOMMENDED BOOKS: kit.co/arjancodes.
You can find the code I worked on in this episode in my GitHub repository: github.com/arjancodes/betterpython
All parts in this series:
Part 1: Cohesion and coupling - kzitem.info/news/bejne/xp9633-VqJiBg4I
Part 2: Dependency inversion - kzitem.info/news/bejne/rKxr0JyYjJ2if3o
Part 3: The strategy pattern - kzitem.info/news/bejne/uIduyIKasYR2e4o
Part 4: The observer pattern - kzitem.info/news/bejne/0ISX0oydb2mJeHo
Part 5: Unit testing and code coverage - kzitem.info/news/bejne/y6OGmZqmmHSZoHo
Part 6: Template method and bridge - kzitem.info/news/bejne/1WajqaaOgaV9lX4
Part 7: Exception handling - kzitem.info/news/bejne/u6mszKihm5SjhWU
Part 7b: Monadic error handling - kzitem.info/news/bejne/q2N-vaGljX2Zdm0
Part 8: Software architecture - kzitem.info/news/bejne/yp6qr5d9pIZ3dYo
Part 9: SOLID principles - kzitem.info/news/bejne/0Yp4mWSXkYVoaoo
Part 10: Object creation patterns - kzitem.info/news/bejne/s6NqsIRtg5ikfo4
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!
DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
Негізгі бет Cohesion and Coupling: Write BETTER PYTHON CODE Part 1
Пікірлер: 388