Tom MacWright

tom@macwright.com

DC Code Hackathon: v2

About a year ago, the DC government released its laws in digital, free, and complete form for the first time, and a group of awesome people met to do things with them. We built some software that connects to other software and uses libraries that handle the big problems of laws. And then DCDecoded.org and Josh Tauberer did the hard work of parsing & formatting everything correctly, and Dave Zvenyach got the DC Council to start releasing open source code that fixes real problems.

So we’re hanging out again: this Saturday, May 10, at the Mapbox garage, we’re doing a DC Code Reunion Hackathon and you’re invited.

What’s left? A whole lot. The hackpad has a lot of the potential tasks. The crossover between development and laws is fascinating, so let’s look at a few of the challenges.

Legal authentication

The original dccode viewer is unofficial for several reasons: it’s not hosted by the DC Government, it doesn’t follow government accessibility regulations, and it isn’t authenticated. Authentication is a process in which the government tries to guarantee that the law you’re reading hasn’t been tampered with. It’s similar in concept to md5sums, except often the implementation actually doesn’t give any technical guarantee - it’s more like a watermark that could be easily forged.

What is built so far is the skeleton of a Django app that will aim to be a sort of key server, called authentication so far.

Citations

Laws are roughly structured text: they have paragraphs, sections and headings, and no other important formatting. Thus, they don’t have links. But they refer to themselves all the time, via citations: shorthand like 5 U.S.C. 552(a)(1)(E) designates a reference and the page, section, even sentence referenced. Extracting these is a neat and hard problem, but key to fulfilling the central coolness of the internet: hyperlinks.

What is built so far is a node module called citation that pulls in modules of regular expressions that support specific citation styles.

Editing the code online

The drafting process for any official document is usually the same or worse than your office: Microsoft Word or WordPerfect, track revisions, file naming ‘conventions’ like TomsEdits-a2.doc. Creating an editor where revisions to the law could stay online would make the process better for everyone and reduce the friction for lawmakers to draft laws with public input.

What is built so far is a node app that provides an editing interface built with CodeMirror.

A Legal Format

Standardizing a representation of anything is hard. Two well-known drafts exist: Akomantoso and United States Legislative Markup. But there’s still a long way to go to find the right balance between terse and explanatory markup, between developer ease and producer consistency.

So far Josh has prototyped a format that powers the editor and display tech.

Plus

There’s a lot to do than just these projects. After the initial legal blocker was removed, the possible tasks expanded greatly: should we rebuild everything on an open, digital base? The amount that this effort can move with some developer energy is huge: in many ways, DC quickly gone from being a sad case of copyright lockup to an example of how it’s done. I’m excited for a new era of open becoming official.