Matt Hackmann

MattHackmann

The thoughts and goings-on of some programmer dad.

Profile Pics - The Story of One Man's Beard

I recently decided that it was time to update my profile picture across the various sites I frequent. This is something I do, on average, every 6-8 months or more (I didn't really bother to calculate the actual average). Looking through my past profile pics on Facebook, I noticed something interesting: they convey a visual history of my beard. My beard is certainly deserving of its own blog post, so I will regale its tale here for the masses!

April 2007 - A couple of straggling hairs, but otherwise nothing. My hand does not deserve to be stroking a smooth chin.

May 2007 - At this point, there's enough hairs that I could probably have cosplayed as Detective Gumshoe quite easily.

October 2007 - Okay, let's face it. 2007 was a crappy year for the beard.

October 2008 - While certainly not filled out, the beard was finally showing some promise of being EPIC. Interesting side note - I had to Photoshop that smirk onto my face

May 2009 - Two years later, the beard is finally respectable enough that it can be stroked in deep thought and look awesome.

October 2010 - After 24 years of beard growing, I think it's finally gotten to the "You don't want to fuck with me" status. The shades help.

Some other interesting things to notice in these pictures:

  • My face is almost always pointed away from the camera
  • I get fatter as time goes on

Crayon vs SyFy CGI

Received this message on Facebook from a buddy of mine today:

Did you see (and I am NOT making this up) OCTOSHARK on SCI-FI last night. I mean the (so called) special effects were anything but! You with a crayon and a piece of paper drawing the title creature could have made a scarier one.

I'm never one to turn down a challenge like that, so I give you the terror of the deep, Sharktopus!

Trailer for the horror in question can be seen here.

Wordpress - Related Posts Script

At my job, I currently have three Wordpress sites under my watchful eye. On one, I was tasked with creating a related posts feature. Now, there are certainly enough plug-ins that will do just that, but none of them worked how I wanted to or were generally more complex than necessary. So, I whipped up this little script:

function relatedPosts($id) {

    /* Build a query to get a list of all posts that share similar tags */
    $s = microtime(true);
    $q = "SELECT count(*) AS total, p.ID, p.post_title, p.post_date FROM wp_posts p INNER JOIN wp_term_relationships t ON p.ID=t.object_id AND t.term_taxonomy_id in (SELECT s.term_taxonomy_id FROM wp_term_relationships s WHERE s.object_id=$id) AND t.object_id != $id AND p.post_status='publish' GROUP BY p.id ORDER BY total DESC, p.post_date DESC LIMIT 5";

    /* Format the output */
    $out = "";
    $result = @mysql_query($q);
    if ($result && @mysql_num_rows($result) > 0) {
        $out = "<h3 class=\"related\">Related Posts</h3><ul class=\"related\">";
        while ($row = mysql_fetch_object($result)) {
            $perma = get_permalink($row->ID);
            $out .= '<li><a href="'.$perma.'">'.$row->post_title.'</a> - '.date("F j, Y", strtotime($row->post_date)).'</li>';
        }
        $out .= "</ul>";
    }
    
    echo($out);

}

Just drop that in the wp-content/yourtheme/functions.php file, where yourtheme is the directory of your active theme. Then add the following in your wp-content/yourtheme/single.php where you want the related posts to appear:

relatedPosts(get_the_ID());

You should now have a list of posts with similar tags. Styling is simple: one h3 and one ul, both with the class "related".

Enjoy!

Because it Provided Ample Opportunity for Practice

I've done some odd things to other people's work for my own pleasure. Editing parts I don't like out of songs comes to mind (I've done this on more than one occasion). However, the latest target of my artistic raping is the live action video for Ningyo Hime, the Chobits closer and a song I much enjoy. While I do enjoy Japan's animated fare quite a lot, I am of the mind that they really suck at live action. The video of this song suffers from a lack of vision and direction, but more importantly it looks like it was shot on an old Sony HandyCam. I sought to "correct" this issue by using it as practice for color correction. After dropping the frame rate to 24 - down from a too smooth looking 29.97 - and slaughtering the blue color channel, this is what came out:

youtube video