Friday, January 16, 2015

Learning to pick your fights

If there is one thing I have learned in life...

...it's to learn to pick your fights. I never go into an argument I know I'm going to lose. Concede early and concede graciously.

I used to play the Japanese game of Go a fair bit. When you start playing you want to play to a conclusion and until there are no moves left. Soon you learn that this is not in the spirit of the game. At some point you will realise that you are playing undefendable stones that have no relevance, This shows no respect for yourself or your opponent.  the The mark of a good player is to learn to recognise the outcome early and bow out graciously. Also, to give you opponent the opportunity to do the same, without condescension or malice.

Player 1:"I think the game has gone stale but I think you might take it by a few stones"

to which the correct response is something like

Player 2:"No, you would definitely have won the battle in this corner, my defeat was inevitable by 10 stones."

Two experienced players will know that there is only a five stone advantage to Player 1 but both exit the game with elegance and neither looses face.

So, play for the joy of playing. With experience you will recognise when to concede and when to procede. And if your opponent is more experienced than you, listen carefully to what he says, he might be saving you face and time. And when the joy goes out of the game, end it. There will be other games.

Go appeals to the philosopher in any man and Chess to the merchant in him. - Trevannion (Shibumi)

Sunday, January 11, 2015

Put some fun into politics

Politics isn't much fun is it...

Oh I know we can have a bit of a giggle at the politicians who aren't the sharpest knives in the block and every now and again a belly laugh at on who does something outrageous but there really isn't enough fun being had. We need less dour gloompeddling and and more chaos. I like chaos. Chaos is a state of possibilities. The road to order is just a restriction of those possibilities.

We are in a 4 1/2 month drag to the next general election. It's really difficult to get engaged. There's a new series of I'm a Celebrities Failing in Uninteresting Ways starting every week.  My prediction is that just over two thirds of the people who can vote will. No one will have a clear majority so some deals will be done in order to form a government. The government will not represent the majority of the populace. And all the promises in the manifestos will be forgotten in the first 3 months when the clear intent will be seen too late. They will dick around for 5 years tinkering here and there and things will be a bit better or a bit worse, depending on how you choose to measure it, than when they started. Then we'll do the same thing all over again and we'll wonder why nothing changes.

It's not all doom and gloom though. I think it can be fixed.

Do away with general elections and introduce some random churn instead.

Every week the names of three MPs will be selected at random. We could use something like the lottery machines. 

They will be put on two weeks notice. 

One seat will be decided by the traditional democratic method of a by election as a nod to democracy.

Another will be decided games designed to see who is best at strategy and thinking. I suggest a GCSE maths paper, chess, Brain of Britain, go, World of Warcraft and It's a Knockout. The overall  winner gets the seat. 

The last seat would be decided by a random selection from the constituency. Drawing a salary and not turning up would be an option, just as it is for MPs now.

That should eventually give us a good churn rate and a good mix of skills. The turnover would be the equivalent of new government every 4 years.

Deciding who gets to talk and for how long should be on merit. In order to draw their salary each month MPs would be required to submit forecasts of a bunch of indicators 3 months ahead. Off hand I suggest GDP, borrowing requirement, cost of a trolley of shopping, house price index, Number 10 hospitality bill, A&E average waiting times. To introduce a bit of chaos they would also have lottery tickets and a win would count towards their score. Depending on the aggregate score MPs would be given allocated a time to speak and introduce suggestions for new legislation. The person who did worse would have to wear a pink ballerina outfit for the month and the other MPs would be allowed to refer to him as the honourable poohead. The person who had statistically speaking tracked the trends best over a year would be made prime minister at the end of the year and would be able to wear casual clothes on Tuesdays and Fridays. He would select his cabinet from the 100 next top scorers using the time honoured method of eeny meeny miney mo on parliament green.

House of commons debating could be replaced with the rules of something like Just a Minute. An MP is given a set time, depending on their predictive skill in the areas above to speak on a current affairs topic and in that time everyone listens, in silence. Interruptions not in the rules of hesitation, deviation and repetition would be penalised by having to sit in silence in a dunces cap for 30 minutes. A successful challenge would mean that you got to talk on the same topic. Until everyone got fed up and no one wanted to say anything else. Then there would be a division but instead of ayes and noes each MP would post on facebook what he thought it was about and the one with the most likes would be taken away by the civil servants and drafted into a law.

There would also be set phrases that had to be used in the correct context. These would be changed weekly by randomly selecting phrases posted on social media. I've just done a random scan through a couple of pages my twitter feed (really) here's some we might expect to see:

rabid, non-objective, sensationalist
self-serving buffoons
just blocked the fat tub of lard
voluntary deradicalisation programme

Failure to work in the required phrase means you have to get the next round in in the bar.

There would still have to be a speaker to keep order. I suggest the job is allocated a bit like jury service and instead of order papers to waive the speaker has a supersoaker filled with ink for minor infractions and taser which he can use if things get really out if hand.

