Archive for August, 2014

Science and Art

August 29, 2014 Leave a comment

My loyal readers might have noticed that I haven’t written a blog post for a while despite the abundance of source material I could have used. There is a simple explanation for this: I am working on too many other projects just at the moment and have tended to spend time on those instead. Contrary to what you might think I do spend a reasonable amount of time researching, writing, and revising each blog post and they’re not just tossed together in 5 minutes!

Most of what I am working on currently are programming projects which all seem to have become critical at the same time. But that doesn’t really worry me because (and I’m sorry if this sounds really geeky) programming is fun. It’s one of those rare creative activities which results in something which is actually useful (well, at least in most cases).

When I create a new system (and my current projects all involve web-based databases and apps written using PHP and MySQL) I like to create something which is easier to use, more reliable, faster, and just generally more elegant than the alternatives. There are some pretty impressive web-based systems out there now but there is a much greater number of truly terrible ones, so in general I just hope to raise the average a bit.

It’s quite amusing using another person’s web system and noticing all the design and functional errors they have made and smugly thinking “amateurs! my projects never suffer from that problem!” Of course, I shouldn’t be too smart because every system has its faults.

As I have said in the past, programming is a great combination of art and science, or at least it should be because both are required to get the best outcome. The art component doesn’t just involve superficial factors like graphics and typography, it is deeper than that and requires creation of a friendly, logical, and flexible user interaction. The science component should be obvious: programs must be technically correct, perform calculations accurately, but also more subtly be fault tolerant, easy to enhance, and interact with other systems properly.

All of this is not easy to achieve and I have made plenty of mistakes myself, so it is even better when something does magically come together in a positive way. And that description is significant because the way I work a project is an evolving, organic thing which often changes form and function as it progresses. I always have a plan, diagrams for the database structure, flow diagrams for the general functional flow of the program, and technical notes on how certain functions should be performed before I start coding, but by the time the project is finished all of these have changed.

And I am often asked to write technical documentation while I am creating a new system but that is useless because I change the details so often that it’s better just to write that documentation when the project is complete.

When I look back at old projects I am sometimes amused at the naive techniques I used “back in the day” but more often I am quite amazed at some of the awesome, complex code and clever techniques I have used. It’s not usually that I set out to write really clever, complex code, it’s more that as more functions and features evolved the code became more and more impressive. But it is too easy in that situation to let things become convoluted and clumsy. In that case I toss that section out and start again. Sometimes my systems take a little bit longer to complete but they always work properly!

And that brings me to my last design philosophy. I don’t re-use a lot of code, I rarely recycle libraries and classes, and I definitely avoid using other people’s code. Also I don’t use rapid prototyping tools and I don’t use graphical tools to create markup code like HTML. No, it’s all done “on the bare metal”.

In fact that’s not really true, or course. I was recently tidying up some shelves in my office and found some old machine code programs I wrote back on the 80s. Now that was really coding on the bare metal! Multiplying two numbers together was a big job in that environment (the 6502 had no multiply instruction) so PHP and hand-coded HTML are pure luxury compared with that!

Well that’s enough talking about it, it’s time to get back to doing it. I’ve got a nasty bit of database backup code to debug right now. Some sort of privileges error I think, time for some science and not so much art.

A Train Wreck

August 20, 2014 Leave a comment

I’ve often admired the skills of the New Zealand prime minister as a politician even though I rarely agree with his politics. But I’m now beginning to wonder whether his apparent skill has just been because he has never been put under any real pressure before, because in a recent interview on Radio New Zealand with Guyon Espiner he sounded pathetic. I think Labour’s Grant Robertson said it best when he described the interview was a “train wreck”.

I’ve often heard interviews with Key before and I’ve been frustrated with the dishonest way he avoided questions, changed the subject, and simply repeated meaningless slogans (no doubt created by one of his spin doctors). But this interview was different. Espiner didn’t let him away with his usual tricks. Here’s the interesting part of the interview…

JK: At the end of the day we’re 5 weeks out from an election. People can see that Nicky Hager’s made a whole lot of things up in this book. They can see that he can’t back a lot of them up.
GE: Well, I’m talking about one that can be backed up, you’re not going to get away with that… because, this is one that can be backed up, because the justice minister of New Zealand has conceded publicly that she did pass on the name of a public servant that resulted in him getting some pretty severe death threats, and you think that’s OK?
JK: and people can see…
GE: Is it OK?
JK: and people can see…
GE: Yes or no? Is it OK?
JK: and people can see…
GE: Is it OK?
JK: and people can see that this is a smear campaign by Nicky Hager….
GE: I’m not asking you for a critique about Nicky Hager’s motivations, I’m asking you about something that is publicly in the arena. Judith Collins has said “I passed on the name of this public servant.”
JK: so I don’t know all the details behind all of that, but what I do know is that this is a series of selected pieces of information, many of which cannot be backed up…
GE: That’s John Key…

Yes, that’s John Key all right. For a start that rather silly phrase “at the end of the day”. What does that mean? It’s nonsense, but it’s something the PM uses a lot. Maybe his propaganda experts think it makes him sound more decisive or something.

