Friday, March 09, 2007

Holiday Inn Web Annoyance

I've complained about this kind of thing before, but I continue to be surprised that someone doesn't catch (and fix) these kinds of annoyances.

I was making a booking on Holiday Inns web site and had to enter my billing address. When I submitted it I got an error saying "spaces are not allowed in zip/postal codes". I shook my head and remove the space. I get another error saying the format is invalid. I read the fine print and it says you have to enter postal codes with a hyphen. Huh? Since when do Canadian postal codes have a hyphen in them?

The "funny" part is, I bet they added that explanation because people kept getting it "wrong". I wonder if it ever occurred to them to simply accept a variety of formats? e.g. postal codes with space, hyphen, or no separator.

Even better, they could use a little JavaScript to validate fields "on the fly" so it would be marked as invalid as soon as you left the field.

Thursday, March 08, 2007

Those that can, do...

As the saying goes, "Those that can, do, those that can't, teach."

I just listened to a podcast by Jon Udell with Marty Collins the senior marketing manager with the solution architecture group. Also see Jon's blog post about it.

As I understand it, the goal of her group is to "evangelize architecture". I don't know Marty's background but she calls herself a marketing person, and she talks like one e.g. "how do I push our content". Her group consists of 18 ex-architects.

First, I should admit I have a bias against anyone who calls themselves an "architect". In the software world, if a project "fails", the "architect" rarely gets blamed. Even "real" building architects have been know to design buildings that look great, but the roof leaks. Of course, they would similarly have you blame the builders, not the architect.

Don't get me wrong, I still want good architecture, but my feeling is that good architecture comes less often from self-proclaimed "architects", and more often from good programmers. How many "architects" did Unix or Apache or Linux or TeX have?

Marty tells us that one of the reasons for their group is that architects tend to be possessive and secretive about their work. According to her, even the architects working internally within Microsoft won't (or aren't allowed) to share because of the fear of "losing competitive advantage". Or is it that their work doesn't stand up well to public scrutiny?

So the architecture evangelists aren't working architects. Hmmm... And they are led by a marketing person. Ouch. If the working architects won't share, where are they getting the material they produce? Are they just sitting around dreaming up architectures? That doesn't sound very useful to me.

One of the ideas discussed is that companies should watch for people blogging in their area and jump in and contribute comments. Great idea. Jon asked Marty to let him know when they start doing this. But apparently, first they have to get some fancy new tool that is still in beta to let them monitor and comment on blogs. To me this is very much the wrong approach. It's a perfect example of something that you can try out right away and find out if it works or not. If it works, and once you have done it for a while, then you can think about tools. Why can't each member of her group, sit down, find a blog and add a comment. Not next month, not after getting more "tools", but right now, today! I'm not sure if this is a psychological block, or a bureaucratic one.

I've always liked Jon Udell but I am still wondering about his move to go to work for Microsoft. One of his goals is to reach a broader audience and he feels that Microsoft can help with this, but I'm not so sure.

Saturday, March 03, 2007

Slow Code

One of the problems we run into with our code is that it ends up too slow.

Before I continue I want to assure you that I'm not suggesting "premature optimization". I fully agree that optimizing before it's necessary is the wrong thing to do.

What I am suggesting is that "too slow" is a bug, and like other bugs it should be avoided if possible, or at least caught as soon as possible.

One of the causes of slowness is code that is ON2 (or worse!). Nested loops are a common cause. Programmers either don't recognize the nested loops (hidden in separate functions or in recursion), or else they don't realize the dangers of them. For example, if you have 10 items and you iterate over them twice that's 20 loops. If you have one loop inside another that's 100 loops. 5 times as many loops but not a big issue. But what if you have 1000 items? Iterating twice is 2000 loops, but nested it's 1,000,000 loops or 500 times as many. If each loop takes .001 seconds then 2000 loops is 2 seconds, but 1,000,000 loops is 1000 seconds or roughly 17 minutes. In an interactive application that's a big problem.

I think one of the reasons for this problem is that programmers unconsciously relate speed to number of lines of code. So:
for each item
for each item
do stuff
can look shorter than:
for each item
do stuff
for each item
do stuff
Higher level languages, libraries, toolkits, frameworks etc. can make this even worse. Now one line of code can do a huge amount of work, but to the programmer it's just one little line of code. How bad can it be?

Programmers normally test with small amounts of data. When you're only dealing with a few items, both 2N and N2 are fast. You don't get the feedback about the slowness until much later, when the user has larger amounts of data. And programmers are inclined to ignore whining from users anyway!