The house of lords would be abolished completely. New laws would be posted on twitter and hashtag campaigns would decide which ones were enacted. For every law passed twitter would be allowed to revoke one. Bonus revocations would be awarded every time an MP was caught with their hands in the till.

See, all it takes are some well established gameshow formats, social media and we could put everything right. I'd pay my taxes to watch that.










Thursday, January 8, 2015

Grim Day Yesterday

So here's the thing...
 
Yesterday a whole bunch of people were killed in Paris because of some ink marks on bits of paper. The killers feel justified and righteous because there these ink marks made fun of their beliefs.
 
It seems there is a bunch of people who are happy to live in old testament times. This is the state that IS, Taliban and Boko Haram are promoting on the African and Asian continents and as brutal as they are the time when the European and North American continents could act as world police dealing out justice abroad is well and truly over as witnessed by the results, or lack of them in the catalogue of recent African and Asian exploits. Imposing our values on other countries is not going to work any more unless we are prepared to admit our aim is to wrest sovereignty from them and become an imperial powers again. That time is past. The crusades were 700 years ago and we live in a different world now.
 
So what is to be done if they try to export old testament beliefs to more civilised countries? Go into  full Christian patriot mode and start a holy war? That is what some keyboard warriors would like to see I am sure. My opinion is that we should unleash the full force of the justice system on them. Becoming as brutalised as they are can never be the answer.
 
I have no idea how many 'terrorists' the UK is harbouring. I have seen numbers that say 700. Given that more than half of these are gobby kids who have no intention to take up arms we are left with a few hundred in a population of 64 million.  
 
I don't feel terrorised.
 
So let's take a deep breath, stand back and look at ourselves. Try and stay civilised people. And think for yourselves. Being carried along with the mob is not your only option.
 

Sunday, July 6, 2014

Climate Chaos

The arguments about what the right CO2 concentration and global temperature is are getting a bit dull. And to be honest I have spent far too much time on blogs and reading scientific papers on what looks to me like an entirely nugatory exercise. And I hate to see wasted effort. We know that even with supercomputers and some of the best meteorological minds in the country the weather repeatedly fails to listen to what the Met office tells it to do. And despite rising CO2 in the atmosphere the warming is stubbornly failing to materialise. There are explanations like at a certain concentration all the IR that is s going to be absorbed has been absorbed. And there are  other negative feebacks in place that kick in when something goes wrong. Another way of saying that that should appeal to the Gaia-ists is that Gaia heals herself. Surprisingly though they all seem to be in the interventionist camp. I might blog about why I think that is another time.

Suppose the climate is a set of linked chaotic but bounded systems and the past does not accurately predict the future. The climate record and the statistical models that are used to analyse the data for trends are meaningless. In a truly chaotic system any possible outcome has an equal chance of coming to pass. They must be somewhat bounded however because -10 in July in Surrey has to be an edge case. It is not however impossible. I remember vaguely a science fiction book I read many years ago. It might have been Players of Null A where one of the protagonists suffocated when the outside chance of all the O2 molecules in the air, which are constantly in random movement, moved in the same direction, to the other side of the room.

Most people don't like chaos. It is threatening. So we try to make guesses. Mostly based on prior observation. Some systems are predictable, sunrise and sunset, the movement of the planets and stars for instance for these our guesses are good. Sometimes we just plain get lucky.

Thousands (millions) of man hours and pretty well bottomless funding has come up with a conclusion that there is a 95% certainty there will be 0.3 to 6.4C of global warming in the next 86 years. For all the work that has gone in to deriving these numbers the error bars are massive compared to the observed temperature anomalies.

Do you think it is not a chaotic system? Do you think the outcomes are predictable? Want to prove me wrong?

Here is a challenge for those who presume to tell me what the global temperature anomaly is going to be in about a 100 years to an accuracy of 6C and with a 95% certainty. Take a single land based surface thermometer, one with a good and reliable record, anywhere in the UK or CONUS, I'll let you choose. Look at the raw data record or any adjusted data you want to use and tell me what the temperature on that thermometer will be tomorrow and each day at any given time for the next two weeks to within +/-0.5C. That's a pretty big target to hit from a short distance. I've eliminated the necessity gridding and infilling because that is a fairly contentious issue. We are talking about a single location, although you can use any statistical jiggery pokery that you think it helps your data accuracy. You can use any other data inputs you want including GCMs and satellite data, solar activity.  You have a simple series of ~200 years worth of data points. You can manipulate it however you fancy.  Just give me 14 temperatures. I don't even want to see your workings. It should be easy.

Let's make it interesting. For the first person that gives me 14 numbers only, I'll buy you a pint of Timothy Taylors Landlord for every day you hit the mark within the given range.

And yes, I know the difference between weather and climate. Climate is weather averaged over time and area. But I want keep things easy by specifying over small area and a very short time. That keeps the variables down, right?

Saturday, June 14, 2014

On Labels, Parties and Isms

