tomhoppe.com

Racing, Web Development, Photography, and Beer...Stuff that matters.

Archive for 2008

Never fear, the iPhone is here

Friday, July 11th, 2008

Finally! Corporate email support, 3G, GPS, and now I’ve got one :)

It was quite an adventure this morning, as I got in line around 6:30am at the store a few mins from our house. I was 55th in line (lucky number, sweet) and there were people that spent the night waiting.

The whole process with AT&T was a total and gigantic clusterfuck. Their systems were up, their systems were down, their systems were slow. They did something last night so where the staff had no idea what they were doing and were reading off instructions off printed sheets. Half the people that showed up to buy a phone had no idea of contracts, some didn’t have their license on them, just plain WOW

At least I had my laptop and wireless, so I got a bunch of work done while I waited. I got the phone and busted out of there after the lady told me everything was perfectly setup. 3 hours later and I’ve still got No Service. Time to call AT&T. Coming from Verizon, I’m real happy to have the iPhone, but real skeptical on being an AT&T customer. I hope this experience so far isn’t repeated on down the road :)

Better Firefox bookmarks toolbar

Monday, June 30th, 2008

I hate having “toolbars” under my address bar as it takes away real estate from webpages. Having said that, there are pages that I want access to with one click and not having to go to “bookmarks” and searching for them. I found a cool little way to have your cake and eat it to by moving the bookmarks toolbar items to the main file toolbar. They fill out the otherwise unused space between “Help” and your window controls.

  • Enable your Bookmarks Toolbar under View, Toolbars.
  • Go to View, Toolbars, Customize
  • Drag the “Bookmarks Toolbar Items” from the Bookmarks toolbar to the top bar next to “Help”

Now you can change those items around to have shorter descriptions so they fit. I ended up removing the names and going by just the icons. When you bookmark something that you want in there, just add it to the bookmarks toolbar and it pops up there. Brilliant!

Google AJAX Libraries API

Monday, June 23rd, 2008

Kind of old news, but Google is now hosting the latest and greatest versions of the most popular JS libraries including jQuery, prototype, script_aculou_us, etc

Because of the gzip compression and fast response of google’s servers, these files get to the users fast!

You can either use google’s loader or just link to the permanent paths of the files.

The Ajaxian has a great article on this

iUI is awesome

Monday, June 9th, 2008

It looks like I will be an official iPhone convert here shortly. I’ve been playing with some iPhone looking pages lately at work, and got to use the iUI JS library that Joe Hewitt created.

This library is awesome. It lets you code a page in standard, plain HTML and then converts the CSS/JS to an iPhone look and feel. Also, it sets up your links to enable the “slide in” navigation to work correctly between your links. Plain genius and its oh so easy to use.

With this work and the new “Corporate Friendly” 3G iPhone that is coming soon, I’m hoping to be able to get rid of this POS Palm 700w that I’ve been cursed with, and go to the iPhone for my phone/email device. I’m very excited. We’ll see what happens!

Road Atlanta ProIT

Tuesday, June 3rd, 2008

So we just got back from Road Atlanta. A fun as hell, but in the end, disappointing weekend. I started out with the test day and trying to finish shaking the rust off, trying some more lines, as well as gathering some data. I also wanted to give the Hankooks one last shot, to confirm my findings from the previous test (just as good lateral grip, but not as good under the brakes) The first few sessions went well with me finding some speed and putting down consistent good laps. The third session, I put down 2 killer laps, and decided to just shut it down for the day and not risk the car.

For the morning qualifying, I threw on the Hoosiers and went out with the red mist. I drove around traffic for a few laps and on the 4th one threw down a rocking lap. Came in early as I felt a high end miss on the car that was there throughout the whole qualifying. Checked out the timing sheet, and oh boy, 1:42.84. Pole by almost 3 seconds and a time that would have gotten me 2nd on the grid at the ARRC.

I checked the plugs and wires (all looked well), and turned the rear sway bar up for the afternoon qualifying. Figured I would try to set the car up very loose and see if I could hold onto it. The good news was that the bar worked well, but the miss was still there.

