Tuesday, 30 December 2008

Kinetic scrolling with Processing - part1

I've been toying with an idea for a timeline based project; it hasn't got much traction.
I did give the interface some thought and decided to try and implement a kinetic scroller.

It's pretty difficult to find a definitive explanation of Kinetic Scrolling or Flick Scrolling, but I think this pretty much sums it up:

"Kinetic scrolling is the popular term to denote the scrolling of a long list with a bit of physics so that user feels like moving a wheel. Such a list view is then often referred as a flick list, caused the scrolling involves some sort of flicking gestures. " [1]

Apple have a tutorial showing how to use their implementation here [2]


The physics are an illusion, and the approach I used is simple.
  • Click and hold the background to drag.
  • When drag is released, note how far it moved since the last draw.
  • Use that distance as the speed (or energy) of the scroll.
  • Continue moving in the same direction, but start reducing the speed (decay).
  • When the speed slow below a threshold, stop the scrolling.
I made a demo using Processing [3], click the image or here to start.
The coloured bars are just for showing the movement clearly.




[1] http://labs.trolltech.com/blogs/2008/11/15/flick-list-or-kinetic-scrolling/
[2] http://support.apple.com/kb/HT1636
[3] http://processing.org/

Sunday, 7 September 2008

Ubiquity commands for openmoko searches

I've been trying out Mozilla's Ubiquty, and I love it.
I hope it gets support and flourishes to the point of being the norm for interacting with the web.

My only gripe (so far) is I have to use it from within a browser, I wish was part of the wider OS, in the way Launchy is.

Anyway, here's a couple of commands to search Openmoko mailing lists and the Openmoko wiki.

makeSearchCommand({
name: "OM",
url: "http://openmoko.markmail.org/search/?q={QUERY}",
icon: "http://wiki.openmoko.org/favicon.ico",
description: "Searches Openmoko Mailing Lists for matching words."
});

makeSearchCommand({
name: "OMW",
url: "http://wiki.openmoko.org/wiki/Special:Search?search={QUERY}",
icon: "http://wiki.openmoko.org/favicon.ico",
description: "Searches Openmoko Wiki for matching words."
});
To add them to Ubiquity, use the command editor (you'll need Ubiquity installed).
Copy and paste the code and you good to go - real-time development, weird.

To use, invoke Ubiq and enter either commands OM or OMW.

Done.

Sunday, 29 June 2008

Processing Nagios Status Data - part 1

I've been tinkering with Processing of late, and having a lot of fun with it.
After finding the awsome traer physics library and Sean McCullough's implementation of force directed graph layout, I thought I would see if could visualise the status data from Nagios (..is an Open Source host, service and network monitoring program).

Essentially, after defining hosts (devices) and services (stuff the hosts provide), Nagios will monitor their performance.
I wrote a utility to extract the data I wanted from Nagios, and output an xml file.
I have plans to extend that as a seperate project - Nagiosity. The processing app uses the xml to constructs a graph. It's a bit rough, but I liked the result anyway.
The bigger circles are the hosts, the smaller circles are the servcies.
The more transparent the colour the older the status data.
Green is good, red is bad, the rest are somewhere in between.
The graph layout it's force directed, and uses an inverse gravity model; bigger mass repells.
We can use this property to create an intresting effect.
As the status data updates (every 10 secs) we adjust the mass slightly, and the graph reconfigures accordingly.
For failing services, or old data, we increase the mass, and they migrate to the edge of the screen. Click the image below and run the app, it's quite a neat organic effect.






Wednesday, 9 April 2008

Error creating gateway

If you use ESX from Vmware, you may also use vRanger Pro from Vizioncore to backup VMs. Consider doing so, it's great.

If you are already and you start getting backup failures, with 'Error creating gateway' in the log, check to see if someone has changed the root password on the ESX hosts.

If the password has changed, you need to go into Configuration/VMware Hosts//Modify Host and update the password, for each vmware host.

I speant a good few of hours figuring that out. :(

Saturday, 2 February 2008

Teracopy

Every so often a nice little utility comes a long, and it makes stop and wonder why the OS vendors didn't include it as part of the OS.

Teracopy is a small windows utility from Code Sector which replaces the tediously slow native file copying process.

Essentially it provides file copy queues.

Find the file you want to copy, right click use the context menu to use Teracopy, Copy to.. etc, start the copy process.

Want to copy another file to the same place?
Just drag it to the existing copy dialog and it will be added to the queue.
So simple and intuitive.

I love it. and it will be part of my essential installs.

Wednesday, 4 July 2007

Australian product recalls feed

I'm a subscriber of Choice magazine (Australia) and a supporter of their campaigns.
Towards the back of each issue there is a couple of pages listing product recalls. I typically scan through them, but there's a lot and the format is not great.

The same information is provided online by the Australian government, here.
It's not the most attractive website, but it probably supports every browser and let's face it how slick does it need to be?

If the style doesn't date it, the lack of RSS does, and that's what I was after, a low volume feed.
I emailed the address on the contact page, but I haven't heard back, so I though I'd just scrape the pages for data and fabricate my own feed.

I tried using feed43.com, a service specifically designed to scape content from html to produce rss feeds. However, there's no facility to pull content from multiple sources, so the feed it produced was not much more than a teaser, no good for my offline reader.

I decided to write my own, using python.
A quick Google for a python module located PyRSS2Gen.

Essentially, this the the processes :
  1. Download the web page with a list of product recall in the last 30 days.
  2. Locate and extract the individual recalls using regular expresions.
  3. Download each recalled item's information page.
  4. Extract the details of the recall.
  5. Construct an RSS feed from the scraped content.
Here's the code, and the resulting rss feed.
A cron job runs every day, and updates the feed.

Thursday, 26 April 2007

What is a book ?

First I saw the cover of an old novel pop up on my LibraryThing collection and then, a post about Ludditism on Digital History Hacks reminded me of the same novel, and today a post titled Bio-Optic Organized Knowledge Review, reminded me of it again.
The novel, Days by James Lovegrove is an old favorite of mine, and a significant section of the plot revolves around an escalating conflict between a book shop and a computer shop.

What sticks in my mind is this lovely piece about books, spoken by Miss Dalloway the Luddite bookshop manager.

"A book. As a source of easily retrievable information, portable, needing no peripheral support systems, instantly accessible to anyone on the planet old enough to read and turn a page, a book is without peer. A book does not come with an instruction manual. A book is not subject to constant software upgrades. A book is not technologically outmoded after five years. A book will never ‘go wrong’ and have to be repaired by a trained (and expensive) technician. A book cannot be accidentally erased at the touch of a button or have it’s contents corrupted by magnetic fields. Is it possible to think of a object on this earth more – horrible term – user-friendly than a book?"

That was written in 1997, when computers were outmoded in five years. (yeah right)

I've long since been waiting for the arrival of e-ink, I have wanted a good ebook reader for years and this post on Signal vs Noise, gives an encouraging review of the Sony Reader PRS-500 (massive image), encouraging enough for me to look around this room for something to sell.

Books they be changing.