Friday, 28 December 2007

Moved to WordPress

I have started to move the site over to WordPress, starting with the blog entries and during the conversion process I remembered to re-learn a little bit about SQL.

I studied relational databases at University but the days when I can knock up a left join insert with multiple renames, without thinking have passed me by.

I do find that in my old age I rely on query builders to help me generate some of the more complicated queries that I use during testing.

I hand crafted php files with automatically generated text data files to build my previous blog. With all of the blog data entry done in Compendium-TA using a VBA script to generate the files and the rss file, and generate an ftp script to upload it all to

But I thought I'd get with the times and start to use a 'proper' blogging tool. So a quick hack to the VBA script and I generated an RSS file with all the posts in it. I imported the RSS file into WordPress. But because I have in the past written less than XHTML compliant posts, most of the posts generated had CDATA wrapped around them to generate a valid xml RSS file.

I started amending the posts in WordPress manually to remove the CDATA tags and after 5 edits thought "wait a minute why am I not automating this!".

So a quick flick through the mysql manual and I identified the LEFT and SUBSTRING operators and voila...I could extract the contents of the CDATA information.
UPDATE 'posts` 
SET post_content=left(`post_content`,length(`post_content`)-3)
WHERE substring(`post_content`,1,9)='<![CDATA[';

UPDATE 'posts`
SET post_content=substring(`post_content`,10)
WHERE substring(`post_content`,1,9)='<![CDATA[';

I could probably find nicer ways of doing it but I did enjoy remembering that SQL isn't just for simple Selects and Inserts even though the bulk of my 'tester' generated xml has required little more.

Of course I still have to manually go through all of the posts to check for rendering errors after uploading...but I'll do that at my leisure over time - this seems 'good enough' to let me use the WordPress blog live.

I also had to hack the dates a bit - somewhere along the line I seem to have managed to update all the posts prior to April 2006 in April 2006 so It seems like I had a very busy writing month then.
UPDATE `posts` 
SET post_date=ADDDATE(`post_date`,INTERVAL id SECOND)
WHERE `post_date`<'2006-04-26 22:00:02';

UPDATE `posts`
SET post_date_gmt=ADDDATE(`post_date_gmt`,INTERVAL id SECOND)
WHERE `post_date_gmt`<'2006-04-26 22:00:02';

Hey ho - I fudged it so that the id gets added to the post date as a number of seconds otherwise WordPress stopped building 'previous' links on the blog posts since all the dates suggest that everything got posted at exactly the same time, which I guess WordPress by default doesn't allow.

I have not amended the theme to match the main site properly yet, so as I move more of the site over to WordPress the look of the site will change anyway.

I did all the hacking in the live environment and tested by playing around - just because all good software developers and testers know, deep in their hearts of hearts, that I just described the one true way to do software development!

General Semantics Videos and Keynotes

The Institute of General Semantics has released some items from the vaults:

I have to assume that every other tester on the planet will be as excited as I am by the release from the vaults by the Institute of General Semantics of audio, video and written material relating to GS.

  • Audio and Video Materials including contributions from Robert Anton Wilson, Wendell Johnson, Alfred Fleishman, and Irving Lee

  • Transcripts and recordings from the Korzybski Memorial Lectures including work from Abraham Maslow, Gregory Bateson, Mihaly Csikszentmihalyi

I confess that I'm slightly less excited by videos from the 2006 GS conference but I'm sure I'll work through those as well.

GS has a lot of written work and presentation on the subject of human communication which is relevant to testing.

  • Irving Lee's 1952 snippet On Evaluating is a good introduction to test execution recording and defect raising.

  • Irving Lee's 1952 Words and Meanings is an enjoyable introduction to the topic of requirements based testing

I have a fondness for General Semantics and enjoy my membership subscription to etc.

These are videos that you won't find on youtube or google videos so head off to the IGS and download a few for offline enjoyment. I'm busy printing off a few choice keynote talks from the Korzybski lectures for spare moment reading. And I'm sure everyone else is too.

3 Free multi monitor utils

3 free utilities for a multi monitor setup:

I went looking for a tool to expand the taskbar into the other monitors and allow me to move maximised windows to other monitors. UltraMon is a good shareware tool for doing this, it does a whole bunch of other stuff which I wasn't using, but I got quite used to dragging maximised windows around. And then I found Multimon, which is freeware from the same people that make Real-Draw. Multimon, pretty much only does taskbar and moving maximised windows, which was exactly what I wanted so it is now installed on all my multi-monitor setups.

taskswitchxp is an Alt+Tab replacement. Previously I was using the Microsoft Alt+Tab replacement Powertoy but on a multimonitor setup I find it annoying to have the alt+tab window appear on a different monitor from the one that I am working on. Fortunately taskswitchxp has a setting which causes the selection window to appear on the monitor that you are working on. taskswitchxp also acts as a mini-process explorer by pressing F1 when viewing a process thumbnail.

And of course when it all goes wrong and you reshuffle your monitors or drop down to single monitor mode, there is always going to be one, or three, or half a dozen, applications that remember where they last were, even though that monitor doesn't exist anymore, and that is why force window visible exists, to get that window back on screen. force window visible can also show hidden windows from some apps and might give you some test ideas about what to do next to the system under test.