Apr 252013
 

Normally when I want to do something other than the “standard” thing with logging, I replace whatever came with the server with syslog-ng, but I’ve just had an urgent need to do something with rsyslog. Specifically exclude any messages with reference to a certain card that was generating “corrected” errors at a vast frequency … enough that my /var filesystem was filling up regularly.

Turns out to be surprisingly easy, if you figure out how to get rsyslogd to read the updated configuration.

First the rule :-

:msg, contains, "pcieport 0000:00:09.0" ~

This more or less translates as look for the string “pcieport …” in the complete message sent to syslog and if it appears then discard.

It turns out (quite sensibly) that this needs to appear before any rule sending messages off to a file to get stored for later. And of course the configuration file to edit was /etc/rsyslog.conf.

Before blindly restarting, it’s quite nice to have something that will check the syntax of what you’ve just written to make sure it is valid. Nobody gets this stuff right first time! Turns out there’s a simple way :-

# rsyslogd -f /etc/rsyslog.conf -N 1

Once that stopped giving an error, I needed to get the running daemon to accept configuration changes. It seems that whilst it accepts SIGHUP, it perhaps does not re-read the configuration file so a full restart is necessary :-

# /etc/init.d/rsyslog restart
Apr 162013
 

In recently announced plans, it appears that the government is going to change the primary school curriculum to include (amongst other things) teaching the times tables up to 12. Now I’m not sure about the other plans, but the insistence on the 12 times table sounds a little to me like an old-school Tory frothing at the mouth declaring that if they had to learn the 12 times table then everyone else should do as well.

Why did we learn the 12 times table? Yes, me too! Who knows, but it may have something to do with 12 inches to the foot. Which of course is totally irrelevant these days given we have sensible decimal based units.

There are those who say that the bigger the times table you learn, the more useful it is. True enough, but once you get past the 10 times table, the incremental value diminishes. And there’s one thing that people forget: Learning the times table is just about the most tedious learning it is possible to do and each extra increment to the size of the times table we teach children should have a damn big incremental value.

Or to put in other words, the larger you make the times table, the more children get turned off maths. Is it worth turning children off maths for those extra 2 numbers 11 and 12? Far better to avoid putting off those children and just teach the 10 times table. If you know that, and a few tricks, then any multiplication is possible.

And frankly a lot of simple arithmetic tricks can be sold as “cheats” which is undoubtedly a nifty way of getting children to have fun whilst learning maths.

 

 

 

Apr 132013
 

So Maggie Thatcher has died. And people are acting somewhat surprised that there is so much polarity in the reaction to her death – well, this is hardly a surprise given just how divisive she was in life. Or perhaps more accurately, how divisive she was in power. It is true that the anti-Thatcher reaction to her death is kind of tasteless – dancing on her grave is not exactly the best of behaviour.

But it is also kind of understandable. The first reactions to Thatcher’s death were from the pro-Thatcher brigade who loudly trumpeted just how good Thatcher was for Britain. The anti-Thatcher mob understandably reacted negatively to all of the positive things that were said about Thatcher in the first few hours.

What might come as a surprise to people who weren’t around in Britain during Thatcher’s reign (1979-1990) is that whilst Thatcher may well have been the most popular British Prime Minister of the modern era, she was also by far the most hated Prime Minister of the modern era. Because if you have to sum up Thatcher’s career in just one short phrase, it would have to be that she was probably the most divisive Prime Minister Britain has ever had.

If she were still around, she would quite happily admit to not being interested in consensus and to having the ambition of thrusting her beliefs and policies down everyone’s throat. She believed that she was right and that everyone else who disagreed with her was wrong. There are those who would say this is the essential ingredient to “leadership”, but it is actually only half of what makes a great leader; and it’s the dangerous half at that.

Listening to the opposition – and the louder they are, the harder you should listen – isn’t caving in to their demands, but simply listening. They might have something interesting to say.

For example, take Thatcher’s Poll Tax. Thatcher’s intention was that everyone should have to pay something towards the cost of local government in a way that illustrate just how expensive different councils were, and wanted to do so by everyone paying the same (students and the unemployed would only pay 20%). The opposition to the Poll Tax wasn’t based because of this policy, but the way that it was implemented. It could have been possible to implement Thatcher’s policy in a way that would not have caused the level of opposition that we saw :-

Those opposed to the Poll Tax were more opposed to the regressive nature of the tax, than the idea of a simplified means of paying for local government that would make it clearer how much local government was costing. As an example, a local income tax clearly marked in your payslip (“Local council: £37.95 – 1.5% compared with the national average of 1.2%) would quite possibly been much more widely accepted. Of course the Poll Tax was incredibly popular with the rich (as they would pay much less), but unfortunately for Thatcher, there really aren’t that many of them.

To set the context of Thatcher’s government, we have to remember that Britain in the 1970s was in poor shape with an industrial base reliant on old heavy industry, a former empire that was no longer buying British goods by default, paying much higher prices for oil, and of course an unnaturally militant bunch of unions :-

Of course the unions were to blame for everything bad that happened in the 1970s – OPEC rising oil prices, the hot weather in 1976, the civil war in Lebanon, Pinochet’s cout d’etat in Chile. That’s not to say that they couldn’t do with a little cutting down to size, but they probably sounded more radical than they actually were. Having been a member of a union, I can tell you that those who climb up the union hierarchy are those who are interested in the work involved whereas the majority of the members are less politically motivated; the 1970s union leaders may well have had a portrait of Uncle Joe that they regularly worshipped to, but the members didn’t.

There’s truth in the idea that the big heavy industry of the 1970s needed to become more efficient and less labour intensive; there’s also a grain of truth in the union’s claims that a great of rationalisation was more about making money for the company owners than gains in efficiency.

