How not to give a talk at a Conference

September 20, 2006 at 04:31 PM | categories: python, oldblog | View Comments

I'm currently sitting in the session Scaling Up Open Collaboration and was expecting the two presenters to run a session, to run a talk. What have we got instead? We have a "video". This has instantly turned me off. Almost everyone in the room is now concentraing on their laptops, and not the message of their video. Despite the clear amount of effort and love that they've put in, they've failed completely to get their message across, which is a shame. If you run a talk, talk. I've been in bad talks, depressing talks, but all of these have been more compelling that smeone playing a video at me.

On a technical level, I watch a lot of TV - probably waaaay too much, and being in a broadcasting org I've picked up some tips about how to make a documentary, and this breaks a lot of rules. In places we have video, in others we don't. There doesn't appear to be a story being told... There's sections with people talking over text, which is fine, however the editors clearly recognised this alone isn't compelling, so they decided to add some background music. However if you're hearing isn't that great (like mine) then the fact that the music was louder than the person.

Another problem is the large changes in volume - the lack of good audo editting also turns me off.

Personally, I found the session awful. Ironically, if it'd been on youtube or google video, then there's a good chance I'd've watched it if linked through it.

As a session though, I found it painful.
Read and Post Comments

Daleks

August 21, 2006 at 08:57 PM | categories: python, oldblog | View Comments

Five million Scary Cybermen jumping through the void,
One fell badly, and whirled and whirled,
Rose phone The Doctor and The Doctor said,
"No more Cyberman taking over the world"

Four little Daleks, with a genesis pod
One got shot and bumped his head.
Rose phoned The Doctor and The Doctor said,
"No, no Daleks off you go to bed"


Read and Post Comments

Would you fly to the US right now?

August 12, 2006 at 12:42 AM | categories: python, oldblog | View Comments

That's the question on my mind right now. I'm supposed to go to the US for work reasons (Foo Camp) which is undoubtedly (almost?) a once in a lifetime opportunity, but does it outweigh the concerns I have over the fact that I'll have to check in my laptop into the hold ? (having had one data recovery experience this year, I don't want to risk a second) More importantly does it outweight the concerns my family have for my well being - that is they don't want me blown up ? That I really don't know right now. I do know that I'd planned on flying on one of the airlines that had apparently been targeted, which doesn't really inspire me.

The restrictions on what you can take on board for a long term flight (ie nothing) would probably also drive me barmy, and for EuroFoo and EuroOSCON I'm probably going to get the train - under 2.5 hours from Waterloo!

As you can probably tell, I'm rather undecided what to do right now. I've got about a week to consider though. Taking any longer and it wouldn't really be possible for Tim & co to re-allocate my space to someone else (something I'd like them to do if I can't make it to foo). Ironically, whilst my families biggest fear right now is of me being blown up, mine revolve around losing my data. I've already had that hell once this year and really could do without it a second time :-(

Any experience anyone else has had with laptops stowed in the hold would be encouraging to hear. (Even if my response is a little delayed...)
Read and Post Comments

The Long Tail Paradox - You don't need a tail

August 09, 2006 at 09:15 AM | categories: python, oldblog | View Comments

This is something I've been itching to write for a while, and I'm not sure I've got my analogies and descriptions right yet, but the gist is right more or less right (perhaps less than I'd like), the long tail sucks, viva le long tail...

The long tail - or rather Zipf's Law - has been getting a lot of publicity recently, which is nice in a way, but also suprising in others. I first came across the long tail 8 years ago when I started work at the Janet Web Cache Service in a variety of papers from the 3rd web caching workshop (which had been held in Manchester just before I started working there). The one thing that struck me was the fact that Zipf's law is a fundamental aspect of human behaviour (as fundamental as fire).

As a result, when people started putting catalogues on the internet people, whole new communities - business communities - started to see the effects of the long tail of human behaviour on their profits. Intuitively we all understand the long tail - we know that we want things that suit us, that match our desires.

