Code

Holy fucking shit, it’s the 80’s!

There is frequent talk of computers and cellphones converging and becoming readily available for use in the developing world. Let’s analyze that statement with regard to time, financial incentives of companies such as Nokia, and the economic prospectus for the developing world as it is.

Currently two billion people have access to cellphones, which are providing a severe jump in infrastructure all over the place. It is expected that within the next five to ten years every human on earth will have access to a cell phone. This is based on direct trend analysis without much regard to means, but let’s take it as a given.

If this is the case, then most likely what will happen in the short term is that older phones used in the west will trickle down the line to be sold or given away second hand in developing countries - now I’m not talking about places like urban areas in India, where almost everybody already has a cellphone, but rather places like the Indian province of Kerala, or perhaps Burma or rural Thailand, or even Malawi. So second-hands filter down, infrastructure is raised, all the while in the west our cell phones become like 1990’s level supercomputers, with big screens, fast uplinks and high levels of interactivity.

This is not a bad way of doing it, and what’s probably going to happen is that the cell phone emergence in the developing world will cause a massive positive feedback loop of innovation and economic growth. Couple that with appropriate technology and you’ll see numerous other trends:

  • Decreased fatalities due to smoke from open fires, malnutrition, simple bacterial or viral infections, and that kind of poverty related death.
  • Decreased birth rate, connected to higher quality of life, availability of contraceptives, and lower infant mortality rate.
  • Increased global food output
  • Increased levels of organic farming on a global scale
  • Far higher average GDP globally, and less scedasticity overall

But this is all grounded on the added functionality expected of cellphones during this inevitable convergence, e.g. built-in global positioning, fast internet access, high resolution screens, USB host inputs on devices, all of which could provide for things like:

  • Location specific agricultural instrumentation and satellite based fertility analysis provided directly to farmers on the land, so they can get specific recommendations for plantation.
  • SmartAID - cell phone based expert system for first aid and disaster response; essentially a simple AI strapped onto a Wiki, channeled through a cellphone.
  • Cellphone based microcredit/mutual credit banking systems.
  • Identity management, voting registration and direct democracy.
  • Public safety announcements, etc.

For some of these any modern cellphone, dating back to 1998, will do. But for many of these services you need to be far further along the convergence pathway.

Which is why rebooting tech is a smart idea.

With $10 in parts today you can build a 20 MHz network-capable computer that’s roughly equivalent to a cheap home computer of the early 1980’s. Connect it to either a TV or a cheap LCD screen, for example a Nokia 3310 screen (pictured), and a keyboard, and you’ve got yourself a really simple teletype terminal.

Nokia front - picture: Dhananjay Gadre

So, instead of waiting patiently for the convergence to reach developing rural areas, which is 10-20 years from now at current rate, you use what exists to push general computing into 1980’s level tech. Make it available to people, and you’ll have an emergent hacker culture.

Now, for text only teletype terminals to interface with the best resources of the day, we’re going to need a few things:

  • BBSWikipedia - a small C application that runs natively on AVR microcontrollers, for example, that can download Wikitext directly from Wikipedia or other Wikis, parse it, and display it on a 80×25 type display (or less!), with links active but images omitted and tables severely simplified. This could be just a port of Links, but then it would have to have significantly improved offline caching support, because
  • we really need stable Internet connections; and while this could mean waiting for proper broadband penetration in rural areas, it more likely means backing up a bit and using cellphones as dial up modems for a while. At any rate, we can’t assume the existence of persistent network connectivity for a while, so people must have a way to back their shit up while offline so that they can schedule downloads and stuff.

Essentially, what I’m talking about doing is making a cheap platform for 1980’s style tech and use technological paradigms of the era as a migratory step until there’s something better. Something better will arrive a lot faster than it did the first time round, that’s almost certain, but having something workable really fast is definitely a win.

How insane is this idea?

Code
Fab Labs
Sustainable technology

Comments (1)

Permalink

Terence McKenna

Is a bit too New age mumbo-jumboish for my taste, but if you run what he’s saying through a low pass filter and stone wash it in a soapy medium rinse cycle for a while, he starts to sound like.. well.. me. How scary is that?


Digital Freedom
Code

Comments (0)

Permalink

The Shadow Parliament Project

First, think about free cultural projects. Think about what happens when people disagree on the direction the project is taking. The project forks, right? Now, hold that thought in your head for a bit.

A new type of voting system

Now, lets talk about voting systems. When voting, a voter is presented with two functions: vote for one of the options, or don’t vote. I suggest we add a third: forward your vote to a third party.

This is the essence of “representative democracy”, but I’m talking about expanding it - in representative democracies everybody forwards their vote to a predefined subset of the people, and each representative has an equal weight in subjects. Here I’m saying anybody can forward their vote to anybody, and forwarding votes increases the weight of that individual’s vote.