Then there’s the claim that a lot of people can see Hager has made things up. But can they? I don’t know of any good evidence that he made anything up. You might disagree with how he reached some of his conclusions, but they were all based on real facts.

Then there’s the repeated attempt to turn the whole issue into a conspiracy with the suggestion it is a smear campaign by Hager. He can’t answer the real question because he never answers questions, he just repeats meaningless phrases that he has most likely practiced with his advisers before the interview. (for comments on how he used this technique to destroy John Campbell see my blog post “A Study in Media Training” from 2013-08-20)

Finally there’s the feeble attempt at avoiding responsibility – because that is totally his party’s cynical strategy – when he says: “I don’t know all the details behind all of that”. Yeah, sure you don’t. Maybe the propagandists don’t have a canned answer for that one so the trusty old “I forgot” or “don’t know the details” defence kicks in instead!

It was a rather disrespectful way to treat the prime minister I know, but did he really deserve any respect for repeating that same meaningless nonsense about “people can see”? In fact has he really deserved any of the respect he has been given recently? Maybe if interviewers had held him to account like they should have done we might all have heard more meaningful political discussions here in the past.

I’ve seen a lot of very critical material in the news media about Key recently. Maybe people are finally waking up to how they have been fooled by him for the last 6 years. Maybe they won’t be fooled any more and will vote him and his despicable bunch of cronies out at the upcoming election. At least now, thanks to people like Hager and Espiner who dared to stand up to him, we have some hope.

No Justice

August 15, 2014 1 comment

We often call our system of law the “justice system” but I specifically avoid using that description because justice often seems to have very little to do with the actual practice of law.

I know that the word “justice” can mean a system used to administer the law but the more common meaning, and the one most people first think of, involves words like these synonyms: fairness, justness, fair play, fair-mindedness, equity, evenhandedness, impartiality, objectivity, neutrality, disinterestedness, honesty, righteousness, morals, and morality.

So what is all of this leading to? Well obviously I have discovered another situation where our system of laws isn’t fair, and the reason it isn’t fair seems to relate mainly to politics.

I recently heard an interview with an associate professor of law who compared the exercise of the law in relation to tax evasion and welfare fraud. Both of these transgressions (or crimes, or misdeeds, or whatever else you want to call them) are purely financial in nature, there are no direct victims (although the government or taxpayer could be seen as a victim), and they produce the same outcome: less money available for government spending.

Before I go any further I should say that tax evasion is the illegal failure to pay taxes and this should not be confused with tax avoidance which is avoiding paying tax through legal means. But I think in many cases avoidance, even though it is legal, is worse than evasion. Huge corporations paying almost no tax is pretty morally reprehensible in my opinion, even if it isn’t technically illegal.

But to continue with the main point, let’s look at the size of the problem. In New Zealand the government loses about a billion dollars from tax evasion every year, and the estimate of hidden activities is over 5 billion. So how much is lost to benefit fraud? That would be 20 to 30 million. That seems fairly trivial in comparison.

The tax problem is over a hundred times worse than the benefit one so you would expect efforts at control, prosecutions, and penalties to be correspondingly high. But no, 700 welfare benefit cheats are prosecuted each year, compared with 50 tax evaders. And even though the average value of a tax fraud case is $287,000 only 20% go to prison compared with welfare fraud, where the most serious case involved $67,000 but where there was a 60% chance of prison as a penalty.

To make matters worse restitution for tax fraud in 176 cases showed just 18 repaid in full and 13 partly paid, but in the case of welfare fraud, practically every case was fully pursued.

Remember that most people are on welfare just to survive and many might be forced into bending the rules just to try to give their family a slightly better life, but in the case of most tax fraud just plain greed is the motivating factor.

It seems like a simple case of one law for the rich and another for the poor but there are some extenuating circumstances. The government has put a bit more effort into stopping tax evasion, but even then it is not as much extra effort as they have put into stopping benefit fraud. I think it is fair that Inland Revenue should try to help possible offenders to correct and repay their debts but why not offer the same flexibility to those guilty of benefit fraud?

There is a simple explanation here. Our right-wing governments and their supporters like to be seen as being tough on benefit fraud even though it hardly even matters in the big picture. And those same people are often sympathetic to those who avoid paying tax even when their actions are illegal. And yes, these are the same people who want to get “tough on crime”. Right-wing nutters aren’t exactly known for their tolerance or their consistency I guess!

But whatever the motivations for this inconsistency I think one conclusion is obvious: we really don’t have a justice system, just a legal system designed to be anything but fair. There really is no justice.

Two Wongs

August 13, 2014 Leave a comment

It really is the silly season here in New Zealand. The election is fast approaching and the political maneuvering gets more entertaining every day. Just today well known investigative journalist Nicky Hager released a book which describes a complex conspiracy between the National government and crazy right-wing blogger Cameron Slater. But that little gem will have to wait for a future blog entry after I have evaluated the credibility of the book better (note that I’m not saying it isn’t credible, just that no one really knows this soon after it was published).