However the reason why "hits" and "hit culture" took off is simple to explain - we all want quality. We don't want to choose from 20,000,000 things - this for me is the nightmare of the record store (online or real). Ask me what music I like and I'll say "good stuff". Don't ask me if it's garage or rap or indie, I don't know. I don't care about that subdivision, that label. I like cool stuff. I can point at stuff by Queen, stuff by Rob Dougan, Pictures at an Exhibition, the theme tune from twin peaks, Ernie the Milkman, Lilly the Pink, and so on. I don't classify my likes. As a result music stores suck for me (of almost all kinds).

Expanding that choice by even double, let alone 10 fold or 20 fold, leaves me cold. I'm aware that this makes it more likely that it is _possible_ for me to find something I'll like, but my ability to find it decreases as that choice size increases. This is Mooer's law in action. The usefulness of the system to me decreases as the amount of information increases.

I'm not alone. (I might be one datapoint, but I'm not arrogant enough to assume on a planet with 6 billion people to believe I'm that different from other people)

That's why top tens are good. It's why if I'm going on a long flight at an airport, I'm pleased that they have a top ten (or a variety of top tens). It's why I'm pleased that shops tend to operate on a principle of "survival of the fittest". If a book is good, it's likely to stay on the shelves (through restocking). If it's not, it's likely to disappear or get covered in dust. The smaller the shelf space, the more important those decisions become. Too much dust and you go out of business. Sure, the books available are less likely to be a good fit for me, but they're also more likely to be closer to the head than the tail (The tail being where the likelihood of it sucking for me increases).

This for me is the real issue. Why do you see zipf distributions? Because by and large the values as to what is good are shared by many people, we do tend to have similar likes on some levels to other people. That is why places like Amazon are particularly good, they don't just operate a long tail - every online bookstore does that - they allow people to gain insight into what's going on in that long tail. Similarly, Google News has the ability to look at what thousands of journalists worldwide have chosen to write about and chosen to publish. They then allow you to look at the head of that snake, by time, date, a search or a combination of all of these.

These services make the head & body of the long tail visible, which in essence is what we all want anyway, though personal to us.
The long tail exists because our tastes all subtley differ, and we all want quality. What you think is terrible, I might think is great. I still remember seeing Spawn at the cinema, how much fun I found it, and how good a film I find it, and yet, I'm still to find another person who agrees. The phrase "so bad it's good" is a cliche, and with good reason. If I say "The Matrix" however, you find lots of people agreeing that think its a cool film.

As a result, the head of the snake is useful. The head of the snake is a means of navigating yourself to content that lots of other people who may share similar tastes to you think is good for some reason. If you make the place to choose from attractive to a wide audience who choose from the wide variety of content, then the head of that snake will be attractive to that wide audience. And that's why hit culture took off. As long as everyone was choosing from the same pot and the reporting on that pot was accurate, then the top 10, top 40, top 100 was useful. That's why the top 40 in your local supermarket might be more relevant to you than a general top 40.

The real interesting aspect of things like recommendation engines is that they're personalising this snake. They're turning the snake into a hydra, and each head is a real user.

However, the interesting point is this: caching makes sense. Caching to be effective has to identify the head of the snake. By identifying the head of the snake, but still making available the tail the cache is useful, but provides a time benefit to the user and cost benefit to the provider with regard to the content. What does this mean in the context of a long tail? It means that small stores can exist, and can stock a wide variety of useful content, and can even use simple heuristics to make money. This is essentially what web caching does after all.

And why does caching make sense? It identifies the head & body of the snake, allowing you take advantage of the fact that the head and body have equal business or bandwidth value as the entirety of the tail, which is a choice set, many, many, many, many, times larger.

Now, I'm not a business person (by choice), but I'm savvy enough to realise this: if a web cache (fixed amount of choice of storage) can cope with the vagaries of an effectively infinite choice zipf distribution, and still turn a profit (ie be worth running), surely the same can be true of a business. You don't have to say "we'll stock everything", merely being able to get everything, and be able to serve the high quality stuff (as chosen by that audience) is sufficient. Furthermore, it's entirely likely that given a sufficiently "good" recommendation engine, that the amount you stock can be kept small.

