Tuesday, January 03, 2006

Let the Code DRY - later on..

I finished writing the first draft of the SnapshotEngine code that I wrote about in the previous post. I produced it by copying and modifying snippets of code from the FactEngine, rather than subclassing it.

The result is much much clearer code.

True, there is some duplication, but I am now in a better position to decide what can be abstracted. I have detected a few common methods and I might put them into a common superclass or into a mixin utility module. I might even decide to not abstract it. The two classes could still develop in quite different ways and I may not want to tie them together yet.


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?