Category Archives: QNS Applications

Previous Work: Halo Stats (2010-2011)

 

Download the Halo Stats for TouchPad source code

When Halo Reach was released a few years ago, I stumbled upon their statistics API and saw an opportunity for a new webOS application.  I had seen some success with my Quick Subnets app and wanted to develop more, but a creative writer’s block had set in and I couldn’t find something I wanted to build.  When I saw the API that was available, inspiration finally hit!  I created an application that allowed the user to look up any Halo Reach player and see their information.

Now, I’ll be the first person to downplay the abilities of Halo Stats.  It basically only loads player and challenge data, when other applications load all kinds of per-match statistics and information, and even display it in a better format.  But at the time, deciding to write it was a lofty goal.  I had never written an application that connects to the internet before other than some class projects in college, and I didn’t really know about AJAX and JSON beyond just the concepts of them.  Writing this was an opportunity to learn both of those concepts, and through that further expand my Javascript knowledge.

One thing I remember in particular is finding out how easy it is to access JSON compared to XML or other formats.  To do this day I opt for JSON when I can because of that.  I also remember that the frameworks used on the webOS hardware would block XMLHttpRequest calls, and wanted their abstracted versions to be used instead.  That was an adventure in troubleshooting almost worth its own post!

After I had written Halo Stats for the Palm Pre, I was actually contacted by a programmer representative at Palm who wanted to get me set up to write more apps, and even encouraged me to get a TouchPad version of the application together before it launched.  The TouchPad was using a new framework called Enyo, while the Pre had used Prototype.  So at the time I was writing code for a framework with no documentation outside the HP/Palm forums, for hardware that hadn’t been released to the public yet.  All my testing was done via web browser or emulator.  It was quite the challenge, and experience!

There are things I would definitely do different if I were to write this again though.  For me the biggest problem is in the code itself, I had some problems associating the style information to the elements that Enyo was generating; so I chose instead to set the innerHTML property of the elements to some HTML I was generating, and then I would control the styling via CSS.  This was beneficial in many ways,  I could centralize my styling, it allowed me to use techniques I was already familiar with and made the development process faster.  But it was detrimental in that I had no control of the display or positioning that was happening higher up in the software, and couldn’t predict some of the output because of that.  And the resulting code now has chunks of hard coded HTML in it, which is ultimately harder to work with in the long term.  When I made MD5 Lookup I worked around that, but I had far lower styling expectations for that program.

Staying on the styling issues – looking back I really wish I had put more time into it.  I will always claim to be a web developer before a designer, but I’m not completely blind to a bad layout.  The commendations are off-center and not vertically aligned with each other, there is a blue border around the right frame for no real reason, the challenges don’t like up with the map and other elements – and I could go on.  Ultimately the design was rushed and it makes the entire application worse.  In the future that is something I be sure to avoid, by putting in the time to properly test the styling and nitpick over the small details until it looks more refined.  Again, I’m not a designer – but that doesn’t excuse a poor layout and appearance. In retrospect I’d rather have a simple design that looks great than what happened here.

At this point the TouchPad, Pre, and webOS are outmoded, and even Bungie’s stat servers only give back historical data.  No new games are being registered on their servers.; everything has been replaced with 343’s Halo Waypoint.  But, if you have some webOS hardware or an emulator image Halo Stats is still available in the app store, and you can even look up a player’s info, as long as they played before the switch over to 343. I’ve posted the source code above as well – most of my writing is in the source folder, under SplitView.js and Splitview.css.

Thanks for reading!

MD5 Lookup submitted to Palm!

I just submitted my newest TouchPad application to Palm, this is an MD5 Lookup tool powered by Noisette.  You can look for it under the (very literal) title “MD5 Lookup.”

Working with webOS Enyo Web services in Google Chrome

The options described below are very useful for development, but equally dangerous. Enabling these options is a huge security risk and should not be used for normal browsing.

If you need these options enabled but still want to browse, please consider using Chromium as a development browser with these options.

I’ve been writing code for in HP’s new Enyo framework for webOS, and a constant issue has been that WebServices can only be run in the emulator.  Webservices are Enyo’s abstraction of XMLHttpRequest, basically.  One of Enyo’s biggest strengths is that it can be tested in any Webkit based browser, but when you get to the internet access portion of testing (usually the biggest part!) you have to move to the emulator.

Fortunately, there is a fix!  As noted above, do not leave this on by default as it is a huge security risk.  This disables the file access and same origin protections, allowing you to perform webservices calls in Chrome.

To do this, run Chrome with the following command line options:

--allow-file-access-from-files --disable-web-security

In windows, you can add these to a shortcut (after the quotes, if present) just be sure to make the double hyphens a single hyphen.  On OSX you can copy and paste the command line options above.  For OSX you’d want to use a script unless you want to run it from the command line each time.  If you’ll be spending a lot of time within Enyo, you may want to download Chromium and use that for development work.  Again, browsing with these options enabled is a significant security risk.

Thanks for reading!

New version of Halo Stats submitted to Palm!

A new version of Halo Stats has been submitted to Palm.  I can’t post further details at this time.

In other news, I have a project I finished last month that will be posted soon.  It’s pretty far away from code and computers, so it should make for an interesting post.  And I’m still looking for application ideas.  I really wanted to make a Yelp application for the Pre that supports checking in, but their API does not allow it at this time.

The ability to create, but no ideas on what to create. Who would’ve thought coders can get writer’s block?

Halo Stats 0.7.7 submitted to Palm.

The new version of Halo Stats has been submitted to Palm. It corrects an error with K/D ratios, and hopefully resolves and issue where the text box wouldn’t appear on WebOS 2.1.0 devices.

UPDATE: I made an error in submitting the program, for right now the update is only available to webOS 2.0+ devices. This is being corrected and the updated application should be available on 1.4.5+ devices soon.

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!

Quick Subnets 1.0.6 Now Available!

Quick Subnets 1.0.6 is now available in the Palm App Catalog!  The fix in 1.0.5 had its own flaw that I didn’t notice until it was submitted.  If you find a bug or have a feature you would like to see built in, feel free to send suggestions to QNS@john-am.com.

Quick Subnets 1.0.5 Submitted to Palm

Quick Subnets has been updated to version 1.0.5 and has been submitted to Palm. Here is the update info:

Update in 1.0.5

– Fixed labeling for Network and Broadcast addresses. No longer labeled “Min IP” and “Max IP”

– Changed help screen to display properly on the Palm Pixi.

– Corrected error where the Network and Broadcast addresses would generate impossible IPs if a number larger than 254 was entered.

Also, Quick Subnets has had over 1500 downloads! Thanks for downloading everyone!

Quick Subnets now in Palm’s App Catalog!

Quick Subnets has been accepted by Palm!  My page for it is available in the link or in the above menu.  Otherwise you can view Palm’s page for it, where it gives you options to send it to your phone or post it to Twitter / Facebook.

Also, there have been over 700 downloads since it was accepted on 7/28/10.  I hope everyone is finding it useful!  Please send any comments / issues to QNS@john-am.com.