With the help of Bowie from Conover Motorsports and Matt from BHP Brakes I got a new distributor on with a quickness. I didn’t have time to test it before the race, as the miss was only there in 4th and 5th gear acceleration. Figured if the miss was still there, I was just going to punt on the race and not hurt the motor

I had a rough start as I got caught inbetween gears as the green flag flew, immediately putting me down two spots. No big deal as I was a good deal faster then the two guys behind me. I waited a few turns and passed them right back. Even better, the high end miss was gone.

I settled in for a few laps and opened up a big gap between me and 2nd place. After 4 laps though the field got bunched up behind a pace car as a car spun and broke in turn 1. During that restart, I let Mike Cottrell in an SM in front of me and helped push him along the straight for a little bit. Figured out though that I was just going to get into their race and mess it up, so I went and pushed ahead. Over the next 15 laps, I built up a 15 second lead while not pushing the car very hard.

On the last lap, the drivers side axle decides to let go. I got a big puff of smoke, lots of noise, along with the car not going anywhere. I thought I broke a lot more then I did! I went ahead and pulled it off to the side and watched the field go by to take the checkered :(

All in all, I obviously wished I would have finished, as I would have had a nice win and some good contingency $$, but what can you do. Oh well. At least it wasn’t something very expensive and I have some spare axles at the house. For the next set, I will be using Redline high temp grease in the CV joints hoping to prevent it from breaking down. We’ll see if that does the trick.

I’ll have some pictures from a pro photog that was there, so I’ll post those up as soon as I get them

VIR - Al Fairer Double SARRC

Tuesday, May 20th, 2008

Even though I really wanted, I couldn’t race this double weekend because of my broken hand. I went out instead with the Conover guys and helped out as much as a 1 handed gimp can do and took shome shots. Here are the ones from Sunday. I seem to have “misplaced” the pics from Saturday so I’ll try to find them tomorrow :)

Use it or lose it…..

Monday, April 14th, 2008

Its amazing how fast you lose a skill if you don’t use it for a few years

In my current day job of product development and client-side engineering, I haven’t been messing much with ASP, other then the occasional support for some in-house apps

I recently took a side job to make a database driven website for a jewelry store. The front end was a piece of cake, and took less time then I estimated. The asp back-end/adming tool/shopping cart on the other hand, bleh. Having been working pretty much 100% with Javascript, I “lost” the ASP syntax, methods, etc. I had to look all that up on google. I knew “what” I wanted to do, but I just couldn’t write it off the cuff like I can with JS these days.

In the end, it took certainly longer then planned, but I’m glad that I did it. I got the “asp mindset” back, and I haven’t lost a step in my day job either. Guess I came out smarter overall :)

Short weekend at Road Atlanta

Saturday, March 22nd, 2008

So it was a short weekend, just the test day, but not in a “bad” way.

Started out the weekend great. Beautiful friday, car was ready, we setup the new EZUP’s, and had a fairly pimpy pit area. Bolted on the Hoosiers, and it was time to go testing.

The first session I was bedding in the new BHP brakes, and just getting a feel for the car, nothing too special. I screwed up the DL-1 data acquisition by turning it off while still logging, so I got no data, and no info of how was fast I was going. The 2nd session, I kept the tires the same, but with the bedded in brakes and working DL-1, I put my head down and actually drove. I had a nice surprise as I came off the track and read the data, as I ran some damn good times. I realized my tire pressures were a bit off, and I felt the car could have been loosened up a touch, but it was an awesome second session ever. I really felt “in touch” with the car, and I’m really happy with the purchase. I’m certainly going to be keeping it around for a while!

