Holiday Traveler’s Guide To Interstate Highways

I was driving home today from seeing my family for Thanksgiving, and I noticed a few things that are typical of drivers on the road after a big holiday. These are usually folks traveling because of the holidays, in distances they don’t normally travel. These distances seem to make even the most stalwart of motorists behave in the most deplorable ways. Because of this, I’ve come up with a few rules of the road.

  • Always stay in the left lane. The left lane is the long term lane, and you should never leave it, no matter how fast someone passes you on the right.
  • Use your cell phone, all of the time. The drive is a long one, and you might as well have something to pass the time.
  • If someone tries to pass you, speed up to make it difficult for them. Hey, you wouldn’t let someone pass you in line at the store, would you?
  • When passing cars on the right, slow down to pass. Nothing says safety like boxing the guy next to you in. When you slow down to pass, you’re saying, “I care”.
  • Tailgate people in the right lane. Hey, if they’d listen to the first rule, they’d know the right lane is for passing. Geez.
  • Stop to look at accidents far away from you. Hey, part of being safe, is stopping in the middle of traffic to make sure that family in the SUV is alright.
  • Use a GPS device. Long gone are the days when you need to think for yourself (Obama did get elected). What you need, is to not think about the road, and let an electronic voice tell you where to turn.

That’s about it. If you can remember those rules of the road, you too can contribute to the slow demise of our society!

Rob Zienert

Rob ZienertThe next person in my ongoing series about folks that are important to me, is Rob Zienert. Rob’s the other developer with me on a huge project at Hydra Studio. Rob’s a young guy, which should make him less competent than he is. That’s whats weird about Rob; he’s awesome.

I guess there’s something to be said about Rob’s upbringing. His mom was a database programmer. His dad was an engineer for Ford. I guess with that kind of brains for parents, something has to get passed down, right?

Rob is the head developer at Hydra Studio. Rightfully so, he knows more about the code here than anyone. His master of abstract coding concepts is as good as anyone I’ve ever seen. He’s a mega smart guy. He actually owns a copy of the ‘GoF Design Patterns’ book. It’s sitting on his desk right now.

So, the next paradigm about Rob, is that he’s not a mega-geek. Rob’s not a D&D guy. Rob can pick up girls with ease. He was a hockey goalie growing up too. He’s an all around talented dude. He even grew up next to Emimen!

Rob’s been a real help to me at Hydra, and I appreciate it a lot.

As was the case with Parler, there are quirks about Rob. He’s tough to read. He can smile at you, and make a joke about a situation, that’s far more serious than he’s letting on. That’s his way of being a pain in the ass. Just keeps me on my toes. ;)

Anyways, Rob’s a good guy, and I’m glad hes my amigo.

Google Reader and Zend_Http_Client Saves Time

I’ve been working a lot on Florida Death Metal lately. Part of that means that I need to know news, as it happens, from a lot of different sources. That can be difficult (and a pain in the ass) to keep track of. The last thing I want to do, is visit 50 different sites every 15 minutes to see if there’s any news I should know about.

The first thing I did, to filter input, was to setup a Google Reader account for Florida Death Metal. At least this allowed me to see updates from a variety of other sites in a single place. This also allows me to search through those new listings for keywords to bands and events I think are important to know about.

This still requires me to visit Google Reader, and parse through a lot of stuff (routinely over 1000 new items) to find out what’s going on in the world. The real dilemma I was having, was trying to implement an active alert system to news going on around me. The active part, was me actively searching through Google Reader for information relevant to Florida Death Metal. 

Needless to say, this started to suck. I have a great full time job, a wonderful wife, and a million other things I like to do with my spare time. Spending my days and nights on Google Reader, struggling to keep up with news for a project blew.

I love Florida Death Metal. I’ve never been involved in something that means so much to me. However, there are only so many days in the week, and so much time in each of those days. I need a way to passively keep up with relevant news and events. I needed some automation, so I could spend time hanging drapes for Melissa, or having a beer with Rob.

Enter Zend_Http_Client ….

One of my favorite programming tricks is breaking down requests to servers, and finding a way to do them programatically. So, I got to thinking about how I could parse through all of my stuff in Google Reader. For each of the views in Google Reader, there is an associated RSS feed. Well, that makes things simple enough. I could just grab the RSS feed and parse it. 

