Python Programming, news on the Voidspace Python Projects and all things techie.

Stuff I Agree With: Debuggers and Testing

emoticon:test_tubes An interesting post on debuggers and testing: Debugger Support Considered Harmful. It says exactly what I mean about testing:

One deleted comment stated that tests were for finding out when things went wrong, and debuggers were for fixing them...

Tests are absolutely not for checking to see if things went wrong. They are for articulating what code should do, and proving that code does it.

This is why test first is so radically different from test afterwards (unless you usually write your specification after the code...).

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2007-11-29 21:03:53 | |

Categories:


Consolidating Digital Identity, Web apps & onaswarm

emoticon:file1 Jon Udell has written a blog entry on digital identity: Your Winnings Sir.

The basic problem is that 'content we create' (our identity online) is distributed all across the internet, on various sites and possibly multiple blogs, with no way of connecting them all together. One solution of course is to give all your data to one company, google aren't doing badly on this score. Smile

More broadly, this isn't just about the reputation that accrues to your online persona, but also the reputation that it confers on others. Page ranking algorithms are numeric, not social. People who know me, and my work, value resources I cite because it's me citing them. So they assign equal value to citations that emanate from weblog.infoworld.com/udell or from jonudell.net. But ranking engines have no idea that those two sources represent a common identity, and no idea of how other identities relate to that one.

This is one of the reasons I like OpenID. I try to keep most of my content on Voidspace. OpenID allows me to use this domain as my identity. It isn't the whole answer though, I also use services like del.icio.us and facebook.

Of course it is perfectly possible to mash all these together - but thankfully someone has done it so that I don't have to. Smile

Onaswarm is a new (beta of course - and built with Python which is even better) service that mashes up blogs (or anything with RSS), del.icio.us, facebook, Pownce (or twitter if you prefer) plus lots more. It's given me a renewed enthusiasm for Pownce as well:

Onaswarm has an RPC API, so it should be possible to build some nice things on top of it. I have a couple of invites for it, plus stacks of invites for Pownce.

The desktop client for Pownce is really nice. It has got some flack but I really like it. It is written with Adobe AIR. I've long said that the line between desktop and web apps needs to be blurred, and Pownce does it very well. Another web/desktop app is the one used by Emusic: EMusic Remote. It is a wrapper around Firefox with a custom sidebar. You login to your account through the 'website' and the app is integrated with the download manager from which you can launch songs, create playlists and configure your media library sync settings. It's very well done, is created with Mozilla's XULRunner and has Mac, Windows and Linux versions.

Other random guff:

  • Just added another gig of memory to my Macbook Pro (up to the max of 3gig now) - the upgrade was monumentally easy
  • The delivery date for my eeePC got pushed back so I cancelled. They are available on ebay but I don't think I really need it.
  • Just watched the new futurama movie - it was ok. Nice cheesy ending.
  • The Resolver public beta will be coming out really soon now. We've done a lot of work since I last updated you on it, expect more details when it finally happens. Robert Scoble is coming to London next weekend. I've arranged to meetup and it looks like we might be doing a ScobleShow on Resolver which will coincide nicely with the beta.

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2007-11-28 23:38:32 | |

Categories: , ,


Functional Programming on .NET

emoticon:mobile The part of my presentation at DDD that I enjoyed the most, was talking briefly about functional programming (demonstrating multiple programming paradigms with IronPython).

First class functions and closures:

def makeAdder(x):
    def adder(y):
        return x + y
    return adder

>>> addThree = makeAdder(3)
>>> addTwo = makeAdder(2)
>>> addThree(2)
5
>>> addTwo(2)
4

A similar example but generalising for partial functional application:

def add(x, y):
    return x + y

def partial(func, x):
    def inner(y):
        return func(x, y)
    return inner

>>> addThree = partial(add, 3)
>>> addThree(2)
5

partial binds a function that takes two arguments to the first argument that you pass. The function returned only takes one argument. This is basically the mechanism by which methods fetched from an instance have self bound as the first argument.

This reminds me of one of the things that happened at TechEd that I haven't blogged about yet. I met Robert Pickering (who is a really nice guy - I doubt I can persuade him to work at Resolver though!). He works for Lexifi, who are a French company doing commercial development with OCaml (and their program - although very different - is working in the same problem domain as Resolver).