The paradox of the long tail is this: you don't need a tail to take advantage of it, a virtual tail is sufficient - as long as you're willing to change your body and head to match the whims and desires of those choosing. If you can provide insight into that long tail, and shift content into a local store - and turn that tail into a body & head, then you increase the value of your proposition to the audience, and they will move your store along the long tail of online stores further towards the head, than the tail of online stores.

After all, if you could go into a store on the high street and say "give me something cool to listen to", and they did, and every time you went there not only did they give you something cool, but it got cheaper with time, surely you'd go back? You'd stop caring about the size of the tail, as long as you could get at it.


Read and Post Comments

Choose Your Own Programming Adventure!

August 07, 2006 at 12:45 AM | categories: python, oldblog | View Comments

I made the offer to write some exercises to teach python programming at OSCON, specifically in the form of being able to create a "choose your own adventure" style game using python. So, here we start! By the end of this first entry, you will be able to write a basic "choose your own adventure" computer game, even if you've never written a line of code before.

OK, there's dozens of ways of doing this, so we have to pick one. One place to start is to look at what the thing you're trying to emulate looks like.

What does a choose your own adventure look like?

Well, it's essentially a book, divided into lots of micro-chapters - at most 1.5 pages long, normally 1-3 paragraphs in length. Each paragraph has the following:

  • It is typically numbered and you start at section "1"
  • The section says where you are, tells a microstory, that ends with a choice point.
  • That choice point then allows you to move on to another part of the story

So, let's begin.

As a word of warning, this will start out gently, perhaps a little patronising, but hopefully with enough humour or bizarreness to offset that. The reason it might seem patronising is because I really want to point out some really important points, and without understanding those, everything else falters. However at the end of this first tutorial you will write your first adventure game, and don't worry, it will be simple.


The tutorial for sake of getting into the spirit of things, the tutorial is in the second person. This is YOUR adventure!

Prologue

You are sitting at the computer looking dumbly at the screen. You ponder your decision to decide to learn to code wryly, and realise that it might not've been such a bad idea after all. You decide to download python, and give it a go.

You go to http://www.python.org/download/ and grab a version suitable for your OS (unless you already have it installed because you have a recent Mac, or a modern Linux install) and install it.

The first program you are asked to run looks like this:

print "Hello, you are in a small dark room"

Unimpressed, but determined to follow the instructions, you open up a Terminal window, then load up the python interpreter:

~> 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.
>>>

You type the code in, and press return, and are singularly unimpressed by the result:

>>> print "Hello, you are in a small dark room"
Hello, you are in a small dark room

That said, your lack of awe with regard to this fills you with hope. You realise that this programming lark might not be as difficult as some people make out.

The Lobby Scene Begins....

"AAARRRGGGHHH!", you think, "I'm late!" - as you remember that this is your first day at yet another job of the kind that you're hoping to use your hoped to gain programming skills to get out of. You're starting a new day as a receptionist at the local hotel, though thankfully only for postal & messages tasks. You remember the hassle you got last time when you were on the front desk and all those people from that open source conference were visiting - what a nightmare that'd been - everyone complaining about the wireless!

You arrive at work, some 10 minutes later, and after 20 minutes of waiting are thrown straight in.

In front of you is a large collection of old style pigeon holes on the wall. All 256 are numbered, though oddly starting from 0 all the way to 255. Puzzled by that you pass it by. Next to the collection of pigeon holes is a register which should contain a list of the surnames of the people staying in which rooms. You note that some rooms have multiple surnames associated with them. Since it's not the 1900's you're not particularly surprised by this!

You do for a moment wonder though - why's the story taken a turn for the moment towards hotels, pigeon holes, and surreptitious weekends away when the story should be related to teaching programming through adventures...

"WHAT ARE YOU DOING DAYDREAMING", shouts the concierge at you. "HAVE YOU FORGOTTEN WHY YOU'RE HERE?"

