轉錄 [C++] how to think about OO

It is quite good article, it shows how to think about when you write OO code. And it may influence when you refactor your code.

http://googletesting.blogspot.com/2009/07/how-to-think-about-oo.html

Good sentence:
everyone always writes code that one day they will reuse it, but that day never comes, and when it does, usually the code is entangled in other ways anyway, so code reuse after the fact just does not happen. (developing a library is different since code reuse is an explicit goal.) My point is that a lot of people pay the price of “what if” but never get any benefit out of it.

Never think tooooo much which can lead to over design, I think we should refactor the code regularly!

Advertisements