Another related issue is the difference between dealing with things in memory and dealing with things in the database. The difference is huge, but again, in testing it may be barely noticeable. And, again, the actual number of lines of code may be comparable. (This can be a problem with tests. For one test it doesn't matter. For a whole test suite it can mean the difference between a suite that runs in a minute and one where you have to run it overnight.)

Unnecessarily reading "everything" from the database into memory is another common mistake. If you actually need all the data in memory at once, fine, but if you just need to find a particular record or set of records then it's an inefficient way to do it. In our Ruby on Rails project I regularly come across code that does model.Find(:all). At first glance it might seem harmless. But what happens when that table contains 100,000 records? (Sadly, part of the reason for this is that Rails doesn't seem to provide any way to iterate through a query, so the alternative to Find(:all) is to do your own SQL - an ugly choice.)

I don't have a solution to this problem, but I think we need to become more aware of it. I think it's one of the reasons why our software gets slower at the same time as our computers get faster!

The Trouble With Programming

An interesting article/interview with Bjarne Stroustrup:

http://www.research.att.com/~bs/MIT-TR-original.pdf

Sunday, February 25, 2007

The Old New Thing

I also really enjoyed The Old New Thing by Raymond Chen, a long time programmer at Microsoft. This is a collection of his writing, much of it from his blog of the same name, about Windows software development. It ranges from history, to how-to, to humor.

After I finish a book, one measure of how "interesting" I found it, is the number of sticky markers I've added. This book ended up with quite a few.

Although my impression of Windows as a baroque hodge-podge was reinforced by the book, at the same time I also gained a new sympathy for the difficulties of developing software as widely used (and abused) as Windows.

I've already applied one of the small exercises in the book (converting a bitmap to a brush) to Suneido to accomplish a task I've been wanting to do for a long time, but just didn't know a reasonable way to go about it. In the process though I struggled through a typical example of the difficulties in Windows programming. I wanted to find the size of the bitmap - something that wasn't covered in the example in the book. You'd think that would be an obvious, simple thing to want to do. Guess what API call you use? "GetObject". And, of course, it's not under the bitmap section of MSDN, because it works on other things as well as bitmaps. Nor is it linked to LoadImage, although I would think that getting information about the image would be the obvious next step after loading it. It's another one of those things that's trivial once you know it, but next to impossible if you don't. What did we do before Google?

I'm pretty sure I'll be able to apply several other things I learned from this book - definitely a worthwhile book if you're a Windows programmer.

Dreaming in Code

I recently read Scott Rosenberg's book Dreaming in Code - about the development of Chandler, the Open Source Applications Foundation (OSAF) personal information manager. I'd recommend it - it's interesting and well written. For anyone dreaming of creating software, it's a scary story.

If you haven't heard of Chandler, don't feel bad. Despite the project being started in 2001 it has yet to release an actual product. The web site says they're "getting close" to a "preview release". Coming from a small business background it's hard to comprehend how anyone can go that long and spend that much money without actually producing anything for people to use.

One lesson I think the book illustrates is that constraints are good. Given virtually unlimited time and money what will you produce? Judging by this story, probably nothing.

Drag and Drop to Firefox

This blog post - Upload Files in a Browser Using Drag and Drop - describes a great add-on for Firefox - that lets you drag and drop files to your browser instead of either typing the complete file path, or browsing to it. You can even drag and drop multiple files at a time.

Even my wife complains about the awkwardness of attaching files to Gmail messages. I've suggested zipping up multiple files so she only has to attach one zip file, but to her, that's just adding complexity. I think she'll be happy with this new trick. (Once I get around to installing it on her computer and explaining how to use it.)

Bad Code

Soon after writing my Good Code post I ran into some code that really sucked. It was hard to understand and hard to modify. The sad part was that it met most of my "good code" criteria - it had reasonable names, little duplication, and small methods. You could criticize some of the coupling, but that wasn't the cause of its "ugliness". (In the process of refactoring it I found several bugs, which demonstrates that "good code" is not just an aesthetic judgment, but really does affect the quality of software products.)

Knowing some of the history of the code, how it had grown, I could see why it ended up like it did. You could blame some of the problems on insufficient refactoring as it was worked on. The programmers working on it had just been concerned with getting their task accomplished. If they noticed how ugly it had become, they probably felt they didn't have time to do anything about it.

The lesson is that the criteria in Good Code are necessary, but not sufficient. You need to do them, but you also need to think about whether the end result is understandable.

