Friday, September 2, 2011

The compliment.

Today had me whipped before I even walked out the door.  The girls are sleeping better and we ate at home mot of the week.  Those are usually my two number one exhausters, but I still hit the wall today.  It was a big day for me.  A huge milestone for the product that I work on and a not insignificant milestone for my project.  Both milestones met successfully even if they both consisted of a frantic push right to the end.

Somewhere during all of it, we got to discussing previous designs gone wrong.  We all have them.  You can't be an innovative software designer if you don't push the envelope or yourself a little too far once in a while.  One of my designs I was most proud of has never been implemented.  I tried for two weeks before schedule pressure arrived and I had to abandon my approach for a more ... sedate one.

For this design, you get a bunch of data in.  It is all compressed and you don't know what you've got until you start reading through it.  The data always begins the same but takes on different formats and contains different information based on what was in the common fields.  The idea was to instantiate a generic class which would add attributes and methods to itself dynamically corresponding to the data it parsed.  When the parsing was complete, the original instance of the class would have been customized to manipulate all the fields of the data without extraneous attributes or methods and also without knowing anything about the original data.

If you followed that, I can tell you that my language of attack is python and you can do what I wanted to want in python (dynamically adding attributes and methods to a class instance).  I just couldn't make it work in the time that I had.  My initial design was not so well articulated and I tried to tackle it by dynamically changing my inheritance structure.  That is as yucky as it sounds and it blatantly didn't work.  I tried other even wackier things during my two weeks, but was inventually encouraged to pursue a different design.  At the time, I was unable to get buy in for my approach and my moved on.

In talking about this today, another developer called my initial design elegant.  I was almost speechless.  To me having something I design be referred to as elegant brings tears of joy to my eyes.  I strive to write clean, intuitive, and yes elegant, solutions.  In my corporate environment I've settled for writing things that I can make work before we run out of budget.  I look back as some of my projects with embarrassment when I have to explain them and a bug which has been discovered within to the uninitiated.

But for a few minutes today, something I wrote was considered ELEGANT.  It warns this little developer's heart and gives me hope that I haven't completely gone off course with my life.  This code comes from somewhere.  And in that place a little hope still lives that the next thing I implement will transcend my usual rush and be a little greater than the last great thing I managed to do.  Maybe even elegant...

No comments:

Post a Comment