He is also the author of a book on F#. F# is a functional programming language for .NET (heavily influenced by OCaml) that started as a research project, but was recently promoted to 'supported product':

Robert gave me a copy of the book. I'd love to learn a functional programming language and F# looks like a good choice, unfortunately I won't have time until I finish the book.

There is a nice summary of some of the features in F# on Frank Sommers' Blog. It includes (which I didn't know):

#light: The #light directive in F# allows code to omit begin...end keywords and some other tokens, and instead relies on indentation to indicate nesting. This is similar to languages like Python, and enables the same kind of syntactic lightness that programs in these languages enjoy.

Cool. Smile

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2007-11-28 23:03:58 | |

Categories: , ,


Developer Day 6

emoticon:new_document On Saturday I was at Developer Day 6, a .NET community event in Reading (the Microsoft corporate bunkers in the UK).

I'm now starting to get to know some of the folk who come to these events (the 450 places at DDD were all filled with 24hours of registration opening!). Coming from the free-love hippy environs of the open source community, it is nice to find that there are some good people even amongst the ravening capitalist confines of Microsoft land. Wink

I did a presentation on 'Dynamic Languages on .NET', unsurprisingly with a focus on IronPython:

You can find most of the resources mentioned in the talk from the IronPython section of my website: IronPython Stuff.

At Mix I was asked to talk on IronPython and Silverlight, and the (personal) feedback from there was that people wanted to know more about IronPython itself and why they should even care about dynamic languages. An hour is a useful amount of time to be able to deliver a real message [1], and although some parts of the talk could have been better I think it went well.

As well as talking about dynamic languages I demoed Resolver, which seemed to go down pretty well. I certainly made some useful contacts through the talk. I'll be interested to see if any 'feedback' makes it way back to me (which it didn't directly from Mix).

By the way, a special thanks to Zi Makki for all his efforts, not just for his part in organising the event - but particularly for the geek dinner he arranged afterwards.

I particularly enjoyed the talk by Dave Verwer on IronRuby. He basically uses these talks as a propaganda opportunity for Ruby, and everytime I go to one (this was my second) I learn a bit more about Ruby. He copes very well with my interruptions and questions. Smile

There are some photos from the day and more blog entries: Mike Hadlow, Paul Lockwood, Ben Hall and Richard Fennell.

I have no more talks planned for this year (well - except possibly a lightning talk on rest2web at the next Python London meetup), which is a great relief and means I can finally concentrate on the book (Manning will be very pleased!).

Coming up next year are PyCon and RuPy. If you have a login for the PyCon site you can see the summary of all 140 (-ish) talk proposals. As usual there are some very interesting ones. There is one that looks like it has been submitted by Jim Hugunin and it even mentions Resolver's C-Extensions for IronPython project. Smile

There is also a talk proposed on Python.NET. I hope this talk gets accepted as it is a project that deserves to be more widely known than it is.

[1]Anything more than an overview in the half an hour allotted for PyCon talks is very difficult.

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2007-11-26 14:11:35 | |

Categories: , ,


We're Going to Try Agile Programming

emoticon:avocado snigger Smile

Agile development at its best...

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2007-11-26 14:08:51 | |

Categories: ,


Ebay Geek Clearout

emoticon:envelope I've had a clearout of some of my unneeded geek toys. Smile

Putting those online wasn't the most fun way to spend Sunday evening, but I've been putting it off for a while. Ho hum.

I'm selling my books via Amazon Marketplace as an experiment

It's not all good news on the gadget clearing front though. I couldn't resist the Asus eeePC [1]. For some pictures and a review, Smurf on Spreadsheets convinced me. The best is the picture of the eee on top of a Sony Vaio. Razz

And yes, I know that someone installed Mac OS on one, and about the GPL Violation scandal [2]. I don't know when mine will arrive, but it will be nice to finally have a Linux box.

[1]Especially as the OLPC Give One Get One program won't ship to the UK and I didn't want to feel left out at PyCon.
[2]Which sounds more like incompetence than malevolence to me, but we will see.

Like this post? Digg it or Del.icio.us it.

Posted by Fuzzyman on 2007-11-26 00:34:03 | |

Categories: ,


Hosted by Webfaction

Counter...