VS: simply things which are incredibly hard

There are some very clear examples out there about what I mean when I talk about VS obscurity being a major pain for getting people extending the platform and trying to make my dream come true.

As a rule of thumb people should know that if demostrating incredibly basics things takes you more than a few words and a trivial code snippet then most probably something is wrong.

There is a post by Dr. Ex on how to detect when a toolwindow is closing, it's 52 paragraph and 509 words in length, pretty lengthly, ugh?

What this should have been instead?

mytoolwindow.Hide +=  new EventHander(hide_handler);

There is another post from Sara Ford that touches how to insert some text in the editor, it's 20 paragraphs and 300 words in length. If you have the estomatch to go throught it you will notice all sort of crazy stuff like you having to do your own memory managament (flashback to 1978!):

IntPtr pText = Marshal.StringToCoTaskMemAuto(text);

try

{

      textLines.ReplaceLines(0, 0, endLine, endCol, pText, len, null);

}

finally

{

      Marshal.FreeCoTaskMem(pText);

}

What this should have been instead?

myeditor.Text = "foo";

Luckily enough both, Dr. Ex and Sara, write their posts with a salt of humor which I don't think it's a coincidence but a technique for trying to eliminate the idea of suicide from their weblog readers while they're reading.

I'm fine with their approach as long as they understand that there isn't really anything funny about it and that this really, really, really begs for a change sooner than later.

2 Comments

Comments have been disabled for this content.