Trip 2012 – Day 1 – Travel and Route 66

We Made It!

We had a pretty good, though long, first day of the trip. The car to the airport arrived a bit early. With the very light traffic, it was 6:15 in the morning after all, we made it to the airport in plenty of time. We even had a decent breakfast before going though security as the offerings once past at Newark’s terminal B are pretty poor. Our flight was pretty full, but left on time and arrived in Minneanopolis 20 or so minutes early. This was nice as our connection as scheduled was a but tight at 49 minutes. We did have an issue in that we somehow messed up our seat selections for this leg. (Kyle and I were on one reservation while Suzanne was on another due to number of frequent flyer miles we each had.) Instead of sitting three across, Kyle and I were in one row in the window and middle seats and Suzanne was in the row behind in the window seat. The lady in the aisle seat very kindly offered to swap. (I wasn’t even going to ask as she was traveling with someone across the aisle, but she offered and insisted.)

We arrived in Las Vegas right on schedule. After getting our bags, we managed to get our rental car, a nice Chevy Malibu, right about when I had expected. On our way out of town, we stopped by Wal-Mart for lunch at McDonald’s, kind of grungy one, and some supplies.

Heading down Route 66

We were then really on our way, down over the new bridge by the Hoover Dam and into Arizona. After a brief stop in Kingman, we headed up Route 66. It was kind of cool to see some of the old places along it. Parts of it really are in the middle of nowhere, at least for us Easteners. Part way down, we stopped at the Hackberry General Store. This was certainly worthwhile for some kitsch and some good photos of lots of historic “junk”. Then it was back in the car for the hour drive to Seligman along some of the straightest stretch of road I’ve ever seen. (I swear it was 10+ miles without a turn.)

Hackberry General Store

Seligman is a cute little town where Rt 66 intersects back with Interstate 40. (Rt 66 takes a big loop between Kingman and Seligman while I-40 does it in a straight shot.) We checked into our very nice room at the Canyon Lodge. (Funnily enough run by a gentleman from Freiburg, Germany, who was born in Mainz. Mainz is just outside of Frankfurt, so quite close to Marburg.) He recommended a great place for dinner which I had planned on going to anyway (Westside Lilo’s). The food was very good. (I had the Weinerschnitzl.

Route 66 Gas Pump

Their chef was from Weisbaden, also right outside Frankfurt.) Also interesting was the waitress was from Michigan and had lived in Ypsilanti and Manchester, two towns right next to Ann Arbor where we lived while I was in grad school at MSU. Even better, Kyle was in a bit of a mood. (To be fair, it was getting on 10:30 Eastern time and he had been up since 5:45.) The only kid’s meal that wasn’t available was pancakes, which, of course, he wanted. They actually made a special dinner-plate sized one for him. (I’m not 100% sure they even charged us for it.) One thing we found very interesting about the town is the number of foreigners. At dinner, there was an Italian group, a German family, possibly another German family, and a French, I think, couple. At the hotel, there is a group of older motorcyclists whose language I don’t recognize. I find this pretty cool.

Tommorrow, our plan is to see a bit of the town and hop in the car for the 90 or so minute drive to the Grand Canyon. It should be exciting.

Update and a Few Photos

I know it’s been a couple of months and I’m behind with photos. (What else is new?) We’ve had an fine past couple of months. In March, we headed up to Paramus to spend a couple of hours at the New Jersey Children’s Museum, where Kyle had a great time. At the end of March, Kyle started T-Ball. He really enjoyed it, especially since his best friend Robbie was on the same team.

We had a quiet Easter at home. In April, we hit the Somerset Patriots (minor league baseball team who plays about 30 minutes from us) Fan Fest. This included games for the kids and a game of old-fashioned baseball. Kyle didn’t want to stay long enough to run the bases like he did last year. In May, we visited the Bronx Zoo again. (We have a membership for the year, which pays for itself with only two trips. We try and do four for the year we are members.) For Memorial Day, Suzanne’s parents came to visit. It’s always nice when they come, though it’s likely to be a while before they get back as Suzanne’s sister Beth is due any day now.

The big thing last week was Kyle’s graduations from the YMCA’s Kinderwrap program and Kindergarten. It’s hard to believe he’s already that old.

Kinderwrap Graduation

Kindergarten Graduation

Kindergarten Graduation

Kyle just started summer camp at Oak Crest Day Camp today and had a wonderful time. He’ll be there for a total of 7 weeks this summer, but will go the YMCA’s program for the week before our trip out west as Oak Crest ends a week earlier. Next week we’ll be camping with my Mom in NH for a few days. Kyle has wanted to go camping for a while and this should be a good intro. We’ll have a tent, but we’ll see if we end up sleeping there or in the motorhome. Aside from our trip at the end of the summer, we don’t have any big plans for the summer. Undoubtedly we’ll have a few birthday parties, and we hope to hit the zoo one last time. Maybe by then I’ll have more recent photos posted. 🙂

Brief update and a few photos

