Fusing open source with... judo

Lance Wicks finds an innovative way to combine his love of judo with open source

a judo fight

Image: CC-AT Flickr: tangi_bertin (Tangi Bertin)

My project—DojoList, an open source web application—first started as a quick hack when I was writing to create a Google Map for the Hampshire Judo Association website, in order to locate where all the clubs were on there.

Quickly, I began to see greater possibilities and the project began morphing from a quick hack to a real software project – a web application to maintain a comprehensive list of all the Judo Club Dojo locations and information all over the world. I decided from the start to develop “in public” which meant sharing all the source and the data - I wanted people to be able to use it freely, so as not to have yet another data silo. So I applied a Creative Commons license to the data to explicitly state the data could and should be used by others, which would ultimately result in better and more accurate data. 

As the project developed, I began to add more and more features – I removed the admin interface and replaced it with a structure where the admin functions could be accessed via the main interface. With some difficulty I added the option to edit training sessions, and I enabled the basic upload of images. From here I moved on to more complex ideas, like draggable map markers – this would mean that when a new Dojo is being added, or an existing one being edited, you can simply drag the marker on the map and drop it at the Dojo’s exact location.

I also learned that writing tests against bugs before I wrote fixes for them, was extremely good practice – this is a Test Driven Development (TDD) idea, and one well worth using. The idea is that you write a little bit of code that hits your bug, then after you have a test (that fails) you make your fix and re-run the test, hopefully passing this time round! One of the benefits of working this way is that you have to isolate the bug so you can write a test for it – this forces you to delve pretty deep into the bug and understand it, before you start trying to fix it at all. This also leads you to identifying messy bits of your code. By this practice, I soon started developing must stronger code, and a code that I was far more comfortable playing with. 

Another very tricky feature that I’ve spent much time over is syncing data. I wanted the DojoList to be a system that could send and receive data from one installation to another. For example, DojoList already reads data from http://judoworldmap.com, but my initial hack at this was one-way. I wanted to structure things so that, should someone update a Dojo I have imported, those changes automatically feed back and appear everywhere.

A good example case would be this. Your area association might install DojoList on the area website and maintain a list of clubs in your region. This is likely to be an accurate list because it is local clubs and these clubs visit the website, so updates are bound to get made. The national governing body also installs DojoList, but rather than re-enter and re-manage the clubs from your region they point their DojoList installation at your area installation and hey presto! – all your local clubs are listed on the national website. When you change training times on the regional site, it updates the national site too. What’s more—and this is where it gets tricky—if you happen to update the national site, it updates your area site too. 

So you have a two way sync, and everyone gets better information. Of course it's proving tricky to work out how to do this. I have been making some changes to DojoList to make it possible. This has included the creation of a source URL field to show where the site came from originally and a GUID (Global Unique ID) for each Dojo (I am also adding a "last updated" field). Later I even see the system watching the RSS feeds from other sites to decide when and what to update.

That said, I am now moving onto the 0.9.0 release, which should have all the sync functionality up and running – this should be available in no more than a couple of months. As it stands, the 0.8.0 release is pretty well tested and has some great features. It lists over 4,000 Judo clubs from all over the world, and there are just about 40,000 lines of code behind it!

There are several tools I have used to help my project along: PivotalTracker helped me maintain my list of things to do, and I used GitHub to host my source code. I also started using the PHP CodeSniffer tool to push myself to the PEAR Coding Standards, in the hope that it would make the code more friendly to others who’d want to use it, or better yet, contribute.

This open source aspect is a cornerstone of my project – the code is freely available to download from GitHub. I used an AGPL licence for the project, which is an open source licence that protects the code but also gives others permission to use, change or improve the software just as long as they share. I like the fact that it protects my effort but still allows others to use, improve and share it – ultimately benefiting everyone.

The idea is to transform this project from a one-man-band into a community developed project. To this end, I added some basic information on the About page of the website, and have created a mailing list too. The more people that use the system and contribute new ideas, the better it gets. I want to go beyond making the code simply ‘available’, and instead get it to a point where it is a two-way conversation – so get tinkering! I need more eyes to spot my silly mistakes and more hands to create the stuff I can't yet imagine! The latest version of the DojoList codebase is up here. 

And stay tuned for the big 1.0.0 release, scheduled for mid 2011!


This account was complied by Iman Qureshi from lancewicks.com/blog, with the permission of Lance Wicks

Lance Wicks works in IT, primarily involved in web services, and is a judo coach. He tweets as @lancew

Share this article

Google+ Delicious Digg Facebook Google LinkedIn StumbleUpon Twitter Reddit Newsvine E-mail


Comments (0)

This thread has been closed from taking new comments.

By Lance Wicks on Feb 25, 2011

Featured Article

Schmidt Happens

Wendy M. Grossman responds to "loopy" statements made by Google Executive Chairman Eric Schmidt in regards to censorship and encryption.

ORGZine: the Digital Rights magazine written for and by Open Rights Group supporters and engaged experts expressing their personal views

People who have written us are: campaigners, inventors, legal professionals , artists, writers, curators and publishers, technology experts, volunteers, think tanks, MPs, journalists and ORG supporters.

ORG Events