Monthly Archives: October 2010

Regarding Halo Stats application reviews

Several of the reviews in Palm’s catalog commented on the lack of challenge progress, and that the Spartan images don’t appear correctly.  I don’t want to write a review just to comment to those people, so I did the next best thing by posting here.

Spartan images are controlled by Bungie, Halo Stats does not manipulate them in any way.  Until Bungie begins updating the images, the changes will not be reflected in Halo Stats.  In that same vein, Bungie does not (currently) provide challenge progress information in their API.  If it becomes available, it will be implemented.

Other than that, the reviews have been great so far!  The other recurring comment is regarding K/D ratios and commendations.  The code for that information is being written, and an update should be available soon.

Halo Stats

I haven’t had time to post about this, as I’ve been out of town, and otherwise busy.  But Halo Stats is now available in the Palm Application Catalog!  The latest update for it was pushed out yesterday as well, adding daily / weekly challenges and some extra player information.

Halo Stats has already received 40 reviews (almost all positive) and surpassed Quick Subnets in downloads.  The next update will have commendation information and a new interface, some of which is already written into the current version (0.5.4).  Also, Win/Loss ratios will be implemented, as it’s one of the top requests in reviews.

Expect the update sometime next week!  And thanks everyone who is downloading it!

Fast output into TextArea

Note: The example here has been written in VBScript, but the principles should apply to JavaScript as well.

While I was working on the KML generator for work, I wanted a text log to show errors if they came up.  The information wasn’t important enough to save to a file, but it needed to be displayed to the user.  However, as the HTA would go through data, the speed at which the log file would update would become slower and slower, eventually appearing to lock up.  Considering it was dealing with approx. 500kb across three CSV files, this was not acceptable.

Here is a simplified version of the HTA script:

  <TITLE>KML Generator</TITLE>
Do Until (conditions)
  realTimeOutput.value = realtimeinfo.value & "Message. " & vbCrLf
   <textarea id="realTimeOutput" readonly>Waiting for data.</textarea>

The code in red is fine for a quick addition, but terrible for fast successive additions to the textarea.  The content of the textarea was being copied, the addition appended, then the entire value was being written back in.  So, after several searches and attempting other re-workings of that same idea, I found this method of doing it:

realTimeOutput.appendChild(document.createtextnode("Message" & vbCrLf))

In this case everything (except vbCrLf) is carried out via DOM functions, allowing the text to be appended into the textarea without copying everything already in there.  The speed difference was very apparent, as what would come to a near-lockup was now instant.  It seems unusual to create a new text node just to add text, but it’s the only way to update the textarea via the DOM.  In a more memory-sensitive environment, you could assign the node to a variable and null it out as needed. But honestly, at that point I’d ask why VBScript is still being used.

Norton Ghost, Virtual Machines, and weird MBRs.

So, here is something to show you, a physical laptop backup restored into a VirtualBox machine:

Laptop Running in VM

Laptop running in VM

I’m doing this for work, and while it was a fun “just to do it” project, it also served the purpose of testing the backup, and giving us a place to test fixes and (as shown) attempting upgrades.

Ultimately, the backup was done with Norton Ghost 15.0.  I was really hoping to be able to do it with CloneZilla, saving some cash and using Open Source software.  However, no matter what options I entered in that software, it could not restore into the VM. At first I thought it was just the difficulties of moving an OS to another machine. But trying fixes from MergeIDE to UBCD4Win’s Fix IDE / Fix HDC to no avail, it was something else.  I was seeing that there was something detected on the drive – no “Operating System Not Found” error - but it clearly wasn’t loading the OS. 

The fact that this laptop was registering as having 5 partitions, one of which was without a file system, and the other labeled as “DOS” told me that there may be an abnormal MBR structure or partition table in there 😉

When we moved to Ghost, I was seeing the same errors.  Fortunately, Ghost has some extra utilities on their live CD, allowing me to save the MBR and Partition Table separately:

Extra Options in Norton Ghost

Ghost Options

After saving and restoring the MBR and Partition Tables manually, the image booted without issue in the Virtual Machine.  What strikes me as strange is that CloneZilla will back up the MBR and partition table automatically.  This issue shouldn’t have come up with CloneZilla if it’s working as it is supposed to.  I may have to look into that later if I get the time.

If I was looking to do a straight physical to virtual conversion, there are much better options to use.  Disk2Vhd would be one of them, as @CC_DKP pointed out on Twitter.  But the purpose here was just to test a backup, so I was working from a regular backup, not a VHD file.

One last note about Ghost:  While I like 15.0, I can’t recommend it for legacy hardware.  The only reason I got it to work with this laptop is because we installed more RAM.  Worth it?  Completely.  But if the laptop couldn’t take the upgrade we would’ve been dead in the water.