downloads, net comments edit

The Fusion Log Viewer (in pre-.NET-2.0) is a great tool but is a pain to work with if you’re working with ASP.NET apps. The built-in ASP.NET log setting is useless, which means if you’re going to debug ASP.NET, you need to use the Custom setting. MSDN talks about how to do this, but I find I do one of two things, always:

  1. Enable logging in a custom folder (sometimes logging everything, sometimes logging only failures
  2. Disable logging to the custom folder (and, in most, if not all cases, logging of binding in general, including failures)

To that end, I wrote a little script to handle that. From the command line (available by running the script with a “/?” parameter):

This script "enables" and "disables" custom settings for the Fusion
Log Viewer tool.

Enabling settings will:

-   Create a log folder (default: C:\\fusionlogs)
-   Add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogPath and
    set it to the log folder
-   Set HKEY_LOCAL_MACHINE\SOFTWAR\\Microsoft\Fusion\LogFailures
    to 1
-   Optionally set
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\ForceLog to 1
-   Optionally set
    to 1

Disabling settings will:

-   Delete the log folder and its contents
-   Delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogPath
-   Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\LogFailures
    to 0
-   Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\ForceLog to
-   Set
    to 0

Usage: FusLogVwSet.wsf [/enable] [/all] [/disable] [/logpath:value]


 enable : Enable custom fuslogvw.exe settings.
 all : When used with /enable, logs both failures and successes. Only
       valid with /enable.
 disable : Disable custom fuslogvw.exe settings.
 logpath : Sets the log path (default is C:\\fusionlogs). Only valid
           with /enable.

If you use the Fusion Log Viewer to debug your .NET assembly bindings, this is pretty handy stuff.

Note that since it writes to your registry, you need rights to do that. It’ll fail if it can’t write the appropriate keys.

[Download FusLogVwSet.wsf]

(Of course, no warranty, expressed nor implied… use at your own risk, etc.)

General Ramblings comments edit

I was trying to keep this bottled in, but after today I’m realizing that I’m attempting to internalize a frustration beyond my abilities to control, so it’s time to release it upon you.

I am sick and fucking tired of the level of sheer incompetence in the world.

I went to the fabric store the other day to buy some stuff to work on my Halloween costume. Just a spool of thread and some elastic. The ridiculous incompetence when I reached the cash register was dumbfounding - and I’m not even talking about the staff! It’s the customers! Do you really have to count - twice - all $0.97 you got back in change… while standing at the register and holding up the only open checkstand? Making small talk while you’re doing it doesn’t make it better, it makes you stupid. Get out of the way so the other 15 of us standing in line can get through.

That was the part I was going to bottle inside. I was going to let it go. Then I got into a set of meetings today regarding the project I’m working on. A mysterious and arbitrary requirement showed up that the new product we’re working on - a standalone API - should be somehow “backwards compatible” with a nearly unrelated product. Not only that, but the idea reared up that the taxonomy of classes in the API was nigh unto irrelevant.

I won’t lie to you, folks. I’m anal about stuff like naming conventions, standards, and taxonomy when coding, especially when it’s lower-level API stuff that other people will be using as the foundation for their applications. I believe stuff should be elegant, well made, and simple to pick up and use. Familiarity is key for the developer - if it’s named in a familiar and conventional fashion, it will be easier to learn and use.

So when it comes out that people think a class like “TopLevelNamespace.MyReallyCoolClassThatDoesNeatStuff” is a better idea than organizing the class hierarchy by namespace to group similar classes, like “TopLevelNamespace.Stuff.Neat.ReallyCool.MyClass,” I reach a state of insurmountable cognitive dissonance. The idea that people want “standards” but won’t even take the time to name things properly is… I don’t even know what it is. It’s not even comprehensible to me. Like “new math.”

Anyway, we got into it for quite some time, and even after I ended up basically coming out ahead (and maybe enforcing a little structure on the chaos), I didn’t feel good about any of it. Having to even have that debate… it should never have happened. If people did things right the first time rather than jamming stuff together over a couple of days and calling it ‘done,’ we wouldn’t have this going on. Instead, I have to fight people to make robust, extensible, easily debuggable code. Astounding. Do people not think ahead?

Then you still have the idea of “backwards compatibility” with this unrelated product. I ended up coming out on top there, too, but you have to dumb down the argument in order to get it to sink in. “We’re making a square peg factory and you want it to output things that will fit in round holes. Somehow that’s not going to work.” Then you get stuff like, “Well, can’t you make a square-peg-to-round-hole-adapter?” No! It’s a new thing! We’re basing our whole framework on the idea that holes and pegs are square!

Argh! I’ve got my angry music on, and I may just have to wear my combat boots tomorrow.

General Ramblings comments edit

Watched the Aladdin DVD this weekend. Good stuff. Thought it was interesting that the version of the opening song on the soundtrack is different than the version on VHS and DVD. Good to see it again, though.

Saw a preview for a movie, National Treasure. I think it could be cool. Of course, I’ve seen a lot of trailers for movies I want to see but haven’t gotten to. Maybe I’ll make this one.

General Ramblings comments edit

No one particular thing driving this post, more just a random blast of thoughts and items.

The Winter Hawks canned the best (in my opinion) player on the team, Robin Big Snake, apparently because he was being a little mouthy. Apparently he’s now playing for the Owen Sound Attack (whoever that is). I’m still trying to piece it all together, but it’s sounding like scandal. Heh.

I was a big fan of Schoolhouse Rock, and while this isn’t real Schoolhouse Rock, it’s a pretty funny take on it. Check it out - Pirates and Emperors.

We watched the Star Wars movies last week and now I’m really itching for a Millennium Falcon. Anyone love me enough to pony up? No? Darth Vader’s Tie Fighter maybe? Guess I’ll have to save up a bit (after the tires last week, I’m running a little low on funds).

humor, net comments edit

I’m not sure how my mind works or why it thinks of these things. Maybe I’m thinking of work too much. Thing is, I’ve had to explain this “Navigation Service” class that we’re working on more times than I care to count. (The Navigation Service is a class that helps in providing navigational menus, breadcrumb trails, and other navigational artifacts by maintaining an object hierarchy representing the site… basically.)

So I was on the way home last night and decided it might be described best by Adam Sandler’s “Cajun Man” character:

Presenter: The Navigation Service provides an object-oriented view of the site map, related links, and quick links for a site. You can use it to display, for example, a tree-view of the available pages for a site.

Cajun Man: Hierarchical presenta-shawn.

Presenter: The Navigation Service is accessed through a property available in the base page class. You could cache an instance of the Navigation Service class and then access that cached instance through the property on the page.

Cajun Man: Single-tawn.

Presenter: When getting a reference to the Navigation Service, you don’t actually create the instance directly. Instead, call the static “GetNavigationService” method and it will get an instance for you.

Cajun Man: Factory crea-shawn.

Presenter: What the Navigation Service does is it takes the navigation.config file and reads it into an object model based on the file schema.

Cajun Man: XML deserializa-shawn.

Presenter: Then it does some manual processing to make the objects just a little bit “smarter” than that, filling in calculated values and such.

Cajun Man: Initializa-shawn.

Presenter: If you have a bunch of, for example, “Item” elements in the “Site,” those will come out in the Navigation Service as a…

Cajun Man: Strongly-typed collec-shawn.

Presenter: Right. And if there are no elements in a collection, you end up with…

Cajun Man: Empty collec-shawn.

Presenter: Well, no… actually you get a null value, though the Navigation Service could be updated to make any null collections be empty collections. That way you could just iterate over the collection rather than having to check for null all the time.

Cajun Man: No NullReferenceExcep-shawn.

…that’s as far as I got before I made it home and my train of thought was lost, but I think you see how it goes. While I’m nowhere near as funny as Adam Sandler, maybe I can use this to explain (in a memorable fashion) how this thing works. Heh.