Tuesday, May 20, 2008

Strange messages in Windows: Part N

I do like making a note of strange dialogs for some reason. Here is one I got trying to copy a file in Windows Explorer:So what does Internet Explorer have to do with copying a file? The source and the destination were both on my local computer. Actually, the source file was inside a Zip archive I downloaded, not using Internet Explorer though.

Oh, and that icon looks a bit dated too.

Tuesday, May 06, 2008

Useless error messages

Don't you love them? :)

Tuesday, April 01, 2008

Visual C++ 2008 Incremental Link Bug

Finally, Microsoft released a hotfix for it. You can download it from the above link.

Wednesday, March 19, 2008

More Amazon

Amazon.co.uk have a little thing on their website where you can submit corrections in their product listings. It seems a bit cheeky really, but even worse look what happens if you do actually bother to submit a correction:

Greetings from Amazon.co.uk,

Thank you for using the Catalogue Update Form.

For ASIN: B000YO1MJU, Title: LiteOn 20x Int. DVDRW IDE Retail Kit, we have received your updates to the attributes listed below. Beneath each attribute we include the action we have taken.

Attribute: Brand Name

Current value: LiteOne

Your suggestion: LiteOn

Action: None. We could not verify the requested update.

Data accuracy is highly important to us. We appreciate the time you have taken to submit your updates to us.

Best regards,

Catalogue Department

www.amazon.co.uk


Wow, lol.

Friday, March 07, 2008

Amazon artwork grabber script

If you're like me and you like storing all your album art in a single folder I made a quick and dirty Windows Powershell script that automatically grabs artwork from Amazon for all tracks in your foobar2000 Media Library (using foo_comserver2). It works pretty well for me, I only got one wrong artwork that was due to tagging issues, but this will probably vary depending on what is in your media library.

You'll need to modify the script a bit for your own needs. You'll need to set $AWSAccessKeyId (you either find one from e.g. some other software or failing that register at Amazon yourself).

I would have made it a proper Powershell script but I was put off by the restrictions in place by default on executing those so you'll just have to copy and paste it to the prompt and press enter a couple times if needed.


Update: Script moved here.

Friday, February 29, 2008

What's NOT fixed in Vista SP1?

Oh, they definitely fixed some problems, but they also didn't fix some (and possibly added some).

1. I think this one is new because I never noticed it before. Open an explorer window and start renaming a file. Change the extension and then left click in some empty space in the explorer window. The "Confirm file extension change" change prompt comes up, left click on Yes. Now very annoyingly a selection box appears.
2. If you open an explorer window, select a file, and then minimise and restore the window the keyboard focus is lost and set to nothing useful (you can visibly see the selected items having the inactive colour). This means you can't use the mouse wheel, left/right keyboard keys, CTRL-C etc. until you click on the item list again. I have no idea how such an obvious bug remained in RTM and even in SP1 - it completely broke my work patterns using CTRl-C and CTRL-V. For more weirdness, after doing this you can press the application/context menu key to see a context menu pop up in a random place.
3. On my desktop with Vista x64 I still see the problem where randomly (although very rarely) some icons in the Control Panel display as blank, useless icons. Reopening the window sometimes fixes it.
4. There's still some issues with the synchronisation of the "File name" field in the "File Open" dialog. In this screenshot, what will happen if you click on Open?

In this instance (the events beforehand matter), it wouldn't open Test.mp3 specified in the "File name" field but rather the Test2 folder.
5. Oh, this isn't my complete list, just the first ones that popped into my head.

Also, not technically a bug, but it's extremely annoying how the Safely Remove hardware command refuses to safely remove a portable disk drive (specifically: an iPod) when any Windows Explorer windows have a folder in the drive displayed. XP used to close those automatically (I mean, I did say I wanted to disconnect the device after all..?)

Friday, February 22, 2008

Problem Reports and Solutions

How many things are wrong in the screenshot below?
In case you're wondering, this is the rather random file linked.

Maybe this solution came from Microsoft's "COMMUNITY SOLUTIONS CONTENT" which also produces some pretty bad knowledge base articles - just how do you lunch Internet Explorer?