In this post I want to quickly comment on another little piece of political theatre, the “joke” by Winston Peters that ” Two Wongs Dont Make a Wight”. It was made in the context of how both the current National and the previous Labour governments had allowed too much (according to Peters and many others) New Zealand land to be sold to foreigners. The issue has arisen after a Chinese company (hence the “Wong” joke) indicated interest in buying a large New Zealand farm.

Of course many people have been outraged and claimed the joke was racist and that it shows a deeper level of intolerance to foreigners, especially Chinese, by Peters and his followers. But how true is this claim?

Well only Peters really knows, I guess. There are a number of levels this can be evaluated on. First, does it indicate a deep seated xenophobia? If it does then that is bad. But maybe it indicates a cynical manipulation of public opinion and a way to gain extra publicity. If it does then that is really just politics and it isn’t so bad. Or maybe Peters actually has a point. In that case it’s good!

So does he have a point? I think he does. I fully understand that some foreign investment does benefit the country and that every change in ownership or management of any asset will bring both good and bad outcomes, but I think we should be deeply suspicious of any company from any other country (certainly not just China) which wants to invest here.

Why would a company want to invest here? Clearly the most likely reason is that they think they can make more money. That means money which might have stayed here will go back to the home country of the owner instead. This is good for New Zealand how exactly?

Another possible reason for investment is that our labour laws, or business environment in general, is attractive. Again, I have to ask who does that benefit: the big multinational or the average New Zealander?

And a final possibility is that the foreign company just wants to help us out and improve all our lives. But, of course, I’m just joking, because that never happens in business. Most business people would say that attitude is dangerous because the company’s return to investors is all that they should be considering.

A spokesperson for the Chinese community here was (unsurprisingly) very dismissive of Peters saying that many Chinese people already live here and make a big contribution. I totally agree and I think Peters would too. But it’s not the people who make the commitment to live here and run a business that we should be worried about, it’s those who see investing here as simply a way to make more money from a distance.

So what about that joke then? Well it really isn’t all that funny, but I think people who get all offended are being rather petty, and it certainly has brought more attention to the issue than a simple, boring political speech would have. Unfortunately making a claim of racism is an all too common way just to shut the discussion down too.

But people have a choice because it’s fairly clear which way different parties view this controversy. Whether he’s Wight or Wong, good old Winnie has at least made this a real election issue.

An Abomination

August 5, 2014 Leave a comment

Whatever you think of the democratic process there is no doubt that it produces a lot of entertainment, especially as an election approaches. The upcoming election here in New Zealand is already creating a lot of entertainment, especially from the more extreme parties involved. And who could be more extreme than the Act (libertarian) Party?

I find libertarianism very frustrating because I totally agree with many parts of its ideology from a philosophical perspective. But that is the problem: it is just an ideology and has none of the moderation which we would get from a more practical perspective.

The pursuit of ultimate freedom for individuals is always extended to companies and institutions as well which would inevitably result in the complete opposite of what is claimed is the bigger aim.

And no matter how many times the claims of libertarianism are shown to be false, or at least highly questionable, they still carry on as if nothing had happened. For example, they still think the trickle down theory actually works, they think greed is good, they think private enterprise is always the best solution, they think competition is always better than cooperation.

So no matter how appealing libertarian policies seem they are dangerous because most libertarians are fanatics with very little grounding in reality. And, of course, Act Party leader, Jamie Whyte, is the greatest fanatic of them all (at least in current New Zealand politics).

I listened to an interview with Whyte recently where his fanaticism soon became obvious. Here are a few of the points he made on the issue of race-based laws, and my counter-points to them…

Whyte thinks that there are laws in New Zealand which are intrinsically racist and give Maori (the original inhabitants of New Zealand) special privileges. These include the option of voting in a conventional or a special Maori seat, and special rights of consultation in management of natural resources.

Of course, he is right – those types of laws do exist – and in a perfect world we would prefer not to have them because they are racist. But the real world doesn’t work like libertarians imagine it does, and it is not as clear and simple as it is in Whyte’s philosophical musings (before entering politics he was a philosopher).

So why make a big point out of this issue just before an election? For most parties I would suggest political posturing and that could easily be the case here too, but I think it is possibly much worse than that because Act genuinely encompass this sort of pure ideology into their practical policies.

I do have to say that the reactions to these comments haven’t exactly been full of robust and rational logic either. Various Maori leaders have said Act’s ideas have no place in New Zealand politics (why not? aren’t they worth discussing in a reasonable way?), and that it is now election time so the old racist policies always appear (isn’t that the best time to get the most attention?), and he should be ashamed of himself (why? he’s just making a not unreasonable point about existing laws).

So there are a lot of silly nonsense on both sides and both sides sometimes take the discussion to ridiculous extremes. Whyte claims the race-based laws we have are an “abomination”. For a philosopher and someone who usually tries to look very rational that is a very emotive term. The definition of abomination includes: “a thing that causes disgust or hatred”, and synonyms include “atrocity, disgrace, horror, obscenity, outrage, evil, crime, monstrosity, anathema, bane.”

Honestly, is it really that bad?