Superheroes?

December 30, 2006 at 01:10 PM | categories: python, oldblog | View Comments

Steve Holden posted about the "which superhero are you?" quiz. My result?
Your results:
You are Hulk
Hulk
80%
Spider-Man
70%
Green Lantern
65%
Iron Man
65%
Robin
55%
Catwoman
55%
Batman
50%
Supergirl
48%
Superman
45%
The Flash
35%
Wonder Woman
28%
You are a wanderer with
amazing strength.
Click here to take the "Which Superhero are you?" quiz...
Read and Post Comments

Exogenous Connectors as an emergent property?

December 29, 2006 at 12:47 AM | categories: python, oldblog | View Comments

I've just added basic authentication to the Kamaelia Web Client, since it seems the useful thing to do, and appear to have created a need for exogenous connectors as an emergent property, which is incredibly cool. This will potentially allow:
Pipeline(
    ConsoleReader(eol=""),
    SequentialTransformer(
           HTTPRequest,
           AddHeader(AuthorizationHeader("Username", "password"))
           AddHeader(CacheControlHeader("no-cache"))
    ),
    SimpleHTTPClient(),
    SequentialTransformer(feedparser.parse,
                          pprint.pformat),
    ConsoleEchoer(),
).run()
This would take a URL from the console, turn it into an HTTP request, add a header which happens to be an Authorization header, also add a cache control header, and then pass this onto the HTTP Client. That makes a request, and then passes it on to the next component to be parsed and then put through a pretty printer. It's still transformational, but rather than requiring you to write new components for everything you can write simple transformations. The next step is to figure out how to invert this - how to make it such that Sequential components can be the primary component framework. (this would allow Kamaelia components to be used as a library in "normal" code). (Consider for example taking an RSS feed from a site that publishes links to .torrent files, extracting the ones you like, auto dumping the results to disk for local playback when you get home... )

I've just checked in an initial pass at a SequentialTransformer into Kamaelia.Util.SequentialTransformer.SequentialTransformer. Thinking about it though, I've perhaps written too much code - the Sequential Transformer is just a specialised version of the PureTransformer...

So how did we get to that stage? Well, locally for testing, I've created an authenticated RSS feed that looks like this:
Pipeline(
    ConsoleReader(eol=""),
    PureTransformer(AuthenticatedRequestStream("Username", "password")),
    SimpleHTTPClient(),
    PureTransformer(feedparser.parse),
    PureTransformer(pprint.pformat),
    ConsoleEchoer(),
).run()

And it just struck me - this could be rewritten as:
Pipeline(
    ConsoleReader(eol=""),
    PureTransformer(AuthenticatedRequestStream("Username", "password")),
    SimpleHTTPClient(),
    SequentialTransformer(feedparser.parse,
                          pprint.pformat),
    ConsoleEchoer(),
).run()
However you would then get the ability to do this sort of sequential transform elsewhere. This combined with the ideas that Kamaelia's website engine runs on generated the example at the top. Essentially sequential components operating on a shared expected state, which they update and passback.

Read and Post Comments

Basic Authentication - Did you know?

December 28, 2006 at 07:41 PM | categories: python, oldblog | View Comments

You may think basic authentication for your site is OK, and depending on how secure you want you data, and how much control you have of your network, it might be. However, consider this (faked) snoop:
GET /Some/Secure/Thing HTTP/1.0
Authorisation: Basic TWljaGFlbDp1bHRyYXNlY3JldA==
How secure is that?
~> python
Python 2.4.2 (#1, May  2 2006, 08:13:46)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.decodestring('TWljaGFlbDp1bHRyYXNlY3JldA==')
'Michael:ultrasecret'
Not very secure at all.

Is this a problem? Do you know where all the transparent proxies might be between your users and your resources?  As always, depends on the context :-) I found it interesting though, due to looking at adding authentication support to ryan's webclient code, since I'm looking to capture, process and potentially republish potentially authenticated RSS feeds using Kamaelia. (basic RSS example)
Read and Post Comments

Rudolph The Duck Billed Platypus

December 24, 2006 at 11:39 AM | categories: python, oldblog | View Comments

Rudolph the Duck Billed Platypus
Had a very shiny beak
And if you ever saw him
You would even say it squeaked

All of the other platypuses
Used to laugh and call him names
They wouldn't let poor Rudolph
Join in any Duck Bill games

Then one soggy Christmas Eve
Santa came to say
"Rudolph with your beak so bright
Won't you paddle my boat tonight?"

Then all the platypuses loved him
And they shouted out with glee
"Rudolph the Duck Bill Platypus -
You look like a Christmas Tree!"

Read and Post Comments

Live Simple?

December 17, 2006 at 11:54 PM | categories: python, oldblog | View Comments

Interesting social site from Philips. I'm not sure how many active users they have (or what social tribes it crosses), but they do have an interesting site. Questions like "is RSS really simple?" Question about DRM. Is time the new currency? Some questions of collaboration creation, which may miss the point. (and yet, depending on how approached, might not). Themes include: Internet & Computing questions, Lifestyle & social (I like the 4 day week idea myself :) - wasn't more leisure time, for whatever purpose, one of the dreams of progress? )
Read and Post Comments

Amplee using Kamaelia Web Server

December 15, 2006 at 11:27 AM | categories: python, oldblog | View Comments

