really long error messages can finally be read without the mouse

I was playing around with internal interfaces today, trying to get them to work with just the access modifier internal. The compiler didn’t like that very much. Did you ever get this error message:

‘ClassLibrary1.FooClass’ does not implement interface member ‘ClassLibrary1.IFoo.Bar()’. ‘ClassLibrary1.FooClass.Bar()’ is either static, not public, or has the wrong return type

or how about this one:

“The type or namespace name ‘Data’ does not exist in the namespace ‘System’ (are you missing an assembly reference?)”

I get that one all the time! Anyway every time I’d build, I’d get a message in the Task List (we all know that), but in the Task List uses some crazy ListView that doesn’t behave like any other ListView ever. So to view the description like the above, one would have to expand the column by dragging <gasp!> then scroll twice the screen width to read the whole comment.

When I got home I went to my Whidbey preview and I am happy to report that the VS team fixed that. Excellent. Now here’s a good long-winded post with no  point.


BTW, I figured out my problem from this post here. I had heard of Explicit Interface implementation before (I swear!) but never saw why anyone would use it.

Coding Conventions – Use your inside voice

At work I have to do some COM interop stuff. I’m looking forward to it, since that’s part of the framework that I haven’t played with yet and it’s a complex topic, so I’m willing to sink my teeth into it.

I think one of the deterrents to looking into it sooner was the SCREAMING_CAPS_NOTATION that a lot of COM objects had; all that lpzstrVariableName stuff would make my eyes glaze over too. I would quickly close the book or browser window that contained that code, shrug my shoulders and move on to something else that has instant learnablity – like Solitaire.

I realize that the SCREAMING_CAPS_NOTATION and hungarian notation were developed as guidelines because of the weak typing of C. Those guidelines presumably made the code more readable, but having only touched C/C++ a bit in school, reading sample source wouldn’t put me in the mood to look at more. In C code this would be:

state_my_learning_state_of_mind = CRINGING_IN_FEAR && MOVING_ON;

No wonder the notion that computer programming is hard prevails. It takes five minutes to understand what’s happening in a five lines of code!

Even Java wouldn’t let it die. Hungarian Notation is gone, but SCREAMING_CAPS_NOTATION is still lurking there in Java’s constants. Maybe that practice will die in Java with the birth of enums in Java 1.5. Here’s hoping. Even camel case looks weird for method names, but this is just showing my bias for C# 🙂

I find C# code and most of Java code to be more readable than the previous conventions, and I’m sure I’m not the only one. Microsoft, for one, went out of their way in .NET to eliminate those conventions. They took most of Java’s guidelines and took them to the logical conclusion. And that’s a good thing! And if it’s more readable without all that type information, why was Hungarian notation put in there in the first place?

Does anybody miss it?

Finally! Some whidbey.

One of the sweet things about going to VSLive for Imagine Cup was getting the tech preview of Whidbey. I’ve been wanting a copy of that ever since I got to read about the features at the PDC. I’ll write more about what I like in VS 2005 and .NET 2.0, but my first impression is that there so much new stuff, I don’t know where to begin: it’s like learning .NET 1.0 all over again. So I’ll probably focus on the new Winform controls and features. There is lots of neat stuff in that namespace.

I’ve read of a few problems installing but it was a snap for me. Virtual PC is indispensable.

Also, there is a bit of a shock using a MS product that doesn’t have the polish of, well, an MS product. I know, I know. It’s alpha stuff, but it’s still pretty weird.

I have a March build, so hopefully they put back Ctrl-Shift-B back in for other builds. You know what the F stands for in F2? Far away.