Matt Hackmann

MattHackmann

The thoughts and goings-on of some programmer dad.

Relaunch... again!

After many, many months of development and fretting over design, I've finally completed the latest iteration of dxprog.com! There's quite a bundle of changes in this version both under the hood and... over it? Here are the highlights:

  • New look The most obvious change is, of course, the new look. I've opted to go for a super clean look with more attention paid to the textual layout.
  • Unified content model This means that items from my portfolio, artwork, videos or blog can all be displayed in the same list yet be treated differently for display. It reduces a lot of code and makes for a much nicer, streamlined presentation.
  • Commenting upgrades In addition to being able to use your twitter account to sign-in, there's now the option of Facebook and anonymous. Also, comments are broken down into pages of fifty (there's only one post where you can see this in action).
  • Speed I've done a lot of changes to the backend structure to enhance load times. The average load time as I'm writing this is well under a tenth of a second.
  • Comics As much as I loathe some of those comics, dxprog.com is meant to be a repository of all my work. As such, you can view the entire Digital Double archive by clicking "Comics" up on the top nav. I'm going to work on getting the newer stuff in as I finish importing content.
  • Sidebars There have been many tweaks and additions made to the various sidebars. The first I'd like to point out is the "Most Popular" which, as the name implies, is a listing of the current most popular items on the site. Another interesting one is "Last Listend To" which displays the last song I've listened to through my Music Page. Finally, the archives and tag clouds have been given some nice overhauls.

Of course, these are just the noticable differences. The amount of changes in the codebase are wide sweeping and quite substantial, but will allow for a much more maintainable codebase in the future. I plan on releasing the source within the next month or so after I've had a opportunity to watch it in the wild and fully document it. Until then, I hope you enjoy the new site. If you're having issues or have a suggestion, please feel free to leave comment!

Office Doodles

I have managed to deprive people of my VisualBasic code for two weeks now and it looks like I'm not reversing that trend any time soon. Instead, today I'm going to present to you some things I've doodled at various points while at work. Sadly, some of my more epic doodles are in a different notepad and will not be presented here today, and seeing as I'm on vacation for the next week I can't just wait until Monday to write this. But, enough said. The artwork is after the break.

Continue Reading

Incriminating Evidence

I do not have a strong love for my home city of Bartlesville. The citizens are a near fifty/fifty split of rich assholes and white trash (at least, that's what it seems), there are no decent places to shop and there are no good hang out spots. However, we are home to one thing of true magnificence: the AT&SF No. 940.

I've thought that this train was the coolest thing in Bartlesville since the days I was first watching Thomas the Tank Egnine, back when it was rusting outside of a local park. A few years ago, while I was in Florida (dammit), the city moved the train to the old train station and it is now open for the public to go inside and climb all over. Truly a fantastic thing. However, it is also sad. This glorious machine, once a productive piece of history, has now been relegated to nothing more than a set piece for the town. And while this is better than rusting in a park, it's not all it could be. I have a solution for this.

I am going to restore and steal this train.

That's right. Should I ever come into a lot of money (by which I mean millions), I will fix this train up in the dead of night, move it onto the real train tracks that run adjacent and ride off into the sunset. It will be the most glorious thing of all time. A true romantic heist that you only see in the movies. Of course, it will lead to my arrest, but I can't help but think: what would the reaction be when I'm charged with grand theft locomotive? What will they do with this now fully operational vehicle?

Of course, this is all a fantasy, but one I like to entertain often. Perhaps someday enough money will be raised to make it operational again and they can offer train rides to the tune of $10 per, but I feel that my grande heist will probably happen sooner.

Sleep well, sweet prince of the rails.

Instant Carsonification!

David Carson. I could begin a long diatribe about how I hate this guy and his hack methodology of design, but I will instead be mostly silent and say that I've boiled David Carson down to a 554 byte JavaScript bookmarklet:

<a href="javascript:(function(){var b=function(a){return Math.floor(Math.random()a)},h=function(a){var c=document.getElementsByTagName(a),d;for(d in c){a=c[d];try{var g=a.getAttribute("style");Math.random()>0.6&&a.setAttribute("style",g+";left:"+b(1024)+"px;top:"+b(768)+"px; font-size:"+b(120)+"px !important;z-index:"+b(1E3))}catch(i){}}},e=["a","img","p","div","span","table","tr","td","th","h1","h2","h3","h4","h5","h6","li"],f;for(f in e)h(e[f]);document.getElementsByTagName("body")[0].innerHTML+=''})();">Instant Carsonification

You can drag that to your bookmarks bar/window or you can copy and paste the URL from the link above and paste it into the title bar of your favorite website. For a more instant gratification, just click it. Any poison you pick, enjoy!

Rise From Your Grave - JS Subtitles

It's that time of week again! Now, last week I made an allusion that there wouldn't be many more new or non-VB projects. Well, this is week defies that in both that this is something pretty recent (this year) and not VB (JavaScript, in this case).

You are certainly well aware of the so-called Music Page. What most people are not aware of is that there has been a video counterpart to it for almost as long, though its development has been far slower. In its original incarnations, the video page was a way for my bros and I to watch shows across the interwebs while I was in college. Now-a-days, it acts as simple front-end for VLC running on my server. But, streaming is certainly in the plans for it yet.

That in mind, I had begun playing around with the webm codec when it was released for this purpose. However, one naggling issue was that a good chunk of my content is in foreign language (I'll let you guess which one) and ffmpeg is not capable of burning on subtitles. I did a little research around, but ultimately decided that I would just write my own subtitle parser on the front end player - i.e. parsing and displaying SRT formatted subtitles with JavaScript using HTML.

This is arguably pretty easy (the basics of the format are very human readable) and I had a working implementation within about a day. The largest hurdle was getting the timing correct and finding a display format for the font that would allow it to be readable without going old school closed captions style and blocking out the video behind (I settled on a soft yellow with a CSS3 drop shadow). There is some rudimentary support for subtitle position animation, but little else. I would love to get some of the fancier animation stuff implemented as there are many anime that script the karaoke portion of the OP/ED to nice effect.

You can check the subtitles test page here: [ JavaScript Subtitles ]. You'll need an HTML5 compliant browser that supports h.264 (Chrome, Safari or IE9 at this point). Also, all the source is in the one file, so just do "view source" in your browser and there it is.

Next week I promise there will be VB goodness!