Time Division Multiplexing as a Form of Proportional Representation

May 11th, 2010

The UK is still in the process of working out who will form the next government.  The current state of limbo has caused people to wondering if there is a better process for voting a government.

One computing inspired solution would be to use Time Division Multiplexing as a way of achieving Proportional Representation. 

Let’s imagine that Parliament sits for 200 days per year.  (Actually I imagine it’s well short of that, but no worries!)  Each party would then have Parliamentary time allocated to them in proportion to the percentage of the vote they got.  Therefore, if party A got 40% of the vote, party B got 35% of the vote and party C got 25% of the vote, party A would be able to submit legislation to Parliament for 80 days of the year, party B for 70 days of the year and party C for 50 days of the year.

An important thing would be to keep the repetition cycle fairly short, say 4 weeks or 20 working days.  In that period party A would be able to submit legislation for 8 days, party B for 7 days and party C for 5 days.  By this approach each party would presumably have legislation in the pipeline, and so they couldn’t just block opposition proposals, but instead would have to negotiate with each other to get their legislation through.

The party with the most votes would supply the Prime Minister.

The ‘Benevolent Dictator’ as a model for democracy

April 30th, 2010

It’s election time in the UK once more, and it’s looks like it’s going to be an exercise in choosing the least bad leader rather than choosing the best leader.

But maybe we shouldn’t be surprised by that.  If you’ve ever worked on standards development you’ll know what design by committee is like.  Government has got to be the biggest design by committee going.

Another thing is that the key players in business tend to have had many jobs and therefore much experience.  For those aspiring to be Prime Minister or President this is not an option as they have to work their way up the system.  That’s a problem because it means that if someone like Richard Branson or Gerry Robinson fancied trying to run the country they couldn’t, which means the country is missing out on a lot of talent.

That got me thinking.  In the software world we have the idea of the ‘Benevolent Dictator.’  Could that be used in a democracy to run a country?

Certainly dictators get things done.  The problem is ensuring that they serve the people and not themselves, and keep it democratic.  In other worlds, how do you keep them benevolent.

This is not such an issue in the software world because if a ‘benevolent’ dictator goes bad you can just change your project allegiances, especially if it’s a volunteer based open-source project.  In the case of a country leader you’d have to leave the country, and that’s not so easy.

I believe it could be made to work along the following lines…

When in power the benevolent dictator could do pretty much what they wanted.  That would allow things to get done without having to satisfy a multitude of special interests all the time.

Every year a simple yes/no referendum would be held to ask the population if they are prepared to accept the benevolent dictator carrying on in their post for another year.   This ensures that the performance is regularly reviewed.  If the population is satisfied then the benevolent dictator can effectively carry on forever.

If a change is required, then anybody can stand to become the new benevolent dictator, including the current one.

In this scheme parliament/senate/congress are not involved in debating laws.  But they should be used to discuss laws and it’s up to the benevolent one to address comments raised or not.

The other power parliament/senate/congress would have to force an emergency referendum on whether the benevolent one should be replaced.  Hence they would be charged with seeing that the benevolent one remained benevolent!

Hopefully that way things would actually get done, without getting compromised by lots of self interested parties, and the benevolent one wouldn’t lose track of who [s]he was serving.

(In this scheme, when voting you’d vote for your preferred benevolent one, and also vote for your local Parliamentary Petitioner who would be your local representative in Parliament.)

Does it make sense for Apple to patent gestures?

March 31st, 2010

It looks like Apple is trying to patent gestures for multi-touch interfaces.  Regardless of the merit of such patent applications, I wonder if it is in Apple’s interest to patent these gestures.

If what we’re lead to believe is true, that the future of computer interaction is hands-on-screen multi-touch, then I don’t believe it’s in Apple’s interest to prevent other companies using their gestures.

Basically, if Apple doesn’t let other people use it’s gestures, then others will invent their own gestures.  The result is that there will be two different ways to drive client-side computers; the Apple way, and everybody else’s way.  It would be like having two different types of keyboard; a place our ancestors had been about a century ago!  Basically, people are not very good at having two different ways of doing things.

Let’s say there are two realms of client-side computing that are important; regular PCs and smartphones.

In the case of PCs, most corporates are Windows or possible Linux based.  Therefore as work people will have to use the ‘other way’ of doing gestures.  They’re unlikely to try an Apple if it involves a whole new interface.

The smartphone arena is much more open, but I believe the future is between Apple and Android.  Lots of people who are smartphone users get their phone through their company.  One benefit Android offers is the ability to generate your own corporate apps.  I believe this will ultimately tip the balance in the corporate case towards Android, and then we are back in the same situation as for PCs.