Sunday, February 18, 2007

Monster Palm

I recently ran across Bruce Tognazzini's web site Ask Tog. (I'd previously read his book Tog on Interface - recommended.)

One of his articles was Make Your PalmOne a Monster Machine

My list would include:

TextPlus - Suggests words and phrases as you enter letters. This makes entering text on the Palm hugely more efficient. I'd have a hard time living without this now. The ability to add your own words and phrases makes it even better.

Wikipedia for Palm (and other platforms) - I have the 2 gb version on an SD card. It's great traveling to be able to look up information about where you're going. Or to scratch a curiosity itch when you're away from the Internet.

Noah Pro - a dictionary with 122,000 words. Again, great when traveling and away from the Internet. I always hate it when I come across a word that I don't understand, or aren't sure of the exact meaning.

Bonsai - an outliner for Palm and Windows. I use this to keep to-do lists, shopping lists, ideas, packing lists, etc.

Aigo - a Go game for Palm. Considering the limited capabilities of the platform it plays amazingly well. It probably won't be good enough for a real Go player, but for someone who just fools around like me, it's great. This is the only game I play at all, and I don't play it much. I had a chess game on my Palm for a while, but never used it.

I've also been checking out the software Tog recommends in his Make Your Mac a Monster Machine article.

Surprisingly, I couldn't find an RSS feed for his web site. Tog is falling behind the times!

My Mouse Has Two Buttons!

I'm almost embarrassed to tell this story! Again, Mac users will be shaking their heads.

Since I got my new Mac, I've been cursing the lack of a "right-click". I've gotten really accustomed to using this on Windows. It was especially bad when I was running Windows under Parallels. I kept thinking that Apple really needed to drop their old obsession with one-button mice.

I tried using the configuration where holding down the mouse button is eventually treated as a right click. But if the delay was too short I kept getting it by mistake, and if it was too long I got impatient. I could use CTRL+SHIFT+click but that seemed pretty awkward.

I knew my "Mighty Mouse" (who picks these names?) had an "extra" button if you pressed on the little scroll-ball since I annoyingly kept triggering it by mistake and bringing up the dashboard widgets. I wondered if I could re-configure this to be a control/right click.

When I went into the mouse settings, lo and behold there was a setting for clicking on the right hand side of the mouse! My Mighty Mouse does have left and right buttons! That's the problem with overly slick, seamless designs - there are no "affordances" to let you discover their capabilities.

I pull down the choices for the right button but there is no choice for CTRL+click. Strange. But there is a choice for "secondary button" - I wonder what that does? I try it and it seems to do the trick. And it works in Windows under Parallels. Problem solved!

This was a good lesson. It's so easy to make fun of stupid users. We're always amazed when we observe someone using our software in such awkward ways - why don't they do it the "right" way. Or getting complaints from customers about missing features when it's right there in front of them! Obviously, if I had looked at the specs or looked more carefully at the settings I would have solved this a lot sooner. But if I can fall into this trap, with umpteen years of experience in the business, it's hard to blame someone who has little or no experience.

Thursday, February 15, 2007

Mac OS X with Windows Printer

I struggled on this one for a while. My printer (Epson 2200) is hooked up to my main Windows box and shared so my wife and I can print to it from our Windows laptops via wireless.

I could find and add the printer in the Mac printer setup but it wouldn't work. I was getting NT_STATUS_ACCESS_DENIED.

Searching the web found many people with the same problem. I eventually got it working by using the Advanced printer setup (a little tricky to find) and using a URI of:

smb://andrew:@mckinlayhome/epson2200

Judging by what I found on the web this has been an ongoing problem with OS X. I wonder why it hasn't been fixed?

Funnily, my copy of Windows running under Parallels on the Mac had no problem connecting to the printer.

Monday, February 12, 2007

Rogers.com won't take no for an answer!

This is classic - they give you a checkbox to say whether you want email, but they won't let you save unless you say "yes"!


So I changed my email address to nospam@really.com :-)

Sunday, February 11, 2007

Good Code

After 30 plus years of programming, the basics of good code has boiled down in my mind to just a few things:
  • Good names
  • Consistency
  • No duplication
  • Small pieces
  • Loosely coupled
These are roughly ordered by scale - from individual "words", to lines, to modules.

None of these are original. They have all been endlessly discussed, analyzed, and written about.

Good names

Why is "i = j * 2 + k" bad? Because you have no idea what it means without studying a much bigger context of code to try to figure out what i, j, k, and 2 mean.

