Archive for the ‘IT’ Category

I’m Baaaaaaaaaaaack!

Friday, March 22nd, 2013

After a bit of a hiatus (due to my new router ignoring all attempts to persuade it to forward port 80), I have finally brought the blog back up again — by installing the server running it elsewhere.

Shop Demo Software Shenanigans

Saturday, June 9th, 2012

Back in the 1980s, a friend of mine had some serious phun with BBC model B’s in stores that also sold software.

He would take a box of 5.25 inch floppy disks, all but a few of which was labelled “Watford Electronics Compatibility checker”. (Watford Electronics were a third-party supplier of peripherals; they made an improved disk system for the BBC, better than but slightly incompatible with the “official” Acorn upgrade and some software, especially games, would not work with it.)

So my friend would ask to “check” if a game would be “compatible” with his Watford disk system. Inserting the “compatibility checker” disk into the drive of a BBC computer and pressing shift+BREAK produced a fancy screen with a progress indicator; which then asked for the game disk to be inserted, thrashed the drive a bit, then asked for the checker disk again. After a series of such disk swaps came the dreaded announcement that the game was not compatible with the WE DFS. He would return the compatibility checking disk to the back of the box, and ask the shop assistant if he could compatibility-check another game. While the assistant was away fetching it, my friend whipped out the compatibility-checking disk from the front of the box (nobody ever noticed this blatant switch, which was done with no sleight-of-hand) and booted it up.

Again the compatibility-checking process would require several disk swaps, and again it would fail. And my friend would wander off, dejected, before the shop assistant could work out what had just happened right under their nose.

What had happened, of course, was that the “compatibility checker” disk contained a program that loaded itself into RAM, then copied the game disk sector-by-sector first to RAM, then to the “checker” disk (overwriting the original copy of itself into the bargain, but it was already running from RAM, and each of several disks in the box contained a copy of the same software.) As there was only 32KB of RAM and some of that was eaten up by the OS, copying a 100KB disk (yes, you read that right: 102 400 bytes) had to be done in stages.

28 July: Day of Protest against Internet Explorer

Tuesday, April 21st, 2009