One minor detail, the RSS feeds aren’t publicly available. You have to be logged in to use them. This makes sense. I imagine Google doesn’t want to be used as an aggregator of RSS feeds to be used as a proxy to other sites. Sorry :/

So, here’s a breakdown of what I needed to write a script to do:

  1. Login to Google
  2. Grab the RSS Feed for ‘All Items’
  3. Parse the RSS Feed for keywords relevant to Florida Death Metal
  4. Email me alerts (if there are matches)

Not too bad. So, Here’s the script I came up with. I hope you like it :


');
define('GOOGLE_RSS_URI', 		'');
define('GOOGLE_LOGIN_URI',		'https://www.google.com/accounts/ServiceLoginAuth?service=reader');
define('GOOGLE_LOGIN_EMAIL', 	'');
define('MAILER_FROM_ADDR',		'');
define('MAILER_TO_ADDR',		'');
define('MAILER_SUBJECT',		'Google Reader Parsing');

/*
* a Zend Framework Installation _MUST_ be located on the include path for PHP
*/
require 'Zend/Loader.php';
Zend_Loader::registerAutoload();

//Instantiate a new Zend_Http_Client, with the google login url
$client = new Zend_Http_Client(GOOGLE_LOGIN_URI);

/*
 * Set the client cookie jar ...
 * Set the method to POST ..
 * Set the parameters to post with
 */
$client->setCookieJar()
	->setMethod(Zend_Http_Client::POST)
	->setParameterPost(array(
		'continue'		=> GOOGLE_RSS_URI,
		'service'		=> 'reader',
		'niu'			=> 1,
		'hl'			=> 'en', 
		'Email'		=> GOOGLE_LOGIN_EMAIL,
		'Passwd'		=> GOOGLE_PASSWORD,
		'PersistentCookie'	=> 'yes',
		'asts'			=> ''
));

//make the login request, and store the response in the $response variable ...
$response = $client->request('POST');

//If the response was successful, change the uri value for the client object
// to the appropriate rss file for parsing
$client->setUri(GOOGLE_RSS_URI)

		//Change the request method to GET
		->setMethod(Zend_Http_Client::GET); 

//send the request, and store the results of it
$response = $client->request();

//Initialize an array of keywords to look for
$keywords = array (
	//Whatever your keywords are you're looking for
);

//SimpleXML is great!
$sx = simplexml_load_string ($response->getBody());

//Iterate through each of the retrieved entries
foreach ($sx->entry as $entry ) 
{	//Now, iterate through each of the defined keywords / keyphrases
    foreach ( $keywords as $keyword ) 
    {	//First, check to see if the title contains a keyword / keyphrase
        if ( stristr((string)$entry->title, $keyword) ) 
        {	//Append any matches to the matches arrays
            $matches[] = (string)$entry->link['href'];
        }
    	//Next, check to see if there are any matches in the summary
        if ( stristr((string)$entry->summary, $keyword) ) 
        {	//same deal: If there are matches, add them to the stack
            $matches[] = (string)$entry->link['href'];
        }
    } //END keyword iteration
    
} // END posting iteration

//IF matches were found, send an email
if(count($matches)) 
{	//Initialize a variable to store a mesage in
    $message = '';
    
    //Iterate through each of the matches
    foreach($matches as $match)
    {	//For each of the matches, append them to the message string, separated 
    	// by newlines
        $message .= "\n" .  $match;  
    }
    //Initialize a new Zend_Mail object 
    $mail = new Zend_Mail;
    
    //Set the parameters necessary to send a message 
    $mail->addTo(MAILER_TO_ADDR)
        ->setFrom(MAILER_FROM_ADDR)
        ->setSubject(MAILER_SUBJECT)
        ->setBodyText($message);
        
    //I never trust email, so wrap the email execution in a try/catch statement
    try  
    {	//Send the mail
        $mail->send();   
    } catch (Exception $e ){
        //Do something here
    }
}

Wrapping all of this up, I stuck this script on a spare debian box at my house, and setup a cronjob to run the script every 15 minutes. It saves me a lot of time. I’d love to hear some feedback from y’all about how I got this done. I’m a script guy at heart. So, this stuff is super fun for me.

Wrapping all of this up, I stuck this script on a spare debian box at my house, and setup a cronjob to run the script every 15 minutes. It saves me a lot of time. I'd love to hear some feedback from y'all about how I got this done. I'm a script guy at heart. So, this stuff is super fun for me.

