because sometimes I’m just fucking right
Jun 21
2010

OK, so the question marks may have (probably) came from when I upgraded from MySQL 4 to MySQL 5 not from the WordPress upgrade.  I just didn’t notice when I did the upgrade.  It was a quick thing.  Anyway, I confirmed that the data in the field was actually a question mark combined with another character and then whipped up a simple PHP script to fix it all.  I’ve managed to fix most of the issues but not all.  There are some posts that I may have to edit by hand or just ignore. Oh, and the code below assumes the Zend Framework is in your path.


require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();

$db = new Zend_Db_Adapter_Pdo_Mysql(array(
        'host' => 'NOPE',
        'username' => 'NOPE',
        'password' => 'NOPE',
        'dbname' => 'NOPE'));

$sql = 'SELECT ID, post_content FROM wp_posts where post_content like \'%.?%\'';

$result = $db->fetchAll($sql);

$table='wp_posts';

foreach ($result as $row)
{
    $newContent = str_replace('.?', '.', $row['post_content']);
    $wheres = array("ID={$row['ID']}");
    $params = array('post_content' => $newContent);
    $db->update($table, $params, $wheres);
}
 
Jun 17
2010

So I just upgraded to the newest version of WordPress and now most of my old posts have question marks sprinkled through out them.  Grrrr… I know no one actually reads my blog but it’s still irritating. :)   Now I have to write some masterful script that will remove the question marks that don’t below but leave the ones that do.  Or maybe it’s just time to dump the whole thing…

 
Feb 20
2010

So, I LOVE the Zend Framework.  I love it so much, in fact, that I’m a ZendFramework Zend Certified Engineer.   However, I have one rather large gripe about ZF and that’s its documentation.  At first glance, and even when you first start using it, the documentation seems rather good.  It covers lots of salient points and always gives you the quick and dirty way to get started.  The problem with it is that while the breadth of the documentation is very wide, it isn’t deep at all.  Simply put, the documentation is good if you’re doing simple things.  If you want to do anything complex at all, it’s fairly useless.  There’s a pattern I find myself following whenever I delve into a piece of ZF that I haven’t used before. 

  1. Check out the ZF Documentation.  See if it answers all your questions
  2. Do a search on Google to see if anyone else has used the component you’re wanting to use in the fashion you want to use it
  3. Check out the ZF Reference API
  4. Crack open the ZF source code

Generally speaking, if you’re willing to spend the time to follow these four steps, you can figure out what you want to do.  The biggest problem with this is that sometimes after investing the time you realize that the coponent you’re researching doesn’t do quite what you want.  Frustrating!

Now, my wife always says you shouldn’t complain about something unless you have a solution to offer or are at least willing to help with the problem.  So, my solution is to write better documentation!  OK, that’s a no brainer.  I think the biggest frustration I have with the documentation as it stands is that there seems to be pieces missing when you’re reading it.  For instance, if I want to write a Plugin for the MVC components, there’s documentation that kind of outlines how to do it, but not really.  You really have to dig to figure it.  Now I know that sometimes digging through source code and trial and error coding is a great way to learn stuff but sometimes I just want to take a peek at the documentation and say “Oh! That’s easy!” 

Here’s the kicker.  ZF is a very well designed.  Generally speaking, it will do what you want it to do.  It’s just the figuring it out part that is the issue.  And yes, all you trolls and haters out there, I use the documentation on an almost daily basis.  I recognize that what is currently there is good.  I even recognize that for a free product it’s even better.  Having said that, you need to acknowledge that a for profit company is tooting it’s own horn over ZF.  They have a team of paid developers working on ZF as their full time jobs.  I think that they also need to apply that method to their documentation for ZF.  It’s the logical next step to making a great framework even better.

 
Jul 03
2009
posted by Mike in Blog

As evidenced by my lack of writing the past year and several other blogs that I used to follow, the personal blog seems officially dead. No one seems to have the time or energy to update their personal blogs on a daily basis anymore. Facebook and Twitter status updates have taken the place of the long, utterly boring diatribes of days gone by. Is this a good thing or have we sentenced ourselves to a literary loss of epic proportions? Yeah, right. :)

So, obviously I’m not writing anymore. This begs the question: what am I going to do with this website? At this point, I haven’t decided. I will keep this blog up as the main page for now but it will eventually be relegated to a sub folder of the site. What will be on the main page I have no idea. I honestly have no idea. It may just stay a forlorn forgotten blog. We’ll just have to wait and see.

-michael

 
Jun 16
2008

I had a co-worker in another department come up to me today with a question about whether or not he could do something. See, we have about 20 computers on campus with a specific type of software and correlating hardware installed on them. Due to the nature of the programs, the regular campus technicians aren’t allowed to service the external hardware nor the connections to the computer. Frankly, it pisses this guy off something fierce. I’ve heard at least five times “It’s just a couple of USB cables! Why can’t I remove them or set them up?” Honestly, if I had my druthers I’d let him but I can’t. Anyhoo, one of the offices with these computers installed is getting new machines so we have to re-install all the software and hardware on the new machines. No big deal. It’ll probably take me an hour or two. Well, this guy, let’s call him Smithers comes up to me this morning while I’m putting stuff in the fridge and says “Hello.” I assume he’s just being friendly and start to leave when he says my name. When I turn around I find a visibly nervous Smithers. So nervous in fact he’s practically out of breath. Wants to know if he can make an image with the software and drivers already on it to save some hassle. We go back and forth on it for a while because he’s not being clear AND he’s being an arrogant ass. When I finally get the giste (he wants to make an image to use for the 20 machines with the software on it and then throw it out when the new machines are done) I tell him he needs to talk to the project manager for the overarching project. At this point he gets huffy about the whole thing. Says he’s just trying to make things easier for everyone. I’m not sure why he’s so concerned about this software other than he’s not allowed to touch it. In all honesty, it probably wouldn’t matter if they put it on an image but I’m not willing to let it happen. In the end, if something goes wrong, I need to know with 100% surety that the software is installed correctly. I just can’t be if those jokers get to monkey with it. Anyway,? what really caught my attention about the whole thing today was how downright scared Smithers was to talk to me about his idea. I don’t believe I’ve ever given him reason to fear me. I’ve certainly never yelled at him or threatened him. Maybe he knew I’d say no but was hoping I wouldn’t. Anyway, I have no idea what his damage is or why he’s so intimidated by me. Probably just that low self esteem kicking in. Poor Smithers…