Sep 082016
 

Freedom of information requests are a pretty cool feature of law that forces public bodies to disclose information on request if it is appropriate to do so. However it effectively only applies to public bodies which effectively excludes most charities and private companies.

Why?

The purpose of the FOI law is to catch out public bodies that are up to some sort of shenanigans – spending public money on first class junkets to Hawaii (or Italy if you’re on the American continent), diverting funds intended for hospital beds to some less worthy purpose, losing nuclear submarines, and all sorts of other nefarious activities that idiots with inadequate supervision can get up to.

This is all very well … indeed very useful, because the public should be able to obtain details from public bodies about what they get up to.

But what about other organisations?

In theory, private companies are supervised by the board, which in turn is supervised by the shareholders. In practice, shareholders are unlikely to be interested in the day to day operation of a company until that company starts losing money. So what happens when a company is up to something nasty, but is still making profits? Well there is always the hope that hard investigative journalism will expose the scandal.

Or you could change the law and make freedom of information requests apply to all organisations.

Because journalists can use FOI requests to delve into the secrets of public organisations to get an easy story, we are in danger of getting a skewed picture of the relative merits of public organisations versus private organisations. If scandals within the public sector are easy to expose, and scandals within the private sector are hard to expose, we will get more stories about scandals in the public sector.

Which may lead the naïve to believe that the public sector is more prone to nefarious behaviour than the private sector.

So in a way FOI requests applying to only the public sector is another way of demonising the public sector.

But ultimately the question is: do charities and private companies sometimes get up to activities that it is in the public interest to know? If the answer is yes, then of course FOI requests should apply to them.

stack-of-coins-p1

 

Sep 012016
 

Although I use graphical on-screen calculators for many calculations, it can sometimes be convenient to perform calculations at the command-line (or in shell scripts). In which case the old tool is expr :-

» expr 3 \* 9 
27

Very convenient; even though I can do such a calculation in my head there are circumstances where checking with a calculator is suitably cautious. You can of course perform calculations directly in the shell; if you are using a modern shell such as zsh or bash :-

» echo $((3 * 9))
27

Whilst convenient, such methods do have their disadvantages :-

  • The expr tool takes it’s expression after the shell has had it’s way with interpreting it – which is why I have escaped the “*” to multiply. You cannot put quotes around the expression either as expr assumes it to be a string.
  • These calculations are integer calculations, so you cannot find out what 77/4 is (19.25). Oops! Turns out that if you make one of the numbers in the expression a float, then the result is properly calculated: echo $((77.0/4) -> 19.25.
  • These calculators are limited to relatively small numbers – according to zsh, 2^63 is -9223372036854775808

If you need something a little more sophisticated then qalc (this is the command-line interface for Qalculate!) makes a pretty good command line calculator. It has to be installed with sudo apt-get install qalc and once installed it should be run interactively to get the initial configuration out of the way :-

» qalc
You need the download exchange rates to be able to convert between different currencies.
You can later get current exchange rates with the "exchange rates" command.
Do you want to fetch exchange rates now from the Internet (default yes)? yes
> quit

Once installed you can perform calculations in the same way as expr (although you can enclose an expression in quotes) :-

» qalc "3 * 9"
3 * 9 = 27
» qalc "2 ^ 72"
2^72 = approx. 4.7223665E21
» qalc "0xff"  
255 = 255
» qalc "86400s to hours"                                                                  
86400 * second = 24 h

You can add the “-t” option to prevent qalc telling you the expression it calculated; perhaps more useful in scripts than interactively.

damascus-unix-prompt

Sep 012016
 

One of the advantages that ZFS brings, is that it is so easy to create file systems, that you can create them for purposes that you would not previously do. For example, I have an additional file system mounted under my home directory for a certain application that generates a lot of data that I do not need backed up. Because the script I use to back up stuff does not cross file system boundaries (i.e. it does not descend into a directory that contains a mounted file system), I can simply exclude a large amount of frequently changing data by making a file system.

Or I might (as it happens I do not, but I could well do) create file systems for large lumps of data to easily see how much space they occupy – perhaps ~/Pictures. You can run a command like du -sh ~/Pictures, but that is an expensive command (it takes a while) and it tells you how large the files are; not how much space they occupy on disk. And on-disk compression can make that a significant difference! So simply run df -h ~/Pictures if that directory is on a separate file system.

But there is a bit of a gotcha with that. If you create such file systems in the normal way (such as zfs create pool/mikes-pictures; zfs set mountpoint=/home/mike/Pictures pool/mikes-pictures) you risk creating a situation that may prevent your home directory from mounting. If the “child” file system is mounted before the parent, it will not be possible for the parent file system to be mounted when booting.

Instead create the hierarchy properly :-

zfs create pool/h2
mkdir /h2
zfs set mountpoint=/h2 pool/h2
zfs create pool/h2/mike
zfs create pool/h2/mike/Pictures
ls /h2/mike/Pictures

You will also have to fix the permissions, but this is a far safer way of organising things suitable for future file system creation.

damascus-unix-prompt

Aug 292016
 

It seems that occasionally GNOME can go a little screwy and its fancy mouse pointer plugin can result in an invisible mouse pointer. Which makes doing anything just a little bit tricky.

If you can open a terminal, enter the command :-

gsettings set org.gnome.settings-daemon.plugins.cursor active false

And all should be well. At least until it decides to turn itself back on again (so make a note of this fix!).

damascus-unix-prompt

Aug 232016
 

There are moves afoot to scrap the UK’s Human Rights Act.

Think about that for a moment. There is a minister of justice who wants to take away your human rights.

Whether or not you like the ECHR, the fact that a British politician wants to scrap the Human Rights Act is somewhat worrying. They want to take away our human rights. It is all very well saying that the British authorities never behave in ways that would threaten our human rights, and we have both common law and traditions that protect our human rights. But scrapping the Human Rights Act sends a signal that we do not need human rights; a signal that may not be picked up and acted on for years or decades, but the signal is still there.

Now if they were merely going to modify the Human Rights Act, that would be fine. I am sure there are parts that go a bit too far and others that do not go far enough. The key thing is that changing the Human Rights Act; even improving it, sends a different signal no matter what those changes are. That signal is that we do believe in human rights.

And that is a good message to send.

The New Defence

The New Defence