Why My Server Repeatedly Beeps

Yesterday I found that my server, a DELL PowerEdge SC440, repeatedly beeped. Very annoying and concerning, because beeping usually means hardware fault. I did some diagnostics and could not find anything out of the usual, so I rebooted the server and noticed, that the beeping seemed only to occur whenever Windows Server 2003 was up and running.

Using Task Manager I noticed that my DynDNS service was using more CPU than usual and that my indexing service did the same. Although stopping the indexing service did not solve the problem, stopping the DynDNS service did.

Apparently the DynDNS service beeps, whenever it fails, unfortunately it does not leave any message about this in the event log. I upgraded the DynDNS service to the latest version and the problem went away. I do not know, what DynDNS have changed, but my service was unable to update DNS until it was upgraded.

How To Create "Classes" In JavaScript

Functions in JavaScripts are objects themselves and objects in JavaScript are associative arrays. An associative array is an abstract data type consisting of unique keys with associated values. Very simply put, this means that you can use the function in JavaScript as a class.

The point is to add keys and values inside the function. Then "new" the function and you have the behaviour of a class. You can reference your instance of the function and move it back and forth between methods. E.g. I use this in a script that connects to a database an retrieve some values that I store in my instance of the function.

function Car(brand, type) {
         this.brand = brand;
         this.type = type;   
 }

Proving that the function is indeed an associative array, try outputting the car example the following way:



    var car = new Car("Toyota", "Aygo");
    
    // Syntactic Sugar
    alert("My car is a " + car.brand + " " + car.type);
    
    // Associative Array
    alert("My car is a " + car["brand"] + " " + car["type"]);    
    

It will give you the same output.

A personal note: I think the JavaScript syntax in this matter is lacking a Class keyword. Having functions act as classes obfuscates the readability of the code. I think it is important to have a good coding convention for JavaScript.

Happy programming!