Suddenly you realise you have forgotten what you're doing. You decide to make a note on the notebook in front of you to remember what you're doing - you're taking messages and giving them back when requested.

Your First Assignment

A customer comes up.

"Ahh, your first assignment", says the concierge.

"Hi! I'd like to leave a message for Mr Message", says the customer.

You think this is a very odd name for a person, but reply "OK, sure, let me just check his room number". You consult the register and find that he's staying in room 5. You grab the slate board from pigeon hole 5, whilst thinking briefly how strange it is to be writing notes on slate boards, but hey, maybe the hotel management isn't really that bright, or just stick to simple things they trust.

"OK, ready, what's the message", you say.

"OK, the message is 'Hello, you are in a small dark room' ", the customer replies.

You pause for a moment thinking how strange this is - after all this was the message the tutorial you were reading suggested.

Undeterred, you say "sure, no problem", and write "Hello, you are in a small dark room" on the slate for the room that Mr Message is staying in, and store the message "Hello, you are in a small dark room" back in Mr Message's pigeon hole.

Strangely, the mysterious glyphs ...

>>> message = "Hello, you are in a small dark room"
>>>

... appear in mid air, burning like fire, but as cold as stone. There is a clarity about the phrase. It is trying to get you to understand something. Something about what you are doing in the hotel lobby storing a message, and what looks mysteriously like something you'd see on a python prompt.

You ponder for a moment what could possibly be similar between the code ...

message = "Hello, you are in a small dark room"

... and putting the text "Hello, you are in a small dark room", in a pigeon hole associated with a Mr Message?

A wry observer sitting the hallway nods sagely and realises that whilst such a description may be patronising, he's seen many a novice stumble over this initial step.

He walks forward and says: "Think like Daniel - the Karate Kid. How many times did he wax on, wax off, on those cars? When did he learn Karate? Was he merely polishing when he was hitting his opponents? or was he fighting those cars instead of polishing them? Sometimes realising that you already understand something is merely a matter of recognising that it is really no different from something you already know."

You pause. Pop reference. Telling you something you already know, but telling it to you in a way you hadn't expected. Australian accent. Hmm. Nah. You move on.

Then you realise - the old man was right. If taking a message for a man named "message" and placing it in a pigeon hole was an easy and obvious thing to do, something you'd seen a 100 times, then that was precisely what ...

message = "Hello, you are in a small dark room"

... means. It means taking a piece of information, storing it away somewhere, merely referenced by the name message.

Access All Areas

"PAY ATTENTION", shouts the concierge again. "DON'T YOU SEE THAT SOMEONE IS HERE?"

"Oh, sorry", you reply.

"Yes, I'd like to access my messages"

"Access my messages", you think, "how strangely these people in silicon valley speak. Maybe they've spent too long near their computers". However, you reply "Of course sir, name?"

"Message", he replies

For a moment you pause, you were about to ask "yes, but I need your name". However you realise that this is actually Mr Message - you remember that he does actually have a message.

You glance at the register, looking for the name "message", finding again that he's in room 5. "How could I forget that? That was like just a moment ago?". Shrugging, you grab the slate from pigeon hole 5 - and find "message" has the message (hmm, that's a bad turn of phrase you think) - that "message" has the value "Hello, you are in a small dark room".

You declare to Mr Message, "Your message reads, 'Hello, you are in a small dark room'".

As you do so, again those firey, cold, and compelling letters come into the fore again, but this time it's different:

>>> message
'Hello, you are in a small dark room'

Mr Message seems happy with this news, and wanders off. Presumably he just wanted to hear what was left in his box, and didn't actually want to do anything with it.

At this point in your thoughts you see the old australian again look up at you, give you a piecing look, and a smile that suggests that there is something here again. However all he says is, "Look at you figuring it out! You snake!".

Realisation - Revelations in a Lobby

More puzzled than before you wonder, what can he mean? Snake? What can be the relationship between a man coming up to you, saying "message", and you replying " 'Hello, you are in a small dark room' ", and the interaction on the python interpreter of:

