OdeToCode IC Logo

Fragile

Tuesday, December 28, 2004 by scott

When I was growing up, I thought I lived in the most boring place on earth. The Blue Ridge mountains in Maryland reach a humble elevation of 2000 feet (600 meters). The mountains are known for coal, and coal is relatively uninteresting – at least compared to, say, the hot magma inside of Mt. Saint Helens. As a kid, I always wanted to know what an erupting volcano would look like.

The climate in the northeastern United States is tame. Tornados are extremely rare, and I figured there was little chance of me being whisked into the Land of Oz with Dorothy. Growing up, I always wanted to save Dorothy from those flying monkeys.

Earthquakes also fascinated me. I used to picture earthquakes as making a cartoonish clean split in the ground. The ground here is rich in limestone – a soft rock. The most interesting ground features in this area are the numerous caves and sinkholes formed by erosion. Being I’m a tad bit claustrophobic, I’ve always considered spelunkers to be quite mad.

Then there is the Maryland shoreline. The waves in Ocean City are mostly small, and often cold. You won’t see any surfing championships here. As a kid, I used to look at pictures of surfers with waves towering behind them and imagine how exciting it must be to be ahead of a wave so large.

Being a little older now, I realize there are some events I don’t want to witness first hand.

Nature’s extreme forces make life look so fragile.

The Shared Folders

Monday, December 27, 2004 by scott

Tomorrow, dear reader, is not a day I am looking forward to.

Tomorrow, I’m going into the labyrinth alone. I’m heading into the shared folders.

The shared folders embody the essence of our company. They contain the past and the future - all inside of a single hierarchical structure.

A few months ago, I went into the folders, and they looked something like this:

I went to the powers that be, and asked for some insight as to the structure I found. Are the final specifications the complete specifications? Or are the complete specifications the final specifications? Do we make final specifications, then review, update, and mark them complete? Or do we make a complete set of specifications, then update, review, and mark them as final?

I suggested wikis, portals, or anything with WebDAV to make some sense of our artifacts, but the powers that be like folders. Shared folders. Shared folders with a deep hierarchy. The deeper the better.

The powers that be told me the folders would undergo a reorganization, and the latest version of specifications would be easier to find. Past versions would be put into an archive folder. “Great!”, I said. I returned to the shared folders a few weeks later to find this:

Looking at this, I feel like David Carradine’s character in the old Kung Fu series.

That is not a puzzle, Grasshopper. It is only something you do not yet know

Atkin’s Query Plan

Friday, December 24, 2004 by scott

One of our customer’s warehouses threw a fit over an extraction query this week. The query ran for two hours before we cancelled. We expected the query to run for about 5 minutes, but the database turned out to be subtly different then the testbed we use for optimizations. Here is a zoomed out view of the estimated query plan we started with:


Notice the line along the top where SQL is working hard between join steps to prepare data for the next join. After every little change to the query and indexes, I’d revisit the zoomed out plan to see if it was getting any skinner. I was thinking of calling this technique “big picture optimization”, or the “Atkins query plan”, but that’s just silly talk isn’t it? Here is a plan that finished in 4 minutes:

And with this picture of success, I’ll wish everyone reading a merry Christmas.

Even More On Static Members

Thursday, December 23, 2004 by scott

Bruce brought up an important point about my MSDN article that I left understated. In order to show the full impact of the beforefieldinit flag on a type constructor, the code has to compile with optimizations.

Also, many optimizations take place with the JIT compiler, but the JIT doesn’t optimize when the app is running under the debugger. See John Lam’s post “Beware of Heisenberg effects” for in-depth coverage.

Static methods are debated regularly in the forms and newsgroups. I posted two little OdeToCode tidbits on the subject: Statics & Thread Safety Part I and Part II.

OdeToCode Links For Dec 22

Thursday, December 23, 2004 by otcnews

This Post Brought To You By The Letter K

Wednesday, December 22, 2004 by scott

When I was in school, I decided in addition to needing money I desperately needed to expand my cooking repertoire beyond grilled cheese sandwiches and scrambled eggs, so I applied to be a cook at a steak house restaurant. After three years of part time work in a kitchen, I came away knowing a lot more about meat, fish, and vegetables.

A funny thing happened along the way, and it started the day I was hired. It went something like:

Manager: So, ahhh, Kenneth. Do you prefer to go by Kenneth or Ken?

Me: Actually, I use my middle name, which is Scott.

