Thursday, February 10, 2005

Comment your source code?

Believe me, this is not a Microsoft only issue... ;-)

Microsoft Considers Opening Up Access to Windows Forms

"Burke acknowledged there are a few potential stumbling blocks that could interfere with making the WinForms source more widely available."

"The WinForms source — like all Microsoft source code — is loaded with comments that developers wrote into the product when creating it. And code comments typically include lots of four-letter words, politically incorrect references and disparaging comments about competitors, if not customers."

"In order for us to ship the code we need to 'scrub' the comments and make sure there is nothing bad in there. No swear words, no bad jokes on the part of developers, no references to specific customers, no geo-political faux pas."

Tuesday, February 08, 2005

Breadth-first file enumeration

At last some code...

How to enumerate the filesystem without recursion.

public static void ShowAllFiles(String path)
   Queue q = new Queue();
   DirectoryInfo dir = new
   FileSystemInfo[] entries;

      entries = dir.GetFileSystemInfos("*");

      for (Int32 i = 0
         ; i < entries.Length
         ; i++)
         if (FileAttributes.Directory
            == (entries[i].Attributes
            & FileAttributes.Directory))
            // Process subfolder later.

         // We have a file.

      // Are there subfolders?
      if (0 == q.Count) { break; }
      dir = q.Dequeue() as DirectoryInfo;

Monday, February 07, 2005

I've sinned

I'm not really much of an XBox-player or whatsoever-gamer...
but this really rocks!

Especially in multiplayer (system link) co-op mode.

Thursday, February 03, 2005

Gmail = generous = me

A = B
B = C
A = C ?

Enough b*llsh*t

I have a lot of invitations,
just leave your email address in a comment to get one