>>> message
'Hello, you are in a small dark room'

You pause.

You think.

Then you smile.

The old man is trying to draw your attention to the fact that your role in the hotel lobby has been akin to that of the python interpreter. You have been the python - you have been the snake. Once you have been the snake there is no going back. From now on when ever you see the following on the python interpreter

>>> message = "Hello, you are in a small dark room"

You will think of the lobby. You will think of the pigeon holes, each with a slate that can hold only one message - only one value. You will remember the register on the desk beside the pigeon holes, and remember that it allows you to look up a pigeon hole from the name you're given. You'll remember that when you see:

>>> message = "Hello, you are in a small dark room"

That you will look up the room "message" is staying, grab the slate from the pigeon hole for "message", write the value "Hello, you are in a small dark room" on the slate, and then put the slate back.

Furthermore, you'll also remember that if someone merely requests the value associated with message, that is if you see:

>>> message

That they're not necessarily interested in doing anything with the value, they're just after the value.

You'll remember it's like someone coming up to the counter and saying "message" (or rather messages for Mr Message, but you filter out the boring parts), and that when they do that you look up which pigeon hole contains what they're after. You'll remember that you simply reply with the value in their pigeon hole.

Indeed, so patronising do you find the whole idea, you realise that the person behind the counter could be replaced with a little robot instead who merely sits there storing values for names, and when asked for values by name it replies with those values.

As a result, by this stage you think that the following is now painfully obvious to you:

>>> message = "Hello, you are in a small dark room"
>>> message
'Hello, you are in a small dark room'

You realise that "=" has nothing to do with mathematical equality (mind you, neither does gender equality!) as you learnt in school, and whilst there is a link, the reality is that what this...

>>> something_memorable = "some thing"

... really means is take the value "some thing", and store it in a location for safe keeping that we can come back to later and label that place "something_memorable". When asked for the value "something_memorable", by simply mentioing it's name:

>>> something_memorable

... we'll look at the location assocaited with "something_memorable", find the value "some thing" and merely return the value.

Your First Adventure

Excited, you realise that this actually is enough for you to get started with your first adventure!

OK, maybe it'll be a bit manual right now, and lets face it this will be a bit un-exciting as a first version, but hey, we need to learn to crawl before we can run right? And heck, we'll be able to translate all those old choose your own adventure books at this stage (but not those more fun Fighting Fantasy ones perhaps ! ;-).

You figure that surely the later steps in the tutorial will be about making this less manual, so you give the person writing this tutorial a break - after all this is about getting started as quickly as possible.

You do cut them a break, don't you? ;-)

So without further ado, we revisit what a choose your own adventure is - it's a collection of sections - all numbered - much like the rooms. Each section is a passage of prose, finishing with a little statement of where to go next.

Get a room!

You then figure. "Hmm. I can do that already. What would the first room look like. You excitedly open up your python interpretor and bash out your first section excitedly:

>>> one = "You are in a small dark room. You can see a dim light coming from the north and south exits. Type two to go south, and three to go north"

You sit back and think "It can't be that simple can it? There's all that choice stuff in those books?! They seem so complex? So rich? It can't be as simple as this". However your next step is to try it. What does it look like, can it really be this easy?

>>> one
'You are in a small dark room. You can see a dim light coming from the north and south exits. Type two to go south, and three to go north'

You sit back, stunned.

This is exactly what you wanted! (or said you wanted :-) OK you think, let's go north, I wonder what is north. You see that the instructions are "to go north, type three". So you do just that.

>>> three
Traceback (most recent call last):
File "
" line 1, in ?
NameError: name 'three' is not defined

Oddly however, you notice that your computer is also shouting this at the top of it's lungs in a voice that sounds remarkably similar to that of the concierge. At this point, you remember the hotel lobby. What if someone had come up to the desk earlier today and asked for messages for "Mr Three". There were no messages for "Mr Three", and furthermore, no "Mr Three" had ever checked in.

