davidpratten.com

David’s Tech and other Interests

Archive for April, 2006

SVG Visualisations

without comments

A few years ago I created this solar Equation of Time visualisation using a visual basic macro and DeltaCAD:Solar Visualisation

That was at a time before SVG was supported by any major browser. Today the situation is quite different and it is time to revisit the creation of Visualisations for the web. Is it possible to create a SVG visualisation that is contructed as part of page creation by a PHP script? After many visits to google, I finally found the keys here:

In order to use PHP in conjunction with SVG you have to do two additions in your webservers config-file. We will describe the Apache case, because it is the most-popular webserver. We assume that PHP is already installed and working correctly. First you need to add the type “psvg” to your mime-type file so that the relevant line reads like image/svg+xml svg svgz psvg. The mime-types are usually either located at /etc/mime.types or /etc/httpd/mime.types. Secondly you have to add an additional SVG-handler in the apache config-file, so that your relevant line reads like: AddType application/x-httpd-php .php .php4 .phtml .psvg, assuming you call your php-generated svg-files .psvg.

Stirring stuff! Actually with my bluehost.com control panel adding the mime type and the application type was the work of about 5 minutes.

In addition to adding the mime and application types to my server, I also needed to make sure that the psvg file contained a header() command and that the xml header was printed into the output rather than being plan text:

<?php
header("Content-type: image/svg+xml");
print("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
?>

Unfortunately IE and Firefox cross compatibility issues require the use of the non-standard <embed /> element instead of the recommended <object /> element. Here is the cross browser compatible html to include an svg into a web document:

<embed width="600" height="600" src="eotvisualisation.psvg" NAME="Dynamic EOT Visualisation" type="image/svg+xml" />

Having registered .psvg files with the webserver and sorting out the cross browser issues, the results may be seen in a unique visualisation of the speeding up and slowing down of sun based time throughout the year.

Written by david

April 29th, 2006 at 3:26 pm

The Leadership Challenge

without comments

Without a doubt the most helpful leadership book that I have ever read is “The Leadership Challenge” by Kouzes & Posner. The authors have interviewed 1000s of leaders around the world and distilled effective leaders’ stories into 10 key themes of leadership. The theme that I have learnt the most from is the theme of “Find Your Voice” - What is it that is important to me? What do I care about? How can I communicate that with others in a way that carries passion?

I have read many other leadership books, but this one is a beaut!

Written by david

April 25th, 2006 at 5:24 am

Posted in Books, Leadership

Fun with Monad?

without comments

Remember command.com and .bat files? Still using them? I recently downloaded Microsoft’s new command shell (available here). The key idea seems to be to make 99% of the internals of a MS Windows based computer accessible to a command shell. Whereas the Unix tradition of shells have commands linked together by consuming and producing text - in Monad commands consume and produce objects. Read the rest of this entry »

Written by david

April 25th, 2006 at 5:10 am

Posted in Languages

Username and Password Jungle

without comments

The promise of infocard and digital identity is still a long way ahead of us. Until digital identity provision becomes a ‘no-brainer’ commodity technology we will still need to keep track of a multitude of usernames and passwords. My best estimate is that I have about 150 separate password and username pairs from different websites and services! Any Password is the tool of choice for me.

Written by david

April 24th, 2006 at 4:51 pm

Posted in Working Set

Font Viewer

without comments

Working with fonts for Kazakh language is getting easier all the time.  Unicode is really having and impact and the old codepage soup is slowly disappearing.  Occasionally however, I still need to view a rogue Kazakh (or yesterday Kirghiz) font to find out where the characters are hiding.  The Arjan Mels freeware font viewer is an oldy but a goody!

Written by david

April 24th, 2006 at 4:47 pm

Posted in Working Set

Desktop Search

without comments

Desktop search has changed the way that I look at my computer. I spend a lot less time filing — and I can now find my old notes and emails much more reliably. I am currently using Copernic Desktop Search having dumped Google Desktop. Google Desktop kept crashing Outlook. No such problems with Copernic.

Written by david

April 24th, 2006 at 4:43 pm

Posted in Working Set

Mind mapping software

without comments

I have looked for years for software that allows me to brainstorm. My friend Francis introduced me to Freemind which is now part of my working set of programs that I use daily. Freemind runs under the Java VM and is now at version .80 . Definately worth a look.

Written by david

April 24th, 2006 at 4:40 pm

Posted in Working Set