Unexpected Behavior

August 20, 2006

Visual Studio’s immediate window, our old friend, is generally a very powerful debugging aid. A few judicious commands executed there can save hours of manually reading through source code that makes sense on paper on screen.

In fact the only place the immediate window fails to deliver is when dumping the contents of multi-line string variables. In this particular instance, it is a close race  between the immediate window and a chocolate teapot as to who is of less use.

Look at this sample code:

P.S. Yes, that is inline SQL! Sue me!

If you put a breakpoint at the Console.ReadLine() and dump the contents to the immediate window, this monstrosity rears its ugly head:


This, needless to say, is not something I generally want. This SQL statement cannot be pasted and executed in Query Analyzer / iSQL / SQL*Plus without forcing me to open another application and wrestling with search and replace and then pasting *that* to the query window.

Why not dump the string as it is?


Watching a newbie try to use Windows Media player this weekend made me realize just how hostile it is to completely green users. The more I thought about it the more I realized is that it actually is not as easy to use as it seems!

For  example:

Does this mean the movie is paused and will play if you click the button or it is playing and will pause when you click the button?

I found myself unable to answer what the heck this button does

And what the hell is the second set of maximize, minimize and close buttons for?


Here is the last update to builder EVER by me. It was a proof of concept and I enjoyed wrestling with the code but  there will be a proper tool from Microsoft eventually. No need for me to lose sleep over it!

kick it on DotNetKicks.com


2 Responses to “Unexpected Behavior”

  1. Al Pascual Says:

    We all do it (sql in line) thank you for coming out of the closet!

  2. Elling Says:

    I agree about the media player. In my opinion it’s been pretty poorly designed ever since version 7.0.

    Before that it was pretty consistent and functional, albeit a bit ugly.

    After that there’s been too much focus on bells and whistles, custom skinning and whatnot….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: