Konfabulator Development Annoyances

Over the last few weeks, I wrote an Evolution Konfabulator Widget. It sits on your desktop and keeps you up to date with your continent.

Evolution Widget Beta

Konfabulator isn’t exactly developer friendly. Writing a widget isn’t exactly developer friendly. There were two main annoyances.

Firstly, Konfabulator invented their own dialect of XML. That means you get stuff which looks like this:


    <text name="scoredata">

        <color>#ffffff</color>

        <vOffset>130</vOffset>

        <hOffset>100</hOffset>

        <width>200</width>

        <hAlign>center</hAlign>

        <size>12</size>

        <onMouseDown>

            openURL("http://ev5.neondragon.net/rankings/continent");

        </onMouseDown>

        <zOrder>100</zOrder>

    </text>

This isn’t based on any other XML dialects as far as I know – it would have been a lot easier to use HTML and CSS. Konfabulator also uses Javascript but it does not use the DOM. There are strange ways of updating data, changing properties and grabbing and parsing files. I believe having used XHTML and CSS as a base would have been a much better choice as the learning curve isn’t as steep and anyone who has written a website could write a widget.

Documentation

Of course, having a new XML dialect and strange JavaScript code wouldn’t be bad if it’s well documented. The documentation sucks. It’s only available in a PDF file which are hard to navigate and hard to search. With an easily searchable, bookmarkable HTML documentation, this would greatly decrease the amount of time it takes to learn how to use Konfabulator. The documentation can also benefit from user comments. PHP is a great example of fantastic documentation and is probably one of the main (if not the main) reasons why it is so popular today.

Testing

I developed quite a nice way of easily testing Konfabulator widgets. By turning debug on in the widget, you get a nice window which allows you to reload the widget with a single click. I then wrote a build script which automatically “built” the widget from the source code. My build script is available in the SVN repository – you will need Winzip and Winzip command line add-on. It shouldn’t be too hard to adapt the script to use something like 7-Zip. I edit the files I want in Crimson Editor, launch the build script and then click on the reload widget button to test the changes.

Google Calendar

Via Google Blogoscoped, the Search Engine Watch suggests that googlecalendar.com is “currently registered to Data Docket, an Idaho company that often “holds” domains in their name to new Google services until the service or search tool is just about ready for launch.”

The article mentions how this was done with Google Earth. http://calendar.google.com also seems to be working but currently shows the Google Homepage. Both GCalendar.com and GoogleCalendar.com give me some kind of Site Administrator/User Administrator page.

This suggests Google may be getting ready to launch a calendar application. With GMail, it makes sense also to launch some personal information manager and organization applications. This is probably one of the things applications like Outlook do, but GMail doesn’t.

Apache Multiview Support Added

I just added support for Multiview – you can access blog entries via /index.php/Object-Alias. This is the same as the old URLs which used to be index.php?s=Object-Alias. This was mainly to produce cleaner URLs, improve search engine indexing, and produce better statistics in AWStats :) This script is designed to be used with mod_rewrite/Multiview. There are no hacks – all you do is change the object url in the configuration file from http://khlo.co.uk/?s=%s to http://khlo.co.uk/index.php/%s. The template engine generates all the URLs used via a makeLink() function.

The code on the server which takes the index.php/Object-Alias and converts it into a more sane form looks a bit like this:


<?php

/* Apache Option Multiview */

$multiviewBase $_SERVER['SCRIPT_NAME']."/";

if (!isset(
$_GET['s']) && substr($_SERVER['PHP_SELF'], 0strlen($multiviewBase)) == $multiviewBase) {

    $_GET['s'] = substr($_SERVER['PHP_SELF'], strlen($multiviewBase));

}

?>


Edit 29/9 22:25: Fixed broken PHP.

WolframTones

WolframTones is an “experiment in a new kind of music”. It uses some mathemetical patterns, takes your input for genre of music, and you can also specify things such as instruments, tempo, etc. You then get a nice computer generated piece of music. I do wonder how long it’ll take for a computer generated piece of music to get to number 1 :)

