top | item 4464186

DNC just open-sourced their voter registration platform

113 points| kine | 13 years ago |democrats.github.com | reply

31 comments

order
[+] tptacek|13 years ago|reply
This application is very, very simple; it's a practically the starting skeleton of a modern Rails/Devise application.

One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". There are a LOT of business processes that work like that.

[+] cperciva|13 years ago|reply
web application whose purpose is to spit out PDF files that need to follow a specific format

FWIW, I've found that "generate HTML and feed it through wkhtmltopdf" is a surprisingly effective way of doing this.

[+] luriel|13 years ago|reply
> One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format".

As others have pointed out, the (not really open source) license doesn't allow any uses for other purposes.

[+] nakkiel|13 years ago|reply
Read your comment (and other's) about the PDF filling and got interested into looking at the source.

I think doing it this way is wrong. It's essentially the same thing as putting your code and HTML together in a PHP file for example.

When the format of a PDF file is fixed and must be filled computationally, I'd advise to add PDF fields to the original and fill those by name through API calls instead of using coordinates.

That way, you can hope to write your code once and update the PDF when necessary.

But OK, it's all pretty dumb and maybe not worth a mention at all.

[+] ekoontz|13 years ago|reply
I used Apache Fop (http://xmlgraphics.apache.org/fop/) to convert XML to PDF at a previous job. It was extremely painstaking work. On the other hand, it gives you a lot of fine-grained control over the appearance of your PDF.
[+] cap10morgan|13 years ago|reply
Yeah, it changes the game when you need to fill out a pre-existing PDF form with user-supplied data (as opposed to free form PDF generation). In my experience, you pretty much have to use a Java library (such as iText) for this. So for a Rails app, that means JRuby, queue to a Java daemon processor, or something along those lines.

Though I see they're using the prawn gem to do it here: https://github.com/democrats/voter-registration/blob/master/...

Last time I checked, prawn wasn't quite powerful enough for this use case. I'll have to revisit that approach.

[+] gary4gar|13 years ago|reply
it is missing integration tests, though
[+] Hoff|13 years ago|reply
The first part of the software license looks to be BSD/MIT-like with the to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,... sentence, but then there's this paragraph:

This permission does not include: (a) any use of the Software other than for its intended purpose; or (b) any use of the Software in any manner that violates applicable law. Any use of the Software other than as specifically authorized herein is strictly prohibited and will terminate the license granted herein.

[+] balpha|13 years ago|reply
In particular this means that this is anything but open source (at least if you go by the OSI definition, which I do).
[+] tptacek|13 years ago|reply
I imagine that that's CYA; one thing both party organizations have in common: they are saturated with lawyers.
[+] grandalf|13 years ago|reply
Wouldn't a better strategy be a Twilio app that calls voters and informs them that they are registered to vote already?
[+] greenyoda|13 years ago|reply
The point of this software is to make it easier for people who have never registered before to register. The Democratic party probably spent their resources on this because they think that a large percentage of unregistered voters come from demographic groups that tend to vote for Democrats, such as recent college grads who were not yet old enough to vote in the 2008 election.

How would your strategy improve the expected outcome for the Democrats?

[+] cap10morgan|13 years ago|reply
I worked as a Rails dev at the DNC in 2010-2011. I pushed for open-sourcing our fully-featured voter reg. Rails app back then, but didn't find much support for the idea. The political world is pretty wary of "giving code away" because the opposition will use it, etc. So, progress?

We were allowed to open-source some infrastructure code back then: https://github.com/dnclabs

Hopefully they'll continue working on this tool and make it something worth using and contributing to. I've tried to convince several political orgs. I worked for in the past to do this, but so far none have bitten.

[+] mediocregopher|13 years ago|reply
Maybe it's just my screen, but I find that shade of grey to be incredibly difficult to read.

I do like the trend towards technological openness though, hopefully we'll be seeing more of this sort of thing.

[+] dnctroll|13 years ago|reply
This will be helpful for the DNC to register the dead people and dogs needed to win elections this year with national unemployment at 8.3%.