Skip to main content

Abstraction to a Point

Architecting and implementing software is a constant balancing act.  First the design has to work in the end but the underlying implementation can vary greatly, event during development.

Re-use existing classes that almost fit, or create a new or derived hierarchy for just what is needed.  Abstract out the needs in base and helper / utility classes, but not too complex to not allow modification for the ever changing requirements.  Is the abstraction clear to others that will be maintaing the code, months or years later?  Should the abstraction only existing for the main feature / operational aspects of the application or should they extend to the smaller aspects of the operations as well.

It's a constant battle of decisions during implementation.

The abstraction point is not isolated to development as the cost associated with these decisions can increase the code and timeline of the implementation and even place a project at risk.

During sprints for adding new features there is a temptation to refactor classes to make better use of abstraction, re-use of code and testing,  But this comes with a cost.  Too much refactoring can lead to instability of code (yeah I know the tests should catch errors, theory -vs- practice), lengthening deadlines and slowing of finishing the project as the more features are completed.  There is a balancing act to the refactor / abstraction dance.

Over the years, I've found my balance point of when to abstract and when not to.  My goal is to have a fare amount of abstraction but not to where the different logic hits the metal (like UI behavior) to occur.  Basically it's not to do abstraction when it feels forced or where complexity starts to build because of the abstraction.  The larger the abstraction granularity (base classes, MVC, command patter, etc) the lower the complexity.  The finer the abstraction the risk of increasing the complexity and the risk of harder to maintain, refactor, etc.  You can sometimes see this when there are abstractions upon abstractions, that's a red flag of complexity.

It's a tough balancing act to follow.  

Comments

Popular posts from this blog

A Process

Once in a while I take photos of a work in progress.  This is for me as well as others as the work moves from stage to stage.  And it is done in stages with defined processes for each step.  On this walkway overpass up in Spruce Pine, I've done both an ink / marker and an Ink / Wash on the same piece. This is the finished watercolor of the work.  To start the process I did an ink drawing of it and then took a tracing from that.  It's the tracing where I did another ink drawing but this time on watercolor paper. Tracings of a work is done with standard tracing paper.  I get mine from CheapJoes.com and use the 8x10 size as that covers most of my needs.  The tracing is done with a 0.3 ink pen (Winsor & Newton Fineliner).  Once I have the tracing I can then use it for other paper or to do another work of the same subject. The tracing is just a start as I still need to get it transferred onto other paper.  For that you need a very bright light...

Still Life

 Life is never still, at least I don't think you would want it to be.  That's why so many of us (i.e., retired care free people) travel.  Keep seeing new things and places.   Well the Hurricane so far inland was a new thing and one I would have rather forgone but life is what happens.  Life keeps moving. Except a still life is forever and captures a slice of time frozen in a painting.  This is from a wooden bowl of pears onboard our ship during dinner one nice.  Again, just thought it looked nice. Enjoy.

3rd Try is a Charm

I've been trying to draw / paint these barns for a couple of years but never felt or got them right.  This time I think they turned out right. So What went wrong before and what's right now with this drawing?  This time, the light was right.  It's coming from the upper right and the shadows just looked right.  The other thing is the corn field on the left had to "be in season", otherwise it's just a plowed field.  I had taken other photos from different angles but they never felt right.  This angle has the road, power lines, corn field, etc. all leading to the right.  The shadows on the lower right helps fill in that corner (don't forget about the corners!).  The last part is trying to draw (ink paint maybe) the trees in the background.  Not so easy when they are kind of a blob is green shades. So yeah, it's composition that is king.  Many times I just don't see it until the drawing / painting is finished and when it's right it feels goo...