Tee'd it up to today

I got out for 18 for the first time in about three weeks.  Hard to believe it has been that long but it has.  I was in Europe for a week for work then came back and went to the beach for a week on vacation so when I got back to the office, I had two weeks of crap piled up.

I played pretty well today, shot 92 (45-47) which is the best round I have had in a while.  My short game was better than usual and I was reasonable off the tee.  I have tried choking up about an inch on my driver and I seem to hit it much more consistently and don’t really lose any distance.  I noticed Anthony Kim doing this when I was at the Wachovia Championship back in May.  Of course, he still hits it 300+ yards.  I hit a couple today which were about 250-260 out which is about as good as I can hit it.

I still left some strokes out there but not as many as I have lately.  I three putted a couple times and hit two balls in the water (#1 and #4).  I broke 95 which I have struggled to do lately.  I really want to get a few rounds in the 80’s – I think I can do it.  I am going to play on Saturday with two of my girls in the parent-child event.  Should be fun.

More on Short Codes

I had posted a question on Short Codes to the wp-hackers mailing list and got a pointed to an article on the Codex which explained the process of coding up a short code.  I expected it to be more involved than it was and I was pleasantly surprised to find it was really straight forward.  I have already implemented one short code for the wp-SwimTeam plugin and expect I’ll have half a dozen more done by the end of the week.

What I implemented for Flickr was pretty simple – it allows the insertion of a Flickr slideshow in a post or page using the Flickr UserId value (which is different than the username) and the Set Id.  Here is the snippet of code:

 * wpst_flickr_slideshow shortcode handler
 * Build a short code handler to display a Flickr slide show.
 * [wpst_flickr_slideshow userid="id" slideshowid="id"
 *     frameborder="pixels" *     width="pixels" height="pixels"
 *     scrolling="yes|no" align="left|center|right" view="yes|y"]
 * To show this Flickr slide show:
 * http://www.flickr.com/photos/27604893@N04/sets/72157605764227907/show
 * Use this shortcode:
 * [wpst_flickr_slideshow userid="27604893@N04" slideshowid="72157605764227907"]
 * This is the resulting IFRAME tag which is returned to the caller.
 * <iframe align=center src=http://www.flickr.com/slideShow/index.gne?
 *     user_id=27604893@N04&set_id=72157605761943480 frameBorder=0
 *     width=500 scrolling=no height=500></iframe>
 * If the 'view="yes"' or 'view="y"' attribute is include, a linl to the
 * Flickr slideshow will be placed under the IFRAME.
 * @param array - shortcode attributes
 * @return string -  HTML code
function wpst_flickr_slideshow_sc_handler($atts)
    $c = container() ;
    //  Parse the shortcode
        'userid' => '',
        'slideshowid' => '',
        'frameborder' => 'default 0',
        'width' => '500',
        'height' => '500',
        'scrolling' => 'no',
        'align' => 'center',
        'view' => 'no',
    ), $atts)) ;
    //  If either the userid or slideshowid are missing then
    //  we have a problem and can't do anything meaningful.
    if (empty($userid) || empty($slideshowid))
            html_b("wpst_flickr_slideshow::Invalid Shortcode Syntax"),
            html_br(2)) ;
        return $c->render() ;
    $if_src = "http://www.flickr.com/slideShow/index.gne?" .
        sprintf("user_id=%s&set_id=%s frameBorder=%s align=%s",
            $userid, $slideshowid, $frameborder, $align) ;
    $c->add(html_iframe($if_src, $width, $height, $scrolling)) ;
    if (($view == 'yes') || ($view == 'y'))
        $link = "http://www.flickr.com/slideShow/index.gne?" .
        sprintf("user_id=%s&set_id=%s", $userid, $slideshowid) ;
        $c->add(html_br(2), html_a($link, "View this slideshow on Flickr."), html_br(2)) ;
 return $c->render() ;

The code above makes use of the phpHtmlLib to generate HTML code but the general intent should be pretty obvious.


Opt-in vs. Opt-out?

It has been pretty quiet on the development front.  Now that swim team season is in full gear, I am spending a bunch of time actually using what I have developed to date.  So far, everything is working pretty well although I definitely have some things to do.

Next on the agenda is an online scratch sheet which I will likely implement as a an opt-in or opt-out feature on a meet.  Some meets make more sense to opt out of where as others make more sense to opt in. For example, our regular season meets will be opt-out meets.  All swimmers are assumed to be participating unless they opt out.  On the other hand, our local city meet which we only have 25-30 swimmers entered in, will be an opt-in meet.  All swimmers will assumed to be not participating unless they opt in.  I believe supporting both makes the most sense and will ultimately make the system work better.  Forunately this should be a pretty simple extension to the meet functionality I implemented a few weeks ago.

SmartPhone Dilemma

I still don’t know what to get.  It doesn’t look like the Sony-Ericsson Xperia X1 which I want is going to be available on AT&T Wireless (my provider) so getting one will be a challenge.

My AudioVox SMT5600 needs to go, it just doesn’t do enough any more, particularly after using a Pantech Duo for so long.  Right now I am leaning towards the BlackJack II but I know as soon as I commit, something else I want will come out.