Tuesday, January 22, 2008

Elephantsforpets

The government talks about the cons of having elephants as pets...

Monday, December 03, 2007

VC 2008 released!

...And incremental linking is apparently broken! What great fun!

Friday, November 23, 2007

WTF

Saturday, October 13, 2007

Where does Visual Studio fail?

When you create a new Win32 project in Visual C++ 2005, you get a message loop that looks like this:
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

So what's wrong with that? Probably the fact that the MSDN documentation for GetMessage specifically says not to write code that looks like that! This is what it does say:
Warning

Because the return value can be nonzero, zero, or -1, avoid code like this:

while (GetMessage( lpMsg, hWnd, 0, 0)) ...

The possibility of a -1 return value means that such code can lead to fatal application errors. Instead, use code like this:

BOOL bRet;

while( (bRet = GetMessage( &msg, hWnd, 0, 0 )) != 0)
{
if (bRet == -1)
{
// handle the error and possibly exit
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

Perhaps it doesn't make much difference in actuality, but you would have thought they would at least make the code in their template consistent with their own documentation (which comes with Visual Studio in the MSDN library, I might add..)

Monday, September 24, 2007

Bugs, bugs, bugs

Today I decided to run the Windows Experience Index assessment again since it said it my score needed updating. However, peculiarly when I clicked "Refresh my score" there was no progress dialog shown. You could see the test was actually running, evident from Aero being temporarily disabled etc.

Luckily for me, I had an inkling as to where the progress dialog had gone. A few days earlier, I had decided to enable the option "Lauch folder windows in a separate process" in Folder Options and I suspected that was causing the problem. So I disabled that option, closed all windows then opened system properties to re-run the test. Bingo! Progress dialog was back. And just to check my findings, I enabled that option on a another computer - with the same lack of a progress dialog.

So, in summary, its probably best not to enable that option.

Saturday, September 15, 2007

Minor Vista bug

As I like to note them, I just found another minor but annoying Vista bug.

Go to Control Panel / Power Options / Edit Plan Settings. Click on one of the drop downs, press down or up on the keyboard and click on the drop down (same button area) again. Lo and behold, the Save Changes button stays disabled - so you can't apply the changes.

Probably mixed mouse and keyboard navigation like this is not so common, but I use it pretty often on my laptop + touchpad. It's funny because VS2005 has same bug in some places (e.g. project properties) - which I reported before it was released but they refused to fix at the time because it was below their bar (next release was release candidate or something). They didn't fix it in SP1 of course.

Sunday, September 09, 2007

Vista in nuts mode

The Vista on my laptop decided to go (literally) nuts a few days ago. Nuts, as in a few minutes after login it would half-freeze. Half freeze as in stop responding to keyboard and mouse, thrash the hard drive but still let some UI updates through (e.g. clock).

This would obviously make locating the cause a nightmare. I did manage to cause some funky BSODs in this mode trying to hibernate (something like INTERNAL_POWER_FAILURE ?)

Safe mode was working, but I couldn't see what I could to resolve this. Nothing interesting in the Event Log, and System Restore had no checkpoints (probably because I had it disabled when I was using XP and this install was an upgrade of that).

So I decided to format and reinstall Vista. Alls well that ends well because now Vista is far more responsive. It could be related to the recent performance/reliability updates (which caused problems on my old vista install). Or possibly the lack of junk installed that came with the laptop. What's great is that coming out of sleep mode actually happens in a reasonable time now!

Friday, August 24, 2007

Vista vs UX guidelines

One of the changes in the Vista UX guidelines is regarding capitalisation. On the subject, they say:
Use title-style capitalization for titles, sentence-style capitalization for all other UI elements. Doing so is more appropriate for the Windows Vista tone and its more descriptive use of text.
Exception: For legacy applications, you may use title-style capitalization for command buttons, menus, and column headings if necessary to avoid mixing capitalization styles.
They also have a whole article dedicated to menus, in which they say on labels:
Use sentence-style capitalization.
Exception: For legacy applications, you may use title-style capitalization if necessary to avoid mixing capitalization styles.
One does wonder how much attention Microsoft pay to these guidelines. Let's take a look at the context menu for a shortcut to a application in Windows Explorer on Vista RTM + updates.


Ignoring the entries from 3rd party software, what do we find? Mixed capitalisation styles. In sentence-style, we have "Run as administrator", "Open file location" amongst others. In title-style we have "Pin to Start Menu", "Create Shortcut" amongst others. It does looks somewhat unclean and why they left it like this can only be described as a mystery.

In the same article about menu guidelines, we see some interesting differences between what is shown there in the screenshots and what is actually in Vista:


In this screenshot, WordPad in Vista is on the left, and from the article is on the right. At least part of the UX guidelines were written after Vista was released, so perhaps these changes should be looked out for in Vista SP1.

It was also interesting to note in the same UX guidelines they point out some errors in Vista RTM. For example this appears in the article on progress meters:

Incorrect:

In this example, halting the copy leaves any copied files, so the command button should be labeled Stop.

If you've tried to cancel a file-copy operation in Vista, you'd realise this is talking about the actual behaviour in Vista.

Command Prompts on Vista

I learnt of a neat trick on Vista through another blog - if you hold down shift whilst right clicking on a folder on Vista you get an extra entry: "Open Command Window Here" (in general you get some extra entries, folder or file). Very useful - previously on XP I had to install a PowerToy (as I remember?) to get this in the context menu.

It does lead me in to a bit of a rant though. When you have UAC enabled, sometimes you need to use elevated command prompts which start in a particular directory. This was the case for myself one day, I wanted a reusable shortcut for this so I created a new shortcut to cmd.exe and changed the "Start In" directory. Opening it showed the expected behaviour - it started in the chosen folder. Now to run it as administrator (using the context menu option). Failure - it starts in "C:\Windows\system32" for some reason. Possibly because it's the location of consent.exe, I don't know, but it's not the most intuitive behaviour.

Thursday, August 23, 2007

Vista + Menus

Normally, or at least by default, menus in Windows Explorer on Vista are hidden until you press the ALT key on your keyboard. But for some reason my Vista install displays menus permanently in all Windows Explorer windows. Despite the fact I have the "Always show menus" option disabled:


It's pretty annoying so I wouldn't mind knowing how to fix it..

Tuesday, August 21, 2007

Vista Bugs Again

Is disabling the status bar by default a good reason not to test it?

Crap, I didn't know you could make files with negative size. Why did I bother buying a 750GB hard drive?

More Vista whinging soon!

Monday, August 20, 2007

Vista File Save As Dialog Gone Wrong

I click "Save As" one day in my favourite application only to be very confused:

Ahem, where do I enter the filename?? Which folder is empty?! Let's try clicking the "Browse Folders" button:

OK, now my folder is not empty but still nowhere to change folder or enter the filename.

One last try, let's click the "Hide Folders" button:
Now, this was in Mozilla Firefox. So who's to blame, Firefox or Vista? It is a standard dialog provided by Windows so it would be odd for Firefox to cause this. However it was not occurring in other applications at the time and trying again to save a file in Firefox resulted in the same mess. Even the breadcrumb/navigation bar was missing! Maybe OLE/COM initialisation related, who knows...

Monday, February 26, 2007

Winning e-mail

All I can say is hehehehehehehehehehe
Dear xxxx


Congratulations!

We're very pleased to tell you that you were one of the first 1000 people to qualify for a free copy of Windows Vista Ultimate by taking part in our UK Developer Launch event online.

We will ship the prizes to the winners as soon as we take delivery of them from our manufacturing unit. You can keep up to date with our shipment schedule via Ian Moulster's blog at http://blogs.msdn.com/ianm.
Your prize will be shipped to the following address:

xxxxx

xxxxx
xxxxx


Once again, many thanks for taking part in our Developer Launch event and we hope that you enjoy using your product.

Kind regards

The UK Developer Launch Team
I think that's the first time I've won anything :o I'll post some pictures when the actual thing arrives.