September 2006

Visualising Wikipedia

Exploring-Moé

Something I’ve noticed of late is how Wikipedia has effectively become my upper ontology. As I add more and more links in my utterings I wonder how useful it would be to annotate each and every word with a link to it’s precise meaning. Well its widely agreed meaning at some point in time. Then machines could do something cool later on. I guess I’m ripe for Microformats, GRDDL or RDF-A.

So I was rather excited by the prospect of Pathway. The reality is slightly dissapointing. It’s a shame that visualisations for representing relationships seem to have all fallen into this very flat convention of boxes joined by elastic bands, even when they’re as interesting as They Rule!, as smooth as Tagnautica, as funny as ICONAUT as well animated as associatr or are extruded into 3D. Yeah I know Unix and I don’t want it to look like this. Oh and I want the linkability of Wikipedia. There’s got to be a better way.

Technorati Tags: ,

Comments (0)

Permalink

dotMobi (TM)

So .mobi is here. Don’t touch it, it’s eeviil.

Technorati Tags: , ,

Comments (0)

Permalink

Collaborative Commenting

Just love the AJAX* driven commenting system for the GPL V3 review.

* yeah “Bingo” flip the bozo bit**

** in any group of people, if you can’t spot the, ahem, Bozo, then you’re it :-)

Technorati Tags:

Comments (0)

Permalink

Primes by Regex

Via Otu, a regex to discover prime numbers. Wow!

import re
p = re.compile(r'@^1?$|^(11+?)\1+$')
for i in xrange(20000):
    if p.match('1'*i) is None:
        print i

Cool, but on my slowbook the Sieve of Eratosthenes is some 2000 times quicker:

primes = []
for i in xrange(2, 20000):
    isprime = 1
    for prime in primes:
        if (i % prime) == 0:
            isprime = 0
            break
        if i < prime*prime:
           break

    if isprime:
        primes.append(i)
        print i

Either way I don’t think we’re going to win The COOP Prize, unless we find a cheat.

Technorati Tags: ,

Comments (0)

Permalink

Using Microformats

Brian’s O’Reilly PDF on Using Microformats is out. Go get one!

Technorati Tags: ,

Comments (0)

Permalink

XML2006

XML2006

The conference programme for XML2006 is out and I’m on Tuesday afternoon promoting the work of W3C XML Schema Patterns for Databinding Working Group. Looking down the list there are a few frendly names, so it should be fun!

Technorati Tags: , , , , , ,

Comments (0)

Permalink

Learning to Ride a Bike

Riding A Bike

Here’s a sure-fire technique for moving kids off stabilizers: take the peddles off, let them scoot around for 10 minutes - a slight slope is ideal. Put the peddles back-on and watch them ride.

Comments (1)

Permalink

Read the Small Print

I’ve often wondered after opening an envelope or clicking “yes, whatever, I do want to install your crummy software” how long before they front-up on my doorstep and demand live organ transplants. Well thank goodness we have people like Simon, Eve, Mark and Cory. Microsoft at least seem to be doing the right thing, for once. But Amazon, oh my! EULA, shamoola.

Comments (0)

Permalink

Paint Bomb!

Filming for the latest Sony Bravia advert, more on flickr.

Comments (0)

Permalink

Ruby Net::HTTP and SOAPAction

So you want to spurn SOAP4r and http-access2 and espouse Ruby’s builtin Net::HTTP class? But yes, it is strange how headers such as SOAPAction get munged into Soapaction and rejected by many SOAP toolkits. Don’t spill yer chunky-bacon, try my quick and dirty work-round:

require 'rubygems'
require 'net/http'
require 'uri'
require 'builder'

endpoint = 'http://localhost:10080/'
soap = 'http://schemas.xmlsoap.org/soap/envelope/'
service =  'http://www.w3.org/2002/ws/databinding/examples/6/05/'
operation = "echoStringElement"

xml = Builder::XmlMarkup.new
xml.Envelope :xmlns => soap do
  xml.Body do
     xml.tag! operation, 'Be like the squirrel!', :xmlns => service
  end
end

module Net
  module HTTPHeader
    def canonical( k )
      return "SOAPAction" if k == 'soapaction'
      k.split(/-/).map {|i| i.capitalize }.join('-')
    end
  end
end

uri = URI.parse(endpoint)
http = Net::HTTP.new(uri.host, uri.port)
#http.set_debug_output $stderr

req_headers= {
  'Content-Type' => 'text/xml; charset=utf-8',
  'SOAPAction' => '"' + service + '#' + operation + '"',
}

req_body = xml.target!
response = http.request_post(uri.path, req_body, req_headers)
puts response.body

Note I followed Sam’s example and used XML::Builder to make the SOAP message. I now anticipate bile and vitriol from the apparently friendly, inclusive Ruby community :-)

Technorati Tags: , , ,

Comments (3)

Permalink