Archive for the ‘Miscellaneous’ Category

Generation P

Published by Rob on June 4th, 2007 - in Miscellaneous

A thought for World Environment Day.

One of the side effects of having a Dad who is a professor is that he comes up with some pretty profound thoughts from time to time. 

Recently he made the prediction that the next generation (my sons generation) will be called Generation P, as concern for the planet will be the biggest issue for the generation.

A Painful Trip Through WordPress

Published by Rob on April 30th, 2007 - in Miscellaneous

You may have noticed a bit of mess in the posts to my blog today.  I've just started a process where I'm going to either publish old draft posts, or delete them.  My first post was a post from a conversation I had with my wife, Memory Constipation (not memory leaks).  It was actually a bit exciting having this happen.

  1. I edited the article, and clicked publish, went to my blogs front page, and noticed no listing
  2. I looked at the posting, and noticed the date was "June 2006"… hmmm I guess I started writing the article then…
  3. I changed the date to now, went to the front page, and still no article…
  4. remembering an AJ rant at work about future posts, I thought that perhaps I was future posting.  I set the date to yesterday, and noticed the post. YAY!! I then did my refresh trick to try and see the post on JavaBlogs, but no joy….
  5. So I played with the date, and finally got it to about now on the post.
  6. I went back to JavaBlogs, and noticed that the post now had appeared twice d'oh… what was worse is that the first permalink (with yesterday's date) was broken NASTY.
  7. so I went and created a new post with the same title and yesterdays date.  Unfortunately WordPress forces the article names to be unique, so this didn't work.  People trying with the original posting to JavaBlogs would still get a 404 :(
  8. By now I was getting a bit annoyed with WordPress, but wasn't about to give up. I tried forcing the name of the post, but that didn't work, so had to head into hacking the permalink approach.  The rest of this post shows what I did (warning this was a hacky approach to PHP and updating wordpress).

So the problem was that when wordpress was looking for the post it was using the date of the post, and the unique name to look for the post.  Given that there was no post with the right name on the date, no post was found, so wordpress returned a 404.  My work around is to leave the query code as close to the original as possible, only adding a check at the end, that will remove date the date parameters if no posts were found.  The following code goes at the end of  the get_posts function in the WP_Query class.

1
2
3
4
5
6
7
8
9
// if there aren&#39;t any posts returned by the query, name and year parameters were specified, then<br />
       // we are probably dealing with a post that has moved.<br />
       // so lets go ahead and try a query without any date fields.<br />
       if (sizeof($this-&#62;posts)==0 &#38;&#38; isset($q[&quot;name&quot;]) &#38;&#38; isset($q[&quot;year&quot;])) {<br />
       &#160;&#160;&#160;unset($this-&#62;query_vars[&#39;year&#39;]);<br />
       &#160;&#160;&#160;unset($this-&#62;query_vars[&#39;monthnum&#39;]);<br />
       &#160;&#160;&#160;unset($this-&#62;query_vars[&#39;day&#39;]);<br />
       &#160;&#160;&#160;return $this-&#62;get_posts();<br />
       }

It's a nasty hack, but it does the job, now the following urls, all return my page.

Memory Constipation (not memory leaks)

Published by Rob on April 29th, 2007 - in Miscellaneous

This entry is here cause I messed up getting the dates right. You really want the post here: Memory Constipation (not memory leaks)

Technorati Link

Published by Rob on April 24th, 2007 - in Miscellaneous

This post exists for the benefit of Technorati.

Technorati Profile

First month at Ephox

Published by Rob on February 4th, 2007 - in Miscellaneous

I've just finished up my first month at Ephox. It's been a fun ride so far, mainly due to the people on the team, and a great work culture. Having a team of good people is great, and the nice culture is really making work fun. 

I've been loving being a part of an XP team again. It almost sounds like a cult, but being in an environment where the XP values really makes a big difference, and plays a big part in my looking forward to coming to work. Interestingly I have been spending much of my time doing support related work. It is giving me a good feel for the companies products, and the strengths and some of the weaknesses of them. This is a new experience for me, and it has been an interesting learning experience (I am definitely still a coder :) ). 

The events of my first week-end sums up much of the goodness of Ephox. Instead of spending the week-end stressing about work, or thinking about what I had to get done, I spent time enjoying my family, and went down to the local computer games shop and picked up a copy of Civ IV, in order to fit into the culture best. It is a different place to work where many of the team are playing games at lunch.

This doesn't mean that we don't work hard. We strive for energized work, and focusing on delivering well, and maintaining a sustainable pace. I think the team does a good job at having work-life balance and building useful software. The fact that we have numerous people who have stayed at Ephox for all of their work life speaks a lot. 

I'm looking forward to my second month. One of the more interesting parts is that AJ is coming back from holiday. I've worked with some pretty great people over the years, but with very few that have been held in such high esteem by the rest of the team. I'm looking forward to getting to work with him.

Migrated From Typo to WordPress

Published by Rob on January 15th, 2007 - in Miscellaneous

After my prodding by Doug, I thought I might make a post. 

I'm also making the jump to WordPress as my blogging engine. For three reasons: 

1) Typo doesn't really suit me. It is cool, and ruby on rails, but suffers from the fact that rails is primarily based around persistent processes. This means that I can't just assume that it will keep on keeping on, and I just want to be able to occasionally post, and forget. I still like Rails, and like the idea of having a rails based blog, but am not interested in investing in having one. I am happy enough to use a php based option that will just work, and given that I can easily install wordpress, and there are migration scripts for it. It won. 

