Saturday, 29 November 2003

2004: The Year of the Penguin

Keeping in the vein of the last post (sorta): eWeek: 2004: The Year Linux Grows Up (or Blows Up) (hey, I like my title better)

Dear gods, I hope not.

To me, Linux represents stagnation – an inability for the computer market to see past Unix. For many h4xx0rs, Unix is venerated in the same way that the Founding Fathers are venerated in the US: They (It) Can Do No Wrong.

The thing is, Unix was designed for systems where all the hardware was known and available at boot time, and recompiling your kernel to add a driver was acceptable. That simply isn't true now. Files could never be bigger than 4GB, 2038 was 60 years in the future, and handling 1 transaction a second was fine. Those assumptions don't hold true either.

I've been using Windows XP family systems for about four years now, and I don't see any need to, or have incentive to, change. I have tried various releases of Linux and found them uniformly awful.

I don't believe that Microsoft is capable of locking in by extending the server and client simultaneously (if that's even what they're doing, and even if they are trying to do so). I believe that the history of the software market bears it out - quality products succeed, even if priced higher than lower-quality products. Trying to undercut Microsoft is normally an exercise in futility - not because they're predatory or aggressive, or have more resources (though that helps) but because their product has succeeded because it meets a customer need. The only way you can make that work is if you reduce your costs of development and shipping...

...which is where we came in. I believe that the Open Source model can never equal the best of the commercial developers (which some teams at MS are). But that argument will have to wait for another day.

For myself, I can cope with supporting my Mum on Windows; I found it hard to support other CS/EE students on Linux.

No feed yet

Sorry, looks like I can't have an RSS feed on BlogSpot at the moment. Looks like I might need a different blog server, or pay for this one (except that the Upgrade option is disabled ATM).

Ian's already said he won't host my blog in case I say something about Linux and he gets Slashdotted...

Source Control

Earlier this week, I bought a license for SourceGear Vault - a tool for keeping track of changes to source files. I'd previously tried Microsoft's SourceSafe, but struggled a little. The common theme among users (that post to newsgroups or Wikis) is that SourceSafe is fine for a single user or single machine environment, but starts getting hairy for multiple users.

First impressions are good. The admin tool has a terrible user interface (a tabbed dialog with the tabs at the bottom, but facing up??) but isn't too bad to use; the main GUI client looks and works a lot like SourceSafe.

I got through 30 revisions of my repository today; I think I need to learn a bit of restraint with checkins. I did have a slight problem with Obliterating branches I decided afterwards wanted to get rid of - the solution is of course "don't do that!"

When working on my final year project, SourceSafe was quite handy - I ended up following a number of false paths, and it was easy to roll back to a baseline without those paths.

Friday, 28 November 2003


On a bit of a roll tonight, don't worry, won't last.

Raymond Chen talks about WM_GETDLGCODE. Handle this message to customise how the dialog interaction works. By default Windows dialogs process a number of keys themselves (via a call to IsDialogMessage). Plugging in at this level is much cleaner than overriding PreTranslateMessage, which is what most MFC coders do.

We've used this for UIs where the customer wanted to navigate between entry fields using Enter (Return) – which is of course specifically condemned by most UI gurus (using a GUI as if it were a text-based interface)! However, their users are normally used to it.

Uh oh, bandwagon incoming...

Pocket PC Thoughts had a news story this week about the GameTrac, a new games console based on Windows CE .NET.

What's weird is that the company behind it normally makes GPS solutions!

Ah well, should be able to beat the N-Gage as long as the cartridge slot is accessible...

Oddly enough, Ian and I were talking about portable Windows-based consoles, but in a different context: we thought Microsoft should make the X-Boy.


Darn, no support for OPML. I’ll have to create the list manually, then.

Well, I say manually, but I’ll probably write a tool.

Broken door locks

Also on This Is Broken, I read a post about a broken implementation of door locks (or maybe just signage) on US trains.

It reminded me of a news item about a month ago on local news: South Central Trains introduced some new carriages where the flush button for the toilet was placed on the wall above the toilet bowl. When the lid is up, the flush button is covered.

There's also an Emergency Stop button in the toilet cubicle - on the wall, next to the toilet. So some people have been pressing that when they intend to flush the toilet.

Two things wrong.

As we know from User Interface books, people don't read messages. They need to be kept short and simple, and work the way they expect. When exiting a program, we expect that any message box that pops up means 'You haven't saved your work! Exit now?' and hence expect to click No. There's a type of program which asks you even if there is no data to save. The automatic click on No is just infuriating, because you just have to try to close the program again, pressing the right button this time. ;-)

Secondly, it should be hard to press an emergency stop button for a train (not for a power tool, where it should be very easy). Emergency stop causes extreme discomfort for all passengers because it jams the brakes on hard, and requires the driver to go and find the problem, wasting everyone's time. So it should be somewhat out of the way, and require a firm push or pull to activate. The stop button on those trains looked like it could be brushed against accidentally.

Nasty Template Editor

Eurgh, crappy editor. Oh well, I've always got TextPad. I wonder if I can write plugins for TextPad?

I'll sort out a decent colour scheme (OK, a colour scheme) at some point.

Lessee, what's in Settings... No English (United Kingdom)???

This is (not) broken

Whoo, might as well start somewhere.

So I found a link to This Is Broken from Brad Abrams’ blog (one of my regular reads, we'll try OPML out later to update links). Having a bit of a read, I found this article on software errors.

I suppose this is my field ;-)

I think what's happening here is that a Windows API call has failed. Most Windows APIs return a BOOL, that is, non-zero if succeeded, zero if failed. To get extended error information, you add a call to GetLastError. You can FormatMessage to get a human-readable version of the error.

In this case, GetLastError has returned ERROR_SUCCESS (0), which in English locales becomes “The operation completed successfully.”

There are two possible reasons for this that I can think of: either the API didn't call SetLastError when it failed, or the programmer called another API which called SetLastError with 0 (which it shouldn't, but there are some APIs that do) between the failed API and the call to GetLastError.

Windows 9x and Me don't always call SetLastError when things fail, so you tend to see this more on those platforms. Windows XP family (I'm not going to type NT/2000/XP/Server 2003 every time) operating systems are better at setting the error code.

Conclusion: might be Macromedia’s fault; might be Microsoft’s.