It isn't just that you should have long names, they also need to be accurate. A name that was once accurate but has since drifted into being use other ways is just as bad as a comment that gets out of sync with the code.

Not all good names need to be long. There's nothing wrong with using "i" for a loop index, where it's obvious what it is.

Good names often eliminate (or at least greatly reduce) the need for comments.

Consistency

Consistency ties in with good names. Use the same name consistently for the same purpose. Conversely, do not use the same name for different purposes!

Consistency includes:
  • Coding standards or guidelines
  • Coding idioms
  • Organization, design, architecture
If you can look at a few lines of code and tell who wrote it, then you probably don't have a high level of consistency.

Code reviews, pair programming, and joint ownership of code all help with consistency.

No duplication

Programming by "copy and paste" is easy and quick. It's code re-use - isn't that supposed to be good?

The problem is that code isn't "write-only". You're going to need to fix it, improve it, add features to it. And that becomes much harder when you've got the code in multiple places.

Another problem is that it usually isn't just "copy and paste", it's "copy, paste, modify". So now you not only have multiple copies of the code, but they're each slightly different. Even tougher to work with. And it lowers your consistency.

But there are subtle advantages to DRY (Don't Repeat Yourself) that are just as important as these obvious issues. To avoid duplication, especially when the duplication has variations, you have to think about the code, what is common, what varies, why it varies. Does it vary just because you used different variable names? Maybe you should be consistent. Does it vary because it behaves differently? Maybe whoever uses this code (end user or another programmer) would benefit if it behaved consistently.

Small pieces

In some ways this is both one of the easiest and the toughest guidelines.

It's easy because anyone can see whether you've broken your code up into bite size chunks. You can write automated tools to check function / method / class sizes.

It's hard because it's not just breaking it up, it's how you break it up. You want the pieces to have high cohesion and low coupling, and that's hard. We've been struggling with this one for a long time e.g. Yourdon & Constantine covered this in depth in Structured Design in 1979!

A big benefit of small pieces comes from giving the pieces good names.

Loosely coupled

If every line of code connected to every other line of code then complexity would go up as the square of the number of lines of code. N squared goes up fast. If this was the case we'd never manage more than tiny programs.

On the other hand if every line was totally independent, then complexity would only go up linearly with the number of lines of code. That's a lot more manageable.

The reality is somewhere between. The bigger a program gets, the more important it is to keep the pieces as independent, loosely coupled, as possible. The higher your coupling is, the bigger the risk that a change will have unexpected side effects (also known as bugs).

Again, this is easier said than done. Structured programming aimed to reduce coupling. One of the big goals/advantages of object-oriented programming is looser coupling. "Interfaces" are another tool. Our tools are getting better. But are programs are also getting bigger.

Thursday, February 08, 2007

Working at Home

Lately I've started working at home some of the time, nominally Tues. and Thurs. - so I'm still around the office at the beginning, middle, and end of the week.

As our business has grown my days have grown more and more interrupted and fragmented. I seem to go from talking to one person to helping another, to supervising another. I could close my office door, but that wouldn't stop people from knocking on it or cornering me when I went for coffee or to the bathroom. And I don't really like the idea of closing my door anyway.

I could tell people to get lost, but the truth is I still want to deal with all these things. I'm not ready to step back totally, even if somehow I could. I still want to guide and help people. I just don't want to do it 100% of the time. Or more accurately, I still want to spend some of my time programming.

I want to spend time programming because that's what I enjoy doing. But I think it's probably good for the company as well. There are things that I can work on that will be beneficial, that would never get done otherwise, either because they're things like Suneido C++ internals that no one else works on, or because they're general enhancements that will never be "urgent".

I'm finding my programming time at home surprisingly enjoyable. I guess it shouldn't be surprising - I wouldn't have been programming for 30 years if I didn't enjoy it. But it's been a long time since I was able to focus on it for significant periods of time. On top of the pleasure of coding, it's also nice to feel like I'm getting things done. You don't get that as much when you're managing. In the big picture you're still getting things done, but it's not as personal.

For a lot of people, there would probably be more distractions at home than at work, but I haven't found that. I don't sleep in or watch tv or read a book. I actually want to be programming. And because of that, I'm less likely to be sucked into email or surfing the web. At work, when I know I'm liable to be interrupted any minute, it seems like I might as well kill time, since it's pointless to start anything more serious.

I'm not sure what my staff thinks about it. I wonder if some of them might resent it or feel like I'm "abandoning" them. Hopefully they'll be ok with it. They're certainly capable of operating without me.

An added (intended) benefit is I've been getting on the treadmill first thing in the morning. That way I get my exercise for the day, and I only have to shower once :-) And since I don't have to travel to the office, I still start work at more or less the same time.

Funnily, I've still been going in to the office on the weekends, since it's quiet then.

Here's my new Ikea desk, Mac mini, JBL Spot speakers, and Starbucks coffee mug - all the essentials :-)

Saturday, January 27, 2007

Where is the User Interface Innovation?

It seems like a good user interface toolkit would lead to better interfaces, and I think at one level it does. But recently it has occurred to me that it also tends to reduce innovation. Where I'm seeing the most innovation in user interfaces is on the web with the new generation of Ajax web applications. HTML, CSS, and Javascript provide a pretty basic UI toolkit, certainly not as nice as the Mac or Windows. But it seems to be another example of constraints leading to good things. It seems like, because of its limitations, the web has spawned a rich variety of UI innovations. Of course, the variety means that there's not as much standardization, but so far that hasn't seemed like a big drawback. You have the same problems figuring out how to use an innovative Windows or Mac program.

For a good example, have a look at Dabble DB - the 7 minute video gives a great introduction.

Friday, January 19, 2007

My First Mac

A few days ago I received a Mac Mini I ordered directly from Apple Canada. I could have bought one locally but I was curious about how they're mail order would work.

Although the advertised prices make the mini look relatively cheap, by the time you upgrade the memory and hard disk to reasonable amounts, and add a mouse and keyboard it's ended up almost twice as expensive as a comparable PC.

My first chuckle came when the mouse and keyboard arrived in a box about six times the size of the box the computer came in!

Less of a chuckle when I found that I couldn't use the wireless keyboard and mouse until they were set up - which you couldn't do without a wired usb keyboard and mouse. This wasn't a problem for me since I had spares, but if this was your only computer (or if you only had an older PS2 keyboard/mouse) you'd be pretty frustrated. It might be nice if Apple's web ordering system warned you about this when you ordered a mini with a wireless mouse and/or keyboard.

Other than that, set up was quick and easy. It recognized my Samsung SyncMaster 215TW and set the right resolution automatically - something Windows handles but Linux never seems to be able to.

Of course, the first thing it did was start downloading updates - a good thing, I guess, but not something I like being bothered about. I was sad to see that the updates required a restart. I guess it's not just Windows anymore that wants to restart all the time. I thought maybe the first update was an exception, but the next one (a day later) also required a restart. Updates on Linux don't seem to require this unless there's a kernel change.

For the most part it connected to our Windows network with no problems. It took me a few minutes to figure out how to access network drives and printers but not too bad.

Next, I downloaded some software - Firefox, TextMate, and Parallels. This is where I really felt my unfamiliarity. On Windows, installing software is generally pretty easy - you run the installer and it does its thing. On the Mac I found it quite confusing. You download a ".dmg" file (disk image?) When you open that you see some files, and an icon appears on the desk top (the "disk"?). Now what? Firefox comes up with some graphic which I think is telling you to drag the program to the Application folder. It might help if there was a text explanation as well as the cryptic graphic. Of course, I made the mistake of running programs from the disk images which gave me grief because they were then running (even after I closed the window - another Mac / Windows difference). Experienced Mac users are probably laughing at my newbie confusion, but it's far from clear or consistent.

Eventually I got my programs installed. I haven't played with TextMate yet, but I've heard a lot of good things about it so I'm keen to give it a spin.

One of the first things I did was install Windows XP with Parallels. I could have used Bootcamp to dual boot Windows but having to reboot to run different software is pretty ugly. Parallels did a great job of installing Windows with no interaction (except for putting in the second cd).

It seems ironic that virtually the first thing I do with my Mac is install Windows! But since our business is all Windows software, it's a crucial feature.

I had downloaded the new Parallels release candidate since I liked the sound of the new "coherence" mode. It's awesome. I have my Windows task bar (set to auto hide) at the bottom of the screen, my Mac menu at the top, and my dock (also set to auto hide) on the left. Suneido seems to run fine. Our test suite runs as fast (if not a bit faster) than the brand new dual core PC I bought recently. It's pretty impressive to have OS X and Windows programs sharing the screen seamlessly.

I'm still having a little trouble getting used to the Mac mouse and keyboard. I keep trying to right click on things! And I keep trying to use Ctrl+C for copy instead of Apple+C. At least with Parallels Windows programs seem to accept Apple+C. And Home and End scroll to the top and bottom instead of going to the beginning or end of the line. Apple+right arrow seems to be end of line, but Apple+left arrow doesn't seem to work, at least in Firefox. Some of this is probably configurable.

Now I just need to install Ubuntu in Parallels and I'll have OS X, Windows, and Linux all in one wonderfully compact system.

Disclaimer - calling this my first Mac is stretching it a bit. I've worked with everything from Apple II's to Lisa's to Mac's, but I've never actually owned one for myself.

Tuesday, January 16, 2007

Amazon S3 Tools continued

Just to confuse things even more, I tried #Sh3ll from home on a big file and it worked fine (even over wireless).

So that would seem to indicate that the problem is with my network connection at work. Although that still doesn't explain why jSh3ll worked.

However, I didn't get around to trying the others and I only did the one test at home. So it could have just been lucky.

I'm not sure where that leaves me. Maybe we should try #Sh3ll (because it appears to be the easiest to deploy) on a few of our clients and see what happens.

Monday, January 15, 2007

Amazon S3 Tools

We ftp our client's database's back to our office nightly. This gives them an off site backup and it gives us quick access to their data to help support them. The problem is that as our client base has grown we have run into bandwidth limits at our office.

We could use a hosted ftp site, but I thought it might be worth trying Amazon's Simple Storage Service (S3).

The catch is that authentication is done with HMAC-SHA1 which we've never implemented for Suneido. So instead of writing our own interface to S3 I figured we could simply call someone else's command line tool.

There are quite a few available tools for S3. Here are some that I tried:

s3cmd - Ruby

#Sh3ll - C#

jSh3ll - Java

s3tools - Python

s3curl - Perl

I wanted something that would be easy to deploy on our clients, preferably without installing a language run-time. The best for this appeared to be #Sh3ll which was an exe that only required .Net 1.1 which should be installed on most recent Windows machines. However, there are tools to turn Perl, Python, or Ruby programs into standalone executables so that might be a deployment solution.

But the only one I could get to work consistently for large files was jSh3ll which requires Java 5. All the other tools give timeout errors. I'm not sure what jSh3ll is doing different, or whether Java just has better network support.

The question is whether it's practical to require the Java runtime to be installed on our customers servers. It doesn't seem unreasonable to me, but some people are touchy about it.

PS. There is a nice Firefox extension for S3

Saturday, January 13, 2007

eTrux

After reading The Innovator's Dilemma by Clayton Christenson some time ago, I decided to start a pilot project to make web-based trucking software. (Currently we develop and sell Windows desktop trucking software.) I'd also been hearing a lot about Ruby on Rails so it seemed like a good chance to try it out.

eTrux.com is the result so far. There's not a lot there yet, but it's coming along.

Unlike other people's "too good to be true" stories, we weren't able to produce this over a weekend. Perhaps if I or the programmer I hired had more (any) experience with Ruby or Rails (or even web application development) it might have gone faster. But it's been a slow learning process (many months) to get to where we are now. I think/hope that it will go quicker now that we have figured out the basics.

Have a look. Any feedback is welcome.

Thursday, January 11, 2007

Windows XP Annoyance

Ever since I upgraded my Windows machine it has insisted on weird paper sizes. Google Picasa showed crop sizes in cm and printing showed choices like A3 and A4 instead of Letter and Legal.

Eventually I tracked it down to choosing "English (Canada)" at some point in the Windows install. This shows up in the Control Panel > Regional and Language Options

Where should I start to complain about this?
  • When you choose "English (Canada)" during setup I'm pretty sure it doesn't give you any information or warning about what effect this has. I have a hazy memory of the question being phrased as "What is your language?" (nothing about units of measure or paper sizes)
  • Canada does use metric, so I can sort of see where the crop sizes in Picasa come from, but actually we still use inches for photo sizes e.g. 4 x 6, 5 x 7, 8 x 10
  • Canada does not use A3, A4, etc. paper sizes, we use Letter, Legal, Tabloid etc. When you go to the store to buy paper, that's what you find.
  • The Customize for the Regional Options doesn't even have a choice for centimeters versus inches or A3/A4 versus letter/legal.
The "solution" is to pick "English (United States)" even though I'm pretty sure I'm really in Canada.

Strangely, I don't recall having this problem before. Either something has changed or for some reason (it was the default?) I always made the right choice previously.

I realize many Americans think Canada is some obscure little outpost somewhere in the far north, but surely someone in Microsoft's hordes of developers and testers and QA people should know better! If nothing else, check officedepot.ca and see what paper sizes they sell!