Welcome to the Boolean blog

Here you will find details of news, projects, releases and other bits and pieces that we are working on at Boolean. We hope that you find something of interest amongst the archives.

Code snippets, methodologies and useful links will also be mentioned here.

Where there is more to logic than TRUE or FALSE

Archive for 'Hardware'

Using Google to host jQuery

Using Google to host your jQuery (or other applicable content) has several advantages over hosting a version on your own server including better caching, decreased latency, and increased parallelism. There are plenty of other articles to discuss the merits of decreased latency benefits of a CDN or the effects of parallelism on browsers so it wont be covered here.

Caching
Perhaps the most compelling reason to use Google to host your jQuery is that your users actually may not need to download it at all. If you’re hosting jQuery locally then your users must download a copy at least once. Your users probably already have multiple identical copies of jQuery in their browsers cache from other sites, but those copies are ignored when they visit your site.
When a browser sees references to a CDN-hosted copy of jQuery it understands they all refer to exactly same file. The browser trusts that those files are identical and wont re-request the file if it’s already cached.

Execution
So, now that we know that Google is a good place to serve up our jQuery from how are we going to do it? I believe the best way is also the simplest:

<script src=”//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”></script>
<script>window.jQuery || document.write(‘<script src=”js/libs/jquery-1.7.1.min.js”><\/script>’)</script>

This will point to Google to host the jQuery library, but fall back to local hosting in the event of connectivity issues.

Netgear DG834N dead WiFi

The problem began when both the green WiFi light on the DG834N (v1) ADSL/router stopped functioning and the ability to see the SSID being broadcast ceased. It seemed nothing had changed and during transport from one location to another it had simply died.

To begin with I flashed the latest firmware to the device. It is really important to do this via a wired connection to these devices; often if you perform the operation via wireless the upload of the firmware partially fails and the device ends up becoming a brick. You have been warned!

With new firmware I rebooted the device and at this point the WiFi light turned green. I congratulated myself and expected to find the SSID being broadcast as per normal. It was not to be however, and many hours were about to be spent solving the problem.

I tried many resets – including a hard reset. To perform a hard reset hold the reset button in for 20 seconds with power, continuing to hold the reset button but remove the power for 20 seconds, and finally connect the power while still holding in the reset button. So: 60 seconds holding in the reset button, 20 powered, 20 unpowered, 20 powered. If this reset works properly the power LED will flash between red and green.

After a phenomenal amount of searching the internet I found a few clues to the issue and eventually solved it.

The WiFi component on this model is a plug in module that can sometimes become loose. Open the case, pull the module out, and re-insert firmly. The module is instantly recognisable by the two antenna wires that attach to it.
Note: There are two torx screws that need to be removed underneath at the base and also two underneath the large sticker label at the rear of the unit.

The future:
Apparently the chipset on this model is notorious for heat generation eventually leading to failure. A future mod for this device could be using a dremel to carve out a hole in the chasis and subsequently add a fan to improve airflow.
With the simple plug in antenna arrangement these could also be replaced; however I have had no issues with WiFi performance.
The power supply that comes with these devices are also reputed to be quite underpowered. Mine seemed quite heavy duty so I dont think I will need to replace it unless the addition of a fan increases the current draw too much.