Given that it's clear what the source code of democracy is - its laws - an obvious thing to try would be to apply open source techniques to the process of drawing up legislation:
"In the world of open source, your contribution, vetted and approved by your peers, gets committed into the mainline in a completely transparent and accountable process," Amanda McPherson, director of marketing Email Marketing Software - Free Demo for the Linux Foundation, told LinuxInsider.
"If Joe Citizen could impact and view the legislative process in the way a Linux developer can, I believe the result would be superior legislation," she said. "Lawmakers would be judged on results, those with the most and best to contribute could do so, and special-interest groups working selfishly would be exposed."
Moreover, there's a technology just waiting for this kind of approach:
"Laws go through all kinds of markups, changes and amendments," Leyden said. "The process has evolved from making those changes on parchment to at least using word-processing documents, but it's not that big a step to think of moving to the next generation of tools and crafting a whole piece of legislation on a wiki."
Interestingly, one of the main voices quoted in these two articles on open legislation is Eben Moglen who - quite unsurprisingly - has many insightful comments on the idea. Yet another reason to read them.