Month: June 2009

Looks like we've got some ideal golfing weather ahead, and I'm definitely going to take advantage of this fantastic stroke of luck.

Sunny days ahead ...

Here's my golfing schedule: tomorrow early shotgun with the oldies, Friday afternoon practice round by myself, Saturday morning 1st round club stroke play championship, Saturday afternoon golf lessons, and Sunday if I qualify 2nd round club play championship.

The clubs have been cleaned and polished and I'm ready to have a fun and relaxing time.

The problem with offering your opponent advice on the golf course is that if it helps then he beats you out of a couple more bucks and if it doesn't help then he can blame his lousy score on your poor suggestions.

I also am superstitious in that giving an outsider part of your good advice energy will only deplete your own magical skills a little bit more.

So I told my opponent on the back nine that according to me he was hitting the ball inconsistently because he was swaying too much front to back and should concentrate on taking a wider stance and keeping his balance.

That's when he drilled his tee shot right down the middle of the fairway and I sliced my ball badly out of bounds.

Fortunately this time around we weren't playing for money.
| 1 Comment
Farrah_fawcett.jpg

I cannot believe that she died today.

As a teenager I had the biggest crush on her and that poster of her in that skin-tight red swimming suit was an all time classic that's for sure.

Well, if it means anything to you now, thanks alot for all of the pleasure you brought me while I was growing up and trying to make sense of the world as a crazed young man in need of direction.

| 4 Comments

Recently I've been setting up an extensive test harness suite for a web-based application running on the Catalyst Web Framework for Perl.

In addition to the popular Test::MoreCPAN module, many of the tests make use of the CPAN module Test::WWW::Mechanize::Catalyst where I run automated scripts to access various pages, fill in fields with various values, submit forms and check for success or failure.

One of the tests involves creating a new user account that generates a notification email which is sent to the new user. Within the message text there is a verification link. The idea is that upon receiving this email, the user will click on this link and be redirected back to the application to a welcome page. This welcome page verifies that registration has been completed successfully. The user is invited to login in by submitting a form with the username and password pre-filled.

The problem is that I do not want to be generating all kinds of external emails into the big bad world for these tests. Besides, how can I use automated scripts when they depend on external events like users having to click on links in emails wherever they might be?

So here's the trick. First of all I redefine the Email::Send::send() method so that I can hook into it thereby mocking it's behavior. This redefined method is used to scrape out the embedded validation link we must click on in order to finish the registration process.

our $email_mime_ref;
{
    no warnings qw/once redefine/;
    *Email::Send::send = sub {
        my ($self, $message, @args) = @_;
        $main::email_mime_ref = $message; return 1; };
}

Note that we use no warnings qw/once redefine/ in order to disable the warning messages for redefining the method and only using it once.

Whenever Email::Send::send() is called, we copy the message for later use. Note that since we are in the namespace of Email::Send when this is called, we need to make sure that the message is copied back into the namespace of where we are calling from, namely $main::*:

$main::email_mime_ref = $message;

Later on in the test suite it is time to submit the form like this:

$mech->submit_form(
    form_number => 0,
    fields => $fields,
    button => 'submit' );

Now scan through the message text and extract the uri, there should only be one present. I'm using the CPAN module URI::Find to simplify life.

my @uris;
my $finder = URI::Find->new( sub { push @uris, shift; } );
$finder->find(\$email_mime_ref->body_raw);

As a sanity check (you never know) I check that indeed only one link is present in the message text:

is(@uris, 1, "Found only one URI '$uris[0]' in email message");

Finally, we simulate clicking on this link which should bring us back to the welcome page:

$mech->get_ok($uris[0], "Click on URI '$uris[0]'");
$mech->content_contains("Welcome " . lc($username) . 
    ", your email has been validated. Please log in.");

We did it, so let's pat ourselves on the shoulders and call it a night.

Hey, it turns out that the del-key on my laptop doesn't stick anymore, and I hadn't even noticed it. Remember that blog entry back in April where I was feeling irked enough that I even had to dedicate a whole entry? I guess that due to lots of usage something or other has loosened up beneath the key, and no matter how hard I try now I cannot get it to stick any more. That's fantastic news, even though it's a bit strange how I hadn't even noticed it.
I've learned an awful lot about the many ins and outs of managed virtual servers the last few weeks. It's been a fun adventure talking with companies and the experts about the fine art of managed hosting.

There are many advantages to choosing a virtual environment over the more commonly accepted hardware options. It really boils down to a choice between two options:

  1. Make a big one time investment in hardware and write it off over a five year period. Hopefully within that time frame one can use the costs more effectively by maximizing the use of computer resources.
  2. Or rent the computer resources (CPU, memory, storage, etc) on a monthly basis. As time progresses one can easily expand the resource depending on current needs. Costs are kept more under control and growth should be more predictable.
Another interesting topic of discussion which can get hairy and even philosophical at times is the difference between fair use and bundled bandwidth policies for network usage. A couple of people have discussed it with me but I'm still not convinced about one being any better than the other.

So I figured that I'd work from home today so I could concentrate better and be much more productive.

Woke up extra early to make a good start, enjoying a nice hot cup of coffee and typing away behind my good old laptop.

As it turns out, right across the street there's some @#$! idiot sawing wood with this high-pitched electrical saw the whole morning.

What a jerk. I hope he quits real soon before I get insane and attempt something desperate.
| 2 Comments
That line over there in front of the cash register was shorter than the others, so I took that one because the others were waiting for me outside. I could see in advance that the girl sitting in front of the cash register was not in the greatest of moods. She had this smirk painted on her face, and she never once raised her eyes to look directly back at the important customers.