You realise that you're being unfair - the computer is a poor little dumb beast - it can't take a single value and create a whole adventure, it's just not that good. You need to provide it the adventure yourself. You take a heavy sigh, computers are dumb. They're very good at remembering things if you tell them things and something to remember them by, but you have to remember what you called those things.

Write your own Adventure

Expectantly, you sit back for a moment wondering what the author of this tutorial is thinking. Are they really expecting you to fill in the rest of the adventure yourself?

Suddenly, as if by magic some hints fall from the sky in the form of more activity on the python prompt:

>>> two = "You have entered a clearing. It is a warm and sunny clearing, and you hear birds chirriping, and children playing in the south. You smell the strong familiar scent of coffee to the east. To go east, type four. To go south type five. To return north, type one"

>>> three = "You are in a maze of twisty passages all alike. You continue on for a while and the passageway branches to the right. To continue straight on type three. To turn right type six. To turn back, type one"

Now seeing what the idea is, you copy the text out, into a text editor, and format it over 3 lines to look like this:

one = "You are in a small dark room. You can see a dim light coming from the north and south exits. Type two to go south, and three to go north"

two = "You have entered a clearing. It is a warm and sunny clearing, and you hear birds chirriping, and children playing in the south. You smell the strong familiar scent of coffee to the east. To go east, type four. To go south type five. To return north, type one"

three = "You are in a maze of twisty passages all alike. You continue on for a while and the passageway branches to the right. To continue straight on type three. To turn right type six. To turn back, type one"

Excitedly you copy and paste these three lines into an open python terminal. You decide to start your adventure, head south, then north, enter the tunnels, and return back the way you came:

>>> one
'You are in a small dark room. You can see a dim light coming from the north and south exits. Type two to go south, and three to go north'
>>> two
'You have entered a clearing. It is a warm and sunny clearing, and you hear birds chirriping, and children playing in the south. You smell the strong familiar scent of coffee to the east. To go east, type four. To go south type five. To return north, type one'
>>> one
'You are in a small dark room. You can see a dim light coming from the north and south exits. Type two to go south, and three to go north'
>>> three
'You are in a maze of twisty passages all alike. You continue on for a while and the passageway branches to the right. To continue straight on type three. To turn right type six. To turn back, type one'
>>> three
'You are in a maze of twisty passages all alike. You continue on for a while and the passageway branches to the right. To continue straight on type three. To turn right type six. To turn back, type one'
>>> three
'You are in a maze of twisty passages all alike. You continue on for a while and the passageway branches to the right. To continue straight on type three. To turn right type six. To turn back, type one'
>>> one
'You are in a small dark room. You can see a dim light coming from the north and south exits. Type two to go south, and three to go north'

Happily you sit back, you realise that now it could be just a matter of translating a story into a number of assignment statements, entering those into the interpreter, sitting back and enjoying the results.

Get Some Exercise

Suddenly a storm cloud comes over the horizon, and you sit, worried. How can I avert this, and you realise there is only one way - you have to get some exercise - you have to write your first version of the adventure. Yes its trivial right now, and actually writing the adventure might actually be the harder part here, and you notice that your existing code is decaying and dying. The principles of that code remain in your mind - associate a section with a name starting with one. In the prose of the section associated with that name state "To do X type <sectionname>", and for all the section names include some text.

Some suggestions spring to the screen.

  • Imagine you are writing a choose your own adventure computer game set around discovering the body, entering at the mouth. Some example possible sections:
    • one - "You are in the mouth. Would you like to look around (type two), go down the throat (type three), or open a vein and dive in (type four) ?"
    • two - "You don't see anything particularly interesting and decide to: go down the throat (type three) or open a vein and dive in (type four)."
    • etc
  • Imagine you have a time machine that can materialise and dematerialise at any point (or points) in time and space. You start off in your local city and time (one), and from there on have the choice of traveling through time (two), space (three) or both (four).