Some info at MathWorld.

Raycaster – Amazing Firefox 1.5 Canvas Demo

If this ain’t impressive I don’t know what is :)

Raycast

This is built using Firefox 1.5′s new canvas tag and Javascript. If you haven’t got it, here’s your excuse to do so It produces a virtual room with walls, some lighting on the wall which change as you move around the room. You navigate around the room using the w, a, s, d keys. You may have to disable the “begin finding as I type” option for the best results (disabled by default). The speed and performance is pretty good.

Raycast

It’ll also work in Safari :) There is also some documentation on the raycaster.

Interesting Google Facts

An evening with Googles Marissa Mayer has a list of interesting facts about Google.

  1. The prime reason the Google home page is so bare is due to the fact that the founders didn’t know HTML and just wanted a quick interface. Infact it was noted that the submit button was a long time coming and hitting the RETURN key was the only way to burst Google into life.
  2. Due to the sparseness of the homepage, in early user tests they noted people just sitting looking at the screen. After a minute of nothingness, the tester intervened and asked ‘Whats up?’ to which they replied “We are waiting for the rest of it”. To solve that particular problem the Google Copyright message was inserted to act as a crude end of page marker.
  3. The infamous “I feel lucky” is nearly never used. However, in trials it was found that removing it would somehow reduce the Google experience. Users wanted it kept. It was a comfort button.

I guess the 4th one is true, I never use the button but I would really like it on the Google Firefox Homepage :)

Is the iPod Nano "up to scratch"?

The iPod Nano scratch story has been getting huge attention in the online media, national newspapers and even local newspapers. The BBC’s story made the front page of the BBC News website. The Register covers the problem of iPod Nanos easily scratching again and asks if the iPod Nano is “not up to scratch.”

The register says there are almost 600 forum posts on the Apple forums. A search through the blog search engines also shows many iPod Nano users are unhappy with the iPod Nano.

Scratched iPods

The original story on The Register carried the story of someone who managed to scratch their iPod Nano by wiping it on a cotton t-shirt:

“I found that my black 4GB Nano scratched within minutes after peeling off the protective wrapper and wiping it with a cotton T-shirt”

It seems like the head of Microsoft’s Windows division bought an iPod Nano the day it came out. He said it stopped working after a day.

The BBC tells the story of a 15 year old who had saved up to buy a Nano and found the machine had a cracked screen within just three ours after buying it.

“I pulled my iPod out and my heart dropped. The LCD was half destroyed, but there is no visible scratch or mark on the outside of the iPod,” he wrote.

The iPod Repair company, iPod ResQ, has announced a price increase for Nano screen replacements because of “overwhelming demand”. Apple says, that the screen is made from the toughest materials and subject to vigourous tests.

This site has complaints from many iPod Nano users about the product. According to The Register, sales of the Nano are also slow. By scrapping their most popular model, the iPod Mini, and replacing it with the iPod Nano which has had impossibly bad press, could this be the end of the reign of the iPod?

GMail Space Limit

GMail‘s space limit is always increasing – at the moment it’s at 2636MB. According to Gervase Markham the Javascript is coded to stop counting at 2950MB on January 1st, 2006. There is speculation that they will then choose a good time to up the limit to 3GB for good PR.

There is also speculation they want to reach 3.14 GB by March 14th (3/14) :)

Behind the Evolution Revamp

Evolution has had quite a makeover. It now looks something like this:

Evolution 5 Screenshot

Navigation

On the left, is a OpenRico Accordion Widget. I like Rico’s Accordion because it’s backwards compatible. Turn off Javascript and you can still navigate the site – all of the “tabs” will be open at once. If you’ve got CSS off too you get a good ole list. There is some extreme CSS styling on the navigation to make it look colourful, add rollover background colors, etc. A grey version of the navigation bar is available by changing the option in the Preferences page. All that does is load a different CSS file. Another nice thing is having a fixed navigation bar using position: fixed. No more scrolling to the top of the page to find your way around.

Continent Status, Quick Message, Search, Help

