Tuesday, December 27, 2005

Santa, please no more customized system menus...

When I'm finished with a task, I close all programs and windows that were ivolved in that task. I usually do it by right-clicking the task bar icon of every window that should be closed, move my mouse one pixel up-right to select the Close item on the system menu (opened as a context menu when right-clicking the task bar) and click it to close.

It's a very effective and convenient way to very quickly close a series of windows.

... unless a program decided to customize its own system menu and add custom items at the end of the menu. Because in the rush, by the time I realize the last item is not Close, I already clicked it. Boom!
Stop! What did I do ? Oh I opened a dialog. Let's dismiss it. Let's now CLOSE this program and go on...

It's really only a detail, but a very frustrating one taking into account the hundreds or thousands of times I ran into it.

The MMC console is probably the most common of such BAD programs :

If only these customizations were helpful at all ! But tell me: who the f*** would want to go to the system menu to customize the view (isn't the View menu obvious enough ?) or, even better, to get help ?

Let's not even speak of the About system menu item added by VS's dialog-based app MFC app-wizard.

So, please Santa, no more apps with customized system menus...

Saturday, December 17, 2005

From ATA to SATA

I've been getting short on disk space on my main dev machine lately. Something that hadn't happened for at least 7 or 8 years. With a difference: Disk space is so cheap nowadays that you don't even think of trying to get rid of unused stuff. You simply buy a bigger hard disk.

Hence I decided to replace my 80GB ATA drive by a brand new 250GB SATA drive.

Here's what I learned. You may find it useful.

1. When you buy a S-ATA drive, of course you know you need a S-ATA data cable (and a mobo that supports S-ATA !). But did you know you also need S-ATA power cable ? I didn't. And if, like me, you live in the middle of nowhere, you won't find it funny to have to drive back to your favorite computer shop for a stupid 2.5 € power cable adaptor :-(

People tell me that such HDDs usually have a built-in molex adaptor but mine doesn't.

2. If you use Ghost to copy the contents of your old drive to the new one, you don't need to boot on the CD but you need to activate your copy to enable the Copy Drive function.

3. When using Ghost, make sure to select the Copy MBR option. Ghost tells you that you should use the option carefully. They are probably right but I'll tell you : If you want to make a plain vanilla copy of your drive, you need the option. I didn't click it. Then when I tried to boot on the damn disk, it started to boot but kept hanging again and again more or less when arriving at the logon prompt. Go figure... And try to realize that the Copy MBR option is what you're missing :-(

4. You're using AVG ? The Resident Shield module may fail to restart. Just re-run the installation program and choose Repair Installation.

You guess it: The transition was harder than expected because of a couple of stupid glitches (I don't even want to speak about the misleading BIOS messages that made me wonder why the SATA drive was not recognized even though it was). But the good news is that it's probable going to be another 10 years before I write about HDD space problems again !

Wednesday, December 14, 2005

Your ad on the Belgian police web site ?

Interested in advertising your products on the Police web site ? Yes ? Then stop by the Belgian police site. Here's a screenshot of the search results page:

Hhhmmm... Let me think... What kind of product would you want to sell to visitors of the police web site ? A radar detector, maybe. Or $49 Office CDs (They might request though that you display prices in Euros ;-)

Tuesday, December 13, 2005

Look 'Ma, no Shell !

- Click Start/Turn Off Computer
- Press (and hold) Ctrl+Alt+Shift
- Click Cancel (in the Turn off computer dialog)

Oops! The Shell is gone. You'll tell me that it's even easier to kill explorer.exe using the Task Manager. Maybe, but my method gives you a couple of bonuses :

1. Explorer is cleanly shut down. Certainly less brutal than killing the process.
2. From Task Manager, File/Run : Explorer.exe → Explorer doesn't restart as the shell anymore. Quite fun (!) to use Task Manager as your task list. ;-)

If it's useful ? Well it was for me: I had a file stuck. I couldn't delete it inaymore even though the apps using it were shutdown. It appears the shell was locking it. Shutting it down saved me a reboot. (Trick found here)

Tuesday, December 06, 2005

Did I say 'Language Inconsistence' ?

Yesterday, I mentioned the possible confusion when using auto-localized words (such as day names) in your UI.

Some don't need such auto-translations to mess up with languages. Look at that prompt I received from IE/Blogger a few minutes ago:

(I'm not quite sure if the guilty is IE or the Web site)

Monday, December 05, 2005

The drawback of localized days and month names

Here's a screenshot of the 2 ends of my taskbar :

The left end shows that my Windows UI is in English. The right end shows that even though I'm using Windows in English, I prefer to read dates in French. Cool ! And if I had a screenshot of my date and time control panel applet (the one you get when you double-click the clock), you'd see that while most texts are in English, the names of months is in French.

GetLocaleInfo() and GetDate/TimeFormat() allow your programs to display dates in user's language, exactly as Windows does. It even allows you to correctly display the first day of the week (Whether Sunday, Monday or anything else according to you user's locale). See LOCALE_SDAYNAME1, LOCALE_SMONTHNAME1, LOCALE_IFIRSTDAYOFWEEK et al.

However, my experience is that each time I sent an app featuring some day/months names, my colleagues at tech support and localization would send it back to me saying "Hey, Serge ! You put French days in the English calendar dialog ! Please fix it ASAP !"

No, I didn't ! You get the names in your language for free.
"Wheeew ! Coooool !" They say. But they would ask again the next time ;-)

Now, this little story points out a real problem : Language inconsistence. These auto-translations bring in a mix of languages in your UI, which is not good. Of course, it's up to you to decide if the advantage outweights the drawback. Your decision might not always be the same, according to the context.

BTW, appTranslator doesn't display dates but it displays a list of languages, which Windows can display in English, in the language of the Windows UI or the native name of the language.
It's not completely trivial to make a choice, especially after you read this.

What was that password again ?

I hesitate to post this one at all because obviously it could be used for unconfessable purposes. But it really helped me a couple of times in the past so I think I'd share it anyway...

Here's the scenario:
You need that password but you don't remember it. The most frustrating part is that it's typed there, under your eyes, in the password configuration edit box but of course it's masked.

The most common such scenario IMO is the need for a mailbox password to use web mail. You typed the damn password long ago in your mailer's account settings. Why would you want to remember it ? Well, to read your mail using web mail for example. Or to move your settings to your new laptop.

If this ever happened to you, then you need PasswordSpy. If it didn't, then you're most likely a liar. Are you in marketing ? :-)

Thursday, December 01, 2005

Fast or stable tools

Interesting poll on CodeProject last week :

What's better: Productivity enhancements or Stability?
  • I prefer a product that allows me to work faster
  • I prefer a product that is stable

So. What's your preference ?

25% of polled devs chose faster vs 75% chose stability.

"And you, Serge ?", you ask.

Well, first, thanks for asking ;-)

I don't choose one or the other. I want both.

I hate crashes as much as I hate sluggish apps that make me wonder what the heck is happening after I hit a button to bring a machine capable of about a *billion* operations per second down to his knees...

Bye bye Acrobat Reader, Hello Foxit Reader ! (And don't tell me to remove plug-ins, it's still way too slow).

It's because I want both that I made appTranslator both : fast AND stable.

Fast: For example, the string table view uses a virtual listview. Because for a reason that I've always ignored the standard listview control (CListCtrl in MFC dialect) is painfully slow not only to populate but also to empty (!) when the amount of items in the list grows to a couple thousands or more. And your string table often contains exactly that: A couple thousands or more strings. So I worked harder to make the string table view lightning-fast by using the virtual listview method.

Stable: As soon as I find a crashing bug (or a user reports one, which is _very_ rare), I assign it the highest possible priority ! If you find one, don't hesitate to report it: You'll get a fix very soon.