课程: Python: Design Patterns (2021)

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Consistency with design patterns

Consistency with design patterns

- [Instructor] In addition to using design patterns there are also universal principles you should apply whenever you develop software applications. Consistency is one of the hallmarks of sound software engineering. One of the reasons we recommend using design patterns is to promote the consistency of the code. If an identical solution is used repeatedly to solve the same problem, developers need to modify only one piece of code when there is a need to change the code. Otherwise, you end up spending much more time developing different strategies for different solutions implemented throughout the code to accommodate a change requirement. The benefit of promoting consistency also includes reducing the risk of making mistakes, since the same piece of code is used over and over again. Another benefit is increasing the possibility of detecting errors. Since more sets of eyes looking at the same code may spot the mistakes more…

内容