tomhoppe.com

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

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.

Regular Expression Cheat Sheet

Monday, August 11th, 2008

I just wanted to give myself a reference for a regular expression cheat sheet. This is much easier then forgetting and having to google for what I need. Pretty much all you ever need to know to setup a regexp.

. Matches any single character (many applications exclude newlines, and exactly which characters are considered newlines is flavor, character encoding, and platform specific, but it is safe to assume that the line feed character is included). Within POSIX bracket expressions, the dot character matches a literal dot. For example, a.c matches “abc“, etc., but [a.c] matches only “a“, “.“, or “c“.
[ ] A bracket expression. Matches a single character that is contained within the brackets. For example, [abc] matches “a“, “b“, or “c“. [a-z] specifies a range which matches any lowercase letter from “a” to “z“. These forms can be mixed: [abcx-z] matches “a“, “b“, “c“, “x“, “y“, and “z“, as does [a-cx-z].

The - character is treated as a literal character if it is the last or the first character within the brackets, or if it is escaped with a backslash: [abc-], [-abc], or [a\-bc].

[^ ] Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than “a“, “b“, or “c“. [^a-z] matches any single character that is not a lowercase letter from “a” to “z“. As above, literal characters and ranges can be mixed.
^ Matches the starting position within the string. In line-based tools, it matches the starting position of any line.
$ Matches the ending position of the string or the position just before a string-ending newline. In line-based tools, it matches the ending position of any line.
\( \) Defines a marked subexpression. The string matched within the parentheses can be recalled later (see the next entry, \n). A marked subexpression is also called a block or capturing group.
\n Matches what the nth marked subexpression matched, where n is a digit from 1 to 9. This construct is theoretically irregular and was not adopted in the POSIX ERE syntax. Some tools allow referencing more than nine capturing groups.
* Matches the preceding element zero or more times. For example, ab*c matches “ac“, “abc“, “abbbc“, etc. [xyz]* matches “”, “x“, “y“, “z“, “zx“, “zyx“, “xyzzy“, and so on. \(ab\)* matches “”, “ab“, “abab“, “ababab“, and so on.
\{m,n\} Matches the preceding element at least m and not more than n times. For example, a\{3,5\} matches only “aaa“, “aaaa“, and “aaaaa“. This is not found in a few, older instances of regular expressions.

Granite!

Tuesday, July 29th, 2008

I can’t believe I’m blogging about a kitchen instead of the race car :)

Poor “RedRum” has been sitting in the driveway getting rained on. I discovered yesterday that I have a coolant leak somewhere. Looks to be around the middleish of the motor so maybe its a cracked hose or similar. Going to diagnose this weekend and get her ready for the Barber race at the end of August.

Ok, back to the kitchen. Got the granite installed today. Looks absolutely AWESOME.

Road Atlanta Win

Monday, July 21st, 2008

I had another awesome weekend at Road Atlanta. This time it was a super super hot July weekend with a SARRC 15 lap sprint race, and an ECR 90 minute enduro race with the old car owner as codriver. The sprint races are the ones I focus on, while we were just running the enduro so Dan could keep his competition license. In SCCA, you have to run 2 races a year to maintain a license.

The weekend started out with qualifying, and I put myself on pole by 2 seconds for the SARRC race. I only ran a 1:44.3, but considering the hot weather, it was a pretty good time that I was happy with. In the afternoon, Dan got in the car and shook some rust off, putting us middle of the pack for the start of the ECR. Saturday evening was eventful, with me leaving the new brake pads I needed at work. We had to drive back from Road Atlanta and ended up spending the night in Marietta. Next time I’m making a list before leaving the house :)

We put on the older Hoosier tires for Sunday morning’s 90 minute ECR. Immediately, I noticed a vibration above 100mph, which was probably an out of balance tire or two. I came into the pits after about 15 minutes instead of my 45, as I didn’t want to hurt the car. It wasn’t worth continuing with everything shaking, as this wasn’t a points race or anything. We took the tires off and got them balanced with enough time for Dan to get 45 mins in the car, and finish out the race. No damage, no real wear on the car, success!

Sunday afternoon was the SARRC Sprint. I put on some fresh(er) tires and got ready to kick some butt. It was a fairly uneventful race, which on one hand was nice, but I would have like to have a little more of a fight. I drove hard for 5 laps and put some time on the rest of the field. After that I put it on cruise control and finished off the win. It was the first win (out of 2 races) in the new car. The last one I broke an axle with a 15 second lead on the last lap :) Brian Cembor also came out to watch and took my camera for a spin. He ended up with a few great pics of my car, as well as Kirk’s Golf. These are also the first “evidence” of the new car on track! As a photographer, I never get to take pictures of my OWN car.

On a sadder note, it was a weekend full of carnage for some other racers. Everything from spins, to wall hits, to totalled cars, to flips. I got lucky avoiding the bad luck and came out of the weekend with no damage, other then the scrapes on the front bumper from some bump drafting :)

The Laptop "Drive of Shame"

Monday, July 14th, 2008

Funny article I read today from slashdot. I’ve done this I think 3 times in my 4 years at WebMD. With a 20+ minute commute, that sure sucks!

http://www.networkworld.com/community/node/29791

Finally worked on the race car

Saturday, July 12th, 2008

After what seemed like an eternity I finally got to work on the race car this morning. The next race is Road Atlanta next weekend. All the qualifyings will be on Saturday and then I will be doing a 30 minute sprint race by myself on Sunday morning and then splitting a 90 minute enduro with the old owner in the afternoon. Late July in Atlanta should be scorching so I’m going to start drinking water starting Monday. This should be a well attended weekend, so I should hopefully have some on track photos of the race car finally. Its nice being a photographer, but no one takes pictures of YOUR car. This time I’m going to set loose my camera with a bunch of friends and we’ll see what comes out :)

On the car note, I finished rebuilding both axles today. Just need the boot clamps and those can go back in the car. Holy CRAP that is a messy job. The grease that came out of the old ones was super nasty, but other then that, they looked great. Not sure if I’m going to drop the $300 on raxles unless I keep on breaking them. Hopefully the redline grease prevents the failure I had last race. Other then that, just need to bleed the brakes, a quick oil change, get the new tires mounted up and make sure all the bolts are tight. Might also do a quickie alignment to make sure everything is still square.

Lastly I broke out the powerwasher and washed all the mud off the jeep. It looks sort of weird being clean! We probably won’t get another chance to get her dirty again till August :(