People like labels it gathers allows groups of similar beliefs to group together and it allows other groups who have different beliefs to focus their hate easier. So we have isms that tell us what we are and how we should think if we want to stay in the club. Convienient. More recently we have gone into acronyms which amuse me a lot. I have to search on what they mean because there are so many of them and they are so specific we are almost at the point of being able to have one each*. I've never got on with the idea of this kind of tribalism. After 2 visits to the Cubs 50 years ago it was suggested that it was not for me. I guess I don't play well with others.

This puts me in a good position to observe. Dogmatism is hilarious. You should all try standing outside looking in one day. Shed the beliefs imposed on you by others and think. It is very liberating. It might mean that you can't call on higher authority to support your beliefs and you have to defend them yourself, but it will do you good.

I'm not trying to say that coming together for a common cause is not a good thing. I belong to the Knife Axe and Tomahawk Throwing Association. And the Surrey and Sussex Coppice Group. As soon as either of them tell me what to think I will be an ex-member.

I'm not sure what label you would like to stick on me... I choose not to label myself.

Maybe I do have an ism - individualism.




*We only need 7 letters to service all of the 7,000,000,000 or so people on the planet. Let's call it 10 because working in X, Z and J into your acronym is a bit tricky. Get in quick and register yours here. I'm sorry, SPAZ, MONG and CUNT are already taken.

Sunday, March 23, 2014

Python - the good the bad and the fugly

Background

I'm a fairly seasoned programmer. I cut my teeth on Algol 69, Oric Basic, Sinclair Basic, BBC Basic, Hand assembled 6502 code, MASM, QuickBasic C, C++ and Pascal so I think I know a good programming language when I see one.

Microsoft's .net languages are fairly well thought through but are far more complex than they need to be. I've reviewed a lot of code and had WTF moments where the programmer seems to have been more concerned with obfuscation of his intent than actually making something work.

And now I have come to Python. I've looked at it a couple of times as a quick and dirty scripting language to get things done. My initial reaction was that it was a total balls-up of a language but now I have my raspberry pi looking at it a little closer and I'm starting to find some redeeming features.

Libraries

First plus point is the libraries. They are mainly stable and and pretty useful and seem to work across platforms. They are pretty comprehensive and you can get things done with very little code. This weekend I wanted to get a website into a string variable so I could pick it apart. The following three lines did the trick:

#get a web page in Python
import urllib2
response=urllib2.urlopen(webaddress)
html=response.read()

Easy-peasy but urlopen? What happened to verb-noun naming? I had a cursory glance at some online documentation and and automatically translated it to openurl in my head. If I'd have been the code reviewer I'd have sent that back.

The pygame library for android does on implement mixer to play sound files and the mixer in the android library doesn't want to work. I need to try some tinkering which may well involve digging in to the library source.

I have only just got started with the TKinter GUI library, I've managed to put a label and a button on a screen and trap the button event. I feel like I'd achieved something getting that far.  I'm reserving judgement.

IDEs

The IDEs are not bad. On ubuntu I am using Stani's Python Editor (SPE) which allows running a debugging in in the IDE so it's a bit more than just an editor. I'd quite like to use eclipse but it is overweight and a bit picky about whether it wants to run the Python add-in or not on my setup.

I haven't got around to trying Stani's on Windows yet but most of what I do with Python is on Linux. I have IDLE, which I don't like as much.

On my Samsung Note 2 I have QPython which has an editor and interpretor. Coding on it is not bad using my little bluetooth keyboard.

Pretty code

Python forces you to use indents to mark blocks. On the upside this means that your code has to look nice. On the other hand, for me, it is less than intuitive. I have worked with either text block markers or curly braces. It's going to take me a little while to get used to indents.

The other side effect, whether intended or not is, is that, because indenting is  a pain it does make you more inclined to break up your code.

And there are rules about mixing spaces and tabs.  As you can't see them on the screen, tracking them down is a bit of a mission.

Lightweight

The interpreter is very small. Good when you are looking at the raspberry pi or a phone. And, while some libraries come as standard, most can be added as needed. 

Target Audience

If the target audience is script kiddies who can quickly knock out a few lines to get things done, it's fine. It's a bit more intuitive than Bash or Powershell I suppose.

If it is for learners I'd have hoped for better support. The base documentation is pretty well limited to documenting the primitives. A bit like someone learning C a copy of Kernighan and Ritchie. It's fine if you have a background in coding but it is a bit daunting. Luckily there is a community out there to working stuff out.




Sunday, February 16, 2014

Weather

Here's a thing...

Julia Slingo from the Met Office says global warming will make extreme weather more likely in the future.

David Cameron says money is no object.

My suggestion is the government give everybody whose house is uninhabitable a million and a half quid (or whatever it costs to get an equivalent property and furnish it) or so to move to higher ground. There are plenty of brownfield sites that can be developed. I see them as I travel up the East Cost Mainline.

Generate the money by cutting the budget for the EA and the Met Office.

Surely, long-term that is a more effective and cheaper solution than shoring-up.

Anyone who doesn't want to move can stay where they are. They still get the cash but they need to use it to make provision to bale themselves out when it floods.

The problem is, I don't believe either Julia Slingo or David Cameron. And deep down neither do they.