March 2005 Entries

Example Code, Redux

I’m still trying to rationalize the existence of example code. You know, the poison pills programmers copy and paste into an otherwise healthy body of software. Sometime today, I was thinking back my first physics class, and of three key idealizations. These idealizations have helped students learn physics since the debut of Principia Mathematica in the 1680s. The idealizations are:   The immoveable object.  The irresistible force.  The frictionless surface. Of course, nobody actually builds bridges or launches rockets using irresistible forces and frictionless surfaces, but the concepts do make the first chapters in a physics textbook easier, and we learn...

Indigo Notes

I’ve had some time to experiment, and downloaded the WinFX CTP to give Indigo a whirl. The installation onto a Virtual PC with the VS2005 February CTP went swimmingly. I thought for a first try I’d write a client for an existing web service, and since I have a few VPCs with Reporting Services installed I looked to start a conversation between the two. I created a plain console mode application, and added a reference to the System.ServiceModel assembly. The next step was to generate proxy classes from the Reporting Services service contract (the WSDL from ReportService.asmx). You can create proxies with...

Thought For The Day

Taking the thoughts, ideas, and emotions we have in our brain, and encoding them into an audible form, or a textual representation, is a lossy compression at best…

Team $ystem

Don’t you just love when those brash, young h4xxorz in the newsgroups type Microsoft with a $ sign? Such a rebellious nature…. It’s interesting to watch the reaction to the obfuscated pricing announcement for VS 2005 Team System (a readable version, with opinion, is presented by Mike Gunderloy). Is Team System expensive? Expensive is a relative term, isn’t it? Is CaliberRM expensive? Is Rational Rose Enterprise expensive? Is ClearCase or Perforce expensive? Have you ever priced just their yearly support contracts for an enterprise? I don’t think the price is surprising given the above list, but I was hoping Team...

The Worst of the .NET 1.x Years

It’s been a wild ride for the last 5 years. We’ve seen the best - what about the worst? 1)Visual Basic.NET The problem isn’t with the language – VB is a great language, and I’m not formulating my “best and worst lists” based on technology virtues alone, but on the “experience”. The controversy over Visual Basic.NET started before the product’s release date. Then came the salary surveys, the misinformation, disinformation, statistics, lies, videotapes, benchmarks, whining, moaning, and gnashing of teeth. The debate over the merits of this language seem to be in an infinite loop. Bill Vaughn is right: Microsoft should have...

The Best Of .The NET 1.x Years

Given that .NET 1.x is entering legacy status before the end of the year, I thought it might be fun to explore the best and worst of what .NET developers have lived through for the past 5 years. First: the best. 1) Metadata Metadata is the lifeblood of the common language runtime. Just think of the number of features made possible (or made better) by the presence of metadata: garbage collection, form designers, code access security, and verification to name a few. The fact that metadata is extensible through custom attributes opens up a world of possibilities. Sure, we might...

It's True

There is a Code Camp coming to the Mid-Atlantic.

SiteMapResolve

The SiteMap.SiteMapResolve event is set to cause major headaches in ASP.NET 2.0 development. Jeff Prosise talks about the need for the event in a post entitled “Cool ASP.NET 2.0 Programming Trick”. Jeff appears to be taking the wrong approach. As ASP.NET developers we are accustomed to wiring up events to methods in our Page derived classes. However, SiteMapResolve is a global (defined as public and static) event on the SiteMap class and will fire when resolving a node for any page in the application, not just the subscribing page. Also, we aren’t used to unsubscribing to events in ASP.NET but...

Recruiters

There seems to be a surge in ‘recruitment’ lately, but I use the term loosely. I’ve been receiving emails from strangers like the following: Subject: I have a C# developer position Are you interested? If so, give me a call. Is recruiting just so easy thee days that they don’t even have to try? Isn’t this like writing: Subject: I have a sex organ Are you interested? If so, give me a call. I’d think it would be obvious that a few more minor details, like compensation, location, and type of work, are needed for someone to judge their interest...

For Example

I’ve heard complaints about the poor state of example code. Example code, it seems, is ruining programmers across the globe. Let’s divide the world’s code into two categories: production code, and example code. Much like matter and anti-matter, the two should never meet. They exist for different purposes, and have distinct goals. The only feature these two have in common is that both production and sample code can be difficult to write. Yes, ask any author – coming up with sample code to illustrate a specific point can be a hair pulling experience. Do I contrive an example to keep...

The ThreadStaticAttribute

Thread local storage (TLS) was a fun way to piggyback data into the thread environment block (TEB) in the old days. You can ask each thread in a process to reserve a location to store your special data, say for example, a pointer to a data structure representing a database transaction. No matter where the thread goes, you can always pull the transaction reference out of TLS and go to work – no function parameters required! The managed equivalent of TLS is the ThreadStaticAttribute class. Taking advantage of TLS has always been tricky in an environment using thread pooling. As...

The BoneheadAttribute

I had some time to research SQL Server 2005 this weekend and ran across the HostProtectionAttribute (HPA). The ability to write stored procedures and such with your favorite .NET language opens up a dangerous number of APIs, like Process.Start, which can kill a server’s throughput and reliability. The HostProtectionAttribute lets SQL Server look out for dangerous code. Say we write the following stored procedure: <SqlProcedure()> _ Public Shared Sub PureEvil2()     SyncLock (GetType(StoredProcedures))         ' do work     End SyncLock End Sub The above code will compile and deploy into the SAFE bucket of SQL Server without complaint. Execute the proc however, and the host...

Craftmanship

Sometimes I wonder what I’d be doing if it weren’t for software development. I’d like to think of myself as being a craftsman in some other profession. Then the time comes when I need to attach a small block of wood to a wall using two screws. The tricky part is to accomplish the task without destroying the wood, the wall, the screws, or any of the tools. So much for craftsmanship with my hands. Perhaps I would be a goat herder.

Enterprise Podcasting

This weekend I noticed patterns & practices superhero Ron Jacobs has made the jump into podcasting. His first two shows include an interview with Billy Hollis and a discussion about configuration contexts in Enterprise Library. A bit later I was looking for local events in the area and discovered Steve Vai is bringing his superhuman guitar playing skills to town. Billy Sheehan will play bass on the tour, and believe me - having this much talent on stage at the same time should be illegal. You might be wondering why I bring up these seemingly unrelated events. Well, one of...

Scott Allen
Posts - 869
Comments - 4493
Stories - 14