Тёмный

AVOID Building Fragile Software by ... 

About Clean Code
Подписаться 4,2 тыс.
Просмотров 1,5 тыс.
50% 1

What is the one SOLID principle which, if violated, causes fragile software?
0:00 Intro
0:25 Definition
0:59 Definition Explained
2:08 The Essence
3:00 Extending the Scope
3:33 Contract Specification
4:02 Violations
6:28 Fixing Violations
7:10 Preventing Violations
8:46 Conclusion
"Data Abstraction and Hierarchy", Barbara Liskov
www.cs.tufts.edu/~nr/cs257/ar...
Design-By-Contract:
• Assumptions AREN'T tha...
• New .NET 6 Feature You...
Interface Segregation Principle:
• What others DON'T TELL...
Spoiler alert: The Liskov Substitution Principle

Опубликовано:

 

30 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@fabricehategekimana5350
@fabricehategekimana5350 7 месяцев назад
This is an incredible video ! I have know a practical understanding of the liskov substitution thanks to you ! TBH I am amazed by the development of type systems that brought algebraic data types and funcitonal design pattern like monads. With that, the code is fully syntactically documented and don't need manual check for liskov substitution since it's automatically detected by the compiler. I also agree that properties must be specified by types (since types are proof of the existence of certain attributes in type theory). And finally yes, I prefer abstract class rather than interfaces. I generally use traits in rust that combine a bit of both
@GnomeEU
@GnomeEU 7 месяцев назад
Abstract base classes allow me to read code. Do you love stepping into empty virtual interfaces when stepping through code or debugging? Then use interfaces as much as possible. I think your rules here are great. Although I would just generalize it and say keep to the same coding style. Don't sometimes return null, Exception and empty list. Be consistent as much as possible.
@thirdbeat
@thirdbeat 7 месяцев назад
wouldnt the last example @1:58 just be an example of bad practice? you define that you are going to return string, but null is not even a string type.does the static code checker really allow this?
@AboutCleanCode
@AboutCleanCode 7 месяцев назад
@thirdbeat probably "bad practice" but probably still the most common way to express the absence of a real value in many languages (this is C# but in Java it's the same) and even most "type checkers" (compilers) allow this - null object pattern or an option type as in F# should certainly be preferred
@renegade091m
@renegade091m 7 месяцев назад
I mostly use CPP where I find it very hard to use interfaces/abstract classes, because it is more work. I defined some templates which help me a bit, but it is still so much faster e.g. in java to add interfaces and abstract classes. Sometimes I use interfaces as well as abstract classes. First I create the interface, and then the abstract class. E.g. in a MVP or MVC design pattern.
@AboutCleanCode
@AboutCleanCode 7 месяцев назад
@renegade091m interesting - thx for sharing!
Далее
Едим ЕДУ на ЗАПРАВКАХ 24 Часа !
28:51
He turned a baseball into a stylish shoe😱
00:59
Просмотров 1,1 млн
THIS Is How You Should Handle Recoverable Errors!
3:49
Exploring Hexagonal Architecture with Typescript
22:40
Просмотров 4,8 тыс.
The Flaws of Inheritance
10:01
Просмотров 904 тыс.
Spring Tips: Virtual Threads
50:31
Просмотров 10 тыс.
7 Code Smells You Should Fix IMMEDIATELY!
3:14
Просмотров 2,1 тыс.
Едим ЕДУ на ЗАПРАВКАХ 24 Часа !
28:51