matt hackmann -> web developer

Matt's Glorious Walk for Free Money

Legend:

  • Daily Steps
  • Total Steps

Peace, Quiet and Solitude

Posted on in programming general web dev

I am in the realizing that it's been nearly a month since I last blogged anything, granted this comes on the heels of an unusually active period for me. But, hey. Nothing terribly exciting has happened, so there it is.

I decided that last week would be a pretty good week to blow a whole bunch of my paid vacation time... after all, the best day of the year happened to fall in that week (hint: my birthday). It was nice to just forget about the world around me and piddle around quietly the way I used to back in the days when I was without work. I churned out no less than three distinct (but wholly unfinished) projects.

The first of these is a UX re-imagining for my ongoing project, the Music Page. Now that I am a far better JavaScript guru than I was when this was originally written, I've decided to take a completely different approach in terms of user presentation (though, the underlying functionality is pretty much the same).

Another thing I did was start in on learning some more HTML5 canvas stuffs, as it provides a pretty sweet opportunity for gaming purposes. I started messing around with coding a simple drawing framework and, at the behest of my osu! fanatical brother, began attempting a clone of sorts for that. Ultimately, I made some good progress and the canvas object is certainly a powerful tool, but there are some simple things that it simply can't do that keeps Flash at the advantage (I'm looking at you, per blit alpha).

Other than these few programming things and a goodly amount of time with my nose in books, it was a slothful week to be sure. But, then again, that's the whole point of "vacation."

Tune in this weekend as I head to yet another anime con.

Walking for Cash

Posted on in html5 web dev fitness work

As I'd briefly touched upon in an earlier post, my place of employ is currently having a little fitness competition: can you walk 10,000 steps a day for 75 days? If you reach the grand and glorious total of 750,000, you are awarded two free days of vacation. Everybody was provided with company branded pedometers to keep track of our steppings and left to our devices.

Now, I'm never one to turn down an opportunity to make money for nothing, so I'm doing my best to make a firm effort and accomplish this goal. If you take a look at the blog main page, you'll see that there is a graph with my current progress on this mission (assuming you're using an HTML5 compliant browser). As you may well notice, I'm a few thousand steps shy of my quota for this week (shame on myself).

Now, that's the boring part. The cool part (and the reason I'm posting) is the really the graph itself. Back in December I switched the site codebase over to HTML5. Now, this was mostly a change in semantics, using new tags such as <article> and <section>. I'd not done anything special with CSS3 or some of the newer, funner tags such as <video> or <audio>. One major thing I'd really not looked too much into was the new <canvas> tag, with the ability to draw images in the browser on the fly.

That all said, I needed some place to test this exciting new functionality, and making the graph was just the place. To update update said graph, all I do is modify a JSON data file with my step information, and HTML5/JS takes care of the rest. Of course, this leaves people using IE in the dust, but this site was never designed for them anyways.

So, there you have it. A fitness contest spurned my thirst for learning. Now, if IE9 could speed along and summarily obliterate the install base of all previous versions before it, life would be a joy of canvasy win!

Ajax and the User Experience

Posted on in web dev ajax

The code running this website is well over a year old now and, as I've gone back to upgrade/fix things, I've noticed that it is clunky and highly inflexible. The implementation I've used is actually very, very similar to what I used in YPNgine back in 2003; a switch statement calling functions from an included script based upon variables passed in the query string. Granted, there's going to be some degree of that in any implementation, but through some tinkering with the music page and interviewing with some of the developer's at Digg has led me to a new paradigm: a set RESTful API calls independent of all front end management.

Now, aside from the nice code separation and simplification of feature adds and maintainability this provides, it also opens up a new world to Ajax. Since all the data is accessible via query string, almost all the usual functionality that would normally call for separate pages can be added in without ever having to leave the landing page. In fact, I've implemented this functionality on the test server. As interesting as this may sound, it raises some interesting issues concerning usability and the user experience.

The largest concern is that of site navigation or, more specifically, navigation history. In a normal site, every page you visit will be added to the site history, appending itself to the not only pages visited, but the forward and back buttons as needed. With Ajax, you have none of this. Were you to click a link to a story and have it loaded via Ajax, your browser history does not change. Pressing the back button will take you to the previous entered URL and not the previous page because, technically, you're still on the same page. The new page won't be placed in browsing history which could make finding back a particular story particularly difficult. And, finally, because the page never changes, neither does the URL in the address bar which could lead to confusion.

Say you entered my site on the gallery page using the url http://dxprog.com/gallery and eventually found your way to to the June 2006 blog archives, specifically to a story about my life without a laptop. Because the page never actually changes, the address bar will continue to read http://dxprog.com/gallery even though that content is no longer there. This would have made my retrieval of the URL for that story more difficult and, had the title not been permalinked, I wouldn't have been able to retrieve it at all.

Another thing to take into consideration is search engines. When Google crawls your site it doesn't have JavaScript enabled. So, unless you write duplicate functionality to generate the page before sending to the browser, none of your content will get indexed. I face this problem with the current gallery implementation; even though there is a way for me to access individual items via the query string, there are no hard links on the gallery page itself to point to them. Even if there was, all of the content is loaded on the client side so search engine spiders are just going to get a blank page devoid of content. Not a very smart idea if you want that content indexed.

In conclusion, when it comes to Ajax and dynamically loading content, you really have to consider carefully what should and shouldn't be dynamically loaded. Portal pages - any page with links into sub pages of the site such - are probably best left to the traditional method of loading a new page for each item. Smaller things such as paginating an entry's comments probably wouldn't hurt as much since it is an aside to the main material. Though, even then there may be something interesting you'd want picked up on a search engine. It's really is a balancing act between slick functionality and overall usability.

Celebrating One Year of the Music Page

Posted on in music page programming web dev

For the casual frequenter of my blog, you've probably seen me mention the illustrious Music Page before. It has been my pet project for a year now and has been the catalyst for a few leaps in coding practice for me. Firstly, it's responsible for my becoming quite adept at advanced "OOP"-like JavaScript-ing. Secondly, it's given me an outlet to try out new things such as dynamic graphs in PHP or using Bing's search API. Let's take a brief walk through history.

Continue reading >