The three functions of the vote:

  1. Abstention
  2. Direct vote
  3. Elected proxy

So, for example, if Bob doesn’t have any particular interest in agriculture, he can forward his vote in an agriculture related issue to his friend Sam, whom he trusts to make the right decision about agricultural issues.

What’s more, Bob can choose to automatically forward his vote on all agricultural issues to Sam. And Sandy, who isn’t very political, but trusts Bob a lot, can choose to automatically forward her vote on all issues to Bob, except on issues about education, because she thinks her friend Tanya knows more about that.

The three options of the proxy:

  1. Single issue electorate.
  2. Categorical electorate.
  3. Arrant electorate.

Importantly, they are all free to change their mind at any time. An agricultural matter may arise where Bob has an opinion - it’s not that he doesn’t trust Sam. It’s just that he wants to make his own call on this one. To make this viable, we need another feature: overriding. Until the closing of the polls on a specific issue, a voter may change her mind as often as she wants, and only the last decision is counted.

Changing your mind is allowed, within a generally accepted timeframe.

Consider that every single system of authority on Earth exists as a possible state of arrangement within this voting system. I should draw pictures to illustrate, but suffice a few examples:

  1. Dictatorship:  Everybody forwards their vote to one person. (Let’s not hang ourselves in discussion on why this situation would arise)
  2. Parliamentary democracy: Everybody forwards their votes in equal measure to the same group of people - in Iceland, 63 people.
  3. Bicameral democracy: The social network is disconnected into two groups, one significantly larger. Within each of these subsets there is a parliamentary democracy configuration.

And so on.
For all of this to be viable, you need software that provides this functionality. Solving this sort of voting may be arbitrarily complicated and can only be done in a reasonable amount of time by a computer. This means, for security, we want everybody to use strong crypto - but that’s just a devil in the details, so let’s not go too deep into implementation.

For now, just assume that this software will be written. Now on to the juicy stuff.

Forking the Legal Codebase

It turns out that most countries leave their laws in the public domain. This means that by copying the laws in entirety you do not infringe on copyright. This is good. It also has the interesting side effect that there is nothing that stops you from making changes. Obviously these changes are not law, but they are still legal code.

Think of society as a running program, where the laws are one of the underlying logical components. If you change the laws, you change how the system works.

So take the voting system described above, and put it on a website. Call this your Shadow Parliament. Now, encourage every citizen of your country to sign up. Make some mechanism to ensure their identity - avoid giving people more than one account, and avoid giving people accounts who aren’t actually citizens of your polity. Now start the most interesting social experiment of all time. Two steps:

  1. Every bill that appears on the real parliament is copied automatically onto the Shadow Parliament, where is undergoes the electoral process.
  2. Bills can be proposed by members of the Shadow Parliament in the same way as they are proposed by delegates at the real parliament, and undergo the electoral process as such.

Slowly but surely, the two legal codebases will diverge.

How to bootstrap a Shadow Parliament

When you fork the legal code, obviously your Shadow Parliament needs to obey the laws on it, at least to the extent of the functionality of the parliament itself.

As a result, you first need to make, using the traditional legal process as described in your country’s laws, a legal parliament running on the copy. This means host general elections. There are probably some loopholes you can use to make that process fairly painless, but I suggest consulting some lawyers on how to do it “legally”. Remember that the polity you’re running is a clone, so size restrictions and other things might be a lot easier to overcome.

As soon as you have a working base of parliamentarians running on the copy, make a lot of changes to the laws (the first divergent steps) - and to the constitution! - to make a networked system legal on the law codebase. Make sure you change the laws so that forwarding votes is legal.

This is formality, but it’s something that needs to be done right in order for the experiment to work. If you botch it, somebody will call foul later on.

Making the claim

Every country has its fair share of controversial issues. These are the leverage for the next step. As the experiment continues, the legal system will diverge more and more as the real parliament and the Shadow Parliament show that they are representing the parliamentarians, the lobbyists, and the corruptors on the one hand, and the people on the other.

When you’ve got enough divergence, there might be reason to suggest that perhaps the legally elected legislature of your country isn’t actually doing its job properly, if indeed its job is to be the face of democracy. At some point during the divergence process, if you get enough traction, you’re going to have at least a few parliamentarians who start acting on the results of the Shadow Parliaments own votes. (By all means be careful to have closing dates on issues at least a few hours before they close in the real parliament!) These parliamentarians will be representing democracy, yes, but they will also be fueling the fire, because if they’re just doing exactly what the Shadow Parliament wants, why have them there at all?