For these reasons I don’t believe it’s in Apple’s interest to patent gestures.  If anything they should set up an industry consortium, perhaps for which they can levy some membership fee, to ensure that gestures are standardised across the industry.

Another Idea for Patent Reform

March 3rd, 2010

Following Apple suing HTC, I’m wondering whether it should be a legal requirement that all patents are licensable on ‘fair and reasonable’ terms.

‘Fair and reasonable’ should take into account the amount of innovation and how much investment the patent took to develop.

Licensors should be able to appeal to a court if they feel terms are not fair and reasonable.

That would seem to create a balance between protecting innovators investments without stifling progress.

Any thought?

Ideas for Patent Reform

January 13th, 2010

It’s common knowledge that the patent system isn’t serving the software industry well.  Here’s some ideas to throu into the mix that might help software patent reform.

Variable Protection Periods

The one-size-fits-all protection offered by patents is not sensible.  A pharmaceutical company that takes five years to develop a product probably deserves 20 years protection, but a software developer who takes a week to develop something probably only deserves a month of protection.

One solution to this might be that when you start investigating something you (confidentially) file a statement of interest with the patent office.  Then when you have a solution you file your patent application.  The protection period you get is then, say, 5 times the period between filing the statement of interest and filing the patent application.  (A statement of interest has no bearing on the priority date.)

No Secondary Licensing

The original inventor should have the right to license a patent without having the intent to ‘manufacture’ it, but it should not be possible for an organisation that does not ‘manufacture’ the patent to buy the patent and license it to other parties.

Lapsing Patents

With trademarks, if someone has filed a trademark in a market segment, but is not using it in that segment, then you can challenge them and the trademark can be revoked.  A similar rule should apply for patents.  If the original inventor doesn’t seek licensees, or license holders don’t ‘manufacture’ the patent for, say, a 1/5 of the protection period then you can challenge the patent as lapsed.

Start-up Protection

Start-ups and small companies are commonly the power house of innovation.  Larger companies can use the patent system to squash new entrants.  It should not be possible for large companies to sue a small company that has a revenue derived from a particular patent of, say, 1/20th of the larger company’s revenue derived from a particular patent.

Naturally a small company may grow to where it would be accountable for license fees, but it gives the smaller companies a grace period to either innovate a solution around the patent, or diversify.

Coding Style : Line Wrapping

October 9th, 2009

One of the things about writing code for other people is that you have to be flexible on coding style. Over the years I’ve mellowed a lot on this, but that doesn’t mean I don’t find some coding styles misguided.

For example, the Java coding style suggests the following formatting:

longName1 = longName2 * (longName3 + longName4 - longName5)
           + 4 * longname6;

whereas I prefer:

longName1 = longName2 * (longName3 + longName4 - longName5) +
           4 * longname6;

because I tend to read code a line at a time, and having the + at the end of the line lets me know there is more to follow; a bit like seeing a comma when reading English.

Put another way, I don’t need to just be able to look at the second line and realise it is part of the first line, because I don’t start reading at the second line, either in a book or in code. (In fact, if I just looked at the second line, the indenting should tell me it is part of the line before.)

When the operator is at the begining of the line I find my brain has terminated parsing on the first line, and then it has to raise an exception to say, actually we’re not done yet!

That said, when there are multiply ORed (||) clauses in an If() statement, then I like the || to go at the beginning of the line, as in:

if((condition1 && condition2)
        || (condition3 && condition4)
        || ! (condition5 && condition6)) {
    doSomethingAboutIt();
}

It marks out the separate sub-clauses to think about more clearly. i.e. unlike the first example which is a cue to say there is more to follow, putting the || at the beginning of the line is a cue to say ‘what follows can be thought about separately from the previous stuff.’

Note that I’ve put some extra space around the NOT operator (!) compared to the example in the Java style guide. I guess my eyesight isn’t so good, but I think it’s important to make sure that little fella isn’t missed, especially when preceded by ||!

Related to this, I wouldn’t do the alternate form suggested in the Java coding style of the above expression:

if ((condition1 && condition2) || (condition3 && condition4)
        ||!(condition5 && condition6)) {
    doSomethingAboutIt();
}

because, presumably, each of the three &&ed sub-clauses has equal merit and should be laid out to reflect that.

Lastly, to finish my morning therapy, I wouldn’t layout the following as:

