Back to zero bugs

27th November 2007

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 object after merging it with another one. For example:


$defaultConf = new Zend_Config($default_conf_arraytrue); // allow modifications so we can merge
$userConf = new Zend_Config($user_conf_array);
$defaultConf->merge($userConf);

$defaultConf now contains the merged data, but is still open for modifications, so could be modified at any time. This is not good. setReadOnly() will turn off the modifications flag like this:


$defaultConf->setReadOnly()

Not a big addition, but very nice, nevertheless!

TaskPaper

18th November 2007

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 end of the line and it is crossed out. To aid organisation, any title that ends in a colon is automatically made bold and considered a project. Tags start with a @ symbol and can be used for filtering. For instance, you can get it to display all tasks with the tag of @town to provide a list of items to be done when you next go into town.

All in all, TaskPaper is very simple and very easy to use. You start it up and you can get going straight away.

Obviously, there are a few niggles! Three that I've noticed are:

  • Dragging and dropping of tasks to reorder isn't as smooth as it could be as TaskPaper tends to put the task you are moving into the same line as the task you are trying to insert above.
  • If I've completed all sub-tasks, it would be nice if it automatically marked the parent task as done too. In reverse, it would be handy if it would auto-mark-done all child tasks when I mark their parent task as done.
  • The context menu contains items that don't make sense, such as font and colours.

Niggles, really is the word, isn't it?! I need to stress the application more so that I can find an important thing to complain about!

Hog Bay Software is run by Jesse, who is a really nice guy as he even answered my emailed bug report even though I was just a trial user. I've since bought the product as to my mind it's well worth the money.

I'm now looking for a "diary" type program that will present me with a blank page every day automatically. Bonus points if it allows tagging of pages to help me find stuff I've stored and I'd also like it to store its files in RTF files or similar so that I can take them to Pages with no hassle. So far, I've looked at Journler, Jotter and MacJournal so far, but all require me to start a new entry manually.

svn and case-insentive file systems

10th November 2007

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 on his Windows box… which failed with the same error. We thought at first that linux was allowing something illegal to occur which Windows and Macs weren't. Then we thought about the other differences between Linux and Windows/Mac OS X.

After a while. It turns out that there are two files in the directory: IMG_0013.jpg and IMG_0013.JPG. One svn mv command later and the problem is solved.

It would have been nice to have had a better error message though!

post2cat doesn’t exist after upgrading WordPress

10th November 2007

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 used for storing categories has been changed and the old ones (wp_post2cat and friends) have been deleted and you have some old code in a plugin or your theme that uses it.

In my case it was this Google Sitemap Generator Plugin which was updated back when WordPress 2.1 was released, so the fault is clearly all mine! One thing that was interesting is that the plugin page within the WordPress admin system didn't tell me that I needed to upgrade that plugin, but it did tell me about others.

The move to Mac

9th November 2007

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 benefit we've noticed since purchase is how quiet they are. We didn't realise how noisy those PCs under the desk actually were til we got rid of them.

The biggest challenge has been adapting to the keyboard. The @, " and \ keys in particular are in the "wrong" place, and carat navigation is maddeningly inconsistent between applications. I've worked out that Option+left/right move per word and command+left/right is supposed to move to the start/end of the line. Command+up/down usually moves to the top and bottom of the document, but I haven't found page up/down yet but suspect it has something to do with function option and up,down left or right!

We haven't worked out when we need to quit applications vs just closing the window which leaves the app running.

PHP 5.2.4 was installed by Apple and just needed turning on in httpd.conf (it's in /etc… did I mention how nice having Unix underneath is?!) What's odd is that PDO isn't there and so I suspect that I'm going to have to compile my own PHP at some point.