It’s been a while since I did any kind of an update. Not that that much has changed in the past few months. We had a very nice Christmas, with Jack and Mary Lou coming up for some of the time. We both get the week between Christmas and New Years off, which is always nice. (Well … Suzanne actually has to take it as part of her vacation time as the plant is shut down.)

In late January, we had a wonderful birthday party for Kyle. It happened to be on the one day of snow we had all year, but the roads were decent enough to get around and no one was coming from very far. We had a science, mostly chemistry, themed party with a bunch of experiments making some kind of goo. Several people from my work loaned by stuff which was great. Suzanne did a wonderful job organizing it. I don’t have many photos as I was busy helping the entire time.

Kyle's birthday party

Kyle and Robby at Kyle's birthday party

Last weekend, Kyle had another party to go to at a bowling alley in Garwood. He had a great time. It worked out very well for us too as it was 4:30-6:00. Suzanne and I were able to leave a grab an early dinner at a nearby (excellent) Asian-fusion place by ourselves. Many kudos to Mikey’s parents. Sunday, we visited what will be Kyle’s day camp for most of the summer. It’s a really nice place (Oak Crest Day Camp), but not cheap. (At least his school year costs will drop a lot next year with full day school.)

Not too many plans for the near future. It looks like we’ll be heading our west to the Grand Canyon and southern Utah at the end of the summer. We’re still working on airline tickets, but we’re pretty excited. (Okay, maybe that wasn’t so brief.)

Extra: I had to toss in the one last photo of me at a recent metal (Megadeth & Motorhead) concert.

CS 601 – MySQL INSERT … SET syntax

While working on my project, I came across the following. The standard syntax for inserting items into a database is something akin to:

INSERT INTO tblMyTable (FirstName, LastName, Email, Phone)
     VALUES ('John', 'Doe', 'johndoe@gmail.com', '1234567890')

This is standard SQL. However, MySQL has an alternative syntax using SET which is similar to the UPDATE syntax:

INSERT INTO tblMyTable SET
       FirstName = 'John',
       LastName  = 'Doe',
       Email = 'johndoe@gmail.com',
       Phone = '1234567890'

I ended up using the alternative syntax throughout my project. Why? I felt it is much cleaner and easier to read than the standard syntax, especially when removing a column to insert. (When adding a column, it’s easy enough to add them to the end of the lists.) It should also greatly reduce errors from incorrect ordering between column names and values since they’re right next to each other. I realize that using MySQL specific syntax would break the site if it was moved to another database, but I don’t feel that was a concern for this project. In the real world, especially dealing with projects that are commercial and may/will grow larger, it might not be a good idea.

Here’s an example from my actual code:

$query = <<<EOT
    INSERT INTO tblReservations SET
        dtReservationDateTime = FROM_UNIXTIME($datetimeunix),
        intPartySize = {$_POST['numparty']},
        intCustomerID = "{$_POST['userid']}",
        vcReservationNameFirst = "{$_POST['firstname']}",
        vcReservationNameLast = "{$_POST['lastname']}",
        vcReservationEmail = "{$_POST['email']}",
        chReservationPhone = $phone,
        vcComments = "{$_POST['comment']}",
        dtReservationDateTimeMade = NOW()
EOT;

CS 601 – JQuery UI Datepicker – Blocking Dates

One of the things I wanted to do is to block certain dates from being enabled in the JQuery UI Datepicker widget. There is built-in functionality for blocking weekends, but not for particular dates, e.g., Christmas. Some web searching led me to a fairly easy solution. The widget has an option for providing a function to call before a date is shown. Here is my widget constructor:

$('#datepicker').datepicker({
                inline: true,
                showOn: "both",
                buttonImage: "/cafemarburg/images/calendar.jpg",
                minDate: +1,
                maxDate: +180,
                beforeShowDay: checkClosedDates
        });

checkClosedDates is a function that returns an array of the form [true/false, a class to add, a tooltip message], the last two being optional. It takes the date (as a Javascript object) as a parameter.
Here is the function call:

var closedFullDates = new Array(); // Used for one-time closures or irregular scheduled holidays
var closedYearlyDates = new Array('12-25','7-4'); // Used to regular holidays (e.g., Christmas)
var closedDaysOfWeek = new Array('0')
function checkClosedDates(date) {
 var blocked = false;
 var ymd = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate();
 var md = (date.getMonth()+1) + '-' + date.getDate();
 if ($.inArray(ymd,closedFullDates) > -1) {
     blocked = true;
 } else if ($.inArray(md,closedYearlyDates) != -1) {
     blocked = true;
 } else if ($.inArray(String(date.getDay()),closedDaysOfWeek) != -1) {
     blocked = true;             
 }
 if (blocked) {
    return [false,'dpClosedDate','Sorry, we are closed that day.'];
 } else {
     return [true];
 }
}

As can be seen, I use three separate arrays. One is for one-time events or events that change date year to year. Another is for dates that occur on the same date. The third is for days of the week.