This is clearly the first exercise, and is actually a fair amount of work, though largely creative. It's worth noting here that being silly is probably a good idea, since it'll a) be more fun b) probably create a larger volume of text and sections to be working with. Certainly this tutorial is longer than I anticipated due to the slightly whimsical tone :-) I'd suggest at least ten sections, but no more than 20. When you're done, it'd be really cool to see different answers posted as replies to this blog entry. I'll hold back moderating replies with answers as public for about a week, and then make them public.


In case no one actually posts any answers, I'll post a set of answers as well!
Read and Post Comments

Creative Coding

August 05, 2006 at 10:32 PM | categories: python, oldblog | View Comments

I've now got a focus for this blog - creative coding. This is a consequence of spending a week at OSCON, talking to lots of people, making a few commitments for a variety of people, and trip to a bookstore and deciding to buy The Complete Idiot's Guide to Creative Writing, and also Kathy Sierra's keynote talk, where she said "think of something you're passionate about that isn't code". Well, actually there is something I'm passionate about, that is creative, fun, and artistic, and I'm sorry, it's coding. For me coding is creative, and something to be passionate about. This viewpoint firmed itself up somewhere halfway back to the UK, and I decided that that is what this blog should be about.

Music is great, I love listening to it, but I have no flair there, no creativty. Poetry is intriguing, but it took me 32 years to understand what the point of poetry is. Ask a writer why he writes, and many will reply - because they have to. All are creative in their own ways. All entertain in their own ways. For me coding is just as exciting, creative and fun. It's why programmers argue about language - all major language (bar a few) are turing complete meaning they're all equivalent. Python is no more powerful than Perl. Perl is no more powerful than Ruby. Ruby is no more powerful than C and so on.

So how to they differ? The term we often use is expressiveness. But in reality, what we really mean is they are aesthetically different.

There being only one obvious way to do it means that when we meet new code, we can see the algorithm in use immediately, since all the common forms disappear from our view leaving the structure behind. This is valued implicitly when access to code is important, and an ability to understand quickly is important. It's one reason people create style guides and cookbooks and patterns where these things are valued. However in a language like this, the code poets still exist, they invent forms that make the language more powerful, so that more can be said in a perhaps familiar way, but with the least number of lines. In a way, python can be viewed as being the language of the Haiku - strict rules, powerful, and evocative.

There being many ways to do it is important where the need for personal expression, the need to do it my way is viewed as important. It's of little suprise then that this viewpoint, that a language that is inclusive of the need to express a personal coding style also furnishes some of the more intriquing concepts. How obfuscated can we make this code? How can we write poetry in this code (Two completely opposite goals in many respects). In this way, perl is spectacular - it allows the writer to mould the way something is said to match the needs of the conversation. If you need to say it in morse code, you can. If you want to say it in Buffy, you can. If haiku is your thing you can do that too, and if the computer equivalent of thrash music is your thing, you can do that too.

I'm going to refrain on making allegories on other languages, though I would find it fun to hear quite why so many people find the concept that Ruby is poignent compelling. To me Ruby is the friend I want to meet and get to know, but simply haven't has a chance to find something fun to do with in order to really understand.

However at the end of the day, the real differences here whilst we label them expressiveness are really aesthetic. I would also contend that anyone can learn to code. At present my favourite language is python for many reasons, and so the focus of this blog will be largely on creative coding in python. However, just as the Haiki, or Short Story or Novel, Novella, Limerick etc are all no better than each other, I feel the same about languages. They're all fun. (with the possible exception of COBOL - she needs to loosen up and go out and get a life :-)

So, why the blog, why this focus? After the Google summer of code BoF, I and a few others were kindly taken by Google to downtown Portland for a beer and some Pizza. The conversation strayed over to learning python, and in repy to a comment about "how long do you think it would take to learn python from scratch" (ie no coding experience), one of the summer of code students said "about 2-3 months". I replied "no, a week, maybe 2 at least". This took him aback, challenging me with "have you ever taught programming to complete novices", and ironically, I have. Whilst I was working for Manchester University many moons ago,  I gave an introductory programming course. So I mentioned that.

