Monthly Archives: September 2005

Darlington Park Go Karts

Darlington Park Go Karting Race Track, Gold CoastOn the weekend of the 17th September, we upheld the long standing tradition of a Bucks Party for the Groom. We decided to break the day into four main parts:

  1. Go Karting
  2. Lunch
  3. Race Simulation
  4. Drinking

We turned up to Darlington Park Raceway at about 8.30 in the morning for a package event. It included a warm up, qualifying, three races and a final. The circuit was fantastic, sitting just down from the crest of the hill. It was fast, without being too straight and very interesting to drive with all of the up and down sections; one of the most entertaining and fun circuits I’ve ever raced on in a go-kart.

I didn’t place at all, though I had a blast. The standout driver across the races was without a doubt, Danny. He was consistently faster than everyone else on the circuit, at times up to 2 seconds per lap – with times in the 62 second area.

There were plenty of thrills, I know I went in too deep into a corner and broadslided into my older brother Andrew. Meanwhile, Brendan had some sort of a break failure (which we all thought was worth a good laugh afterwards), in the fastest section of the track. Fortunately, or unfortunate, depending on how you look at it – there were no spills.

All and all, it was an excellent morning of racing and I think everyone had a great time.

Pure Blonde

Pure Blonde Beer, a product by Cartlon Development Group - a division of Carlton & United Beverages.After dining on a fine Thai Massaman Beef with Wayne for dinner tonight, he picked up a new beer, the Pure Blonde by Cartlon United. Carlton describe it as a lighter, crisper, aromatic lager that delivers superior taste; which has been specially brewed longer to produce a beer that is lower in carbohydrates.

I thought it was quite funny that they are advertising it as a low carbohydrate beer. That in itself, is really quite a good thing since beer is associated to beer bellies, which aren’t a pretty sight with a shirt off. What really made me chuckle was when Wayne referred to them as “a geek beer”. I instantly had mental images of a huge, overweight man, sitting on an office chair with his gut hanging out sucking back the cold ones.

JavaScript ParseInt Cast Error

It would appear there is some sort of an auto-casting problem in JavaScript. I have an external JavaScript file included into a page which defines a set of arrays, a line from the file looks like this:

  1. var resortPAArray = new Array('("1 Bed","1 Bedroom","2","3")','("2 Bed","2 Bedroom","3","5")','("Penthouse","Penthouse","4","10")');

The two numbers in each inner array represent the minimum and maximum people allowed to stay in that room type, for instance a 2 Bed bedroom can sleep a minimum of three and a maximum of five. There is a line in the JavaScript file for each building and they are used to auto-populate a booking form (to save posting back to the server on every change). The scripts were executing without error, until we added a room type which allowed ten (10) or more people in it.

When you select the building, it uses the inner arrays to populate a dropdown box with the room types (1 Bedroom, 2 Bedroom, ..). Once you select the room type, it then populates the next dropdown with the corresponding min/max people for that room type. Out of interest, the min/max values are assigned as follows where tmpArray represents an inner array:

  1. minpax=tmpArray[2];
  2. maxpax=tmpArray[3];

From here, those values are used in a for loop as follows:

  1. for (var i=minpax; i<=maxpax; i++) {
  2. // code here
  3. }

Remember, at this point the script is executing without any problems. When the values are assigned to the minpax and maxpax variables, they are technically strings – since they are defined in the inner arrays with quotes around them. Conveniently, JavaScript auto-casts values for you – as such the strings are cast to a numeric internally and the mathematic comparison is done.

Unfortunately, when a string value of 10 was assigned to maxpax, the for loop never executed and the as such, you couldn’t select how many people you wanted in that room. Initially, it made no sense at all. The JavaScript file for this building was structurally sound, no missing quotes, brackets or commas. All the values were in place, no strange characters at all – it was, for all intensive purposes, just like all the others.

The solution was quite simple, explicitly cast the values for minpax/maxpax when they are initially assigned or during the for loop.

  1. for (var i=parseInt(minpax); i<=parseInt(maxpax); i++) {
  2. // code here
  3. }

The Uplate Game Show With Hotdogs

Not long after Hotdogs was evicted from the Big Brother house, he signed a deal with Network Ten for his own show. The show, “The Uplate Game Show” would take the place of “Big Brother Uplate” that was hosted by Mike Goldman.

While Big Brother was running, Uplate with Mike Goldman worked. He would talk about the day that just passed, show snippets of what happened during the day and live feeds from the house. While that was going on, there were also little brain teaser type games being played – an anagram game for instance.

This however, is in stark contrast to The Uplate Game Show. One of the primary reasons it worked with Mike Goldman, was the audience were watching to find out about the craze that is Big Brother. Unfortunately for Hotdogs, he doesn’t have any of that – which leaves him with pointless games and his lack luster hosting ability.

The last couple of times I’ve seen it before going to bed, he is calling people that have registered on his list. Problem is, the show is that boring that once they register they don’t watch it again. Last night again, he called three people who were in bed, the call went something like this (my emphasis and paraphrasing):

Hotdogs: HI!!!!, this is Hotdogs from the Uplate Game show!!!11one
Them: umm, heelllloo.. who is it again..?
Hotdogs: Its Hotdogs!!!!11one, did you register on the Uplate Game Show list????
Them: umm, sorry.. you’ll have to speak a little slower
Hotdogs: The Uplate Game Show, did you register???
Them: umm, no I didn’t.. maybe it was my daughter but she has been in bed for 3 hours already
Hotdogs: well I guess I don’t get to give away a prize tonight then
Them: nope, sorry.

If that isn’t bad enough, imagine the worst TV host you can. Now imagine them on TV for an hour and a half a night, with absolutely no content to discuss at all. It isn’t an entertainment show, he doesn’t discuss any current events at all – its just him, his Uplate list (that no one is awake for), the crap games and him babbling for the whole thing repeating himself over and over.

I can’t believe that the show is on TV, it is appalling.