So, when you have enough divergence, you might suggest a global merge of the two legal code projects - that the “real” parliament merges the differences from the shadow parliament into their own. This will mean that the Shadow Parliament’s lineage of law will legally supersede the old Parliament’s laws, and will effectively take over the legislative wing of your country’s government.

The cool thing

This is my hack. The beauty of this is equivalent to the beauty of the GPL. Richard Stallman recently chided me for using the word “viral” to describe the GPL… so I’ll refrain from using that word… but essentially, this idea has a few features that make it bulletproof.

The first is that the people in power won’t like it at all, but they cannot (legally) stop it from happening.

The second is that even though it is inherently subversive, the more people that know about the idea and understand its implications, the better.

The third is that it leads to more freedom, far more freedom, a kind of freedom nobody has ever experienced. It isn’t even Utopianism, that’s the great part. Proof of concept exists, right here, in this article. Now we’re only months away from running code.

Law
Code
Small Scale Democracy

Comments (5)

Permalink

Heapsort, Quicksort and Entropy

Halli pointed out this great article.

Code
Mathematics

Comments (0)

Permalink

Building a post-scarcity society in a patent-and-copyright-encumbered intellectual climate

In response to my podcast of the other day, Fenn asked:

How should one go about building a post-scarcity society in a patent-and-copyright-encumbered intellectual climate?

There’s no easy way to answer this, as the answer is neither obvious nor uniquely defined. I can posit three suggestions that I think are deeply related:

  1. First, one of the things that will inevitably happen over the next decade, which has been going on for the past three decades, is that the idea of copyright will change. We are accustomed to an extremely rigid system for copyrights, born out of a greed which no longer really has any place in the realms of man in our new digital reality. Those who wish to uphold the old form of copyright are increasingly having to criminalize children and family folks, and any system which marginalizes the majority of the population (by stamps of unethicality, criminality, or whatever) is doomed to die (in the cybernetic sense) eventually.
  2. Second, there has been a lot of talk about manufactured scarcity on Global Swadeshi recently, and in a number of other places. This has relevance here: We already live in a post-scarcity society on a number of levels. We haven’t achieved full cornucopia yet, but for all intents and purposes nobody should be want of anything. The only thing stopping us from having this kind of global equality is the patent-and-copyright-encumbered intellectual climate of which you speak. But that intellectual climate isn’t self-organizing. Rather, it’s a result of the assumption of scarcity, which leads people to believe they can’t survive without property, which leads to greed. This may sound simplistic, but it needn’t be more complicated. So if you want to build a post-scarcity world, start by breaking the current system and replacing it with something better. This can be done in a number of ways and I don’t support any single one more than any other, but as a rule the less violence applied the better.
  3. Third, there is the option of doing the subversive hack. Nokia, amazingly, heralded this in the hardware market by saying that their patents were free for use in free/open source projects without royalties, and that they would not allow companies that did not follow the same guideline to use their patents. This was a big win, and completely parallel to the GNU General Public License or the Creative Commons licenses. Basically, these licensing schemes are viral in nature, and the more you spread the meme the stronger it becomes. Because of this I have been discussing open hardware licensing with a number of ‘big guys’ over the last couple of months, and I happen to know that Richard Stallman and Neil Gershenfeld have been discussing this issue (Neil told me the other day…).

Or, taken into short form:

  1. Just wait, the problem will solve itself.
  2. Encourage the problem to solve itself by political activism. (And btw, anarchism is the way to go)
  3. Push for subversive licensing methods and adopt free hardware licenses that are hostile towards patents.

On the third note, I think I’ll take the liberty of posting a few highlights of the mails thrown back and forth under the topic “Open Hardware License” a couple of months ago. I hope nobody minds.

The discussion started with Michel Bauwens asking about Open Hardware Licenses, or more generally, Open Source Physical Objects,

What do we need to have “economically-significant, replicable, open source physical production efforts?”, i.e. true Distributive Production. Marcin Jakubowski proposes a set of OSE Specifications to judge such efforts.
Key entries: Free Hardware Design, Open Development, Open Customization ; Open Design, Open Hardware, Open Innovation, Open Source, Open Source Product Design, Open Source Hardware
See also: Citizen Product Design; Co-Creation; Co-Design ; Desktop Manufacturing ; Peer Production Entrepreneurs ; Self-organized Design Communities
Open Source for Appropriate Technology: Instructables, Honeybee Network, Appropedia, Howtopedia, Demotech
Sixteen Key Technologies for an Open Habitat. Marcin Jakubowski [3]
Key organizations: Open Design Foundation ; Open Hardware Foundation
Typology by degree of openness: Closed Hardware; Open Interface, Open Design, Open Implementation
The Open Source Product Design platform has a list of Open Design projects
MAKE magazine “has managed to regenerate a previously static culture of do-it-yourselfers at a feverish pace”
The Village Forum focuses on how we design and build our habitat.
The P2P-Design Delicious tag monitors the topic