2) WordPress does blogging well, and is open enough, and is php and I can hack it.

3) As Doug mentioned, I am spending my days at Ephox. Given that AJ has done the work of making Edit Live with WordPress, I can use a real editor :)

Note: I am writing this in TextMate while in the middle of doing the migration, and will get the aforementioned real editor going shortly. update and with just a little bit more hacking I was able to recover my old Movable type comments which never actually made it across to my typo blog :)

Erdős number

Published by Rob on June 30th, 2006 - in Miscellaneous

A bit of geekish miscellany.

Erdős was an extremely well published mathametician, who loved to collaborate. An Erdős number is the measure of the shortest path between you and Erdős in terms of published papers. Erdős is the only person with an Erdős number of 0. People who coauthored with him have number 1. And so forth.

For what it is worth, I have picked up an Erdős number of 4, without even going to E-Bay.

Ed Dawson is reported to have a Erdős number of 3 giving me a 4 through the publication of the article SKMA – A Key Management Architecture for SCADA Systems

AutoHotkey — Cool windows toy of the day

Published by Rob on August 15th, 2005 - in Java, Miscellaneous

While having a look at some various bits and pieces in blogland, I stumbled across AutoHotkey, a free tool for windows that allows scripting of commands, and association of the said script with a hotkey. It is a great little tool for automating the mundane day to day tasks.

I am starting it off to simplify changing between the frequently used windows. At the moment I am almost always running FireFox, a couple of different editors for LaTeX (some subset of TexLipse, TeXnicCenter, jEdit, and gvim), Thunderbird, and Adobe Acrobat Reader.

The program is a great little toy for automating the simple windows tasks. For the windows gui programmer/tester, there are some interesting other uses, such as scripting user interface tests.

The language for writing scripts is simple, and provides a useful set of commands for interacting with windows. Installation is easy, and can be performed with a windows installer, or extracting a zip file (the zip option is nice for those people who are working in an non-administrator environment :) ).

The AutoHotKey website contains above average documentation, including a getting started tutorial, the obligatory wiki, program documentation and a good little article that talks through a couple of scripts that are more useful than the typical “Hello World” example often found in open source projects.

All in all AutoHotKey is a great little utility that is worth the time to download and learn.

It’s a Boy!!!

Published by Rob on June 22nd, 2005 - in Miscellaneous

Isaac Robert Dawson was born at 7:18 AM on the 18th of June 2005.

Isaac weighed 8 pounds 4 ounces, and was 54 cm long.

Suzanne and Isaac came home on Tuesday, and both are doing great.

I just found the last page of the net

Published by Rob on May 24th, 2005 - in Miscellaneous

After about ten years of reading, I just made it to The last page on the Internet. I think I’ll have to go back to the beginning and start again.

© Rob@Rojotek