Wednesday, June 27, 2007

Who Writes the Program Here, Anyway?

 The diagram to the left represents a very simple quote.  Each quote contains multiple lines of business, lines of imagebusiness contain products.  Easy enough.  If the quote header is in a state which renders it read-only, however, none of its children should be editable either.

Faced with the challenge of making this work yesterday, I am ashamed to say I almost gave up.  This object model is easy to understand and manipulate, but when mapping to a database the object model begins to crumble.  This was exacerbated by some very early design decisions in our back-end library.  Our design revolved heavily around run-time modifications.  If a vested party asked for a new field on a screen, we wanted the ability to add the field at run-time.  We used business objects to implement business rules.  These objects represent tables and inherit from a single source.  At runtime we can change the BO for a selected table using reflection.

This approach uses the tenets of object oriented programming in working with and representing tables of information.  It does not allow for modeling of objects as represented in the figure above.  Everything was peachy until I got stuck between large releases.  The release version of the configuration file would continue to get out of sync with the development version.  I switched the model a bit, and now runtime changes can be saved...but they must be compiled into the main executable.  I lost my ability for runtime modification, but I still didn't have to design 80+ individual screens at design time.  I can drag fields around at runtime and save my changes.

Back to my problem from yesterday.  In order to determine the state of a quote header at the product level, I would have to find two queries in the configuration file, execute them, and then use the results to determine if the quote was editable.  What a pain.  Worse, if someone unwittingly changed the configuration, this subtle piece of code would stop working. I almost threw my hands up in desperation.  Perhaps I would make it impossible to drill into a quote that was read-only.

Then I started to realize some things.  I'm the coder, not the library of functions.  Runtime design is high maintenance for the reasons I just mentioned-there are very few compile time sanity checks.  Why not use application resources to associate business functions with stored procedure names and descriptions, and then create a stored procedure executor?  Then I could have the compile time checking I need, and the flexibility I crave!  I did it, it works, and it works well.  More importantly though...I realized that version three of our library needs to be designed around a real object mode, not a "sort of" object model.  The very reason I didn't like my own library is the very reason I don't like other libraries: lack of flexibility.  Finally, in order to make my new vision work...I'm going to need to change my coding habits.  I've been breaking the rule of designing to interfaces instead of classes.  Now I've got a bunch of display classes that only work with SetTableBO instead of something more flexible like iSetBindable.

Monday, June 25, 2007


During our routines, it is so easy to act in a way that ignores the feelings of the people around us.  This is a crime with which I am intimately familiar.  In order to remind myself that I am not, in fact, the center of the universe I printed out the definition of compassion and tacked it over my desk.  From Princeton:

compassion: a deep awareness of and sympathy for another's suffering

Something happened today that really bothered me.  I rode my bicycle home from the office, and it was hot.  There were three cars on the side of the highway on the way.  The first was helped off the road by another motorist.  As he drove away, she was dictating directions into her phone.  No worries there.  The third car was on the opposite side of the divided highway, and was being helped by three other cars.  The second was on my side though, and I stopped to see if I could help.

At first I thought the car had a flat tire, but it soon became clear that there was something else wrong.  The driver was probably about 65.  He wore a ball cap, used a hearing aid, and had a complete set of tools in his car.  In fact, he had on leather work gloves.  As I inquired about the state of his vehicle, he explained that it had started shaking violently as he drove down the highway.  He was trying to determine why.

The gentleman was very proud of his car-an old Ford Escort (or similar car) with a diesel engine that he claimed got 50 miles per gallon.  He went on to explain that it had 1/4 of a million miles on it.  I believe him.  Unfortunately I couldn't help.  This was more than a tire change, he already had a phone, and since I was on my bicycle I could hardly give him a ride.

When I asked if he had a phone, he said he did and he could call 911 if he had an emergency.  His intention was to try to return to Lansing to further diagnose his car.  I wished him luck and took my leave.

Riding away I realized something shameful.  There was not much I could do to help him, but I didn't even get his name.  Is it possible to have a deep awareness of, and sympathy for another person if you do not even take the time to get their name?  It was then that I realized how out of touch my perspective is.

My wife and I have our own "tribulations", but they are completely different than the trials of this man.  We have a supportive marriage, a wonderful daughter, and everything else we need to maintain our relatively modest lifestyle.  We drive two cars, we both go to school, and only one of us works.  We cannot imagine being unable to call a tow truck for a short tow.  We do not know what it is like to drive a car 250,000 miles.  Any time we have a problem we can find someone to help.  911 is the last number we would ever call.  Given the above information I have come to a sad conclusion.

I am incapable of feeling compassion for this man.  Not because I do not want to, but because I cannot have a sympathy for his suffering because I am so far removed from it.  My perspective is so different that I am unable to fathom his situation.  And I couldn't even show the curtsey of asking his name.

Friday, June 22, 2007

Good Riddance to the Airlines

