Archive for the ‘Developer’ Category

My Google AI Tron Bot

Tim Wintle - March 4th, 2010

Over the past few weeks I’ve been spending my free time taking part in the Google AI competition (organised by the university of waterloo).

While I didn’t end up doing so well (I was disqualified for taking just over the 1 second per move permitted in one of my games), I thought I’d post how I went about the problem. Many of the other contestants used similar algorithms, but for those who haven’t been following here’s the full thinking behind it:

(more…)

Delib’s Dialogue App makes debut at GSA webinar

Ben Witnall - February 26th, 2010

We were excited this week to have the opportunity to introduce Delib’s Dialogue App to a whole bunch of US government staff at a GSA webinar. It was slightly strange talking to an audience that you can’t see or hear but I think it went well. We set up a demo especially for the occasion – check it out at http://www.dialogue-app.com/gsa-demo

You can also take a look through our slideshow if you want:

Hopefully, it got people thinking about how they can use the internet to improve their decision-making/policy processes anyway :)

The Dialogue App is another cool thing built in the open source web framework Plone.

Prefer to spell it Dialog App? We’ve got you covered :)

Bath openMIC #4 – Mobile Web, HTML5 and CSS3

Robin Greene - February 12th, 2010

openMIC

Yesterday, I attended the Open Mobile Innovation Camp at the innovation centre in Bath. The event was hosted by Chris Book and had talks from Giles Turnball (Freelance Journalist), Bruce Lawson and Patrick Lauke (both from Opera). The focus of the day revolved around the current trends in mobile app development and the tensions between Native, Web and Widget apps.

The day kicked off with tech writer Giles Turnball talking about how technology has turned the press industry upside down. He recounted tales from the 90s of infra-red modems, Palm Pilots and GoType keyboards, and being one of the first journalists to actively embrace remote reporting and email. Although initially laughed at, remote journalism is now standard and Giles encouraged us not to neglect advancing technologies, but to learn about them and look to integrate them into our businesses and working lives.

Next up was Richard Spence who ‘controversially’ spoke about non-iPhone development. He reminded us that only 8% of the mobile market is iPhone whereas 71% is browser based. Richard didn’t slag of the iPhone, on the contrary, he “thanked Apple from the bottom of his heart” and agreed with Stephen Fry’s eloquent observation:

Does anybody seriously believe that Android, Nokia, Samsung, Palm, BlackBerry and a dozen others would since have produced the product line they have without the 100,000 volt taser shot up the jacksie that the iPhone delivered to the entire market?

Richard went on to give a brief history of mobile development platforms and where they are at now. J2ME, Blackberry and Symbian were all covered and commended for their recent improvements in the light of the ‘iPhone effect‘.

The final talk of the morning was from Bruce Lawson from Opera. Bruce was in jovial mood and was quick to evangelise the latest Opera Beta which claims to be the current fastest Javascript engine. Bruce championed the W3C Mobile Web Best Practices and also highlighted some of the UX and accessibility challenges that await. Bruce emphasized the importance of optimization and minimising HTTP requests. He went on to talk about future advancements in HTML5 and CSS3 and the features that the latest Opera already supports. One particular point of interest for me was the use of Media Queries to change CSS layouts dependent on screen size, without JS sniffing. Bruce finally talked about the potential of Widgets, that Opera are involved with in editing the W3C standard.

After a lunch at the local chinese and heated debate on technology, we broke into smaller groups for our barCamp sessions. The philosophy of barCamp is to create open group dialogues about an agreed topic and to work / explore collaboratively. I attended a discussion on HTML / CSS3 with the guys from Opera, and for my second session W3C Standards for Mobile Web. Both sessions were really insightful and was particularly interesting to hear peoples’ comments from the mobile industry on mobile web.

I also picked up a couple of useful tools:

Native Mobile Development Platforms for Web Developers

Appcelerator Titanium

PhoneGap

W3C Mobile Validator

http://validator.w3.org/mobile/

