Creative Coding
August 05, 2006 at 10:32 PM | categories: python, oldblog | View CommentsMusic 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 :-)
Changed over to using Dojo Toolkit for editting
August 05, 2006 at 09:29 PM | categories: python, oldblog | View CommentsHopefully it will make a big difference ! :-)
OSCON 2006, Portland, Oregan
July 23, 2006 at 05:22 PM | categories: python, oldblog | View CommentsYou can probably tell I'm feeling a little random can't you ;-)
Cerenity - Wiki
July 04, 2006 at 02:18 AM | categories: python, oldblog | View CommentsThere'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.
Hard drive death
June 18, 2006 at 11:01 PM | categories: python, oldblog | View CommentsHard 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...(!)
Create Cool Code
June 11, 2006 at 02:10 PM | categories: python, oldblog | View CommentsThe conversation often goes like this.
-
Questioner: "What do you do for a living?"
Me: "I write code".
Questioner: "Ah, right", questioner looks saddened, "And what do you do for fun?"
Me: "I write code".
At which point they get puzzled, saddened and often walk away.
This frustrates me because you wouldn't get the following conversation:
-
Questioner: "What do you do for a living?"
Artist: "I'm a painter"
Questioner: "Ah, right", questioner looks saddened, "And what do you do for fun?"
Artist: "I'm a painter"
At which point questioner gets puzzled, saddened and often walk away.
This irritates the life out of me because a painter (assuming they're not a painter & decorator - which might be a misconception for an artist) simply wouldn't get the second half of the converation. To me, writing code is as much an act of creation as the artists work.
By answering literally though, I miss conveying the buzz, sheer fun and delight in the work I do. I fail to convey the creative aspect of my work, and the pride which I like to take in it. How do I answer? I say I write code. What should I say? After chatting about this recently, I realised I should be saying this: I create cool code. This is as much a choice as it is anything else. It makes it clear it's creative, it's fun, along with the delight and care.
I've often sidestepped this in the past, by listening to the specific question. "Where do you work, what's your role, what does that entail". Answers to these generally revolves around replying about my employer, the fact I'm employed as a research engineer, and it involves looking how we put the archive online for all the UK, with limited resources.
These are all fine answers leading to interesting areas, and the specific project we're working towards does fascinate people. However these answers also sadden me, since they doesn't state what I do. Based on paraphrasing my new boss (great twist on what I was saying :) - I added one word :) - I've came up the better answer: I create cool code.
After thought: Ironically, this is more about answer the question they were asking, rather than being quite so precise in my answer! Every time I answered "I write code", I wasn't actually telling them anything, after all people generally don't understand what that means in practice!
Oh, and a little sideline I've got going is encouraging others who work with me to do the same. Some of the summer of code work I'm mentoring is really cool code :-)
Foo Camp!
June 09, 2006 at 02:48 AM | categories: python, oldblog | View CommentsIn recent years people some people who have been invited one year and not the next have gotten in a huff, for no apparent reason, so I'm going to assume this is the one time I'll be asked, try to participate to the limits of my abilities and if I'm not asked back again, so be it :) If I am, it'll be a nice surprise.
Kamaelia itself is obviously coming on leaps and bounds these days, and it's nice to be able to simply knock together systems now, with a clear expectation that they can and will scale. I don't know if the latest system I've knocked together using it will be used by the person in the BBC its been created for, but it does give them some extra options, and the time spent writing it was minimal :-)
Hopefully by the time Foo Camp comes around, we'll have more fun stuff to talk about - the SoC work where people are now churning out code & systems using Kamaelia is great fun to see - things are really coming together !
Summer of code
May 02, 2006 at 01:15 AM | categories: python, oldblog | View CommentsIt'll be interesting to see what happens over the next few days - if interested grows. Now if we can just find someone willing to work on the pygame/CSS styled surface manager, that'd be great.
Some links I need to follow up on.
April 24, 2006 at 12:22 AM | categories: python, oldblog | View CommentsBeen a very interesting evening in many respects. Some links I need to follow up on as a result follow:
Some summer of code project lists that we can work forward from:
- PSF SoC list
- Specifically some of the this list appear important. for example this.
- XWiki's project list
Shuttleworth foundation had a meeting which amongst other places had a thread of discussion resulting on edu-sig. The whole discussion there has a number of interesting implications, especially when you consider Kamaelia is a number of steps already along that path.
Beyond that though there are a number of topics being discussed on edu-sig which imply I should really subscribe, esp given that Kamaelia could align with them very well (ie be useful for those things), and I know of at least one person inside the beeb who might support it. (maybe :-)
Summer of code deadline is 1 week earlier than anticipated (lack of line break in a specific place caught me out).
lac noted on #pypy that Strakt would find Matt's whiteboard sketcher useful, and asked why we weren't making announcements on c.l.p.a. My excuse of "too busy" seems a bit lame in retrospect. The level of "wow, that'd be useful", really implies that we really should push that up the "let's release that as a standalone" bundle. It's also likely to be hit by a similar reaction by people at work, meaning it should really happen.
I mentioned that we'd really like to see rpython extended to handle generators, lac mentioned this is something that can happen at the sprint in Iceland which is May 21-28th, so I probably won't be able to go, but Matt could potentially. lac also suggested speaking to Steve Holden about it to help set the focus for the sprint - which has been described so far thus .
Blog Spammers
April 15, 2006 at 11:43 AM | categories: python, oldblog | View CommentsIf you're the spammer spamming and read this: GIVE UP, FIND SOMEWHERE ELSE.
« Previous Page -- Next Page »