The conversation then drifted onto the idea of writing adventure games - the old "choose your own adventure game" style game in python as a learning example, and I offered to write a series of exercises which would teach someone python and programming from scratch. Why did I do this? Madness? Possibly. However, it's probably the same reason Laurie Rozakis wrote a book on how to write creatively - it's fun writing code.

So that's it in a nutshell really, someone challenging me to forget the thing I find fun and creative when thinking about what I find fun, finding a book about creative writing, and me realising that I've not actually seen a site dedicate to the fun of the act of creating code, and actually having a project I've promised to do. Hopefully the writing will be as much fun as writing code :-)

More to come soon :-)
Read and Post Comments

Changed over to using Dojo Toolkit for editting

August 05, 2006 at 09:29 PM | categories: python, oldblog | View Comments

Small changes can make a big difference. For editting of new posts, I'm changing over to using dojo toolkit. I'll see how this goes for a while before rolling out elsewhere on the site.

Hopefully it will make a big difference ! :-)

Read and Post Comments

OSCON 2006, Portland, Oregan

July 23, 2006 at 05:22 PM | categories: python, oldblog | View Comments

Well, here I am, in portland, after travelling for nearly 20 hours, I got here. On the clock I left home around 7am and arrived here around 7pm, but travelling over an 8 hours time difference means it was 20 hours. That led me to the rather random thought - sometimes employers bemoan the fact that there's only 24 hours in a day, wishing there were more - well yesterday I had a 32 hour day. If you simply want longer days, put everyone on a boat, and send them westwards. Can't wait until the working day is done? Go the other way round the world. :)

You can probably tell I'm feeling a little random can't you ;-)

Read and Post Comments

Cerenity - Wiki

July 04, 2006 at 02:18 AM | categories: python, oldblog | View Comments

Finally getting around to putting together a proper wiki engine out of the various pieces of code I have, now that the wysiwyg editor in a browser is becoming sufficiently capable. I'll deploy something soon, once I've integrated the capabilities model inside this blog engine with it, but for use behind a firewall, it's sufficient.

There's a couple of minor buggettes at the moment relating to the use a MIME store, and aspects not surviving in the way they might be expected to, both inside and outside the MIME code.

However it's really quite fun - it only has markup for doing interesting things. Less interesting stuff is handled using the dojo toolkit. This means that you can create taglinkclouds, whereby they're phrases that can be viewed as tags, and the font size of the link is relative to the size of the content. It's a rather different way from usual for dealing with existance/non-existance of wiki links.

More interestingly, in a way, is the fact that the fact that I also used the creation of the cerenity wiki as a test of some ideas I have regarding linear, rather than parallel components. (That is components designed to be run largely one after another rather than in parallel with each other. I find the result interesting - it was quick to write and should be quick to refactor. How much would be reusable however is another matter.

Read and Post Comments

Hard drive death

June 18, 2006 at 11:01 PM | categories: python, oldblog | View Comments

Hard drive death is a terrible, terrible thing.

My hard drive on my personal machine recently died. The problem with this is I've been using this machine as my main workhorse for the past 12 months, and despite good intentions to back up, good intentions have repeatedly failed to materialise. This means, realistically speaking, if I do nothing, I've lost 12 months of my electronic life....

That's photographs, that's reasoned discussions, that's hope and joy, and sadness & regret. That's useful things, fun things, pure imagination gone wild and serious, important things. All, quite possibly, gone forever. I'm currently looking at data recovery firms, but they don't look cheap. Quite frankly I think it's looking like it would have been cheaper to buy a few drives, and regularly back up on a rotating basis.

But as I say - would've, could've, should've - didn't. So now my hopes are with data recovery firms. How much hope I have, I don't know. However, given the drive goes "click-click-click-click pause" 6-8 times, then goes "click", and is then silent, I suspect the drive is trying to start up and can't for some reason. I'm hoping this is recoverable.

Wish me luck... :-/

And yes, I am now backing up things...(!)

Read and Post Comments

« Previous Page -- Next Page »