Fog Creek Software
Discussion Board




Cancel != Debug >-(

What genius at Microsoft thought that Cancel should really mean 'Please load up several gigabytes of Visual Studio so I can look at some bloody assembler.  Now that Word loads so quickly I find the crashes just aren't taking up enough of my time.'

Ged Byrne
Friday, June 20, 2003

It's not very clear which dialogue box you're talking about, Ged.

John Topley (www.johntopley.com)
Friday, June 20, 2003

I totally agree... of what use all this assembler is to the casual user ?!

Eli Bendersky
Friday, June 20, 2003

Why would the casual user have Visual Studio installed?

Just me (Sir to you)
Friday, June 20, 2003

John, if you've installed a debugger on a Windows computer, when an application crashes, the dialog box which appears includes a button to start debugging the app, and that button is "Cancel."

The answer is that the programmer working on that dialog was lazy, and wanted to use the one-line "MessageBox" function rather than create an all new dialog box. The MessageBox function only allows certain combinations of buttons like Yes/No/Cancel, OK/Cancel, etc. and doesn't include the capability to overwrite the text on those buttons. If you want custom text (like OK/Debug) you would have to create your own dialog box, which requires a lot more code (especially since it would have to automatically resize to compensate for different lengths of the text in different languages).

Finally -- what use is the assembler to normal users -- none, but normal users don't install debuggers. Programmers do. And Windows has no a priori way of knowing that Word is the kind of app you don't want to debug as opposed to one of your own apps which you DO want to debug, so it always shows this dialog.

Joel Spolsky
Friday, June 20, 2003

Would it reallly have been that difficult to add a separate 'Debug' button?

Years of playing What-a-mole means that I hit the cancel button before I even consiously notice the unwanted dialogue.

Are they angry with me for not paying more attention to their dialog boxes?

And why is this option turned on by default?  Forget the casual user, what use is assembler to the average VB programmer?

Ged Byrne
Friday, June 20, 2003

dude, just install symbol informations, and set a descent
default debugger that can harness it (windbg?)

just that you are on top of some ten layers of abstraction does not absolve you from the duty to understand the basics

(well , i sound like a bitch ;-) i know it. that's what you get after ten years of windows.

Michael Moser
Friday, June 20, 2003

The stupid MessageBox API is responsible for tons of crappy UIs

The fact it is so difficult to change the button text, icon, add a don't ask again, timeout, etc. means tons of programs muddle thru with a non-ideal UI.

While I understand that you might want a simple API for common cases, the failure to include an additional API with all the relevant options. is in my opinion so short sighted, incredibly stupid, and obviously short-sighted and stupid, I can't believe not one person pointed this out when designing the Windows API.  Heck this API is unchanged (or virtually unchanged) since Windows 3 at least, didn't a single person at MS complain?

S. Tanna
Friday, June 20, 2003

But were talking about the Debugger for Visual C++ here.  These people implemented a low level hook to capture all unhandled exceptions and load the debugger to show a disassembly of the guilty code.

These people must be amazing coders who know the windows platform better than anybody.

Surely they could have managed a customer dialog?

Ged Byrne
Friday, June 20, 2003

I'm going to agree with S. Tanna.

Anyone know WHY the message box dialog only has fixed options? Meesages like "You're about to do something bad. Are you sure maybe you don't want to? OK or Cancel." come up all the time, and this is one of the more common ones.

The could have at least used abort/retry/ignore...

BTW, this particular dialog is fixed on on Windows XP with crash reporting. Now you pick 'debug', 'report', or 'don't report'.

mb
Friday, June 20, 2003

I have a feeling the unchanged MessageBox API dates back even further than Window 3. The failure to fix it in any subsequent Windows version: it's like somebody at MS went to sleep in the 80s and hasn't woken up yet.

If you try and create your own general MessageBox routine which can cover all the options, expand to fit the text etc., it's a lot of work. So either you (1) get-by with a crappy UI, (2) every application wastes time creating a decent MessageBox, (3) you make a dialog for each special case (which is also a great waste of everybody's time).

I have a feeling that MS internally do have a general message box routine - it seems to appear in lots of their apps (Word etc) - so what they've done is keep in their apps rather than add it to the Windows API, and keep it like that for more than a decade.

S. Tanna
Friday, June 20, 2003

"Do you want to debug?  YES/NO"

I bet I would answer this question correctly a lot more frequently than the current text.

Sigh
Friday, June 20, 2003

I agree with you GED.  I can't count how many times I've hit cancel and thought "No, No, No!!!!!  I didn't mean that!".  I hear ya :)

shiggins
Friday, June 20, 2003

The joke is, they do have an option for Abort/Retry, but using the word "Abort" in a user interface is now verbotten at Microsoft, due to the negative associations of the word itself.

For Juno I wrote my own message box replacement that allowed arbitrarily long text and arbitrary buttons. It was a few days of work.

I'm pretty sure MessageBox has been around since Windows 1.0. It has lots of advantages that are hard to repro if you roll your own, many of which are not well known. For example, if you call MessageBox and it fails to allocate memory (e.g. if you're displaying an "out of memory" error message) it will run in a special mode that doesn't require new memory, using a preexisting window and preexisting system fonts that are created when Windows starts up and are guaranteed to be available even in  the most pathological system-is-crashing scenarios. That's REALLY hard to duplicate yourself.

Joel Spolsky
Friday, June 20, 2003

A few days work X thousands of applications = crazy, if you ask me

What also surprises me is not only did they not add a better version into Windows - they didn't include it in MFC

Here is a free source for a pretty good one (I'm not associated with this site in any way)
http://www.gipsysoft.com/messagebox/

S. Tanna
Friday, June 20, 2003

Nothing useful to add, but GOD do I hate that message. Makes me cry every time I hit cancel. :(

Steven C.
Friday, June 20, 2003

Ok, so the reusing resources stuff is preety cool.  Still, if you can manage to load Visual Studio (and it must be loading a hellova a lot, because it takes forever) then you can certainly manage a custom dialog.

Ged Byrne
Friday, June 20, 2003

I hear you Loud and clear Ged.

Prakash S
Friday, June 20, 2003

Guys, why not learning it couple of times and NOT hit Cancel ? That is my way ..

Evgeny Goldin
Sunday, June 22, 2003

>Guys, why not learning it couple of times and NOT hit Cancel ? That is my way

Human factors.

People get so many random dialogs with meaningless random text that they've learned one thing:

If you don't have time to understand what this dialog says, CANCEL will do nothing.

So they hit cancel. After all, they didn't ask the computer to do something, so whatever it's trying to do can be canceled for now and done later.

Of course, in this case, cancel means something totally different. Whoever wrote this dialog does not understand how a normal person works.

mb
Sunday, June 22, 2003

why not just move to linux, then you dont have to worry about it ;)

anon
Sunday, July 06, 2003

*  Recent Topics

*  Fog Creek Home