Pragmatism in the real world

Where to set up your view?

With Zend_Layout on the horizon, I've been looking at how to use it and it will remove the need for my own front controller plugin which I call SiteTemplate. As a result, I need to find a new home for the view customisation stuff I do in SiteTemplate. My current plan is to create a new front controller plugin called ViewSetup (for want of a better name!) that contains just the view setup stuff from… continue reading.

Zend_View: Access the view from a view helper

It's in the manual, but I thought I'd blog about my simple View Helper setup that ensures that I can get at the view with minimal effort. Firstly we create a parent class: < ?php abstract class My_View_Helper_Abstract { protected $_view; public function setView($view) { $this->_view = $view; } } This class contains the code required by Zend_View to collect an instance of the view and assign it to a protected variable. All my view… continue reading.

Back to zero bugs

I've just finished going through the open Zend_Config issues and fixing them all. Nothing major, but a couple of nice fixes and one new function. The bugs recently fixed are: ZF-2209 Zend_Config* contructor should have the section defaults to null ZF-2162 Zend_Config_Xml usage without sections bug ZF-2021 Zend_Config::toArray() does not support generic object values Lastly, I've added a new function called setReadOnly() in response to issue ZF-2061. This allows you to lock down a Zend_Config… continue reading.

TaskPaper

One of the apps that I've found that I'm using daily is TaskPaper from Hog Bay Software. It's a brilliantly simple idea where all it does is format up a standard text file to make it easier to use as a todo list. You just start each item with a dash and it will automatically provide a checkbox next to the item. When you tick the checkbox, then a tag, @done, is added to the… continue reading.

svn and case-insentive file systems

Another one to chalk up to a doh! moment… I'm checking out my wife's website to my new MacBook and get this error message: svn: In directory 'website/gallery/piccies' svn: Can't move source to dest svn: Can't move 'website/gallery/piccies/.svn/tmp/prop-base/IMG_0013-thumb.jpg.svn-base' to 'website/gallery/piccies/.svn/prop-base/IMG_0013-thumb.jpg.svn-base': No such file or directory I'm pretty sure that there's no problem with the subversion repository as I've been using it for months with no problem so I asked a friend to check it out… continue reading.

post2cat doesn't exist after upgrading WordPress

Note to help anyone else who has the same problem! If you are a "little behind" the times when you upgrade you WordPress installation, you may see errors like this: WordPress database error: [Table 'xxx.wp_post2cat' doesn't exist] SELECT cat_ID AS ID, MAX(post_modified) AS last_mod FROM `wp_posts` p LEFT JOIN `wp_post2cat` pc ON p.ID = pc.post_id LEFT JOIN `wp_categories` c ON pc.category_id = c.cat_ID WHERE post_status = 'publish' GROUP BY cat_ This is because the tables… continue reading.

The move to Mac

A couple of days after Leopard came out, my wife and I found ourselves in the Apple store in Solihull and came away with an iMac for her and a MacBook Pro for me. The main reasons we have been interested in Macs recently are: Disappointed with Vista on my wife's brand new computer Disappointed with our last two Inspiron laptops Sleep that works The hardware looks good! Unix in the terminal Interestingly, the biggest… continue reading.

Do it before goddamned breakfast

jwz on 29th Oct 2007: When (WHEN) your backup drive goes bad, which you will notice because your last backup failed, replace it immediately. This is your number one priority. Don't wait until the weekend when you have time, do it now, before you so much as touch your computer again. Do it before goddamned breakfast. The universe tends toward maximum irony. Don't push it. Some very good advice. I just back up my "cannot… continue reading.

PHPAbstract

If you read DevZone, then you'll notice that Cal's looking for some PHP Abstract advertising. I'm always up for free books, so there's my link Cal! (Though I doubt that technorati picks up my little blog!) More seriously, PHPAbstract is worth listening to. Unusually for a podcast, each episode is short (around 10 mins) so that I actually get to listen to a whole episode without being distracted. They have episodes by many (lots?) well… continue reading.

Life outside of PHP

I thought that I'd answer Davey's question: what do you do to get away from PHP?. I also enjoy seeing the non-PHP side of people on Twitter, though I'm tending to use Twitter as a micro-blogging tool more at the moment. I enjoy spending my "non-PHP" time with my family. We are members of the National Trust as it gives us cheap access to land where the boys can run around freely. We also go… continue reading.