If Religious Colleges Taught Programming...
Posted on in comic programming...it might go a little something like this.
...it might go a little something like this.

ID3Lib [ Download ]
As one may have derived from previous posts, I have a project the uses MP3s quite heavily. As such, retrieving tag data from these is quite an important thing. Having recently migrated my personal server to Windows, I needed a non-Linux variant of my previous tag read. I thought that while I was at it I could add an additional feature, namely saving embedded album art. Unfortunately, I was unable to find any clear directions on how to do so using TagLib, so I created my own library. Three different times. In three different languages. A C++ version, a .NET version and, finally, a PHP version.
Continue reading >
Recently, while making some additions to the Music Page, I came across the need to get the location of a YouTube FLV. Unfortunately, most of my googling turned up outdated results that no longer work. Fortunately, unlike a certain other site, it's not impossible. Below is a quick explanation of what I got to work. I'll be assuming that you know how to get your hands on the video ID (the "v" parameter in the query string).
Continue reading >
Over the past few days, I've been developing a library to help in drawing graphs for various stuff on the music page. I've built to to be a fairly complete solution that is both robust and simple to use. Today, I offer phpGraphs to the masses to do with as they please, free of charge. Follow the break for a quick tutorial on how to use it.
Continue reading >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 >Welcome, one and all, to the brand new and totally spiffy dxprog.com! I'm sure I say it every time I do this, but this iteration is by far the most advanced version of the site to date. I can pretty much wrap up all the updates in a nutshell by saying I've had a lot of fun throwing in all sorts of jQuery and Ajaxy stuff, but I'll itemize.
The front page, for starters, shows the latest and greatest projects and blog posts on the site in the featured pane. The gallery has undergone a huge overhaul and is much more intuitive than it was before. I've also uploaded quite a lot of new content to the gallery page, so go take a gander at that to see what awesome stuff I've been up to. And finally, even the contact is looking spiffier with a picture of yours truly and a link to all the social media outlets I'm currently signed up for.
With the new design out of the way, I'll shift focus to the new {mh}labs; section of the website, where you'll be able to find all sorts of little pojects that have never been released to the general public (and some that have).
The future is bright at dxprog.com, so be sure to bookmark us and return often for all sorts of goody goodness.
Was rather bored this afternoon and then I though to myself "Why not add Twitter functionality to my music page?" So, after some digging through Twitter APIs and some refreshers on HTTP Authentication, I wrote this tiny, beautiful little script.
It is as simple as it looks. Enjoy!
I was sitting in lab last night bored out of my skull. Yes, I could have (and should have) been working on my project, but when you're already ahead of schedule it's okay to slack off now and again.
So, as I was saying, I was sitting there and I think "Hey. I'll make a game between now and when final roll is called." I turned to Ryan and asked him what game I should make to which he replied "Space Invaders." I figured "Why the hell not? I did that back when I was fourteen." I told my bro (whom I was Skyping at the time) and he was like "Yeah, well, I bet I can make Asteroids before you can finish Space Invaders." The gauntlet had been thrown and much coding ensued.
After a couple hours of some intense typing and trying to pull down sprites off of the crappy ass wireless in the school, my Space Invaders clone was complete. Not two or three minutes later my bro finished his game, but alas it's not Flash and can't be embedded in browsers like so:
<object type="application/x-shockwave-flash" style="width:640px; height:480px;" data="http://www.dxprog.com/files/SpaceInvaders.swf"><param name="movie" value="http://www.dxprog.com/files/SpaceInvaders.swf" /></object>
It is by no means a mind blowing or even polished game, but for just two hours I'm not complaining. And I also had a hell of a lot of fun coding it which is the important part.
I won't be a total dick and not give Chris any credit. In his defense he did create a vector renderer from scratch (I say create because technically he wasn't actually coding). His game's visuals are also far superior to mine, so be a dear and check it out as well (some Windows and DirectX are required).
It is another month and with that another wave of classes. Lucky me has class six days a week! (except next week where I only have class four days. Whatever.) So, you're probably asking "Hey, Matt! What kind of awesome stuff do you get to do this month?" To which I answer "Have you not been paying attention, compadre? Classes aren't fun anymore." This month is the exciting world of portfolio creation and business communication (see this, here, now? I'm communicating. Perhaps to businesses).
But, school aside, I've been having a rather fun time rewriting the interface to that media player I brought up some months back. This time, however, the entire front end is all ajaxy and delicious. Don't believe me? Check it out for yourself, but don't be ripping off my songs, hear? Though, you'd have to get a flash decompiler or something to actually find where they are on my server. It's all very exciting.
In some days (by which I mean tomorrow) I will the happy owner of a brand new Wii Fit (only cost me twenty extra over retail). Since I left Wal-Mart I've put on some weight - about thirty pounds. Feeling more like a pregnant lady in her third month than the macho man I am, I felt it was time to do something about that. So, I might do a weekly update thingy here as that progresses, though we all know what happens when I promise regular updates of some sort.
Every once in a while I like to google myself and my friends, probably because I have far too much time on my hands. It's an interesting thing to do and one I recommend to my peers (by which I mean other internet micro-celebrities). Interestingly, I seem to have the most web presence of the classmates I googled. Granted, I have had a little bit of a head start and a bump here and there. I suppose it isn't the most common thing ever to be featured on the front page of various gaming sites (twice), but surly somebody in that class has done something that's caught the attention of the internet. Then again, I do seem to be that guy as devusb so fervently calls it, and unfortunately I have to agree. That's probably why I still spend most of my time alone with my computer while everybody else is out smoking weed and getting laid. Or perhaps the internet fame happens because I stay at home by myself. But, we're not here to get into the chicken/egg debate. Actually why don't we.
Q: Chicken or the egg. Which came first?
A: Who cares, they're both delicious.
Well, I suppose that's enough nonsense for one afternoon. Besides, I have other equally unimportant things I could be doing, like checking digg/Joystiq/Engadget, stalking people on Facebook/Twitter, binge drinking all my troubles away, the usual.
Whilst working on my current video project, I came across a need to display the current time code. Expressions are the answer, of course, so I came up with this.
Simply attach this expression to the Source Text property of a text layer and viola!
For the past month I've been tinkering with Flex and my little Linux server. One of the projects that grew out of this was a web media player with which I could listen to all my tunes wherever there happened to be some scraps of internet. This has been one of the coolest projects I've worked on in some time. It successfully blends nearly all of my programming skills: PHP/MySQL, Javascript, XML, Flex/Actionscript 3.0, and some C++. I'm going to write a series of tutorials walking through what I've done in hopes of bringing this coolness to the masses. I'm going to be fairly verbose covering subjects that any seasoned programmer can pretty much skip over. In the first installment I'm going to cover creating the database and getting song information from the MP3s.
Continue reading >It is the eve of the beginning of my PHP/MySQL class. Of course, we should all know by now that CMS programming is child's play for me. However, seeing as my final project for this class is a CMS with front end, I'm taking this opportunity to redesign stuff, and by stuff I mean everthing (even beyond the site itself). Some things to expect from the next iteration:
If my rebrand goes as well as I hope, I shouldn't be updating the design for some time. Geez, we haven't heard that before, have we?
They say all good things must come to an end. Such is true for my one week of summer vacation. It was brief, yet enjoyable. Got to celebrate my birthday with my family, eat grilled food and lots of potato salad, and also take the usual trip to Tulsa. It's a pity that it was so short, but I'm complaining too much. The school is giving me a bachelor's degree in less than two years, so this time next year I'll be out of school. But that's a story for another day.
As you may recall, last month began my two month long journey through the wonders of Flash. Last month focused primarily on Flash as it pertains to design, teaching us the interface, motion tweens, and just a hint of ActionScript. This month, however, is dedicated to nothing but ActionScript. To demonstrate these "newly acquired skills" our final project consists of making a game.
Now, I put "newly acquired" in quotes for a reason. For anybody who's frequented this blog long enough you should know by now that I am, or at least used to be, heavy into coding. Because of this I have an unfair advantage over the rest of the class in this regard and as such I am taking my project to ridiculous extents (far above the scope of the course). The nice thing, though, is that the instructor actually acknowledges the fact that I am as proficient as I am, so much so that I took the place of the lab instructor for one day (whilst the real one was waiting in line for his iPhone 3G). Being able to talk to the instructor about geeky stuff as equals is a nice departure. But, enough ego stroking, about the actual project itself.
I chose to challenge myself and create essentially a dumbed down clone of Street Fighter, but be completely extensible through external configuration files. The first thing I avoided was the use of graphics inside Flash itself opting instead to load sprite sheets from external sources. Everything is configured through XML sheets that define how a character should react, define where animations are within a sprite sheet, stages, etc. Amazingly, I've achieved most of this and all very, very quickly. The biggest problem I foresee is the addition of enemy AI, but I've got ideas on how to achieve this as well. Overall, though, I'm loving being back at the helm of the coding ship. I'd forgotten how much of a thrill can be derived from hours of typing if statements and nested for loops. Damn, it's good to be back.
Once again people have thought it fun to spam my blog. To this I say: Burn in hell, you dirty bastards! But, oh well. I've added some interesting features to the comment system that should keep them at bay... unless they actually write a bot to target my site specifically. But, in the meantime, the comments are back up and running. No crazy password, approval e-mail, or word verification necessary. That's how proud I am of my coding. That and the fact that I can't seem to programtically send e-mails on my server. It sucks. Hardcore.
Also, you'll notice that the RSS feed is back so subscribe and never miss out on my awesome news again. Peace out!
This is the name of the new site backend I've been working on. Now, for anybody who's been paying attention I haven't written a web engine since Tetra 2. The last time I worked on it was sometime back in '05 I believe. Back then I was extremely proud of my little creation but I look back on it and think to myself "that is one bloated piece of crap". It really was. Over 2500 lines of code. In comparison my new engine is only one or two hundred lines of code and almost as powerful (or it will be).
From a design standpoint Purple Fusion is way different from Tetra. Tetra was built around an object-oriented core. From an interface standpoint this was very clean. However, it did lend to some slowdown and made adding new modules cumbersome at best. It also limited what you could do with a module (to a degree). The new engine completely throws objects out the window (almost, the main class is PurpleFusion and that's the only one) and goes for a scriptable approach. Each page is it's own seperate page script that makes calls for getting data, displaying templates, etc. This makes creating new pages incredible quick and eliminates redundant code. Here's the script for the front page:
<code>
<page title="Home">
<template:page_head>
<db:entries limit="15" sort="entry_date" order="desc">
<loop:entries>
<dblink:category_name table="categories" link="category_id">
<field:entry_date type="date" format="m-d-Y">
<field:entry_body type="standard">
<process:data>
<template:entry>
<end:loop>
<template:page_foot>
<end:page>
</code>
As you can see it borrows from SGML's tag structure. Because of the tag structure it's very human readable and makes for quick prototyping. I'm incredibly pleased with the way it's going right now and hopefully I'll have it running this site in a couple of weeks. Now that I think about it I could even speed things up by generating a cached version of the source code and just include that instead of parsing the page all the time. Yeah, this rocks.