Perhaps most surprising, coming to the event as a pure Web Developer (with past dabblings in mobile), I certainly didn’t feel like an outsider or feel like the technology was flying over my head. In fact, I came away with an increasing awareness that, whether I like it or not, Web Development is not simply going to be solely about the Desktop. As hopes of an archaic browser death is on the horizon, another friend is also lurking. In our discussions on Mobile Web Standards, we were reminded that the largest mobile usage is not in China, the US, or Europe, but in developing countries. If the days of IE6 support is numbered, then the days of mobile WAP support may be coming back from the dead!

We’re making Opinion Suite join up with Linked Data (through RDFa)

Andy Parkhouse - January 29th, 2010

With so much chat and buzz at the moment (and rightly so) about Tim Berners-Lee et al’s data.gov.uk, I thought it’d be timely to say a bit about how we’ll be doing our bit towards publishing online consultation information as Linked Data (Steph Gray has recently blogged on a similar subject).

We’ve built (and are continuing to iteratively improve) Opinion Suite, an open-source online consultation management and creation system designed primarily for local authorities and other governing bodies.  It’s currently being used by Bristol City Council, Sutton Borough Council and a large partnership led by Cumbria County Council, with more rollouts hopefully coming soon.

Through Opinion Suite, organisations can store, organise and publish details of all their consultations – hopefully, exactly the kind of information that it’d be really useful to be able to access from a variety of sources, to include in apps and to run analyses/queries on.

As you probably know, that’s what Linked Data is designed to facilitate; it’s a way of marking up web pages semantically so that software (like browsers, search spiders etc) can understand more about the content and so that it’s easier for citizens to ‘cut and combine’ the information in ways that are relevant to them.  The Government’s into it in a big way: all central government consultations need to include this markup as of the start of 2010 and DirectGov already uses it to pull consultation details into its listings.

We’re currently making a few changes to the code of Opinion Suite so that all consultation details entered using the system are marked up as Linked Data – using RDFa, to be precise.  This means that all consultations inputted into Opinion Suite will include this additional metadata, making the information therein more readily and widely available.  So, for example, DirectGov could pick up all of a local authority’s consultation details and pull them directly into the ‘local consultations’ part of their site, or someone could make an app to compare consultation activity with other data, such as population or earnings surveys.  That’s a lot of potential added value for something that’s really not that hard to do – and it won’t affect the appearance or user experience of Opinion Suite for end users or administrators as the data will be taken from existing fields.

It might also be worth mentioning that this is in addition to the existing RSS functionality built into Opinion Suite – for example, you can create an RSS feed from any search query in Consultation Finder, meaning you can take the content and embed it into a blog or community website.

Basically, we like sharing and we like making the most of data – so we reckon RDFa’s a good thing all round and an easy win in many ways.

Thought Den’s art of Flash game production

Alex Pitkin - January 15th, 2010

Some really good ‘Rules of Production’ from our compatriots at Thought Den in their The art of flash game production (with some baggage bowling fun thrown in) post.

It was written after the Suitcase Skittles development that we did with them last year for IHG in which we all learnt a lot. But that seems to be the case with most Flash game developments…

Team Rubber Devs Twittering

Anthony George - January 11th, 2010

The Team Rubber developers spend a lot of time, love and craft doing what we do. If you want to know more about what we’re doing and how, follow us on twitter.
http://twitter.com/TeamRubberDevs

Linux as an alarm clock

Richard Barrell - January 8th, 2010

I’ve yet to find a cheap and reliable alarm clock loud enough to rouse me from bed in the morning. Fortunately, I already have a laptop with workable (if small and tinny) speakers. All that’s needed to turn it into a loud alarm clock is a little software. Here’s an easy way to do it in Linux:

(more…)

Python tip: zcd

Tim Wintle - December 16th, 2009

Another developer here suggested this to me (Thanks Rich!) – but every time I use it I think it’s really useful, so I thought I’d share it.

When you’re working with a python package like “product.section.part”, you end up with a directory tree like so:

product.section.part
    + product
        + section
            + part
               - module.py

Now, navigating through these directories is a pain – each time you want to edit module.py, you find yourself typing something like:

cd p[tab]p[tab]/s[tab]p[tab]
[editor] m[tab]
# (the "/" is required to get past the .egg-info file)
# i.e. this expands to
$ cd product.section.part/section/part/
$ [editor] module.py