Personally I think this is way cool since I didn't write any of the code :)  Sylvain Hellegouarch has written a backend for Amplee that uses the Kamaelia Web Server which I referenced a new tutorial for in a previous post. What is Amplee? From the Amplee site:
  • amplee is a Python implementation of the Atom Publishing Protocol (APP), as specified in the current draft 11.
The integration comes as two files - one is a amplee's demo_kamaelia.py, the other is the file with the Amplee/Kamaelia Web Server Code.

My intention now as a result of seeing this is to look at providing a WSGI interface to using the Kamaelia Web Server. Initially this will be basic integration, but beyond that it would be interesting to expose Kamaelia capabiities to web developers. (Especially given this can run client side) Now I've never used WSGI, but seeing that this works, and seeing that amplee can also use a WSGI based server, this strikes me as an opportunity to say that any help that anyone can give with WSGI integration would be particularly cool.

Read and Post Comments

Kamaelia Cookbook - How to use the webserver in Kamaelia

December 13, 2006 at 08:21 PM | categories: python, oldblog | View Comments

After a request on "how do you use Kamaelia's HTTP Server", I sat down and created a cookbook entry detailed how you use Kamaelia's webserver code. So without further ado: How to use Kamaelia's webserver !

After writing that entry, it struck me that it actually makes sense to extend the codebase to simplify the current API, but even so, being able to write a response handler like this:

def EchoHandler(request):
return Pipeline ( Cat(request), ExampleWrapper() )

is really rather sweet :-) (You can put whatever components you like in between this that you like for example, however wacky)

Read and Post Comments

Project Task Pages - Applying Kamaelia to Project Management

December 12, 2006 at 06:28 PM | categories: python, oldblog | View Comments

Well, a bit later than anticipated - I should really be off to this month's Geekup here in Manchester, but I really wanted to get this down sooner rather than later. In a previous post I mentioned technical debt and my hypothesis of project management debt - caused by lack of tracking tools or reporting mechanisms. Well, we'd recently been overloaded with work on Kamaelia so I decided to see if we could apply Kamaelia itself as a project management approach.
Not as a tool, not to create software, but as an approach in and of itself. In Kamaelia, components perform tasks, and take inputs from places and produce outcomes. In this case we did the same, except in the case of a task, the inputs are people and outcomes can be lots of different types of things (code, docs, presentations, etc). Similarly we looked at the core of how we document things - like 1 line synopsis (what is it?), examples (what will be possible by doing this task), benefits (why would you use a component), and applied that as well.
The upshot is a collection of Project Task Pages linked from our Projects section of our developer console.
The core is that given 3 things:
  • Short one line of what the task is designed to achieve/create.
  • A practical, clear result of what will be possible as a result of achieving this task.
  • The context in which this task sits. Has this task any history? Is it the result of any previous tasks - either within the project or outside.
And preferably little details like:
  • Sponsor (who wanted the task achieved)
  • Owner & Developers
We can track more or less anything we like, be it a bug report, or organising a conference (I'm using it for this internally) as well as larger projects. We've got a rather over the top template which describes the "full on" version, where you can track status, and preferably use a task log, but the overall feel won't be too odd to anyone who's been asked to use a bug tracker to track new feature development.
The upshot though of this, is this: can it actually make your life easier? Well, it seems it can. I've been able to produce a summary of the past 9 months work in about 10 minutes, and I've been tracking our involvement in a conference in this way, as well as a dozen other things over the past couple of weeks - something that would normally overwhelm me. For some examples of public PTPs a few links:
So far we're finding this approach, and it does increase the transparency of Kamaelia somewhat as well. (Which is nice given the recent website revamp :) )
If any of this comes over as forced, it's just because I'm enthusiastic and want to share something we're finding useful :)

Read and Post Comments

Manchester Geek/Tech/etc Events coming up

November 11, 2006 at 11:23 PM | categories: python, oldblog | View Comments

Some links or else I'll forget
  • Nov 14th - Geek Up (similar to london 2.0 AFAICT)
  • Nov 18th - ManLUG. I suspect me turning up after all these years might be a bit of a shock for some :)
  • Nov 23rd - NW Start Up 2.0 - Starting an internet business? Seasoned entrepreneur? Got the killer idea? Wondering what the 2.0 this and 2.0 that is all about? Looking for investment? Looking to invest? ... Come along to the north-west's first and premier 2.0 networking event for an evening of conversation and potential dealmaking.
  • Dec 2nd - DNSCon - DNS9 is the ninth running of the data and network security council conference. This being the annual meeting of UK security professionals and interested individuals. The UK’s longest running open information security conference provides an opportunity to find out about new threats to information security. Now in Manchester instead of blackpool.
    running concurrently with...
  • Dec 1st-3rd - Continuity - Continuity is a free security convention open to anyone with a interest in computer security, hacking, phone phreaking, telephony, cryptography, internet security/privacy, urban exploration, social engineering and related subjects.
  • Also Manchester 2600 - The Manchester 2600 meet takes place on the first friday of every month. It is aimed at everybody with an interest in computer security, telephony, hacking, phone phreaking, cryptography, internet security/privacy issues and related subjects.
Read and Post Comments

Flying Spaghetti Monster shows his Noodly Appendages in Germany!

November 11, 2006 at 07:57 PM | categories: python, oldblog | View Comments

Awesome:
  • http://www.youtube.com/watch?v=vL7FcvEydqg&eurl=
Read and Post Comments

« Previous Page -- Next Page »