Vinay Gupta said:

The issue is patents. Open Source derives it’s power from copyright law - they use the property right of “copyright” and then pool it by using the GPL and other such licenses which rest on copyright.

Patent is a huge pain in the ass. You could do an open source patent pool, but that’s a very expensive and hard to manage undertaking.

So… one option is to work in the domain of no property rights - public domain - which is where a manufacturing technology goes if it is disclosed without patents, or is patented but the patent has expired.

But then what if you publish your design, then somebody makes a small tweak which kind of perfects your design, and then patents their tweak - without a patent on the original item, you can’t require them to release their changes for general use, because there’s no property right that you hold which applies to their work.

A problem, for sure, in terms of doing Open Manufacturing in the same vein as Open Source.

And later followed up:

I’m not sure we need an open hardware license. I’m also pretty sure that we need to investigate other approaches to protecting IP other than copyright and patent, because neither one really expresses the essence of what we’re trying to get at here. Copyright and Patent are two forms of Imaginary Property: we could easily create a third form of Imaginary Property that suited our needs, although it wouldn’t have legal status unless new laws were passed, or old ones amended.

To which I responded:

The problem with Open Source licenses on physical objects is that even though they might do the trick in a legal context, it isn’t what they’re designed to do, so the wording is all wrong. It’s like selling vodka as a disinfectant. It’ll do the job marvelously, but a lot of people will remain skeptic.

Conversely I think doing an “Open Hardware License” would be missing the point to a certain degree - the boundaries between hardware and software are bound to grow increasingly fuzzy as we draw closer to digital fabrication (let alone molecular assembly), and even if we lump those two together we’d be neglecting all the other kinds of “intellectual property”, such as ideas, etc.

I consider patents to be harmful by design. Their original purpose, to spur innovation, worked to a certain degree but it certainly doesn’t scale (much like the republic) - as soon as you have a certain number of innovators, they find their options limited by the number of existing patents, and the patent system becomes counterproductive. Bounty based systems may be better for certain purposes, but this is an issue I haven’t seen anybody nail properly yet.

Which brings me to my point: What we need isn’t just a new license, it’s a new terminology for dealing with “objects”, both physical and imaginary, something that encompasses both snugly, fits in with modern legalese and does the job patents were originally intended for without artificially stifling innovation or stepping on anybody’s toes.

Once we have that kind of framework, a license that applies in general terms to all these things will probably follow somewhat naturally, and that has the potential to handle software, hardware, biomass or whatever humans need to possess.

Marco Fioretti joined the conversation, with:

A much more effective and easier to implement solution may be to simply:

- reduce duration in time of patents
- do not allow them in some fields: software, living things…

if it ain’t completely broken, that is if there is an intermediate
solution that puts an end to all or almost all the harmful
consequences, why make the effort to fix it completely?

Michel Bauwens then replied:

Concerning the new terminology, are you aware of Spimes as a concept,
http://p2pfoundation.net/Spime, explained in this video,
http://p2pfoundation.net/Bruce_Sterling_on_the_Internet_of_Things_and_Spimes

The only beef I would have with Bruce Sterling’s concept is that it relies
on paying for online designs, which I think is not realistic,

some other license related links:

http://p2pfoundation.net/Talis_Community_License

http://p2pfoundation.net/Open_Design_License_Agreement

Here is the perspective of the TAPR open license people, taken from
http://p2pfoundation.net/Open_Hardware_Licence

I hope Lawrence is not objecting to being copied on this, busy as he must
be?

Michel

From http://www.tapr.org/OHL.

You can download pdf versions of the proposed licenses through this site.

“The TAPR Open Hardware License (”OHL”) provides a framework for hardware
projects that is similar to the one used for Open Source software. This
isn’t as straight-forward as it seems because legal concepts that work well
for software (such as copyright and copyleft) don’t neatly fit when dealing
with hardware products and the documentation used to create them. The OHL
deals with Documentation, which describes a project using elements such as
schematic diagrams, CAD/CAM files, and Gerber files, and Products which are
based on that Documentation.

Like open source software licenses, the OHL permits Documentation to be
used, modified, and distributed to third parties. Unlike software licenses,
it also addresses how Products based on the documentation can be made and
distributed. The OHL’s requirements are aimed at encouraging the community
to develop, use, and improve open source hardware — and to prevent others
from turning that hardware into closed, proprietary products.

The OHL does not address software, nor does it address firmware or code
loaded into programmable devices such as FPGAs. These fit much more closely
into a software licensing model than do the physical objects that the OHL
attempts to cover, and we encourage developers to use open source licenses
like the GPL for them.