An article in the Lansing State Journal today proclaimed that air passengers should be on their best behavior to "avoid hassles".  That is precisely the reason that the airlines should be allowed to go out of business.  No more help from the federal government.  Any business that routinely treats their customers like trash deserves to fail miserably.  How about this approach: maybe the airlines should go on good behavior for a refreshing change!  Nothing irritates me more than paying a small fortune to a company so that they can abuse me for a day.  Does that really make sense to anyone?

Since the airline industry has demonstrated a continual contempt for passengers, I can only look forward to a day when I can declare "Good riddance, airlines."

Those Crazy Law Students

First, I'd like to apologize for note getting a picture to demonstrate what I'm talking about.  This afternoon as I was returning from an errand, I walk past our local law school.  In passing, I observed a scooter chained to one of the bike racks.

Gas Scooter (United Kingdom)Now, this thing is pretty large.  It caught my eye.  Without really considering what I had seen, I kept on walking.  At the end of the block I came upon another building from the same law school, and another scooter chained to a bicycle rack.  My first thought was "What kind of cheapskate buys one of these things in order to scam free parking at the bike rack?!  A moment of reflection reminded me that I was standing outside a law school.  Then I realized, these are perfect for law students.

They don't cost much to run.  Parking is free.  If you get hit by another motorist, you can sue them and get credit for an independent study project!

Thursday, June 21, 2007

Now we'll try posting!

I wrote this post just to test out Windows Live WriterReally cool stuff.  It can't post images, even though one appears below.

s41170ca105356_5_0 How did I work around this limitation?  You can actually configure an FTP server, and Live Writer will post the images on your FTP server and link into the blog.  Problem solved!  Otherwise, a very promising piece of software.

Sunday, June 17, 2007

The Pancake Nazi

Aimee has been telling me for quite a while how wonderful Saugatuck is. We had never gone there together, so we decided to spend a night there as part of our anniversary tradition. It is a pretty neat place, especially the state park.

While were were searching for a place to have breakfast, we wandered past Ida Red's. The line was out the door and down the block, though, so we didn't stop. On our way back through we were ready for lunch, and they were able to seat us immediately.

The patio was fantastic, with all kinds of foliage visible out the back of the restaurant. As we perused the menu, we saw an item that made us think of my brother. My brother is the world's greatest connoisseur of pancakes. In fact, finding a place he might like the pancakes is a huge achievement.

Yep. Alan might like those. What you can't see on this blurb of menu is their description of the ingredients. They claim to use only fresh fruit and real butter. We were just about to call and tell my brother that he should come try these out, when we saw the show-stopper\deal-breaker on the back:

Hmm. Have I ever seen him order off a menu without tweaking it first? Maybe he wouldn't like this place so much after all....

Wednesday, June 13, 2007

4 Years!

Thank you Aimee, for the best seven years of my life. Our four years of marriage have been wonderful, and I'm looking forward to many more!
Happy Anniversary!

Yikes! What a day!

This morning, I arrived at the office at a reasonable time. Unfortunately the doorway wasn't wide enough to accomodate the chip on my shoulder, so I had to slide in sideways. When you start your day with a bad attitude, things always seem to get worse. Despite that, it was a great day. Being irritable all day has left me completely exhausted though.

Or maybe it was the mini-golf at Hawk Hollow. This place is awesome. 18 holes of putting action. No windmills, but there were a couple of sand traps, some water, and a couple of really long putts. Never before could I fathom seeing divots on a putting green. I stand corrected. In most of the pictures, bare feet are visible.

Following closely on the heels of putting at Hawk Hollow, a coworker invited me to ride out at the Rose Lake Research Area for a mountain bike ride. What a rugged place to ride a bicycle. Great stuff though. It was a lot of hard work, and neither of us knew the trails very well. As a result we managed to push our bikes up a couple of very steep inclines. It was worth it though. It would be really cool to spend a day out there with a GPS, charting a
map (if nobody has already). Why do such a thing? The place is huge, and the trails go all over the place. They have not been intentionally groomed for riding so they don't necessarily follow any particular logical layout. That chances that I didn't get poison ivy are slim, because the stuff was all over the ground out there.

Ok, so I got to do some really cool stuff today. Why the persistent attitude, all day long? The short answer is that I'm an idiot. It is June 13, and I'm still in school. In fact, being in school full time with a young child in the house is a lot of work. It is a rarity that Aimee and I get in bed before midnight these days. Once we finish for the Summer (next week) we've both vowed not to take classes as aggressively, and certainly not so late into the Summer. We're both drained, and at wit's end.

