Thursday, 27 October 2016

Ransomware (no, not that sort)

Yes, there is malicious software out there that encrypts files on your computer and directs you to a web page where, for a fee, you can buy the decryption key.  Or just restore from a recent backup  (you do make backups, right?)  But that's not what I'm here to talk about tonight.

Closed-source software vendors are holding their customers to ransom.  If you don't buy the latest version of their products, you won't be able to read anyone else's documents if they have upgraded to the latest version.  But what is especially galling is where electronically-identical hardware appliances have features enabled or disabled purely by software.

Saturday, 18 June 2016

What I Wore #1

I wore an outfit for work yesterday that just made me feel enormously sexy!  This is me trying to strike a provocative pose over the pool table:

I have decided, I am going to take full advantage of the relaxed Friday dress code to explore sexy ......

Friday, 13 May 2016

Why would you Pay More and Get Less?

Open Source software comes with the freedom to inspect its internals and make modifications, the better to suit the way you work.

Proprietary software usually does not include such freedoms -- and usually has to be paid for.

So, serious question:  Why would anyone choose to pay good money for Proprietary software, when Open Source alternatives are available on so much more favourable terms?

Wednesday, 5 August 2015

The Great Taxi Rip-Off

Last night I travelled in a taxi.  Among the table of fares was the following:
First mile £3.00
Each subsequent 146 yards £0.10
I asked the driver how many yards were in a mile  (which I think is not an unreasonable question:  if it's on the sign in his cab, he ought to know),  and he did not know.  Therefore, there is a meaningless disconnect between the figures:  If I don't know how many yards there are in a mile, then I can't know how many 146-yard units there are in a mile, and therefore I can't work out how much I should be paying.

Now, if it had read something like
First kilometre £2.00
Each subsequent 100 metres £0.10
then the correlation between distance travelled and amount paid would have been nice and obvious.  Because there's a clue right in the name that tells you exactly how many metres are in a kilometre.   Even if it was something like "Each subsequent 114.3 metres £0.10", the sum would still be possible -- though I might need a calculator, if  needed better precision than "about 9p for 100 metres".

I am convinced that this is another example of rip-off Britain, if we are actively prevented from working out independently how much we should be paying for a journey and instead have to trust the meter.

Wednesday, 22 July 2015

This time, it even looks like Perl!

I said before that my first attempt to get controlling the Raspberry Pi's GPIO pins from Perl looked ugly.  This time, I've added some methods to my JKLMwiringPi package, in an attempt to make the program look more like Perl.

Raspberry Pi Flavoured Shenanigans

The raspberry Pi folks make so much mention of Python that you might think support for other languages might be wanting.

I certainly had difficulty persuading Perl to control the GPIO pins.  I tried using the Perl bindings to WiringPi, but it seems that the underlying WiringPi library has changed since the Perl wrapper stuff was written, and now it either doesn't work, or segfaults.  The actual C library is fine, as I proved to myself during my testing phase; but I'm always a little bit wary of stuff going on fire when I try to program it in C.

I might redo it myself, if nobody else does, but I really wanted to get my Raspberry Pi up and running as quickly as possible.

Fortunately, there's a trick we can use:  Inline::C.  This is a Perl module that does some high-level magic and lets you call functions in a C library as though they were Perl functions.

Here's my version of a "Knight Rider" display using eight LEDs:

Easiest Raspberry Pi fix ever!

I thought I had killed my brand new Raspberry Pi 2, which was showing just a steady power light and that was it -- just like the state the machine is in after typing $ sudo poweroff and before disconnecting the power pack.  The mouse sensor was unlit, and the CAPS LOCK and num lock lights on the keyboard were dead.

However, it turned out to be a false alarm.

I disconnected the Internet, HDMI, keyboard and mouse cables, leaving only the GPIO connections  (which there were a lot of, and I really did not fancy disconnecting them unnecessarily).  Then, on a whim, I decided to try powering it up again -- and this time, I noticed the "disk" activity light flashing, and the lights on the Internet socket also flashed briefly.

Encouraged by this, I tried reconnecting just the keyboard, and noticed the caps lock and num lock lights were working. So I tried logging in blind  (it's not all that difficult, actually; remember that ctrl+U erases everything you typed since the last time you pressed Return, so you don't even have to remember how many times you need to press backspace)  and running my little test program.

And it worked!

So I shut it down cleanly; reconnected the mouse, Internet and TV; and powered it again.  And was back in business, just in time for Pi Day  (22/7)!