Browsed by
Author: Jon Steege

2 hours of Video on JavaScript from Douglas Crockford

2 hours of Video on JavaScript from Douglas Crockford

I spend a lot of time doing web development in my daily life. I am employed as a software engineer, and as part of that employment, I get the opportunity to program in JavaScript from time to time. I’ll be the first to admit that I am not great at it, as the language was never formally “taught” to me. Because of this, I have found several interesting parts of the language that have caused me some problems over time. Below are several links to videos containing instruction from Douglas Crockford on the do’s and dont’s of the JavaScript language, which I found very informative, given the problem I ran into a while ago on the project I am working on.

The problem I had to solve was introduced by another programmer, and that is: he did not formally declare a variable, but instead just started using it. Obviously, I did not discover this until much later, however. Unfortunatly, this variable was set up as a counter, and because the name was generic, it was used in several functions to accumulate the count within different functions. The person who originally programmed it did not know any better, and probably thought that while odd, since javascript allowed him to use the variable without issue, that it must be ok.

Well, it turns out, I got the task of debugging this particular code, which was throwing some sort of “index out of bounds” error that no one could find. After many days of beating my head against the problem, it turned out that instead of declaring var i = 0; in some places, “i” simply came in to use, and was never formally declared. When I found this problem, the var declaration added to the variable fixed the problem, but I never really knew what was going on in the first place to cause the problem, because the error was showing up in different methods, which didn’t make sense because of my presumptions about scope in JavaScript.

It turns out, if you don’t formally declare a variable in JavaScript, but instead just start using it, the scope for that variable is global. I discovered this only recently, after watching a great series on JavaScript by Douglas Crockford. The series is available via Yahoo!’s video service, and is entitled “The JavaScript Programming Language”.

The series is about 2 hours in length, and covers a vast amount of JavaScript nuances and gotchas, and is highly recommended for even the seasoned JavaScript programmer. Douglas Crockford also is the author of a very cool tool you may be familiar with, called JSLint. This tool is very interesting, in that it will tell you more about your JS programming habits than you ever wanted to know. It is a great tool, and I highly recommend investigating these tools to help you become a better JS programmer.

Drive Train Industries is Top Notch

Drive Train Industries is Top Notch

Rocky Mountain Thunder

My dad recently had the 2 piece drive shaft of his ’68 ford rebuilt by Drive Train Industries in Denver, Co. They did an excellent job with one day turnaround on the truck. We noticed a wicked shimmy above 40mph in the rear end, and seemed to be consuming u-joints at an irregular rate. They diagnosed and repaired it for only $210. They installed a new carrier bearing, balanced the driveshafts using a high speed spin balancer and installed brand new u-joints, all in one day, and for a ridiculously good price. Anyone who needs service on their work or high performance rear drive vehicles should check these guys out, because they are great. They even do custom drive shafts and LSDs for race cars, so if you need a rear end for your tubbed Nova, call them up.

NOPI Cancels Colorado and Utah Events

NOPI Cancels Colorado and Utah Events

weather in colorado

With monsoon season in full swing in Colorado, NOPI has cancelled the Colorado and Utah events, the first of which is scheduled for June 21st-22nd. The press release stated they “faced extreme weather at their past 8 events” and decided to cancel the event, leaving many racers and fans bewildered. Many racers have flocked to the Honda-Tech.com Drag Racing forum to discuss NOPI’s recent revelation, and many are not happy.

While most think they are just trying to hide financial trouble, I just want to know who their forecaster is. Anyone who can predict Colorado weather even a week out with this kind of accuracy deserves a Nobel Prize.