“By Design”

Posted by

I think it’s unfortunate that Microsoft’s “Connect” bug database uses the term “by design” as a reason for closing bugs.

As an example, I reported a bug whereby the Visual Studio IDE, when editing files using a font that supports ligatures, would count the ligatures as a single unit. So if you pressed backspace when the cursor was to the right of the ligature, it would delete the whole thing, rather than just last character.

For example, the new fonts for Windows Vista (except Consolas) have pretty extensive ligature support, for things like “fi” which, typographically speaking looks different to the glyph for “f” followed by the glyph for “i” (some would argue).

So if you set your IDE font to (say) Calibri, type the word “file” and try to backspace over it, you’d delete the e, then the l then the fi in one go.

Clearly, this is not the correct behaviour. However, according to the way the bug was closed in connect, it is the “designed” behaviour. But that’s not the right way to look at it.

Sure, this behaviour may be a consequence of the way the IDE was designed. And obviously, they don’t expect you to use a font like Calibri for editing code (though I would argue, why not? Calibri is a nice-looking font, and using variable width fonts for coding are a sign that you’ve moved into the 21st century :p). But it’s not like someone sat down and said, “now I don’t think we should allow the IDE to work correctly when presented with fonts that include ligature information in them.” That would be silly.

Notice that this is different, say, to a bug stating “Microsoft Office Word 2007 cannot export PDF documents out of the box.” There are definitely people who consider that a bug (like me), but in this case someone actually did sit down and say “Office won’t be able to export PDF documents without downloading an extra component.” In this case it was the Adobe lawyers, but no matter...

So closing the PDF “bug” as “by design” would be perfectly reasonable. But closing the ligature bug as “by design” does not seem so reasonable. Perhaps, rather than “by design” they need another option: “no time left” or “not important enough” or “requires fundamental design changes, not worth the effort”?

OutOfMemoryException in Wallpaper Changer

Posted by

I’ve been able to (finally) track down the OutOfMemory exceptions that Wallpaper Changer has sometimes been known to throw. Until now I hadn’t been able to reproduce the problem, but just this morning I downloaded a new image and go the error.

It seems it has to do with corrupted JPEGs – the GDI+ code that I use seems to throw OutOfMemory on all sorts of errors, and corrupted JPEGs is one of them. I discovered the problem as I was downloading a new image – I didn’t realise it was still downloading, and when I tried to open it in Wallpaper Changer, it threw the error.

Looking at the documentation, pretty much the only two documented exceptions for Image.FromFile are FileNotFoundException and OutOfMemoryException.

So anyway, if you’re running into this problem, try loading the image in another program, and if it works there, just try to save the file again and see if that fixes it in Wallpaper Changer.

Unfortunately, since I moved house and changed computers, I no longer have the source code for Wallpaper Changer, so unless I do a re-write, updates are unlikely :(

Mozilla considers being “more defensive”

Posted by

Apparently, there’s an in-the-wild exploit for Firefox that can steal passwords from the in-built Password Manager. In an article I read, Daniel Veditz, a Mozilla developer said:

Up until now, browser makes [sic] have focused on user convenience and assumed sites with valuable passwords would be well-written. But they have bugs just like we have bugs so we might have to be more defensive.

Um, can you say, duh!?

I admit that I use Firefox pretty much exclusively, but if all Mozilla developers are making more naïve assumptions like this one, I might install IE7 after all...

Music industry out-of-touch with reality, film at 11

Posted by

Apparently, the International Federation of the Phonographic Industry (make sure you read that second-last word carefully) wants ISPs to disconnect people who are caught illegally downloading music.

But there’s no way an ISP will agree to that. Here’s why: if they disconnect my service, I’m going to switch to a different ISP!

It’s hard enough for ISPs to convince customers to stay – that’s why they try to lock you in to a 12- or 24-month contract. So there’s no way they’re going to agree to actually force someone to switch away from them.

I recently received a letter from ISP about this. They basically said, “we hope nobody would be using our service to do anything illegal,” but telling people they’ll disconnect you is one thing – actually doing at the request of some “international federation” of a funny-sounding industry is something totally different.

It’s amazing how much these people are disconnected from reality.

What is the point of Daylight Saving Time?

Posted by

When I was a kid, I was told the reason for daylight savings time was “to help the farmers,” but that’s not the case at all (in fact, it doesn’t really affect farmers – their day revolves around the sun, so any artificial time we apply is totally irrelevant). The “real” reason for having daylight savings time is “energy conservation.” The idea being that by artificially making sunset one hour later, we get an extra hour of sunlight in the evening, and thus don’t need to turn our lights on as early. In the summertime, the sun would normally rise much earlier than most people, so the need for lights is offset in the morning this time by the fact that most people will still be asleep.

However, there are plenty of problems with daylight savings time, and I don’t think the (somewhat marginal) benefit described above is offset.

The first problem is that I don’t think there is all that much difference in energy saved. Sure, back in the days when daylight savings time was introduced, hardly anyone had air conditioning in their homes. But these days, and especially in warmer countries like Australia, air conditioning is pretty ubiquitous. So the energy saved from lighting will be offset by the energy required to run the air conditioning for longer (because the sun is up an hour longer, it takes an hour longer to cool down again).

Obviously, the other problem (and this is a little harder to quantify) is simply the fact that you have to adjust your clock twice every year. All the effort that is spent reminding people, all the people who end up being late anyway, all the people who are less productive (because they’re so tired) after the change, and so on. These are not so easy to quantify as the cost of air conditioning, but it’s obvious there must be some cost there.

To be honest, I actually like daylight savings time. I don’t wake up all that early (7:30am usually, to start work at 9am), but I get home quite late (finish work at 6pm). So in winter, it’s already dark by the time I finish. I’d be quite happy for daylight savings time to be the permanent time.