Friday, December 30, 2005

App Config

Here is the first of the promised rants. Microsoft really want you to believe their stuff is easy to use. I suppose this line is directed at Corporate Managers who believe that if they buy lots of Microsoft products, their programmers will produce twice as many features in half the time. And snake oil cures cancer.

And it's true: their stuff is easy to use. But it is not easy to learn to use. That's because it is complex and convoluted and poorly documented. After all, why should Microsoft spend money that Bill Gates could be giving to charity documenting their products? Let Microsoft Press and Wrox Press and Apress and Addison Wesley and O'Reilly make some money, too.

Take, for example, app configuration. This is a fairly complex subject that a programmer would have to spend many hours understanding before he could write code to use it. So Microsoft gave us the settings designer in VS2005. With the settings designer, a programmer can add an application setting to a project without writing a line of code or understanding how the forms designer interacts with the settings. But let him try to do anything that is not an example straight out of the documentation, and bad, scary things can happen. And without understanding all that stuff he didn't study, he is going to spend a bunch of time fixing the mess it put him in. In fact, he could spend more time recovering than he would have spent learning how it worked in the first place.

If you want a worked-out example, visit my web site, wblum.org, and take a look.

Thursday, December 29, 2005

Tracepoint

Visual Studio 2005 is a combination of Christmas and Easter. It's Christmas because you receive so many new goodies. It's Easter because you keep finding Easter eggs.

The latest thing I found when I least expected it is Tracepoints. Open your favorite source file and put the mouse on a statement of interest and right-click. Choose Breakpoint and then on the cascading menu click Insert tracepoint. The resulting dialog box will explain your choices. But in brief you can automatically trace a huge ton of information every time that statement is executed. The default is perfect for tracing whenever a method is executed. You can turn a tracepoint into a breakpoint by unchecking the Continue execution box.

A note on huge tons. Nothing special, they're just the same as long tons, I think 2,240 pounds.

Saturday, December 24, 2005

Initial Post

This is the initial post on the Code Wrastler blog. Just to let everbody know, I am a user of Microsoft development tools. Yes, I've been a Unix programmer, but that was in the dim mists of history when everything was in black and white. Now that I've been assimilated, there is no Unix or Cobol or PL/I or APL or any of those environments I used to know and love.

Now, as for Microsoft tools, I try to limit myself to C#. I will occasionally regress to C++, when required to by the people I've convinced to send EFT to my bank. But C# is where I live day to day. And Visual Studio 2005 is the sugar, fat, salt, and caffeine of my programming diet, and the alcohol, nicotine, and cocaine of my recreational drug bag. Without Intellisense, there would be hyperventilation, and possibly regression to assembly language.

A note on wrastling. Wrastling is what members of WWE (formerly WWF) do. Wrestling is what olympic wrestlers do. Oh, and by the way, wrangling is what cowboys do. But that's somebody else's story. So a code wrastler, obviously, wrastles with code. The code throws him outta the ring, but he drags himself back in and gives the code a body slam and a kick in the balls. The ref gets mad, but the crowd cheers. The code goes and gets a chair and starts swinging it, and things go downhill from there.

The reason I decided to start a blog is because everbody else is doing it. What I think I'll put here is rants about how stupid the Microsoft products are. That's not because I think there's anything wrong with Microsoft products when I am calm and rational. But there are times when I get really frustrated because I can't figure something out, or it's not as obvious as I think it should be. Then I usually blame Microsoft. Who am I supposed to blame, Linus? A man can't blame himself, can he? Anyway, Microsoft is big and strong. They can take it. And really, they know I love them, so they can't get too mad at me.

So anyway, what I'm doing now is playing with all the new features of the 2.0 release of the .NET Framework and C#. The mind boggles at the sheer abundance of new features. The mechanics of typing in code is light years ahead of when I started punching 80-column cards. It's also a quantum leap ahead of just last year (VS2003). So right now I'm a happy coder. But soon, I suspect, I'll run into a quirk I can't figure out. And then I'll come here and rant.