Matt Hackmann

MattHackmann

The thoughts and goings-on of some programmer dad.

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!

In Hopes of Winning a Free Trip to Japan

Anime News Network, one of my daily internet stops, is hosting a art contest in which the prize is a free trip to Japan. Seeing as I am planning on paying for such a trip within the next couple of years, I figured it'd be worth a shot to try and get one for free. Granted, my art skills are probably nowhere near the level of the more devoted and talented frequenters of ANN, but hey. Never hurts to try. So, here's my entry for your viewing pleasure/horror.