Thatcher’s union reforms – criminalising closed shop agreements, insisting on secret ballots, and preventing secondary strikes – all sound quite reasonable from the perspective of distance, but at the time it was clear that Thatcher was at war with the unions, which to many union members felt like the ruling classes were at war with them. And there was a belief that the long-running and exceptionally bitter Miner’s Strike of 1984 was little more than Thatcher’s revenge for the miners strike of 1974 which humiliated Heath :-

Apart from her attacks on the unions, she seemingly went about favouring the rich over the workers in other ways too. Her “big idea” in economic management was to switch priorities away from employment to reducing inflation. This was arguably a sensible change in priority, but then she also went ahead and raised VAT from 15% to 17.5% in pursuit of her obsession with switching to indirect taxes, which in turn immediately raised inflation. This of course made it necessary to pursue monetary policies much more harshly to try and control inflation, which had a much greater effect on unemployment than would otherwise be the case.

This in turn caused welfare spending to surge making it necessary to much more harshly cut public spending in other areas.

Which of course was compatible with her “no such thing as society” – not the speech itself which was a rant about people feeling entitled to assistance (a theme which is repeating itself), but the whole tone of her policies. Thatcher may not have been a disciple of that poisonous Nihilist Ayn Rand, but the only way to tell the difference was that you could find Thatcher in a church. Thatcher was all in favour of the “self-made man” which all too often turned out to be a loud-mouthed business-sociopath of the kind that inspired Harry Enfield’s loadsamoney character.

There’s a lot of truth in the at first rather bizarre claim that Thatcher was behind the current banking crisis – her deregulation of the banking industry kick started the whole big gambling side of banking and encouraged a whole generation of bankers to gamble bigger and bigger. Those that learned the wrong things in the 1980s were the ones at the top of the banking industry during the 1990s and 2000s when the mistakes that led to the collapse of banking were prevalent.

In terms of housing, her policies were rather bizarre. Her policy of selling off council houses at knock down prices was (for her) a way of bribing the electorate into voting for her. The effect on the people who bought their own council houses was positive, but Thatcher’s insistence that councils be prohibited from using the proceeds to build more social housing is rather extraordinary. Not only would it stop further generations from buying their own council houses, but it was almost guaranteed to result in a housing-bubble with house prices escalating out of control.

It’s probable that Glenda Jackson said it a whole lot better than me :-


 

Apr 032013
 

Scanning paper documents is such a tedious task that I tend to lose concentration when doing it. And as a result I recently ended up with two PDF documents needing post-processing. In the worst case, the PDF consisted of three pages – one in the correct orientation, and two rotated 180°!

As usual, there’s a Unix command to help out with that – pdftk. Specifically :-

pdftk \
  input-file.pdf \
  cat 1 2-endS \
  output out.pdf

The interesting operation is contained within the cat 1 2-endS which translates as copy the input page 1 to the output unaltered, and copy the remaining pages rotated 180° (or “S”) to the output. This is of course only the tiniest fraction of what this tool can do.
 

Mar 302013
 

In something I first heard about in the Daily Mail, so there was an instant credibility gap, it seems that Lord Carey has been blathering on about how Christians feel like a persecuted minority, and that the government is discriminating  against them.

Which is of course complete rancid rhino bile.

And any christian who feels persecuted against needs to take a good hard look at things.

According to the 2011 census, 59% of the UK population claimed to be christian. Given that 59% is more than 41%, I’d say that any christian who feels that they are a minority probably needs to take their socks off to count above 10. It is the rest of us – humanists, secularists, muslims, buddists, hindus, atheists, agnostics – who have the right to claim to be a minority. Given that 2001 (72% christian) was the first time the question was asked, it is hard to make historical observations regarding levels of christianity in the UK. Christians would of course say that we have been historically a christian society where everyone was a christian; others would say those who weren’t christian were under a great deal of pressure to pretend.

There are occasions when we get forced to sit through some sort of christian ceremony, although it was more common in the past than today. And it can be quite creepy listening to you guys speaking to your imaginary friend (or is it friends?).

Nothing to do with what goes on inside your churches of course, but christian ceremonies in public life can be excluding to those who are not christian. Take for example, the infamous council meetings where pre-meeting prayers are no longer permitted. Or rather praying out loud as part of the meeting is no longer permitted. If such prayers are part of a council meeting, they are effectively an unconscious expression of the kind of people who should take part in the meetings – that is practising christians. Or in other words, you are saying that the real minorities – atheists, muslims, etc. are not welcome.

Not that a period of silent contemplation at the start of a council meeting is a bad idea – indeed, it is probably a very good idea. And nobody is saying that you cannot talk with your imaginary friend(s) in the silence of your mind.

Carey specifically mentions the legalisation of gay marriage as one of the symptoms of “aggressive secularisation” within the government. Actually legalising gay marriage is simply doing the right thing; there is nothing in the legislation that forces anyone to get married to someone not of their choice! So it is merely allowing those who choose to, to get married to the person of their choice.

What christians who oppose gay marriage are complaining about, is that they are no longer allowed to impose their views of what marriage should be onto those who believe differently.

In other words christians are complaining about not being allowed to persecute others.

If christians still feel they are being persecuted in the UK, perhaps they should look at some of the real examples of christians being persecuted around the world (see http://en.wikipedia.org/wiki/Persecution_of_Christians). Any kind of inspection of what happens around the world will make any decent person claiming that UK christians are being persecuted thoroughly ashamed. Whatever the rights or wrongs of the case (and frankly in the case of the BA employee, both sides could do with being told to just grow up), being unable to wear a cross in jewellery form at work hardly compares to being stoned to death.