(originally posted by me at http://stuartsharpe.co.uk — some changes have been made since then.)

It’s time for everyone who appreciates good web design and open standards to come together, just for one day, and say, once and for all: Enough already!

Enough already with IE riding roughshod over open, published standards because they don’t happen to suit Microsoft.

Enough already with IE and its downright bats#!t insane default behaviour of executing unknown content.

Enough already with pandering to Microsoft’s buggy, broken virus-trap just because it’s “there by default”.

If one person decided that they were going to block IE, to warn users politely but firmly that they were not welcome to use that malware-magnet that can’t render properly, then that person might lose some traffic.

But if enough people decided, all on the same day, that they were all going to f**k off Internet Explorer users until they downloaded a proper browser — Firefox, for instance, or even Opera or Safari; you know how much recommending a closed-source product sticks in my craw, but anything‘s got to be better than IE — then suddenly the users would have no choice but to download a proper browser, if they wanted to see the Internet. The long-term benefits of that would massively outweigh the short-term inconvenience. Microsoft might even write a proper, standards-compliant browser!

Come on, people. Let’s have a worldwide day of protest against Internet Explorer, stick to it; and by doing so, just maybe improve the Internet for everyone. And that day might just as well be 28 July.

Another register_globals cock-up

Tuesday, January 13th, 2009

When I first started programming in PHP, register_globals was on by default. That was just the way things were; if you had a form field called user, you would get a variable $user appearing magically in your script. And everyone was happy.

Including crackers and script kiddies, who were able to override internal variables with crafted requests and so cause badly-written scripts to behave in ways the writers never thought of. If you didn’t initialise variables properly (And I blame Microsoft for that. Their dialect of BASIC silently initialised numeric variables to zero and strings to “” if you tried to read them before you assigned anything to them. The Sinclair and BBC dialects of BASIC would protest with a “no such variable” error if you tried to read a value from a variable that hadn’t been assigned [and Sinclair BASIC added the LET verb, because a program line had to start with a verb -- that was a constraint of the editor]. The only exception is something like Y = Y + 1, which does work. The reason for that is that the interpreter sees Y = and so reserves some space for a brand new variable Y. Then it tries to evaluate the expression Y + 1 and now there is a variable called Y), or if you relied on a variable coming from $_SESSION not being clobbered by a GET or POST request, well, you got what you deserved.

So in PHP version 4.something, they changed the default behaviour so register_globals was off by default. Now you had to look in $_REQUEST for your form data, or even $_POST, $_GET or $_COOKIE if you cared exactly where it came from. Of course, this broke everyone’s scripts; but if you couldn’t simply re-enable register_globals, then a few lines at the beginning of your script restored the old-style behaviour.

You’d think, therefore, that if you kept register_globals off in your development environment (my desktop running Debian Sid) then yourt scripts ought to run fine on a server with register_globals on (as the deployment environment happened to be). But you’d be wrong. If you take a script which works perfectly with register_globals off and try to run it on a server with register_globals on, and you are using session variables, weirdness ensues.

With register_globals off you can have a variable $foo in your program and a session variable $_SESSION["foo"] and they are absolutely, completely, utterly independent of one another. Once register_globals is turned on, however, it’s a different story. Having assigned $_SESSION["foo"] in one script, any attempt in a subsequent script to assign anything to $foo will also assign $_SESSION["foo"] — even if you haven’t used session_resister() to mark $foo explicitly as a session variable.

I have since formulated a new rule-of-thumb:
Any attempt to combine two “intuitive” behaviours will result in a “counter-intuitive” behaviour.

How Piracy harms Businesses

Wednesday, May 7th, 2008

Software piracy does harm businesses, but not the way we are led to believe.

Piracy hurts the big established players much less than it hurts their smaller competitors.

If your business is selling an inexpensive photo editing suite, or an inexpensive office suite, then you are going to lose out to people installing pirate copies of Adobe Photoshop or Microsoft Word. Nobody ever has to make a single pirate copy of your program. They’re not going to, either — why would a pirate rip off 50 of software when they could rip off 500? And why would any punter pay 50 for a legitimate copy of an office suite which is “compatible” with what businesses use, when they could obtain a pirated copy of the exact same software businesses use for much less than that?

All the big software vendors put up with this because they would still rather you were using a pirate version of their product (and therefore maybe acting as an advertisement to anyone else who might just be honest enough to pay for it) than a legitimate version of a competitor’s product. By turning a blind eye to piracy, the likes of Microsoft, Adobe and Autodesk are effectively ensuring that there is no profit in trying to compete with them on price.

It’s hardly a lost sale for Autodesk if Fred in the Shed is using a knocked-off copy of AutoCad — he’d never have bought it anyway. (But it is a lost sale of some inexpensive CAD tool — which, without the option of piracy, he’d probably have caved in and bought.) But if Fred is using Cheap and Easy Designer 2008, gets a job with an engineering firm, and successfully persuades them that C+ED2008 is good enough, that is a lost sale for Autodesk.

I’m no fan of Caged software — I’d gladly watch the whole industry wither and die. But I want that to be for all the right reasons, and not from cheap below-the-belt shots like this.

If you don’t want to pay 200 for an Operating System, then you don’t have to. If you don’t want to pay 500 for an office suite, then you don’t have to. If you don’t want to pay 500 for a graphics editor, then you don’t have to. But there is no reason to use pirated software.

No More -dev packages

Saturday, April 5th, 2008

It’s time for the maintainers of a Linux distribution to give serious thought to dropping “developers’” packages once and for all.

Back In The Days, when processor speeds were a few tens of megahertz, hard disk sizes were a few hundred megabytes and Internet connections were by dial-up, there was a genuine need to conserve CPU cycles and disk space. So the fledgling Linux distributions provided pre-compiled binary packages containing only files essential for day-to-day running. If you wanted to compile another package yourself from Source Code to work with an existing package, you had to download a separate developer’s package. If you were playing about with Linux at all, you generally knew what you were doing.

That made perfect sense in that environment.

(more…)

Compiling Kernels on Debian

Friday, April 4th, 2008

You probably know this. But I didn’t, and it took me a lot of swearing and cursing and poking about in murky areas of the Internet and my own file system to discover what was up with it.

Debian has always had a nice system for compiling kernels: from pristine kernel.org source, you can produce a .deb package, which you can install as normal. Easy. And safe, because no third party has had a chance to muck with it: the source you downloaded came straight from Linus himself.

Only this time, booting stalled with the dreaded Kernel Panic: VFS: Unable to mount root fs on unknown-block error. So what did I do wrong?
(more…)

BLOODY INTERNET BLOODY EXPLORER

Friday, February 8th, 2008

<select> lists are very useful in HTML forms, but there’s a problem: an <option> can’t span multiple lines. Which is a pain in the backside, because I had a killer application in mind that would have needed this.
(more…)