I like the HTC phone which Verizon (SMT5800 I think) has now but there is no way I am switching to Verizon to get it.  I like the freedom GSM gives me.  Get a new phone – pop in my SIMM card and it works!  Travel outside the US – my phone works!

Busy with Swim Team

I have been really busy with swim team the last couple weeks, it is taking almost all of my free time.  I guess that is what happens when you volunteer to be the “IT guy” for the swim team!

Our swim team has been run over the years by volunteers (as most are) using paper and Excel.  It hasn’t been the most organized swim team but the kids had fun.  We did however, lose a lot of information which kids and parents would like, notably swim times.

Last year my wife agreed to run swim team and asked me to help her get the whole process computerized.  I have developed a WordPress based plugin I call wp-swimteam to handle much of the work which when used in conjunction with WinSwim, is working pretty well to manage our season.

However, it is all new and there are lots of questions and lots of “we didn’t used to do it this way” but by in large, people are pretty happy with the way things are going.  They certainly have a lot more information than they have had in the past.  We had a fire drill this week to get data submitted for the local city wide invitational meet which required me to do a bunch of work to get our data submitted.  This is the sort of activity which you don’t realize ahead of time, how involved it can be.  I must have submitted our roster 10 times with the various changes.

WordPress is a great platform for a Swim Team (and probably many other youth sports).  With the wealth of plugins available, it can handle pretty much anything we have thrown at it so far.

Fixed Assign Label Bug

I just committed a pretty important fix to address a bug in the Assign Label function.  If a label is manually assigned, the swimmer would be marked as Inactive on the master swimmer list which is incorrect.  This was a leftover artifact from reusing the Unregister code.  It has been fixed and now swimmers are  propertly labeled AND if Swimmer Label field is properly initialized with an existing value if there one (which wasn’t happening either).

The other thing I ran into as a result of running our Time Trials last night is the need for a confirmation on the “Assign Labels” functionality as it will re-assign all the swimmer labels which may not be the desired state as it was in my case last night.  Fortunately only 2-3 new swimmers had been added to the database since I had assigned labels so manually fixing them wasn’t too much work but I’d rather not have done it at all.

A week with a Dell XPS 1210

I took a Dell XPS 1210 to Europe with me last week and I have to say I like it.  I wasn’t sure I would but after using it, I am pretty pleased.  A guy I know in IT loaned it to me as a stop gap measure – I had told him I wanted a Mac because I concluded the XPS 1330 wouldn’t work for me (no docking station).  He told me we would be getting some new Dell Lattitude E series machines in a couple months and he thought the 4300 would be what I’d want and he would loan me a 1210 until the new E series were available.  I decided it was pretty low risk for me so he sent it out.

The machine he sent me is a 1210 with 2GB RAM, an 80GB disk and WinXP (I have been running Vista).  The first thing I did was upgrade it to XP SP3 and then I went and bought a 250GB disk for it and Ghosted the image over to it.  I also installed VMWare Player and moved the VM I am using for my wp-swimteam plugin development over to it.

The battery life is wonderful, the best I have ever had in a laptop.  The machine is pretty peppy as well.  It hasn’t gone off in the weeds on me at all like my HP tends to do.  I used it on flights to and from as well as within Europe last week and I am happy with the smaller form factor – it isn’t such a struggle to use it on an airplane like my HP can be.  When someone leans their seat back (which they should never do except on a red-eye), I can still work.  I can’t with my HP.

At this point I am going to use it until the Dell Lattitude E series are out and then make my decision.  I am still intrigued by the Mac but being on our corporate standard also has some benefits.

Swim Meets and Swim Club Profiles

Over the last couple of days, actually since I flew home from Paris on Friday, I have added functionality to set up a swim season schedule.  To do this, I added swim club profiles and swim meets.  The swim meet functionality also includes a summary which is added to the overview page.  The summary reports the schedule for the current season, results. and lcation of the meets.

Adding swim meets is base functionality which is necessary to support online scratch sheets (need to know which meet a swimmer is scratching from) and ultimately results.  The online scratch will probably be the next thing I implement, results are a bit trickly because loading, parsing, and connecting results to swim meets and swimmers will be a fairly extensive problem.  I suspect I won’t have this working until after our season completes but you never know!

I also want to go back and visit the Team Profile functionality.  I am storing the Team Profile in the WordPress options table but now that I have Swim Club Profiles, there isn’t any reason to store the Team Profile any differently than any other Swim Club.  It isn’t urgent so I may defer that as well.

Lastly, I need to make changes to many of the classes to allow some of the methods to be called without needing a class variable first (the class::method() format).  For example – I should be able to call SwimTeamSwimmer::getAllSwimmerIds() and return an array of SwimmerIds without declaring a class variable first but right now I can’t due to the way I constructed the base level database query class.  There are a number of places where this would be really handy.

Swimmer Numbers? Swimmer Labels?

I have spent a fair amount of time this week implementing what I am now calling Swimmer Labels.  I may go back to Swimmer Numbers but I am not sure.  I’d like to call them Swimmer Ids but I have used that terminology all through the plugin for the unique MySQL record id field that changing it would be a pretty sizable task.

On the good news front, I have auto-assigment of Swimmer Labels working under several different scenarios.  I am particularly pleased with the auto-assignment of labels within an age group with a prefix – it is pretty slick if I do say so myself.  Since the MacDolphins use this format, it was particularly important to me!