- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Stop writing classes that break everything (Python SRP explained)
Most Python classes start simple. Then they grow — business logic, file writes, email sends, all in one place. Change one thing and you risk breaking everything else.
That's a Single Responsibility Principle violation. And there's a one-word test to find it.
In this video you'll learn:
- What SRP actually means (it's about stakeholders, not method count)
- A one-sentence test to spot violations in any codebase
- How to refactor a real-world OrderProcessor into clean, isolated classes
- Why SRP makes your code dramatically easier to test
The "and" test: complete this sentence about your class — "This class is responsible for ___". If you need the word "and", you've found the problem.
---
Part of an ongoing series on writing clean, maintainable Python.
GitHub Gist: https://gist.github.com/PragmaticProgrammer-YT/a3481f4e827870bcad2851d4e40eb12d
#Python #SoftwareEngineering #CleanCode #SOLID #PythonTips
Видео Stop writing classes that break everything (Python SRP explained) канала Pragmatic Programmer
That's a Single Responsibility Principle violation. And there's a one-word test to find it.
In this video you'll learn:
- What SRP actually means (it's about stakeholders, not method count)
- A one-sentence test to spot violations in any codebase
- How to refactor a real-world OrderProcessor into clean, isolated classes
- Why SRP makes your code dramatically easier to test
The "and" test: complete this sentence about your class — "This class is responsible for ___". If you need the word "and", you've found the problem.
---
Part of an ongoing series on writing clean, maintainable Python.
GitHub Gist: https://gist.github.com/PragmaticProgrammer-YT/a3481f4e827870bcad2851d4e40eb12d
#Python #SoftwareEngineering #CleanCode #SOLID #PythonTips
Видео Stop writing classes that break everything (Python SRP explained) канала Pragmatic Programmer
Комментарии отсутствуют
Информация о видео
Вчера, 23:10:03
00:02:28
Другие видео канала