The links at the top give you quick and easy access to your continent status, quick message, etc. When you click on one of the links, we call Rico’s Effect.Size to expand the panel. A JavaScript DOM CSS call (style.display = ‘block’) shows the content of the panel when it’s fully expanded. On the continent status and help panels, we use a XmlHttpRequest call to grab some extra information. For example, loading information on Research and Development is way over the top on every page load. Therefore it’s loaded on the fly using XmlHttpRequest. One of the nice things about the resizing animation is it actually disguises the loading of extra content via XmlHttpRequest. The animation takes around 0.5 seconds and loading the contents of the panel via XmlHttpRequest takes about the same time.

There’s a nice combination effect of Fade and Animate Position when you close the panel. The panel slowly fades until it’s invisible whilst the contents also move towards the right. Some JavaScript is used to work out how far to the right the panel can be moved without creating a horizontal scroll bar for a few moments. Quite cinematic :) You may have also noticed rounded corners, again thanks to Rico.

Continent Boxes

5 points for every Stargate and Star Trek reference you can find ;)

Continent Boxes

Now, I really like this feature. Whenever you click on someone else’s continent box or name throughout Evolution you get a popup box. This box provides quick access to send the person a message, scan them, view their avatar, information on their alliance, etc. Rounded corners, once again, thanks to Rico.

Rico Problems and Making Rico Smaller

At over 70KB, Rico is quite a monster. Simply removing livegrid and drag and drop from the Javascript file, I got it down to a more acceptable size at 38KB. It also fixed two Rico bugs in the process – autoscrolling (middle clicking scroll bug) and text selection in Internet Explorer.

Acronyms for Fun

We were just having a discussion about TLAs (three letter acronyms) in Evolution IRC and I managed to dig up an old blog entry where I listed 100 computing acronyms for fun.

HTML, XHTML, XML, RDF, C++, C, vB, MS, GNU, PPPoE, SCSI, DLL, IDE, EIDE, PHP, ASP, JSP, MSN, CMD, SQL, mySQL, PostgresSQL, PCI, DNS, TCP, IP, IE, FF, CSS, DOM, JS, HTTP, WWW, CAB, ZIP, DOC, XLS, OWL, JPG, GIF, PNG, JPEG, MNG, JNG, ISP, P3P, W3C, SOAP, XML-RPC, URL, XSL, XSLT, XSL-FO, IETF, RSS, PEAR, CPAN, BBS, FTP, SCP, SSH, SFTP, HTTPD, IIS, PWS, PY, SSI, FSF, GPL, LGPL, CC, WCAG, WYSIWYG, IRC, CGI, CMS, DTD, XMLNS, ASP, ASP.NET, MSDN, PDF, XML-RPC, XP, RAM, ROM, MBR, DHTML, CFM, MP3

I can manage around 92-95 off the top of my head :-)

Update: Incase you like these things, I generated a list of 100 acronyms. They should all be technology related (probably biased towards internet and networking technologies). Enjoy :)

KDE, GNOME, HTML, XML, FOAF, XSS, CSS, LCD, BSD, XUL
WMP, TIFF, JPG, SVG, GIF, PNG, FTP, HTTP, NTP, NNTP
SFTP, SCP, SSH, PHP, PEAR, DTD, CPAN, RAM, ROM, WWW
DOM, TCP, IP, UDP, DNS, IRC, XMPP, RSS, OS, ASP
WCAG, WYSIWYG, IETF, IEEE, XForms, LPT, USB, SOAP, REST, XML-RPC
CGI, XSLT, MSDN, SIMPLE, API, PCI, DVD, CD, VCD, HD-DVD
INI, MNG, JNG, BMP, XSL, XSLT, Winipcfg, 3G, GPRS, GPS
IO, CMS, PDF, RAM, ROM, DRM, CFM, MP3, OGG, AAC
URL, URI, IRI, IDN, RFC, W3C, GNU, IRC, MSNP, HTTPD
SMS, VB, WEP, WPA, DSL, RDF, DHCP, PPK, NAT, ASCII