Wednesday, August 31, 2005

When the going gets tough, the tough fire up the generator.

Just about everyone on the planet knows what Katrina did. And most of us know that New Orleans has been all but abandoned. But not everyone left. DirectNIC, a web hosting company, is running from a dry and secure skyscraper in New Orlean's central business district. They have enough backup power for a few weeks and it looks like they will need it. In addition to keep their customer's web sites running, they have a blog documenting what they are going through and what they are seeing from their vantage point. It's required reading folks.

It's a compelling drama. It's very much like reading a Hunter S. Thompson story. You feel like civilization is coming apart at seams. I IM'ed the author of the blog. I really didn't have anything to say him other than he rocks. They are living in a twisted Charlton Heston movie and they are the good guys.

In addition to the blog, they have a live webcam feed at mms:// which is usually maxed out. There is also a mirror feed at Right now I'm looking a hand holding a clipboard with "Does Papa John's deliver in New Orleans?" on it. Someone still has his sense of humor.

Tomorrow, I'm going to the Red Cross and donating blood. This is worse than 9/11, we all have to step up to the plate.

RE: Disabling Windows Authentication in Visual Studio 2005's built-in ASP.NET server

File this one away...

Here's a handy trick I learned today after attempting to test my ASP.NET site in Opera and found it wouldn't work.

Opera does not ship with support for Windows Authentication (NTLM). By default, Visual Studio 2005's ASP.NET Development Server demands that you authenticate with Windows Authentication. To disable this requirement, do the following:

  1. In Solution Explorer, right-click on your Web Application's project node and select Property Pages
  2. Under the Start Options node, uncheck NTLM Authentication and click OK

And that's it! This also has the effect of removing that annoying authentication dialog in Firefox.

[Via Managed from down under]

Monday, August 29, 2005

RE: Thread-safe Format

Oh, the joy of writing multiple threaded applications. I like this little tip that will keep string formatting calls from stepping over each other.
The Format function isn't thread-safe unless you use the overload which takes a FormatSettings argument (because the FormatSettings-less version uses global variables). I use it to compose error messages in a thread I'm writing, and I want to use the same FormatSettings as the user would normally see in a GUI app. So here's what I did. I added a TFormatSettings field to my thread class:

TMyThread = class(TThread)
FFormatSettings: TFormatSettings;
procedure Execute; override;

Then I set it at the start of the Execute method:
procedure TMyThread.Execute;
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FFormatSettings);

This seems to work well.

[Via Craig Stuntz's Weblog]

Wednesday, August 24, 2005

RE: Strings are immutable

Sahil has a good post that explains why you should use StringBuilder to concatenate strings instead of just doing "string a" + "string b"

So lets see now, look at this code below ---

String str = "Sahil " + "is" + " a" + " modern" + " man";

So right in the code above, how many times did the memory get allocated, and then de-allocated? Dude in the above code, first the framework will declare memory for all 5 strings, and as you concatenate them, it will have to reallocate, and copy memory all over, and over, and over and over again until it gets the final "str". This is why, you should use StringBuilder - because that is not an immutable object. It has the ability to reuse the same memory.

Now this has other implications too, but as long as you remember to say "Strings are immutable" and sufficiently explain what you meant by that, your interviewer will be more or less happy.


[Via Sahil Malik [MVP C#]]

Friday, August 05, 2005

Delphi Basics

Here's a cool site that has a lot of reference information for Delphi.

This web site provides help and reference for the fundamentals of the Delphi© language. It is gives an introduction to the Delphi Object Oriented Language for newcomers, and provides a ready reference for experienced programmers.
It limits itself to a broad base of the language in order to keep things simple and manageable. The approach taken is to present the most useable basics of Delphi in as accessible a manner as possible.

Wednesday, August 03, 2005

And now, a word from Phil...

If you want a refreshing take on the current state of Google, Microsoft, Flikr, and of course, Open Source, you have to read this rant from causticTech.
...we are in the software equivalent of elvis in his vegas years...fat, bloated, barely functional...

It's good stuff, but not for the easily offended.