tomhoppe.com

Archive for 2008

Barber!

Tuesday, September 2nd, 2008

Fun weekend! First off, the facilities at Barber are top notch. Everything is “F1 Quality”. From the manicured grass to the buildings/bathrooms, to the timing tower spectating areas with TV cameras on all the parts of the track.

I’ve never been to Barber before, so as I posted about previously, I played a bunch of video games to try to get used to the track before I drove it. It was certainly time well spent, as other then the obvious G’s that you feel, the visuals were right on with what I was seeing in real life, down to the braking points/zones.

I started out with qualifying on Saturday morning. I was able to use the new Dash3 part of my DL1 to display sector times and lap times, and I was able to run some decent times right off the bat. After only 6 laps on the track, I qualified 2nd in ITA and right after hometown boy Chuck Baader in his BMW, who was sitting on pole. Chuck put in a new motor since last season, and my time was faster then everyone’s lap times from this race last year, so I felt pretty good.

In no time at all it was time for the afternoon race. I started on the inside with Chuck in front of me. Got a decent, but not great start and took it easy for the first few turns. In the corkscrew turn, the 3rd place qualifier, Steve, had his air flow meter break and basically stall out on the outside of the turn. Just happens that I was on the inside, and the 4th place car of Willie Phee was right behind Steve. This allowed me to get a huge lead on Willie. By this time Chuck has pretty much checked out on the rest of us, so it was a very boring 15 lap race for me, basically driving around by myself and getting bored.

In nice contrast, Sunday ended up being a lot more exciting. I tried to find more time out there during qualifying, and got closer to Chuck, but still qualified 2nd. This time I got a GREAT start and pulled right alongside of Chuck before turn 1. As we entered Turn 1 three wide, Chuck got hit, and in turn hit me, which sent both of us off into the grass, still on the throttle, not letting up. Steve was able to get by both of us and started off a great battle with Chuck for the lead, while I hung back and watched. I was being held up in the turns by a higher classed (ITS) RX7, which was supposed to be much faster then I was. I ended up hitting him a few times in turns trying to push him out of my way as I couldn’t pass him cleanly. After a few laps, he got faster and then started getting in the way of the Chuck/Steve battle ahead of me. In the meantime, my car started overheating a bit. I had a bunch of grass stuck in the radiator opening, and also was right on this RX7′s bumper not getting any airflow. I lost focus in a few turns and lost a bit of ground to the lead pack. Chuck ended up passing Steve for the lead and I started reeling both of them in from 3rd. After a few fun laps of chasing and battling, I was able to pass Steve under braking into the hairpin and started to try to chase Chuck down. Unfortunately I wasn’t able to come back all the way and ended up in 2nd again, with a 2 second margin to Chuck. Not bad!

All in all, I feel good for this being my first time at Barber. Both Steve and Chuck live within miles of the track and have a lot of experience here. Chuck’s 325 BMW is also a lot better here then my car. He’s got a LOT more torque to get out of the tight turns, and my car never gets a chance to stretch its legs. Never even get into 5th gear. I also ended up eating two fairly new front tires because of all the wheelspin that I get out of the very slow turns.

Now I take some time off and work on the Jeep/House. Going to start working on the car again in a few weeks to get it ready for the ARRC in November.

2 ways of Javascript menu or navigation highlighting

Wednesday, August 27th, 2008

The following two ways are the way I do client side javascript menu highlighting. These work well if you have a site navigation or menu and you want to dynamically highlight the page that you are currently on. I use Method 1 when I have only a few items in the nav, as the JS for it is super easy, or I need to have relative URLs in my menu. Method 2 is better when there are a lot of items, as it relies only on the href and url and doesn’t need any extra stuff in the HTML. It does need absolute URLs in the menu href’s though in order to match correctly with the url.

Method 1 – This method relies on the fact that you will put id’s on each of the a elements with the value of the file name of that file. The HTML shows what I mean. The JS then just looks at the file name of the URL and makes that ID active. Super easy. There is also an “else” statement at the end of the JS so if the file name is blank because you are on “http://yourdomain.com/” it goes ahead and highlights the index menu item.

<div id="topMenu">
    <ul>
        <li><a id="index" href="">Blog</a></li>
        <li><a id="about" href="about.html">About</a></li>
        <li><a id="race_car" href="race_car.html">Race Car</a></li>
        <li><a id="contact" href="contact.html">Contact</a></li>
    </ul>
