comp1531-软件工程(一)代码设计原则
作者:互联网
文章目录
1 DRY
"Don't repeat yourself" (DRY)
is about reducing repetition in
code. The same code/configuration should ideally not be
written in multiple places.
2 KISS
“Keep it Simple, Stupid” (KISS) principles state that a software
system works best when things are kept simple. It is the believe that
complexity and errors are correlated.
3 Minimal Coupling
Coupling is the degree of interdependence between
software components.
4 Top-down thinking
Similar to “You aren’t gonna need it” (YAGNI)
that says a programmer should not add
functionality until it is needed.
Top-down thinking says that when building
capabilities, we should work from high levels of
abstraction down to lower levels of abstraction.
Why do we care?
Removes unnecessary code, less to maintain,
less likely to cause problems
标签:DRY,code,thinking,代码,should,down,软件工程,comp1531,Top 来源: https://blog.csdn.net/weixin_42089190/article/details/120788867