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

上一篇:Linux 第一课


下一篇:【CF 603A Alternative Thinking】解题报告(动态规划)