The 3rd and 4th sessions, I bolted on the Hankooks to give them a shot. I ended up with the same lateral G’s in the corners, but I felt that they didn’t have as much braking grip as the Hoosiers. I locked up the brakes in 6 on the 2nd lap braking at the same spot as the Hoosiers, and didn’t have confidence in them the rest of the session. I was about a second off the Hoosiers, but it was also later in the day, and I probably could have braked later if I tried. In the end, I think the tires are very close to the same. I’m going to end up choosing the Hoosiers for my tire though, as there seem to be a LOT of availability issues with the Hankooks. Even though they offer a more contingency then the Hoosier, what good is having a lot of “Hankook Dollars” if you can’t use them because the tires aren’t here. Also the trackside support we get from Appalachian Tire for Hoosiers is second to none.

So now we get to the end of my “weekend”. I go to registration and come to find out, my comp license wasn’t renewed properly. I renewed, but apparently it only got applied to my membership. Dammit! Its also Good Friday, so SCCA is closed and nothing can happen. I’m told that maybe tomorrow they can hunt down someone and get it resolved , but even if they do, I miss qualifying. I’m not about to pay a $600 entry fee to start 2 races from the back of 50 cars on purpose. Also, this fiasco just took the “fun” out of the whole night for me, so I said “fuck it, only 45 mins from the house, I’m going home”.

Kind of a shame that SCCA sucks like this, but I guess I had some bad karma or some crap built up. Also looking at the ProIT times for today sucks even more, as I was over 2 seconds faster then the guy that won today. Oh well. Hopefully this won’t cost me the season championship, as there are only 5 races left, and 6 count towards year-end. I’ll have to have some REAL good luck to do great at the 5 that I’ll run.

addDomLoadEvent

Tuesday, March 18th, 2008

Using window.onload for Javascript creates a crappy UI, as it waits for the entire page, including all CSS, JS, and images to load. I avoided as much as possible, but for some things in the day job, we needed to use it. The best example being that we only had access to JS in the head of the page, but needed to immediately client side add some code to the bottom of the page.

For this, we used addLoadEvent and waited till everything was done. Having been fed up with this, I did some a big of searching and found a solution from The Future of the Web, by Jesse Skinner. Jesse’s script puts together a cross-browser way to wait for just the DOM to load, instead of all the images and text

This is easy for FF, Safari 3 Beta, and Opera, but a pain for IE and Safari 2. I changed his script slightly to be compatible with https and came up with the below code. Thanks Jesse!

.

addDOMLoadEvent = (function(){
    // create event function stack
    var load_events = [],safari_timer,done,exec,script;

 var init = function () {
            done = true;

            // kill the timer
            clearInterval(safari_timer);

            // execute each function in the stack in the order they were added
            while (exec = load_events.shift())
                exec();

            if (script) script.onreadystatechange = '';
        }

    return function (func) {
        // if the init function was already ran, just run this function now and stop
        if (done) return func();

        if (!load_events[0]) {
            // for Mozilla/Opera9
            if (document.addEventListener)
                document.addEventListener("DOMContentLoaded", init, false);

   /*@cc_on @*/
   /*@if (@_win32)
   var proto = "src='javascript:void(0)'";
   if (location.protocol == "https:") proto = "src=//0";
   document.write("<scr"+"ipt id=__ie_onload defer " + proto + ">< \/scr"+"ipt>");
   var script = document.getElementById("__ie_onload");
   script.onreadystatechange = function() {
    if (this.readyState == "complete") {
     init()
    }
   };
   /*@end @*/

            if (/WebKit/i.test(navigator.userAgent)) { // sniff
                safari_timer = setInterval(function() {
                    if (/loaded|complete/.test(document.readyState))
                        init(); // call the onload handler
                }, 10);
            }

            old_onload = window.onload;
            window.onload = function() {
                init();
                if (old_onload) old_onload();
            };
        }

        load_events.push(func);
    }
})();

Drag and drop Javascript

Tuesday, March 18th, 2008

I found a great overview of drag and drop by Quirksmode today, and I wanted to make sure I didn’t lose it or forget about it. Its a great explanation of drag and drop through JS with code examples, demos, and exactly how it does what. I only had a few minutes to look through it but it looks awesome.