One important, and unique, component of the OHL is a patent immunity
provision. In short, the OHL requires each person who uses the Documentation
to promise that they will not sue others who make Products based on that
Documentation for infringement of any patent they control. This ensures that
the community is protected from patent claims by those who benefit from the
community’s contribution.

Another unique aspect of the OHL is a provision to provide feedback about
modifications. Open source software licenses steer away from obligating
those who make modifications to pass those changes back to earlier
developers or other users. For a number of reasons, particularly our belief
that hardware fixes and improvements, especially for safety issues, should
be made known to those who may be making or using Products, we felt that a
public feedback provision would be valuable.

At the same time, we wanted to minimize the burden of such a provision, and
the loss of privacy that would result from requiring developers to provide
their email addresses. So, TAPR will provide a mechanism to report
modifications to a central archive that will be visible to anyone. The
requirement is structured so that if the mechanism fails (if, for example,
TAPR should disappear), the rights granted by the OHL will not be affected.

The Open Hardware License allows Products to be used for any purpose. An
alternative version, the TAPR Noncommercial Hardware License, is identical
to the OHL but limits Products to noncommercial use only. While open source
licenses normally don’t allow restrictions on use, there is a big difference
between software and hardware that we believe justifies offering this
option.

While there is no real cost in compiling or copying open source software,
someone who wants to make Products available to others confronts upfront
costs of making circuit boards and obtaining parts. It’s often
cost-prohibitive to do this in small quantity, so the developer who wants to
make his or her Product available, even on a non-profit basis, has to make a
substantial up-front investment. That investment is at risk if others can
compete commercially with him. The Noncommercial Hardware License addresses
this concern. ” (http://www.tapr.org/OHL)

[edit<http://p2pfoundation.net/Open_Hardware_Licence?title=Open_Hardware_Licence&action=edit&section=2>
]
Context and Commentary

From Instructables at http://www.instructables.com/forum/EEMFZXN1G5EXCFLKHF/

“Recently, people over at tapr.org released drafts of open-source hardware
licenses. I got the following message from Jonathan Kuniholm at Duke asking
for comments on the drafts: “I have spoken with each of you regarding our
interest in the infrastructure for the sharing of hardware designs. An
organization with its roots in amateur radio and open source software has
released a draft of two open hardware licenses ( http://www.tapr.org/OHL ).
I believe that the inspiration is primarily electronic hardware, but the
concept addresses issues we have encountered in our work with The Open
Prosthetics Project and its parent organization, the newly incorporated
Shared Design Alliance.

We have been interested in the ways that we might protect those who choose
to share designs for public good from the possibility of having those
designs patented out from under them or otherwise removed from the public
domain, as well as helping them avoid the cost and time delays of patent
protection for efforts from which they are not trying to profit. These draft
licenses also address liability issues, which are another can of worms. I
would be interested to hear thoughts from folks more knowledgeable than I
about the effectiveness and potential pitfalls of such measures, given the
difference between the issues surrounding physical designs and patents (for
which there is currently no open license option outside of patent-related
measures), and those surrounding items traditionally protected by copyright,
which can currently be released under Creative Commons or GNU licenses (
http://creativecommons.org/licenses/ , http://www.gnu.org/copyleft/gpl.html,
http://www.fsf.org/ ).

The TAPR folks have invited comment on their draft, and I think that this is
as good an effort as I’ve seen so far. If you have interest or expertise in
this area, please submit comments through the TAPR site, and please forward
this to anyone else you know who may be interested.” (
http://www.instructables.com/forum/EEMFZXN1G5EXCFLKHF/)

I piped up again, saying:

Thanks for that link, I wasn’t familiar with Spimes. But I’ll agree with your beef. I had a conversation with my good friend Dhananjay Gadre of the Netaji Subhas Institute of Technology in India about exactly this issue - I was pitching to him a concept I had for a “Sourceforge for Objects”, like the flipside of Make Magazine that was intended as a warehouse for digital design patterns. Originally, I had intended for authors of objects to be able to have people pay for downloads, going for the GNUesque stance of “free as in free speech, not as in free beer” trend.. but Dhananjay objected, pointing out a very important fact:

- Most innovation done in the world today is being done By the developed world For the developing world, and this is clearly the wrong way to do things. Enabling people running a collective warehouse of digitized objects to demand money from one another for use of their intellectual possessions would only widen the gap between the developing and developed, instead of reversing the innovation cycles and putting the power in the hands of those who need it, which is essentially my end goal.

In the end I came up with two methods of addressing this. On the one hand ask for donations rather than demanding money. The other method was applying a PPP-valency matrix to pricing schemes. Let me coin the term: A PPP-valency matrix is a NxN matrix, V, of the ratios between regional PPP’s (with tr(V) = N, and prod(V) = 2N, by design.).. the concept is to take the “from each according to his ability, to each according to his need” mantra and apply it to the actual economy, so the amount of money you get from objects is relative to the ability of people to pay for them. The problem with this method is it’s extremely hard to implement in a way that doesn’t beg for abuse, and after doing a few paper napkin Monte Carlo simulations (yes, I’m a geek), I’ve seen that there’s an inherant feedback loop in this thing that could cause instability in the long run. It can be fixed, but I’m not sure how.

Regarding Spimes on a more technical level, there’s an AI point here. Searching physical reality for objects is NP-hard. If we were to apply Bruce Sterling’s idea at face value, we’d end up with a world where you Google your toaster, and it just goes through all known reality searching for the RFID that matches your toaster. This would be stupid.

AI researchers fit into two categories these days: the people who want the AI’s to understand everything, know where everything is, and use deep searching to solve their problems, and the people who want the AI’s to understand context. The first group would just search the entire space for matching concepts. The latter group would narrow the search down to kitchens at first and expand only if necessary. The problem is, despite the best efforts of smart people ranging from John Von Neumann to John McCarthy to Noam Chomsky, we still don’t understand the nature of “context” well enough to actually implement this kind of thing. And actually understanding context might lead us to a far smarter way of doing this that is currently obscured by our limitations.

… after which the conversation pattered out into pointless chit-chat. We didn’t reach any useful conclusion, but I think there were a lot of very good points in there. What I’d like to do is get the big names in the game to stick their noses together and come up with a Much More General Public License - one that doesn’t just apply to software, but to anything. If that seems unreasonable, then I’d settle for a GPL-lookalike that addresses the key issues of free/open hardware, which is definitely one of the things that’s going to be hardest to fix for the purposes of a post-scarcity future.

In the end, it doesn’t matter how the game has been played so far, or that it’s being played unfairly, but only that we are in the unique situation that we can change everything, forever, by playing the game right now. In a world where everything can be a bitstream, what are we going to do?

Economics
Law
Code
Small Scale Democracy
Fab Labs
Sustainable technology

Comments (1)

Permalink

Faraday cage for my passport

Since about 2001 I’ve had my passport in my backpack. It only leaves the backpack to be inspected at airports and occasionally into my jacket if I’m outside of Iceland and not carrying the backpack. But since the U.S. adopted RFID tags in passports and required anybody traveling to or from the U.S. to have the same, I’ve been slightly worried about walking around with my passport. I still do, but I’ve decided that it’s time to do something about it

I clearly can’t just Microwave the RFID, because my ability to enter certain countries is dependant on it working. The first step is to buy or build a passport-sized Faraday cage. It’s not a bad idea at all, because it’ll protect my passport against physical abuse as well as protect my identity. Stylish faraday cages should be easy enough to make by weaving a copper mesh into a felt fabric that can be dyed any which way. But skipping the dye for now I’m going for the most basic. A quick Google search gave me Mobile Cloak, a company that makes Faraday cage bags for passports and other identity-radiating devices, cell phones and other equipment that you don’t want radiating in hospitals for example, and so on. Their bags look good, they’re cheap ($26 + s&h for a passport sized bag), and they’re closed in all dimensions.

When I first thought about this I considered just making a felt bag like the one I keep my dice in. The downside of that would be that it would be open to RF at the top, but that wouldn’t be too bad because it would still block almost everything and RFID readers are highly attenuated.

The second step of this idea, once I’ve protected my own identity, is to figure out how to help other people protect theirs. This blog entry is part of that. Raising awareness is a fickle trade, and I think the best way to do it is to go out to an international airport with a homebrew RFID reader and approach people. “Hello, are you John Smith, born on the seventh of May 1968? Did you know that your passport is broadcasting your identity all over the place?” (I recommend Bruce Schneier’s blog on this.)

But what then? Do you suggest they get a Faraday cage of their own? I wouldn’t want to sit there selling Faraday cages, that isn’t the point. Sign my petition? Puh-lease. The politicians don’t pay any attention to those and besides, the Evil Empire is forcing the RFID’s down our throats.

Figuring out the clever hacks is always the hard part. Lukas Grunwald figured out a way to exploit faulty JPEG2000 decoders in the airport RFID readers, with the potential to execute arbitrary code. Scan my passport and the airport computer system will die. Unfortunately that kind of hack comes with a writeup for terrorism and a jail sentence. Not my cup of tea.

This entire train of thought is going through a very strange tunnel - a Krasnikov Tube - pushing me back in time to 2001, when I was semi-active in the privacy/security game. I can’t remember what my reasons were for dropping out of that part of the digital freedoms activism game for this long, but I’ve got a pretty strong feeling I’m coming back with a vengeance.

Human rights
Code

Comments (4)

Permalink

Pagerank in 126 lines of Python

Vincent Kräutler wrote an implementation of Google Pagerank in 126 lines of Python. The accompanying article is rather good and is worth checking out.

(It’s not mathematically perfect - there are a few minor technical issues that I’m not going to bash him for, because it doesn’t actually matter to the implementation.)

As for brevity, I was able to condense the code to 110 lines without removing any of the documentation strings or damaging clarity - both of which were good in Vincent’s version and worth maintaining. Any further condensation I could come up with came at a cost either in increased complexity or decreased performance.

Documentation is important. My rule is that any code that needs comments to be understood is badly written and deserves a rewrite. Documentation, whether it be comments in the code or docstrings, manfiles or what have you, should augment the simplicity of the code rather than try to explain something complicated. Not everybody thinks the same things are complicated - I once wrote a very nice implementation of a permutation resampling statistical test in C, which makes perfect sense to me, but would probably appear quite odd to somebody who knows C but doesn’t understand computer intensive statistics. But since the code is clean and well documented, any complexity that comes from the algorithm is exposed as not being complexity induced by the language (or scruffiness of the programmer).

Essentially, it’s a question of clarity. Things like Duff’s device are brilliantly conceived, but they’re hacks, and hackish code is hard to maintain, regardless of how smart it looks. When programming, be smart, but don’t try to look smart. Vincent’s Pagerank implementation is a shining example of how things should be done.

Code

Comments (1)

Permalink

RFC 1751

A standard RFC for human readable encryption keys apparently exists. RFC 1751 defines nice human readable keys. Not as deeply thought out as some of the stuff Vinay and I were considering this summer, wherein we were searching for sets of unique phonemes that were easily pronounceable and identical through a host of the world’s languages; the benefit of this being that a native speaker of Hausa and a native speaker of Malayalam can potentially exchange encryption keys verbally without any problems. But this is excruciatingly difficult to accomplish, viz-á-viz our success to date.

RFC 1751 is very Anglosphere-centric, as implicitly acknowledged by Daniel McDonald in the RFC. For the purposes of exchanging keys with other Internet users, who are predominantly English speaking at least as a second language, with a growing contingent of Chinese natives with less general understanding of English, this RFC is sufficient. But for the purposes of assignment and exchange of public/private key sets with, say, refugees at a refugee encampment, the assumption of English as a spoken language is faulty at best.

Why should people at refugee camps have public cryptographic key sets? There’s plenty of reasons. I should enumerate them. Not now. Later today, perhaps.

Relief technology
Code

Comments (0)

Permalink

MIT OpenCourseWare not so Open

Last night I started checking MIT’s OpenCourseWare. It’s extremely impressive, containing more than 1800 courses, almost all of which appear to be fascinating. It’s a spectacular project and completely the right way to do things. Except for one little issue.

The OpenCourseWare relies on proprietary formats for video and documents, namely Real Video media and Microsoft Word/Excel documents. By electing to use these formats they are creating a dependency on proprietary software, or in the best case free software that has hacked implementations of codecs for these formats - e.g. mplayer and OpenOffice.org; both of which are superb programs, but still.

Honestly though, Word and Excel make sense. They are the most common formats for that kind of document and storing them like that is clearly a clever way to offer maximum coverage. Real Video however…

Real Video has one good feature: It streams well. Everything else some other format does better. Back in 2001 when I was at the HAL conference I was part of the broadcast team; our purpose was to record and broadcast all the lectures onto the Internet. Back then, the Net was slow and faulty and using Real Video made sense although I detested it then for the same reasons as now. Only, nowadays almost everybody has a DSL uplink, and can stream much more comfortable video formats. Not to mention that the Adobe Macromedia Flash plugin, as inherently evil as that is, has become the ubiquitous solution for streaming video, and is far more comfortable than Real Player by several orders of magnitude.

I query the Open Source community:

  1. Why are there no really good open streaming video formats? Ogg Theora is a contender, but it hasn’t made much of an impact.
  2. Why has nobody challenged Adobe/Macromedia on the altar of vector web media? SVG is honestly quite a pathetic attempt at the crown jewels, and <canvas>, as cool as it is, is decades behind.
  3. Why is there no pressure to open source the FLV file format? ffmpeg has great support for it, but as far as I know FLV is proprietary.
  4. What is it with French people and VoIP? (question courtesy of Jói)
  5. Why is webcam and teleconferencing support so crappy? What projects are trying to fix that besides Ekiga and Access Grid/Venue?

Cheers.

Code

Comments (0)

Permalink

The oddest question ever

I got a phonecall from a physicist friend of mine today asking if I knew Fortran. “Uhm, no,” I replied, somewhat astonished. “I’ve never learned that.”

And I haven’t. Most people haven’t. And there’s a good reason for that. In the words of Edsger Dijkstra, “FORTRAN, the infantile disorder, by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use.”

But physicists use it a lot. Why? When I asked once, the answer I got was that Fortran was simply faster than any other language. “No,” I replied pointedly. It just isn’t true.

Fortran compiles down to native code much like C. Which means that fundamentally Fortran follows the same speed restrictions as C. Yes, not all compilers are as good as optimization, but that’s not a real issue.

A more important thing to recognize is Moore’s law and that it doesn’t really matter all that much any more which language you use. Yes, sure, fine, you’ll get your results a bit quicker using C than Java, but for most intents and purposes most languages are equal - although I still prefer using C for anything time-critical than Python, for example, which I use for almost everything else.

The thing about Fortran is it takes an age to make anything in it. The syntax is archaic and unintuitive and the language is stuck with 30 year old computer science concepts, most of which have long been exchanged for something better.

Consider for a moment a typical task for a Physicist: Calculating the value of exp(i*pi/2) and printing it out

Fortran (I wrote this myself after having consulted some examples on the net, it might be slightly wrong or overly complicated):

PROGRAM EXPCOMPLEXPIDIV2 IMPLICIT COMPLEX(X)

         PARAMETER (PI = 3.141592653589793, XI = (0, 1))

         X = EXP(XI * PI / 2)

         IF (AIMAG(X).LT.0) THEN

                  PRINT 2, 'e**(i*pi/2) = ', REAL(X), ' - i', AIMAG(X)
         ELSE
                  PRINT 2, 'e**(i*pi/2) = ', REAL(X), ' + i', AIMAG(X)

         END IF
END

Python equivalent:

from math import *
print "e**(i*pi/2) = %s" % (e**(1j*pi/2))

Let’s consider a more complicated example, solving a system of linear equations, Ax=b. (Copied from Wikibooks; I don’t know Fortran, remember!)

function GaussSparse(NumIter, Tol, b, A, X, ActualIter)
   implicit none

   real GaussSparse

   integer, intent(in) :: NumIter

   real, intent(in) :: Tol

   real, intent(in), dimension(1:) :: b

   real, intent(in), dimension(1:,1:) :: A

   real, intent(inout), dimension(1:) :: X

   integer, optional, intent(out) :: ActualIter

   integer i, n, Iter

   real TolMax, Xk

   n = ubound(b, dim = 1)

   TolMax = 2. * Tol

   Iter = 0   convergence_loop: do while (TolMax >= Tol.AND.Iter < NumIter); Iter = Iter + 1

TolMax = -1.

iteration_loop: do i = 1, n

         Xk = (b(i) - sum(A(i,1:i-1) * X(1:i-1)) - sum(A(i,i+1:n) * X(i+1:n))) / A(i, i)

         TolMax = max((abs(X(i) - Xk)/(1. + abs(Xk))) ** 2, abs(A(i, i) * (X(i) - Xk)), TolMax)

         X(i) = Xk

      enddo iteration_loop

   enddo convergence_loop

if (present(ActualIter)) ActualIter = Iter

   GaussSparse = TolMax

end function GaussSparse

And in Python, here’s the same (alas, not for a sparse matrix):

from numarray import dotdef gauss(A,b):

 n = len(b)

 for i in range(0,n-1):

 	for j in range(i+1,n):

 		if a[j,i] != 0.0:

 			lam = A[j,i]/A[i,i]

 			A[j,i+1:n] = A[j,i+1:n] - lam*A[i,i+1:n]

 			b[j] = b[j] - lam*b[i]

 for i in range(n-1,-1,-1):

 	b[i] = (b[i] - dot(A[i,i+1:n],b[i+1:n]))/A[i,i]

 return b

Nowadays, speed of development is more important than speed of execution because we can almost always just toss more computer at the problem - manpower costs more. This does not mean we can allow ourselves to be sloppy or to use overly heavy algorithms complexity wise, and we must still obey the laws of nature - which enforces bandwidth restrictions and convolution of data transmission functions over time (which we generally simply call lag), but it does mean that the idea that writing Fortran code will save you some time in the long run is simply wrong.

So to physicists (and those three other people who use Fortran) I say:

  1. Learn Python, C++, or some other language that has at least some modern features.
  2. Learn some complexity theory and get a good feeling for algorithm optimization - nowadays I can generally eyeball c.a. the big-O complexity of an algorithm with a fair degree of correctness. You should be able to work it out for yourself with little hassle.
  3. Extra credit: is the Python version of the Gauss function faster or slower than the Fortran version?*

Code
Mathematics

Comments (1)

Permalink