This was a big deal for me – after being involved in organising over 25 Startup Weekends and facilitating 16 of them in several countries, this was the first time since 2012 that I’d “just” participated. I haven’t had as much professional fun in a long time.
The main idea behind the hackathon was to explore different ways of representing legislation and rules as code, and “understand the value of machine consumable legislation to community and industry”.
I had registered as a dev, and teams were formed somewhat randomly. I was very fortunate to end up with Kay Jones, Maia Miller, Caleb Moses and Ross Patel as teammates. As our project, we decided to solve the problem of starting a business whilst being compliant with all of the various rules and regulations from central and local government. We had two specific use cases: someone wanting to start a food truck business, and another person wanting to start a sole-trader consultancy.
There are a plethora of different rules from many agencies that need to be followed when starting a business. For example, if you’re registering a company, MBIE’s Companies Office requires you to register in a specific way. Inland Revenue requires you to register for a number of different tax types. If you’re hiring people, you should check your employment agreements against Employment New Zealand requirements, and be sure you’re up to date with Worksafe requirements. If you’re serving food, you’ll need to comply with the Food Safety Act. If you’re operating in a public place, you may need a license from your city council. And so on.
Our team looked at a number of different solutions for encoding the various sets of rules. The hackathon organisers encouraged us to take a close look at Australian Data61’s RaaP (Regulation as a Platform), as well as the French OpenFisca system.
We decided not to spend much time on RaaP after we attempted to sign up, but were unable to get their system to disgorge a confirmation email – seems they were having server problems at the time, and this did not instil us with enough confidence to sweat it out with them over the very limited time we had in the hackathon. RaaP does look like an interesting system though, and seems well suited to the compliance task we were undertaking.
OpenFisca looked really interesting and comprehensive, but we thought the initial investment required for defining every aspect of the rules, objects, calculations, etc were too great for the proof-of-concept prototype that we were attempting to build over a weekend. If we were going to do the job properly and take a month or two about it, OpenFisca might have been a good choice – but five people coming at it cold didn’t really have a chance of producing something impressive with it over the course of a day-and-a-half. Overally, OpenFisca seems better suited to situations which involve entitlements calculations than our less complex compliance task.
Of course, the code that we developed is available on Github, so feel free to have a look, play with it and fork it.
As our submission in the hackathon competition, rockstar Ross Patel put together this video describing what we did over the weekend.
We didn’t win the competition, but we did manage to get third place (out of five entries) – a solid three out of five.
The winning team put together a system to calculate your entitlements to compensation for time off work as a live organ donor, and the second place team took all of the New Zealand legislation from 1993 and put it on GitHub, complete with commit dates for all of the changes that have since occurred. Both of these projects are very cool.
I really enjoyed the Better Rules Hack. I believe it definitively showed that there is great potential in machine consumable legislation, and demonstrated that there are a wide variety of applications for it. We’re only limited by our imagination. And having had a bit of a play, I think we’re ready to move into the next stage – applying this to a real project or three that will commit more than a weekend of volunteer resources.