What next for Carbon Co-op?

A few people have asked me about what is happening next with Carbon Co-op. The short answer is that I have no idea. I had never heard of it before Saturday and I am not very personally invested in it. Probably the best thing to do if you are interested in the future of the business idea is follow the founder on Twitter and ask him.

Now as far as the code that is posted on Launchpad is concerned. I’m going to leave the Sicamp branch exactly as it was when I pushed at 2pm on Sunday. That’s where we go to.

I don’t really like the thought of it but I am tempted to do a screencast to explain the design of the app and show the site and basically all the stuff that wasn’t included in the actually SiCamp presentation. We did a lot of work! We should have shown it!

In terms of the trunk branch I have a few technical questions left of Django that I might use the project to experiment on. These are:

  • Markdown support in descriptions
  • AJAX support
  • Using MySql in the deployed mod_python version (with that done I could open up the app with the understanding it doesn’t do anything).
  • Introducing mocked testing as you would do for a Rails app and off the back of this some refactoring of the views section
  • Replace the Django Template Loader with the Jinja2 equivalent

In terms of the domain problems we set out to solve on the weekend itself, there are two that didn’t get resolved. Firstly there is the Locality issue: who is near who. For the weekend I was going to simply hack it that if the first segment of the post code was the same then those people counted as being in the same area. I’d like to do something more elegant and in depth but that’s another post.

Secondly there is the “ratcheting” idea that was kind of fundamental but I’m not sure really got highlighted in the pitch. The idea is that the app should always be exhorting you to get more people to join and giving you milestones to go for. This means once you have identified all the people in a Locality you need to figure what Actions they are taking and how many people in each Locality are Devoted to the Action.

You then need to see if the Action has Tiers with higher Thresholds and tell the user to try and get their friends and neighbours to commit to the next Tier.

Once you have all the numbers of Ongoing Actions, Devotees and people in the Locality you can then start doing some awesome stuff like altering the postion of the Actions to promote Actions that are close to crossing the next Threshold and so on.

If all that doesn’t make sense then don’t worry because I probably need to explain the design somewhere.

Python, Web Applications

Django in 24 hours

Last Saturday afternoon I decided to learn Django. It was 2pm on the first day of SiCamp 2008 in London and being the only developer in the room at that point I decided that I should do whatever I felt would be the best option to get an application running by 2pm the next day.

Previously I have done some Google App Engine and the experience convinced me to give Django a go after I found myself, by intuition, creating a GAE project structure of (views), and a directory called templates that contained templates. I was then disappointed to find the whole world had got there before me.

So, Django in 24 hours, baptism of fire. What do I think now looking back on the experience?

Everyone has told me that the Django documentation is good and I think I have to concur. Not everything is so clear that when you’re speed reading in one window and typing in another it works first time but importantly nothing in the documentation is actually wrong. When stuff is not working a second, careful look at the documentation got me back on track.

Importantly Django’s core model of web development is sound and intuitive. My editor had around ten files open for the project and the flow of adding something to the application did naturally flow from url to handler to view to model. Maybe the only quibble I have is that the file is deceptively named in MVC terms.

The core of the framework is amazingly concise, I spent the majority of my time thinking about the problem not about the framework API. Binding a URL to function made sense, having to specify a template instead of having one inferred from the method name was maybe my one criticism in the method handler but on the plus side it does allow for flexibility in handling requests. Handing off from one request handler to another was very easy.

Django templates are both amazing and annoying. The syntax and principles are amazing, it was easy to play around with the pages and the template inheritance was really powerful for avoiding duplication. However when I transferred the application from self-serving to mod_python the template generation was very wobbly when compiling changes from the file system. Of course this could also have been mod_python but it was the latest 3 series stable source compiled for the machine. I’ve used Jinja2 previously when generating HTML in Python and might be tempted to stick with it in future.

Django models are great, I hate ORM but I really liked syntax for defining persistence properties and I liked the way that you don’t have the fact that you are really dealing with SQL hidden away from you. It genuinely seemed a more convenient way of expressing the data model rather than an OO wallpaper over relational data storage. I didn’t feel the need to add domain logic to the models but I felt like it wasn’t really polluting the model to do that either.

One thing that didn’t work at all was changing the relations between models; it took me two or three attempts to finally model the relationships between the data concepts. Each time I changed a Foreign Key or Many to Many relationship I ended up deleting the database (SQLite3) as I couldn’t figure how to migrate from the old schema to the new.

One reason for choosing Django was the idea that I wouldn’t have to write the backend code as the admin stuff would be right there for me. It took me a while to get the 1.0 admin to fire up but once it was running it did perform as advertised. One of the attractive things about the application was that the data model followed the conceptual language of the solution in a really powerful way. You could use the admin interface to have a Devotee perform Devotion to an Action. My geek excitement peaked anyway, YMMV.