Rich simply added a simple function to my .bashrc to do this automatically – so I now type

zcd p[tab]
editor m[tab]

#i.e. this expands to
$ zcd product.section.part/
$ [editor] module.py

- It’s much simpler, and makes moving between packages that little bit nicer !
Here’s the script to add to your ~/.bashrc:

function zcd() {
     X=`echo $1 | sed -e "s/\\./\\//g"`
     cd $1/$X
 }

The Greatest Web Framework ever!

Tim Wintle - December 10th, 2009

Here’s a question for the non-developers among our readers:

What web framework is this a screen-shot of?

mce1 The Greatest Web Framework ever!

Answer:

(If you answered “Wordpress” you’re wrong)

- it’s actually from something called TinyMCE – which happens to be used for editing blog posts as part of wordpress – but it’s certainly not “wordpress” – it’s commonly used when building all kinds of sites – using all kinds of frameworks.

What wordpress actually looks like (for the people who build wordpress sites):

Wordpress:

wp The Greatest Web Framework ever!

You may not have got much from looking at that screen-shot – so, for comparison, here are what two other common web frameworks look like to the people that use them to build websites:

Turbogears:

turbogears The Greatest Web Framework ever!

Drupal:

drupal1 The Greatest Web Framework ever!

The chances are that you probably wouldn’t have been able to guess which one of those was which [unless you are a developer who has worked on one or more of them for an extended period of time].

Which brings me back to the post title – What is the greatest web framework ever?

Well that depends on what you’ve got experience with, and what site you want to build.

So What’s the best?

For some reason, people often seem to thing there’s a golden bullet to solve all their problems – both developers and clients. During a discussion the other day I likened this argument to saying

“Excel is great – it’s the best Application ever”

- and from that point forward only using Excel – for anything.

You want to play some music while you work, so you fire up Excel, and start rocking out – Sure, some might say that Excel just isn’t as good at playing music as iTunes – but you carry on because “It’s the best Application ever”

Then you want to check your emails – so you fire up Excel again (Your colleagues are sniggering behind you as you ask the jumping paperclip how many new emails you’ve had today – but you use it all the same…)

Oh hang on – you don’t!

Yet as developers we often find that we’re required to build a site using a specific technology – because “It’s the best application ever”

Some examples:

If you’re creating a blog then wordpress is really great – if you’re editing a blog post then there’s a TinyMCE already built-in, along with blog comments, and the ability to list blog posts in reverse-chronological order on the frontpage. If you don’t want those features – or you want other features, then you’re going to have to start building those things from scratch – that means no easy-editing form, no automatic page generation etc (unless you code it yourself).

Google Wave is written using GWT – which is a great tool for their specific requirements as it lets you design web applications that look like desktop applications in a very nice manner (if you’re a pythonista then you’d probably try something like pyjamas for that).

One of the web apps I spend a lot of time in is written in a mixture of Python and ANSI C (no web framework at all) – and that’s the best decision for that application and it’s requirements.

Another project I work on is in Zope – and another one is based around the Shindig OpenSocial framework – again, they’re the right frameworks for the tasks at hand

- and they’re all different because the tasks are all different.

Multiple python versions – collective.buildbot

Tim Wintle - December 7th, 2009

One of the applications I work on recently dropped support for python 2.4 – and much to my surprise I found out buildbot was failing – despite the instructions to use the 2.5 interpreter.

We had the following code as part of the a collective.buildout:project configuration:


build-sequence =
          python2.5 bootstrap.py
          ./bin/buildout -t 50
test-sequence =
          python2.5 bin/tests -v --v

But looking at the logs, this was being re-written to use “python” (i.e. the version the buildslave was running on) during the buildout.

I guess I could have created separate buildouts for 2.5 /2.6 buildslaves for these projects – but having one buildbot buildout is just simpler.

I found that calling python by it’s full path in the configuration has avoided this issue – although it does mean maintaining different project sections for different python versions.

i.e.


build-sequence =
          /usr/local/bin/python2.5 bootstrap.py
          ./bin/buildout -t 50
test-sequence =
          /usr/local/bin/python2.5 bin/tests -v --v