Manager: Oh ok. Well, I’d like for you to come in for some training next Tuesday at 3. Can you make it?

Me: Yes I can!

Manager: Ok, see you then, ahhh, Ken.

Sure enough, when I arrived for training I had a brand new name tag with “Ken” emblazoned on it. I tried over the next few weeks to get a new name tag and convince people to call me Scott, but it never worked, and eventually I gave up trying.

I sort of enjoyed my alias. I’d throw on an apron and instantly transform from Scott the Student to Ken the Cook. As I worked up the ladder from making deep fried cheese to actually putting filet mignon to the flame, Ken became more of an alter ego. Ken made the best blackened prime rib in the East.

If you’ve ever worked at a restaurant you’ll know it’s actually as much of a social institution as it is a place of business. You work late hours. The dinner rush is stressful. You scream and yell at your co-workers, and to relieve the stress you pull pranks when they are not looking. You put Tabasco sauce in their ice tea, or put fish heads on their car’s hood ornament* (it’s a lot like software development, right?). All of this activity forms a close bond between people, and you end up spending time together outside of work at parties and such.

Eventually, people who knew me as Scott the Student would end up in the same room as people who knew me as Ken the Cook. At least half the people in the room would be confused when any one person was talking to me or about me. This is an awkward social situation, but geeks get used to these, or learn to ignore them completely and go about enjoying ourselves. To this day there is still a subset of people who only know me as Ken (but I never see them anymore).

Anyway, in case you ever wondered what the K stood for (and you probably haven’t, but I can always change reality to suit my needs - it's fashionable, you know), it stands for Kenneth. My parents named me after an uncle who passed away before I knew him, but they wanted me to go by my middle name of Scott.

I throw the K in front of my name here because there seem to be a plethora of Scott Allen’s around. I wouldn’t want people to confuse me with the Scott Allen who wrote ‘A comparison of the Washington Naval Arms Treaty of 1922 and the Strategic Arms Limitation Agreements of 1972’. That is not a topic I can even make conversation about at a dinner party. There is also the folk singer, the rodeo announcer, and the golf pro. We’re everywhere!

*Not that I’ve ever done this. I just heard rumors. It wasn't me. Quit looking at me like that.

Reporting Services News

Tuesday, December 21, 2004 by scott

Here are some miscellaneous tidbits I picked up about Sql Server Reporting Services over the weekend.

Service Pack 2

It looks as if Service Pack 2 will bring some new features to Reporting Services, including client side printing, SharePoint integration, and a new Report Viewer component. The man, myth, legend, and mid-Atlantic Developer Community Champion Geoff Snowman will deliver a webcast about the new features on January 10.

People have complained about the lack of a ‘direct print’ feature in Reporting Services since the initial release. Earlier this year it was refreshing to see Group Program Manger Brian Welcker point out in the newsgroups why there is was no direct print even after SP1:

I'm not sure where the idea that client print is "simple" comes from. Since we can't use the browser print functionality (it is horrendous), we have to create an ActiveX control that collects print settings and then talks to the server to generate EMF files that can be routed to the printer. It is certainly doable, but not trivial.

That pretty much sums up my feelings about printing in Internet Explorer, both from a development viewpoint and as a user. Will it ever get any better?

PDF Troubles?

If you have a subscription setup to deliver a report in PDF format via email, you might be seeing error messages when trying to open the attached PDF. If so, check out KB 872774 and download an updated ReportingServicesEmailDeliveryProvider.dll.

In a newsgroup post, Daniel Reib (MS) said the title of the KB article is misleading. The problem is with a Unicode byte order mark in the attachment, meaning the problem is not restricted to just Lotus Domino.

Rendering In Word

I’ve heard a few people lament the fact that Reporting Services cannot render a report into Microsoft Word format. Brian Welcker also addressed this topic in a post:

“Right now, it is not scheduled for SQL 2005. It is a lot of work and we don't want to introduce a new rendering extension without the ability to get it right. Fortunately, we can add new extensions without changing the server.”

Forms Authentication

If you want to use forms or custom authentication with reporting services, then you'll need the enterprise version to develop a custom security extension. The price difference between standard and enterprise gets people a bit upset when they realize this limitation. Brian addressed this subject in the newsgroups too:

While most security extensions are used in SSO / enterprise or Internet scenarios, we understand that some people will want to use forms authentication without a full security extension. It is under consideration but not sure it will get addressed.