So them’s the highlights of the experience. Overall Django delivered me a rapid web development process in an intuitive, powerful way and lived up to nearly all of the claims made on the tin. Deploying to Apache/mod_python was painful but most of the pain surrounded the infrastructure of my box (multiple versions of Python, Apache config files) and my lack of mad Apache admin skillz.

I would happily tackle another project in it again.

Perhaps of interest is how the Django development experience matches up against Rails or GAE  which would have been the other obvious choices. GAE would have been very similar but the deployment would have been better and I wouldn’t have had any automatic admin. In retrospect it may have been a better choice for a hack party type event. It certainly would have been my choice for personal projects for easy of deployment but now I have one Django app running perhaps that isn’t as relevant any more. Certainly the thing that has kept me from GAE before, the pain of data migration, doesn’t seem that better in Django (except that you control the datastore and its contents).

Compared to Rails?

  • Admin is much more awesome than scaffolding.
  • Django ORM is much less complex than Active Record, all the data required to create, deploy and use the object is in one place. Django doesn’t have Migrations but has its own brand of database versioning pain.
  • RSpec is awesome (despite its monkey patching of Object) so you aren’t going to beat Rails for easy testing.
  • Django templates are more powerful and easier to use than Erb but you have a lot of Ruby templating options so it’s hard to make a complete comparision. They probably both similar in the sense that you can find a template library that suits your preferences. Django is the purely solution out of the box.
  • Routing and Controllers are much less involved in Django than Rails.
  • Django is less opinionated about how you structure your application directories, which I like.
  • Django doesn’t bake-in AJAX components but is “batteries included”, Rails probably generates better Web2.0 style apps for less effort.
  • Finally Django uses only a few code generators because its basic structure is far less involved. It also generates far less “stuff” for each MVC element which I quite like as I don’t tend to use everything Rails generates.

Okay detailed analysis over, what’s the high-level view? Django and Rails are similar experiences but I think the major differences between them are almost what you could say about Python and Ruby. In Django you are going to get simplicity, clarity and a real choice of how you plug your infrastructure components together. In Rails you are going to get magic up front which is cool but also magic at the back end, which is not cool. Ultimately I think the answer is how opinionated you like your software. Well punk? How opinionated do you like it?


SiCamp 2008: Working with the Carbon Co-op

Okay so it’s Monday morning, I’m tired as hell and I’m kind of wondering what the point of spending my whole weekend at SiCamp was.

The weekend was really a game of two halves: Saturday was generally pretty good. I got there, learnt about the idea, pushed back on it, the group kicks around an idea that we thought we could get done in a weekend and then we set about making it. The team I was in was Carbon Co-op which is about using collective buying power to reduce the initial cost of buying and installing energy saving or renewable energy products.

Sunday though was a general fail fest for the team. On Sunday morning the team consisted of just four members, we had to beg for some help to get the webpages for the site done. Then during the pitch we had a complete fail, the AV system was screwed, the project sponsor seemed nervous about his pitch and there wasn’t enough time to switch laptops and show the site, which meant that all the time we had spent on it was completely wasted. About the only thing wasn’t a fail was the lunch, which was excellent and far beyond what I was expecting for this kind of thing.

The idea for the project is good and actually unlike a lot of the ideas at the event it had a genuine business model. However the team failed to communicate that or show any of the potential behind the concept. It failed to distil simple messages that could be quickly absorbed, in short: it failed to impress.

Part of the failure was not having gone to one of these events before and not knowing the format, what was expected and what you should be doing. So lets try and rectify that for the future.

Firstly, the event is advertised as an X-Camp, fully buzzword compliant. However for the talk of “self-organising”, it is actually a competition. Everything will boil down to 10 minutes in front of a panel of judges. For me an X-Camp should be able to decide the criteria for success, not the organisers; Camp Fail.

As you are in a competition: find out who the judges are. I did speak to the judges and what struck me was that they were for the most part concerned about business model and development. Innovation for them meant responding to changing circumstances in the economy. None of them seemed to care about the tech side of things except as an illustration of what the final product might look. It would have been more cost-effective for me to have hammered out some HTML and Javascript mocks of the site that could have been zipped up and put on the pitcher’s machine. All the working code I had was kind of a vanity project in the end (it is out there as open source though if you are interested). Misguided Effort Fail.

Another important aspect of the judge’s background is that every “mentor” and “adviser” that came through the project door gave really bad advice in the context of winning the competition. This year is you wanted to win SiCamp your project should have found something in the existing economy and done it better. Every team seemed to want to “disrupt” things and that message won no friends. If the advisers do not have the same background as the judges: don’t listen to them. If you think they will be helpful to the business: schedule a post-Camp meeting. Focus Fail.

