Friday, January 26, 2007
This looks to be a terrific new tool for all web developers. Firebug allows you to inspect the contents of pages, scripts, css and DOM. I've only perused it for a few minutes but the possiblities are staggering. I sure could have used this before! Most interestingly perhaps is the javascript debugger that allows you to set breakpoints. Sweet!

1/26/2007 9:24:31 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 
 Thursday, January 25, 2007
In my Asteroid Occultation site I generate dynamic Google Maps that draw the occultation paths with 5 Polyline elements. One of the things I wanted to do is center the polylines in the displayed map. Easy enough, I parse an XML response with coordinates (the AJAX part of the project) and store those in arrays. Simply take the middle coordinate from the middle polyline and center on that when the map is fully rendered. I wrote something like this:

var pts[];

// store coordinates in pts array

var middle = pts[pts.length / 2];


Easy as pi. Not. For some reason my maps wouldn't always center properly. Adding some debug messages I found that 'middle' was sometimes set to undefined. Unlike other languages I've used in the past (c/c++, VB6, VB.NET, Perl, PHP) if you divide an integer by another integer and use the result as another integer, you get, well, an integer. Not so in Javascript apparently. pts[5.5] is nothing. I assumed, incorrectly, that this would be pts[5] or pts[6]. For my application I don't care if the left or right middle element is chosen.

A little Googling found this article http://rextang.net/blogs/work/archive/2006/01/09/3325.aspx which suggests an easy way to turn a number into an integer. Simply do a bitwise or with 0:

var middle = pts[(pts.length / 2) | 0];

This works great! Someone then posted a comment saying that 'parseInt' is a more readable solution and I agree. I still liked the |0 solution though :)

1/25/2007 1:50:06 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Wednesday, January 24, 2007
I've been participating in asteroid occultation measurements for a while now. To facilitate the creation of maps of the events I created a new website that uses dynamic data rather than static to display events. In the process I learned a few things about how to automate windows applications using Perl (check http://sourceforge.net/projects/winguitest/ ), creating dynamic Google Maps using AJAX and using MySQL with ASP.NET. I also learned a lot more about operating winoccult, a program that calculates and displays occultations of stars by asteroids.

Check it out at http://occult.tungstentech.com.
1/24/2007 10:38:07 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, January 22, 2007
SD Time's Linkapalooza alerted me to this site which provides 12 standard CSS templates to quickly create a professional appearing website. I think we'll all agree many sites could use a smidgen of professionalism :) Check them out!

1/22/2007 11:50:10 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, January 11, 2007
This is a classic example of English understatement. I wish I could talk like that. The words I mean, not the accent, that's easy. The way he describes what happened to him (getting arrested in the most violent manner for jaywalking) is a great display of being able to being polite and accusatory at the same time. The vid is a bit long but worth it, I think.

http://www.timesonline.co.uk/article/0,,11069-2541133,00.html

1/11/2007 1:00:10 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, October 02, 2006
After reading about a half dozen reviews online on the Vantec NexStar LX NAS enclosure I decided to get one. I have a small network at home with 3 desktops and a laptop. It makes sense to have a LAN accessible shared storage location to keep things like documents and downloads. We just moved so my budget is a bit limited. The NexStar seemed the ideal solution as it is a BYOD (Bring You Own Disk) solution. I have a few unused IDE drives lying around so this would be cool.

The first disk I tried, an old Maxtor 90840D6 with 8GB capacity did not work over the LAN. It worked fine using the USB connection. Using the web interface I was unable to configure shares on the disk. Bummer. So I put in a somewhat newer Maxtor 52049H4 with 20 GB capacity. Because NAS shares can only reside on a FAT32 partition I had to reformat the drives before installing. It also precludes me from arbitrarily trying other drives I have as they are NTFS drives with content I don't want to lose if I can help it. Back to the 20GB drive. This time I was able to create shares. Wooo! I needed to download an application and figured it was a good opportunity to store this on the NAS box for sharing. Firefox put the .zip on the share without issue. I then attempted to open the archive with 7-Zip . The archive opened fine but files could not be extracted. WinZip couldn't either.

I then proceeded to do various experiments to conclude the following:

  • USB access works fine
  • ftp writes corrupt files
  • ftp reads corrupt files
  • NAS reads corrupt files
  • NAS writes corrupt files
This failure is so blatant that it's hard to believe Vantec would have shipped a product so horribly broken. It's also hard to believe the device could be so thoroughly broken without any complaints online. I suspect that it's a drive compatibility issue. Somehow these 2 old IDE drives do not work with the NAS/LAN code in de device. Other testers have used newer drives and have not encountered these problems.

Please add a comment if you have any experience (good or bad) with this box. I would prefer to not have to buy a new hard drive but it may be the only solution. I have contacted vantec and hope to hear from them soon.

10/2/2006 12:48:20 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [46]  | 
 Monday, August 07, 2006
We'll see what this is good for but I've now claimed my blog on Technorati. I'm supposed to put this snippet on the page:

8/7/2006 2:34:04 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  | 
 Tuesday, May 30, 2006
I had several sites hosted at Blazernetwork for about a year or so. Service was reasonable, not great. Email outages were too frequent but at least they'd get repaired and we'd be up and running again soon after. Not this time. Last Friday afternoon email and web services went off the air and they haven't returned since (it's Tuesday now). All attempts to reach them were fruitless. Apparently they let their domain name expire. Not a good thing when that's needed to translate names into IP addresses.

Thankfully I was able to figure out the IP addresses for the Blazer machines where my stuff is hosted. An old email had the IP address of the mail host and it's still running so I could copy my IMAP folders over to my local computer. I then wrote a simple Perl script that uses wget to attempt retrieval of a file using ftp in the address range of the email server (assuming a 24 bit subnet mask). I then transfered all my files. Finally I needed a copy of my MS SQL database so I wrote another Perl script that attempts to open a socket on the MS SQL port number in that same range of IP addresses. Bingo!

I now use http://www.bananahosting.com which appears to work fine for now. I hope it stays that way as moving websites really is a pain. Luckily it uses HSphere so the learning curve isn't that great. It's a small shop but Johnny is on the ball and provides great support in his forums.

5/30/2006 12:18:14 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |