Aug
31
2010

Order Tara's Bicycle Touring Cookbook Today!

Working at Lake Teletskoye

by Tyler

We started our day looking for information about Uchar Waterfall. Our investigation turned up some interesting news: the falls are very young, just a few hundred years old, and they were only discovered about twenty years ago! Also among the factoids we gleaned was the disheartening detail that "uchar" means unapproachable, and for good reason.

Visiting the falls seems to require a lengthy trek across many raging rivers, usually with the assistance of boats or guide-wires provided by a paid tour group of some kind. As we weighed our options, we both decided we'd had our fill of logistics for the time being. We didn't have the energy to attempt organizing a visit, so we decided to go for a drive along the lake, and then settle in for a relaxing afternoon at our cabin.

Russian Flowers & House

Our drive around the lake left us the slightest bit miffed that we'd followed the advice we'd read and opted to spend the money on a rustic cabin. The number of eye-poppingly scenic wild-camps we passed was astounding! We were briefly tempted to skip out on our second night at the little lodge, ask for a refund, and head to a secluded spot next to the water instead. In the end, we decided to stay.

Largely because of this guy:

PUPPY!

He was so cute that we couldn't bear to leave him. I wasn't a dog person when we left on this trip, but we've had so many encounters with lovable dorks like this that my stance has pulled a 180° over the last year. Hopefully my two cats (currently under the kind care of my sister) will be similarly inclined!

PUPPY! PUPPY!

The little dude hung out with us all day in the sunny three-seasons kitchen where we were working and journaling. It was really hard to get anything done, because we had a tiny puppy curled up at our feet. When he wasn't vying for our attention, he would be busily chewing through the floor, or the chair, or anything else he could get his little mouth on.

Every time I scolded him, he looked up with these heart-melting eyes, as innocent as could be.

PUPPY!

When I wasn't distracted by our canine buddy, I was busy refactoring the billing code for my insurance company client (to support some new features). Every time I sit down to work on this project, I have to spend something like an hour poring over my comments, re-orienting myself with a myriad of interlocking constraints which ensure a mind-bending number of edge cases work properly.

Here is a tiny sample of what it looks like:

// the following suppresses some coverages from appearing on the prorated
// main billing.  it handles problems which arise when the billing is run
// after the 15th due to a weekend, holiday or some other circumstance.

// the issue is that new coverages may have been added by clients during
// these gap days.  thus, coverages which would not have existed at the
// time the billing -should- have been run may be in the system.  this
// makes them appear incorrectly on the main billing one month early.

// the check below suppresses coverages which fit the following criteria:

// 1. coverage is created after the 15th of the month.

// 2. coverage creation date + 1 month is IN the month we are running the
//    billing for.

// 3. coverage effective date is on or after the date it was actually created
//    ^ prevents the suppression of backdated additions

// 4. coverage effective date is less than the 1st of the month after the
//    creation date
//    ^ prevents the suppression of postdated coverage additions.
//      without this, coverages created for future dates would eventually
//      be suppressed incorrectly

$suppress = "AND
             (
                date_part('day',date_created) > 15
              AND
                date_effective
              BETWEEN
                date_created
              AND
                date_trunc('month',date_created)+interval '1 month'
              AND
                date_trunc('month',date_created)+interval '1 month'
                =
                date_trunc('month',$2)
             ) IS false";

// suppress coverages starting on the same day as the master policy
// for the (additions) change billing, they are not changes.
// suppress any coverage which was added or deleted on the same day
$suppress_start = "AND
                     date_effective != policy_date_effective
                   AND
                     date_effective != date_expiration";

// suppress coverages ending on the same day as the master policy
// for the (deletions) change billing, they are not changes.
// suppress any coverage which was added or deleted on the same day
$suppress_end = "AND
                   date_expiration != policy_date_expiration
                 AND
                   date_effective != date_expiration";

Once I am engaged in a complicated programming problem, I become a temporary idiot-savant, wholly oblivious to any external stimuli. Thankfully, Tara is used to this by now – she doesn't expect anything coherent out of me when I'm working!

Eventually, I'll emerge into the real world, usually feeling accomplished and refreshed. For me, programming is often like reading a great book, watching an engaging movie, or even meditation. Today, was one of those days. Every time I ran a test case, everything came back flawless on the first try!

While I intently tapped away, Tara happily busied herself, taking advantage of this great sunny kitchen, alternating between writing and making us a delicious curry for dinner.

Sunny Kitchen View

Later, as we ate and watched the sun set, we agreed that a three-seasons kitchen/dining area would be a good thing to add to our list of house ideas.


Bookmarks