Get a big team and assign roles quickly. I had assumed that everyone was in a similar boat in struggling to get enough people to cover the work (and indeed the winning team was quite small). However at least two of the teams had 10 to 15 people involved. You need people to run your blog, someone to create the presentation, someone to give the pitch, someone to facilitate and someone to project manage. Perform a skills audit quickly and sort out when everyone is available, don’t leave it to Saturday evening to ask whether people will be back tomorrow.

If you decide you are going to try and build a working site on the weekend then you will need a couple of developers with complimentary skills, some web designers (nothing fancy: HTML/Javascript/CSS will do but make sure its practical experience with some cross-browser experience), an infrastructure person (who can be shared with other teams), someone to generate content for the site and ideally someone to test the user experience.

You also need to have done some planning prior to the event. At the very least buy your hostname, buy some hosting, don’t be afraid to make a technology choice if it means your hosting is going to be simpler. Be responsible: Carbon Co-op, for example, requires people to submit an email and postcode, this means data protection issues. You simply can’t ask someone you randomly meet at an event to open their credit card, buy you a name, hosting and then start collecting people’s details. I know everyone at SiCamp is going to encourage you to do this but it’s a really terrible idea and this is meant to be your business not a final year student project. What happens if you fall out with random person after the event? How are you going to get your data back?

If after the skills audit you decide you don’t have a viable team then don’t just plough on. Take it on the chin that your idea hasn’t attracted enough interest and disband the team and go try make someone else’s idea awesome. Alternatively scale back to what you can achieve, which will usually be a really nice slideshow. Accept that a slideshow isn’t going to knock anyone dead when other teams will be launching websites.

Finally a practical point: don’t make videos for your project and presentation unless you are trying to make work for idle hands. Making videos is time-consuming and they don’t impress people. Actually getting someone who had never heard of the project before the weekend to come and talk during your presentation would have totally slain the judges. Think of people who video tape acceptance speeches, the undertone is: “Your event doesn’ t matter to me”. If you want to have someone speak who can’t physically get to the venue then use a video chat instead.

If you are a project founder then don’t be tempted to take an active role in the weekend’s work. Your role is to be the project visionary, don’t even be tempted to give the pitch yourself. Get someone else to give the pitch and then have them invite you to speak during the presentation. It’ll make you seem much more important and insightful. If you give yourself a role in the project then remember that all the time you spend on slides or talking to potential investors or managing tasks is time that you are unavailable to your team. Your team needs you to inspire them and make choices about what you want. This is your job.

What about the organisation of SiCamp itself? Well the venue was fantastic, the internet provision was first-rate, catering was excellent. Kudos on this.

Things that were not so good were the lack of facilitators and runners for teams. Each team should have had an experienced Camp hand to provide an idea of what the event was about, what was expected and when things were going wrong. This person should also have mediated who could visit the team rooms. They should also have compared notes with the other Team Camp hands to see whether all the teams were equally balanced.

Although in principle you were meant to be able to swap between teams and look into the other project rooms I’m not sure who the organisers thought was going to do the work for your team if you went off and have a wander round the other project rooms. I would have liked to seen the other team’s efforts and how they organised their teams but most of the weekend was spent looking at an editor on a MacBook screen.

When teams needed help or advice they should have been able to ask the facilitator to send a runner round the other team’s faciltators to find out if what they needed was in the other teams. There was a real confusion around whether people were competiting in teams or collaborating in a single event.

However my number one issue was the AV at the final show and tell. The sound didn’t work, the microphone kept cutting out due to low batteries  and the VGA connection to the OHP wasn’t working and everything projected purple. In short absolutely nothing worked and stress for our team was massive as we struggled to get something reasonable going.

My checklist of prep would involve: paying for a decent DVI projector with Mac compatibility, do a sound check prior to the event, allow the teams to run through 2 minutes of their pitches in the actual venue, sort out a running order ahead of time. In short, don’t make those 10 minutes more painful than they have to be.

So okay, praising and moaning over, do I think it was worth going? Well it was an interesting challenge and I wanted to see what could be done in two days. I’ve also got at least three blog posts out of it so I guess I learned a lot. My first thought on trying it again would be to assemble a team prior to the event so that you could be guaranteed the range of skills you need to really build something in 8 hours.

That’s really focussing on the competition aspect though and thinking outside the competition there are a lot of intangibles that the entrepreneurs involved gained. Some projects got new names, Carbon Co-op got a cool logo. In some ways assembling the shock troopers of project execution would mean that you were not really taking into account what people need to push their projects forward. You would also exclude some people from teams who could benefit from the experience of working in cross-discipline close-knit teams with immediate feedback loops.

I think I would want a more relaxed role next time with time to take in more of the event. I would also reign back from treating the event like a Hack Day with an emphasis on cool stuff working. Faking it before you make it is absolutely fine. To be honest I could also do with a 10:30am start on the weekend. With that in mind I would consider doing it again.