The same treatment was repeated with me. She stabbed the flat screen with dagger-like motions, rang up two-fifty-five, and I handed her the blue ten euro note. I held my hand in place hovered in the air as she groped around for the money. She handed me back the small change, along with a red twenty euro note.

Caught off guard for an instant, I hesitated slightly before gathering up enough courage to react. I told her politely that I thought perhaps she had mistakingly given me back the twenty euro note when it should have been a five, because you see I had paid with ten.

For the first time she raised her eyes and looked at me directly with pierced vision, her grumpy glance becoming even more irate. She had been trained well to beware of bums like me trying to short change the store.

"That's impossible," she snapped back at me. I responded with a smile, "Excuse me but I originally gave you ten, so I think you meant to give me five back, not twenty." Trained not to think, she kept her lips sealed and just shook her head back and forth. She waved me off and tarted helping the next customer in line.

I'm normally a pretty honest guy. I should have insisted until she called the police to take me away, but that look on her face combined with the growing line of impatient customers and  their rattling overflowing shopping carts hinted that I should just accept this turn of fate and continue with my life.

I walked away wiithout making a big deal, accepting my good twist of fate although underneath I still feel a little guilty about it all.
There's no way to escape it. The way we view the past depends upon the context within which we as observers try to make sense of it all.

Historical events are chaotic and completely random, but in retrospect there is always some way to define a predictable pattern that makes connecting the dots of time more than just an academic pursuit.

Projecting our own meaning on the world around us is human nature and more than likely is a result of evolution and the need to survive.

Two events seem related in retrospect while the defining moments between the first event and the second was at the time no more than a gap of silence.

To experience is one thing but to analyze and predict based on the past is another ballpark altogether.
Let's just say that after such a lousy approach shot, I deserved it and should have seen it coming. My six iron off the tee was hit nicely but caught the tree next to the water hazard when it landed.

Searching for my ball in all that high grass, I wasn't looking very carefully. That's when my right foot came down on a fluff of green which hovered above the water, and unlike the rest of the grass I was standing on, had no solid ground supporting it underneath.

Good old gravity took over. The edge of the pond was steeper than I expected. Without a moment's notice I slid straight down into the pond, plunging down into the water at an eighty degree angle, the surface of the reeking pond right up to my waist.

Bad enough was getting soaking wet, but even worse was the black sludge and muck which filled my shoes and pants up to my knees. I was pulled out of the mud by my concerned opponent who reached out with his wedge so I could grab it and pull myself out of the suction.

Taking off my pants, shoes and soaks and wringing them out as best I could before putting them back on felt only slightly better but did not help the rest of my game.

For the remaining holes my game suffered tremendously. Try for yourself to swing a golf club when your pants and shoes are sopping wet. It's like trying to twist your body when enclosed by tight layer of cellophane which refuses to give in.

Better luck next week.
| 2 Comments

"Well the most important thing in the golf swing to me is the movement of the lower body from the top of the swing. And if you don't mind I'll demonstrate. First off, you start down below with your knees and your hips. At the top of the swing, you move the lower part of your body, not your shoulders, the lower part of your body, letting your arms and hands follow, bring you into position to hit. This is the first movement... there (swish)... then you release at the bottom. Most people do it entirely opposite. They rotate their shoulders first instead of their lower body. As a result they come across the ball and hit the outside of the ball instead of the back of it. If you don't mind, I'll hit a ball... and the first thing to watch is what starts first from the top of the swing."

Ben Hogan bends down and gently places the ball on the tee. In slow motion his perfect swing comes down and strikes the ball with amazing precision, launching the ball forward right down the middle of the fairway, his follow through coming through high and mighty.

Some videos:

Ben Hogan is widely acknowledged to have been the greatest ball striker ever to have played golf. In his career lasting from 1938 to 1959, Ben Hogan had 64 PGA Tour wins and won 9 Major tournaments. He became just the second player, after Gene Sarazen, to win all four of the modern major championships. In 1953 he won the British Open Championship, the only time he played the event.

So I thought that the long and boring job of painting the dormer was nearly done. But it isn't, not by a long shot. Damn.

I've discovered that I still have to struggle to scrape off all of that sticky masking tape that refuses to come off without a mighty fight. It's almost as if that adhesive stuff has melted and bonded with the glass surface underneath.

I'd planned to be able to just rip it all off in one go, maybe at most just scraping off little spots and tidbits of paint drips here and there. But that was never meant to happen. What a pain in the butt.

At least I'll be enjoying a sunny day and getting a nice tan out of it at the same time. Be positive.

Random entries

Here are some random entries that you might be interested in:

Recent Assets

  • Sunny_days_ahead.png
  • Farrah_fawcett.jpg
  • Ben-Hogan.jpg

Recent Comments

  • Long time no see: I remember them, as well. I remember Donald was my ...
    - Charles
  • Bridge to the moon: Yes it was a drawing and my older brother told me ...
    - jpmcfarlane
  • Bridge to the moon: Wow, that's quite a coincidence that we both sent ...
    - Kiffin
  • Bridge to the moon: Hello I was in my teens when Gemini 4 went up that ...
    - jpmcfarlane
  • Back to work: Congratulations Kiffin, I hope it is something you ...
    - KathleenC

Golf Handicap

Information

This personal weblog was started way back on July 21, 2001 which means that it is 7-21-2001 old.

So far this blog contains no less than 2518 entries and as many as 1877 comments.

Important events

Graduated from Stanford 6-5-1979 ago.

Kiffin Rockwell was shot down and killed 9-23-1916 ago.

Believe it or not but I am 10-11-1957 young.

First met Thea in Balestrand, Norway 6-14-1980 ago.

Began well-balanced and healthy life style 1-8-2013 ago.

My father passed away 10-20-2000 ago.

My mother passed away 3-27-2018 ago.

Started Gishtech 04-25-2016 ago.