LiBenkuo / blog

用Issues写Blog
1 stars 0 forks source link

Art of Programming #12

Open LiBenkuo opened 7 years ago

LiBenkuo commented 7 years ago

Abstraction

DRY

Don't Repeat Yourself

Once and Only Once

The Pragmatic Programmer 首提

YAGNI

You aren't gonna need it

Extreme Programming

do the simplest thing that could possibly work

DRY VS YAGNI

两者并非完全兼容。

所以就有了第三个原则。

Rule of three

Refactoring

当某个功能第三次出现时,才进行抽象化。