June 2004 Entries

Twisty Little Passages

Most of the healthcare facilities I’ve been to in traveling consultant mode require an employee to escort the me around. This is in large part due to the high percentage of locked doors in the admin and IT areas, but also in part due to the standard hospital floor plan. Fans of interactive fiction would describe the standard architecture as a “maze of twisty little passages, all alike”. One wrong turn and you could be lost for hours, or have your appendix removed. It’s refreshing to be visiting a small, rural hospital, where I can walk in the back door without...

Debugging HTTP

In debugging some web service wierdness I downloaded Fiddler. Fiddler is an excellent tool for viewing and experimenting with the HTTP headers and payload exchanged between client and server. I've never used a debugging proxy that is so easy and informative. Any software using the WinINET API (like IE) will automatically send traffic through fiddler when the “Act as System Proxy” check box is checked. For the .NET classes like HttpWebRequest and WebClient, I found the GlobalProxySelection class is pretty useful for setting the proxy programatically: GlobalProxySelection.Select = new WebProxy("127.0.0.1", 8888); Before yesterday I didn't know this class existed. It's amazing what...

Anticipation

Let’s see what adds up... Scoble says there is a launch coming next week that requires Slashdot-compliant servers. There is a party at TechEd 2004 Amsterdam Wednesday night. A certain product group from Microsoft will host the party. I see they were talking to the press in San Diego. I’ve had a fresh Virtual PC machine ready for weeks in anticipation of a major event. I’ve named the machine SQL2005B2...

Partial Success

I have a problem when new keywords appear in a language. I consider the problem odd, because I am generally fond of new features. XAML? Super! One hundred new classes in the base class library? Excellent! Hosting the CLR inside of SQL Server? Positively orgasmic! Yet when a new keyword appears in my development language, I respond with complete indifference. I first recognized this strange behavior when the mutable keyword appeared in C++. I’d be reading an article on C++ and suddenly mutable would be mentioned. My eyes would skip over the section, just like they do when I run...

Security Whodunit

I think one of the first steps in troubleshooting the dreaded “permission denied” exception in a server application is to ask the question: To whom did the system deny permission? The knee jerk reaction to this exception is to wander off into the security dialog boxes and start giving the Everyone group permissions. Just to test it, you see. Really. When this doesn’t work, the next step is to start running everything as SYSTEM. Just as a test! Before long, you have an unholy mess of ACL modifications and config file tweaks to undo. Just like a good murder mystery sometimes this...

Explicit Boundaries

I’ve been working with two web service APIs recently and pondering issues. The first issue is what I’ve been calling the “magic string” parameter. In both APIs I’ve had to dig through the documentation to find all the legal values for a “magic string” parameter. For instance: string mode = “verbose”; service.GetData(id, mode); or string mode=”concise”; service.GetData(id, mode); Magic strings are nothing new in the web service world, but in the APIs I’ve been working with the documentation hasn’t been helpful in identifying all the possibilities. How do I know “verbose” and “concise” are the only two options? Perhaps I’m just spoiled by intelli-sense...

Put De Lime In De Coconut

I’ve had just enough formal training in the culinary arts to be dangerous - not that I have killed any human being with my cooking, but my first try at making mutter paneer was an unmitigated disaster. I have learned that cooking outside of my background of gastronomic experience requires more work than memorizing a recipe at a dinner party. Still, I push on and experiment. Years ago my mom gave me a bread machine. I made many types of bread: white, sourdough, rye, onion. All wonderful. Then came the evening I experimented with unsweetened cocoa and peanut butter. I left...

Tablets, Ink, and Irony

There is a company selling automation solutions to the medical industry utilizing the Tablet PC (via MedicalTabletPC.com). I imagine they are using the INK API, even though the name of the company is NoInk Communications. I can picture the help wanted ads now: “Ink Developer Needed For NoInk Software” In print, you might be able to noodle it out. Recruiters would need to be more careful in face to face conversation: “I see you’ve completed a commercial application with Ink” “Yes, I love developing for Tablet PCs with Ink. I think in Ink.” “Would you be interested in a challenging...

Compound Keys: The Ally Of Evil

I’m having a little fun with Brett’s post (Surrogate Keys … The Devil’s Spawn). The fact is, I like surrogate keys, but I’m picking a different battle. There is a vendor in the healthcare industry using compound keys in their data warehouse product. (The fact that they use surrogate identifiers to compose the compound key and other pleasantries puts the entire design squarely in the 5th circle of hell, but I’ll stick to the topic at hand). While compound keys aren’t quite as bad as Satan’s spawn, there are issues to be aware of: 1) A bigger key means more work...

HTTP Connection Limits

Gavin blogs about how to circumvent the two connection limit in IE. RFC 2068 mandates this limit in the HTTP 1.1 specification. If you are calling web services in .NET, or using the WebRequest or WebClient classes, you'll also run into this connection limit, which can really throttle applications using an application server through web services. Fortunately, you change the connection limit in a config file: <connectionManagement> <add address="*" maxconnection="2"> <add address="65.53.32.230" maxconnection="12"> </connectionManagement> For more information, see one of the following: PRB: Contention, Poor Performance, and Deadlocks When You Make Web Service Requests from ASP.NET Applications At Your Service:...

Duff’s Device

I don’t recall when I first heard of Tom Duff’s amazing device, but I’m sure it was from a USENET posting. Tom Duff invented his device while optimizing a program with loop unrolling. Loop unrolling takes the block of code inside of a loop and duplicates the code to avoid conditional jumps and the testing and incrementing of a variable. If this sounds like a lot of work for little payoff, well, most of us leave it to the compilers these days. When I first saw the code for Duff’s device, I did a triple-take. I’m not sure if I...

Reminisce

As a kid I remember spending one summer with a TI994/A hooked up to the kitchen TV. While I would be typing in code in front of the air conditioner, mom would be making lunch. Some days the code would work and we would eat tuna salad and potato chips – those were good days. Some days the code wouldn’t work and we’d eat tomato soup and grilled cheese sandwiches. Those were good days too. I also remember how “the community” around the TI (and later I had an Atari ST) would wring every last drop of value out of the software and...