</div>
<script type="text/javascript" language="javascript">
var fileName=location.href.toLowerCase().substring( location.href.lastIndexOf("/")+1 ).split('.')[0];
if (document.getElementById(fileName)) {document.getElementById(fileName).className = "active";}
else {if (fileName == '') {document.getElementById('index').className = "active";}}
</script>

Method 2 – This method does not need any id’s in the a elements. What it does it look through the href statements in your menu and compares them to the URL. This method works better for larger menus.

<div id="topMenu">
    <ul>
        <li><a href="http://www.tomhoppe.com/test/index.html">Blog</a></li>
        <li><a href="http://www.tomhoppe.com/test/about.html">About</a></li>
        <li><a href="http://www.tomhoppe.com/test/race_car.html">Race Car</a></li>
        <li><a href="http://www.tomhoppe.com/test/contact.html">Contact</a></li>
    </ul>
</div>
<script type="text/javascript" language="javascript">
var theUrl = location.href.toLowerCase();
var navLinks = document.getElementById('topMenu').getElementsByTagName('a');

if (theUrl == 'http://www.tomhoppe.com/test/') { navLinks[0].className = 'active'; }
else {
    for (var i=0; i<navLinks.length; i++) {
        var NavLinkUrl = navLinks[i].getAttribute('href').toLowerCase();
        if (NavLinkUrl == theUrl) {navLinks[i].className = 'active';}
    }
}
</script>

Does training on a video game actually help you in racing?

Wednesday, August 27th, 2008

I’ve got a race at Barber Motorsports park in Birmingam, AL this weekend. As someone at work called it “LA” for “Lower Alabama”. I have been there a few times for Grand Am races to spectate, but never driven the track. With the wear and tear implications,the fact thats its already a 3 race weekend (I’m running a SARRC Race Sat and Sunday, and Dan, the previous car owner, is driving in the Saturday ProIT), and the fact that I wanted to do this little experiment, I’m not running the test day on Friday. That means my first view/action on this track will be qualifying on Saturday morning for the SARRC race.

I’m usually pretty good at getting up to speed because of my autox experience, so I’m not TOO worried about this. Just in case though, I’ve spent quite a few hours behind the wheel of a couple of PC Racing Sims on the track. The two sims I’ve been playing are Race07 and rFactor. They are both fairly realistic and with my wheel/pedal setup, feel great. Also, compared to a few real videos of the track, I think they have the layout and corners fairly nailed. I’ve been driving a Mini Cooper in Race07, as its the closest thing to my Integra, and a VW Rabbit in rFactor.

I’ve probably got about 2 hours or so of video game track time now and plan to spend another hour or so over the next couple of days. We’ll see how close the game is to real life and if things like brake points and landmarks are close enough so I can qualify near the pointy end of the field!

I also posted on the roadraceautox.com forum to see what others thought

Work work work work …….

Wednesday, August 20th, 2008

I’ve noticed that after working a TON, as in 80+ hour weeks for a few weeks, when that stops and I go back to “normal”, I have a real hard time adjusting to “normal” life. I get home and its as if my brain is used to still running at 100mph and not being able to just “sit still”. Real wierd feeling. Almost as if I’m lost just relaxing, and always feeling like its wierd that I’m not “doing something”.

Or maybe I just need a vacation …… :)

First foray in PHP

Wednesday, August 20th, 2008

So I’ve been a windows guy personally. Its just always what the companies where I worked used, and what I personally used. The web forum that I run has been using an antiquated ASP forum software for a while though, and it was time to move on. After evaluating some of the options, looks like vBulletin using PHP was the best one.

I have to say that I’m very impressed with my experience so far. PHP is installed and has been running like a champ on our IIS 6.0 server. The vBulletin and mySQL installs both went super smooth and I had the new forum up and running and data transferred in no time. I also made some custom php pages for redirects and the like, as well as a few edits to vBulletin’s pages.

I’m happy with the speed in which I was able to sort of “pick up” php. I was a little worried at first about being able to jump into it, but its like an “easy” ASP with a little bit of asp and javascript syntax all thrown into one. All in all, easy to learn and because of the community support, there is all kinds of mySQL and php info out there on google.