In other news, my match through Big Brothers\Big Sisters was terminated today. They have asked if I would be interested in being rematched. It takes an incredible amount of energy to be in the program. It is rewarding, but it can also be an emotional sink. I worry a lot about my "little". He taught me a lot, and he's a great person...but I worry that without some very convincing intervention, things may not turn out well for him. Naturally I wonder what I could have done better for him. I wonder how I could have been more supportive. There are no easy answers, either. Should I have been more present? Should I have been more assertive? When possible I hooked up with him every week. He never exhibited any behavior problems around me, but I wonder if I could have gotten him to work harder on his education.

Now what? Until I'm finished with school, I don't think I'll do another community match. When I got matched, Aimee and I didn't even think we could have a child. Now we have a child, school, etc. I do think I will probably get into the school mentoring program in August, though. When I finish my degree I'll try to get into another community match. In the meantime, I've been invited to continue corresponding with my little-sans support from BBBS.

There were a lot of great things about our match. We had a lot of fun, and there are a lot of great pictures to boot. He really got a kick out of Evelyn, and even went so far as to give me diaper changing lessons!

Saturday, June 9, 2007

How cute is this!

YouTube is so cool. (may take a moment to load)

Thursday, June 7, 2007

What are the chances?

If you live in Michigan, chances are quite good that you've got serious psychological problems.  That applies of course to yours truly.  The number one reason people claim to enjoy living in Michigan is because they like the seasons.  Right.  We've got the rainy season, when it doesn't actually rain but drizzles for three months.  Then we have the snow season, which lasts from December 15 to January 15, then we have the arctic season, followed by the mosquito season.  Nestled right in the middle of these seasons is the one, and only, worthwhile season in Michigan. 
Summer.  Summer in Michigan has the dangerous and intoxicating effect of making residents forget about all the reasons not to live in this state.  For practical purposes, this season lasts only from about June 15 until August 15.  Tonight, though, is definitely a summer night.  It is about eighty degrees, actively breezy, dry, and clear.  I'm sitting on the back porch in the dark, and I cannot for the life of me believe that there could possibly be any other worthwhile place on Earth.

Sunday, June 3, 2007

Thank you, Mrs. Lance

Our daughter is about 9 months old now. She's like a miniature teenager;she's got her own opinions, but it isn't like she's got a drivers' license. Today was a really long day, as our tiny daughter was full of opinions all day long. She liked the black beans that I cooked, but she only wanted them whole, and she wanted to feed herself. She wanted to try walking, but refused to try balancing herself on the edge of the furniture. Cheerios were good for breakfast, but oatmeal wasn't really good anymore. Maybe only babies eat oatmeal.

It has been quite warm, so tempers all around were relatively short. By the end of the day we were all beat. My wife and I practically counted down the seconds until 9:30. Bedtime. Time for a short rest and a long breath of relief. My shoulders unconsciously relaxed as our daughter's door clicked shut. Now, I need to clarify. Under normal circumstances, our baby is the most pleasant person I could want to spend time with. Now that she's got teeth and some mobility, she really wants to explore. This is understandable, but since she also cannot tell us what she wants, it can be really frustrating for her and for us.

From the other side of her door, I could hear a faint noise. A breath of discontent, if you will. If you happen to be an incredibly precocious toddler, reading this post, please forgive my wife and I. We're new parents. Idiots, really. The following will serve to illustrate that point.

Anyway...this faint noise grew gradually in volume until it became an impressive impression of the air-raid siren perched on the post down the block. If it weren't clear that the racket were coming from our daughters' room, I would have checked the radio for a severe weather alert. Lucky for me, I was doing the dishes. Aimee drew the short straw to find out what might be bothering our tiny bundle of joy...

As I finished the sink of dishes, it occurred to me that this particular protest was unique in both length and intensity. This thought had barely coalesced in my consciousness when Aimee staggered out of the child's room and "tagged up". Uh oh. My turn.

I tried all the usual fixes, but none worked. She was really mad. This was evidenced by her simultaneous attempts to cuddle into my chest and push me away. After playing this one sided tug-of-war for a few minutes I decided to put her in bed, where I could pat her back until she would fall asleep. This grand mal temper tantrum had been in progress for an ear shattering twenty minutes. She must be tired. So I thought. Not only wasn't she tired, she refused to even stay in one place long enough for me to pat her back.

Then I saw it. Or rather, didn't see it. Something was conspicuously wrong with our baby's crib. I called out to Aimee, only to have my worst fears confirmed. In the distance I could hear the sound of a slowly chugging washing machine mocking us. I'm quite sure it was actually jeering at us. Luckily my wife came to the rescue. We both launched into the storage bins under the crib, trying to find the one in which we had placed various items at the conclusion of Winter.

Finally, at the bottom of the last tub we searched, we found the only other potential substitute for the item we had so foolishly tried to clean. No sooner did we cover our daughter with the hand made afghan given to us by the Lance family, than she stopped crying. The soothing effect was nearly instant. Twenty minutes of mayhem because we tried to put her to bed with the wrong blanket.

Thank you Mrs.Lance! We are both looking forward to sleeping tonight instead of staying up all night with our distraught little girl!