private static synchronized horkingLongMethodName(int anArg,
        Object anotherArg, String yetAnotherArg,
        Object andStillAnother) {
    ...
}

I’d do:

private static synchronized horkingLongMethodName(
        int anArg,
        Object anotherArg,
        String yetAnotherArg,
        Object andStillAnother) {
    ...
}

as it makes it easier to see each of the arguments.

Hum, I guess I still have a lot more mellowing to do!

ezXSD - Building the foundations

October 2nd, 2009

We’ve drawn pictures and now we’ve written some code.  But at the moment we’re still in that stage where you’ve written a lot of code, but don’t have much to show for it.  It’s like the foundations of a building that goes underground and no body sees, but is none-the-less vital to the stability of the whole project.  So while it would be nice to be adding and editing XML Schema elements, we’re taking our time.  Hopefully careful consideration at this stage will mean we can be add features really easily later on.

Here’s a screen shot of what we have so far:


ezXSD 2009-10-02 Screen Shot

As you can see, it’s quite a different layout to other XML Schema design tools. As we work on the different areas, I’ll come back and explain the rationale behind the different aspects of the layout and design.

Bankers’ Bonuses

September 23rd, 2009

Like many, I’m amazed that bankers are starting to hand themselves bonuses even though the planet is still trying to recover from the disaster they created from their previous bout of bonus fuelled greed.

So what to do?

To me the government capping private sector bonuses seems like a dangerous precedent, so that doesn’t seem like a good option.

In many respects, the problem is not that the bonuses are so big when they get things right, but that there is no downside when they get things wrong.

So what downside could there be?

Market principles would suggest that a failed company should cease trading, but while I agree that Lehman Brothers should have been allowed to failed, what it really demonstrated is that some institutions, including private ones, are too important to fail.

And even though Lehman Brothers failed, the people who were responsible for its failure are probably not suffering that much themselves.  They’ve still got all the vast amount of cash they hoarded while things were going well.  So that doesn’t work either.

So my solution is that it should be made a criminal offence to take actions that destabilise the national economy.  A bit like an act of treason or terrorism.

Under such a law the bankers that caused the financial collapse would be serving a long (10 year+) jail sentence right now.

Hopefully that would make future bankers a bit more careful in future.

Alternative for XML namespaces

August 5th, 2009

A thread was started recently on the xml-dev mailing list about how XML namespaces could be made more palatable to the HTML5 working group.

One thing that was mentioned was DNS, which gave me food for thought.  Here’s a proposal that has a hint of DNS and perhaps a hint of e-mail address resolution.

1) fully qualified names should have the form:

    local_name::namespace

2) A name without a namespace belongs to the namespace of the elements nearest ancestor that does have a namespace.

3) A name can also be specified using a partial namespace, e.g.:

    local_name::partial_namespace

4) Unless a name ends with a . or :, on encountering a (possibly) partial namespace, a search is made to see if an ancestor element has a namespace that starts with that partial namespace.  If one is found, the namespace becomes that of the full namespace.  For example, if an ancestor element has the name:

    myName::proposal.example.com

then a name of:

    anotherName::proposal

is treated as:

    anotherName::proposal.example.com

If ‘proposal’ really is the full namespace, and an ancestor has a namespace of ‘proposal.example.com’ then you can prevent the expansion by doing:

    anotherName::proposal.

Trailing .s and :s are obviously removed when selecting the namespace part.

5) For the purposes of HTML5, the HTML5 namespace can be considered to be in-scope prior to the start of parsing so that documents can start simply as:

    <html ...

By way of example:


<html>
    <head>
        <root::myExtension.example.com>
            <child>
                <html::html>
                    <body>
                        <extra::myExtension/>
                    </body>
                </html::html>
            </child>
        </root::myExtension.example.com>
    </head>
    <body></body>
</html>

- The outer ‘html’, and ‘head’ are part of the HTML5 namespace, which is assumed to be something like ‘html.w3.org’.

- The full name of ‘child’ is ‘child::myExtension.example.com’.

- The ‘html:html’ takes us back to the HTML namespace, and so ‘body’ is part of the HTML namespace.

- ‘extra::myExtension’ is treated as ‘extra::myExtension.example.com’.

I think this is simple and allows brevity without having to remember a lot of syntax.  It puts the burden on the tools rather than on the document authors.

The importance of showering!

July 24th, 2009

I had some inspiration while in the shower…

    Life is like a shower control.  The difference between hot and cold can be very small.  Take time to think how you can make even the smallest improvement.

(I know - don’t give up the day job!)