I know I should have checked the success of the initial login attempt before assuming the second request would get anything at all. Keep in mind though, this is a script I use to make my own life easier. Exceptions being thrown here cause me no harm. If I don't get anything, I can check my error logs for issues. Not a perfect solution, but it's working pretty well for me now. :D

Michael Parler

A few months ago, I started working at Hydra Studio. The experience has certainly been the most challenging in my life. At the same time, it’s arguably one of the more rewarding jobs I’ve ever had. I’ve worked on some amazing stuff at Hydra. I’ve learned a whole lot and met some awesome people. One of those people is Michael Parler.

I was looking for a picture of Mike, and I think this one does him justice : 

Michael Parler

To look at Mike, the word ‘professional’ doesn’t immediately come to mind. The cliche rings true however. Mike is easily the most professional person I have ever met. Mike’s attention to detail and ability to create interfaces that are completely seamless is incredible.

You wouldn’t know it to look at his website, but Mike is an awesome designer / developer.

I can’t speak publicly about the projects we’re working on at Hydra. However, I will say that when they’re done, they will realize some of the best UI I’ve ever seen. The credit for that lies heavily with Mike. 

Adding to why Mike is awesome: the most mundane of things don’t bore him. How many times have you worked on a project, and just glossed over some of the mundane details. Yeah, you probably don’t want to admit how many times.

Mike has some serious OCD, and leaves nothing to chance. I’ll admit, sometimes he’s a bit of a pain in the ass. However, for the company, and for the rest of us, his attention to detail is a lifesaver. 

I’ve been meaning to write about some awesome folks in my life lately, and Mike gets to be the first. He’s a really cool guy, and I appreciate what he does a lot.

President Obama

Barack ObamaWell, It appears that the Osama Obama Bin Ladin Biden ticket has won the executive office of the United States. I wish I could be optimistic about the outcome. I’ve got good friends who, despite being conservative also, don’t think Obama will run a socialist leaning White House.

I hope they’re right. 

I sincerely hope that Obama does not work to socialize health care, which has been proven to reduce the effectiveness of health care in every large society that has tried it. Instead, I hope that he works with existing providers to find ways to effectively provide the benefits to people that need care, not meaningless doctor follow-ups and frivolous tests to appease fears about the ailment of the week.

I sincerely hope that Obama does not unilaterally surrender to rogue nations, intent on our society’s demise. Instead, I hope he keeps the offensive on Al-Queda, and other islamic fundamentalist groups hell-bent on creating a global islamic state. I hope he carries that same offensive on all other enemies of the state (loaded term, I know).

I sincerely hope that Obama does not increase taxes on the very people I rely on for my job. Instead, I hope Barack can find a way to reduce the number of programs the government provides, and streamline those that aren’t as competitive as their private counterparts.

I hope that Obama does not increase the country’s dependence on government in their lives. Instead, I hope Barack can inspire people to be the type of independent, successful people that he has become. 

I sincerely hope that Obama does not restrict free speech, by implementing a fairness-doctrine unilaterally on talk radio. Instead, I hope that Obama will recognize that a left-wing television already counteracts a right-wing talk radio media. Instead, I hope Obama just stays the fuck out.

I sincerely hope that Obama does not infringe on my right to bear arms. I’ve heard a lot of folks, weary of the type of gun controls implemented under President Clinton’s administration, talk about rushing to buy weapons. Instead, I hope Obama stays out of my gun cabinet. 

I hope the rest of you were right. All I have left now, is hope.

Halloween 2008

Last August I started work at Hydra Studio in Downtown Orlando. Hydra shares office space with a local ad agency, Push. Push celebrates their anniversary on Halloween. As you can imagine, an ad agency can be quite creative on Halloween, when celebrating at work.

I was warned ahead of time that a costume was an absolute must for the day. I was also warned that the festivities started early and it was unlikely that any work would get done for the day. One of the major take-home points I got from talking to folks who had been part of celebrations in years past, was ‘Go big or go home’. 

I’m an over-the-top kind of guy. The thought of being challenged gets my blood flowing. When I heard there was a bit of competition behind the costume contest, I was pretty excited to be a part of it.

I’m also a really busy guy. Work has been very busy lately and I’ve little time for my side project, Florida Death Metal. Any spare time I’ve got lately I have to use wisely.

Continue reading