« Intelligent Design and Conway's Life | Main | The next few months.. »

June 30, 2009


Michael Hunger

I agree with you but like to add something about setting structures. The structures you set by factoring out code in a certain way reflect your current knowlegde about the problem and solution domain as well as your engineering skills.

So if you set this into "stone" the question is how valid your mental model is at a later time and how hard it is for someone else to follow your thoughts and your flow through the channel and to understand WHY you did the structuring that way.

Enabling change here (even being able to create a totally different flow) is challenging at least. Many people really refrain from inlining code to extract it again (you can even inline classes with a single refactoring).

So by factoring out you kind of take the stance of knowing better or best how to structure the solution. But that may not be the case.

So make it easy for someone else to follow your thoughts and try to include the why's into the code (naming, comments) and don't discourage them
to undo your canalizing.

How this relates to the OCP is also an interesting discussion.

Mark Rogers

Hey, in your book "Working Effectively with legacy code" (sweet book btw), the table at the bottom of page 6, is reprinted at the top of page 7, with no differences in them. Seems like a typo.


The comments to this entry are closed.