March 3, 2007 spout

Using my XBox 360 for Corp. Video Conferencing

I’ve been having another adventure in social video conferencing, this time with my team in Redmond. It all started with Doug brought his 360 into our new conference room, which is just an office with a coupla white boards, some comfy chairs and a 37″ LCD panel for projecting.

Once we got the 360, I purchased a year Live Gold subscription and a live camera for $30, turning it into a video conferencing solution. Now, every morning at scrum, I’m sitting in my living room, telling folks in building 42 what I did yesterday, what I’m doing today and whether I’m blocked or not and they can see as well as hear me. When we go around the room, somebody turns the camera for me and it’s my turn when we get to the LCD panel.

You might ask why we don’t just use Live Messenger’s video support and the answer is — configuration and hardware. Live Messenger’s video just never seems to work out of the box w/ people’s s/w and h/w firewalls and even if it did, nobody’s got a camera on their laptop. Now, the only thing my team mates need to do to see me is turn on the LCD panel and accept my request for video.

That’s not to say that the experience is perfect. I’d love it if the xbox video conferencing:

  • Allowed each side to run video at full screen. I just don’t need to look at myself and when we go picture-in-picture (the LCD is also used for projection), the video’s not very useful.
  • Allowed me to remotely, instead of locally, select zoom regions.
  • Allowed me to control a camera that supported pan, tilt and zoom in hardware.
  • Supported noise cancellation. As it is, I still have to place a phone call to get onto the speaker phone in the room. If we try using the headset as a roaming mike, the feedback makes it unusable.

However, for the $30 incremental cost of the camera + year of live, it’s a solution good enough that we’re using it more and more. Have I mentioned how much I love my xbox 360?

March 1, 2007 tools

Visual Studio Orcas March 2007 CTP

And the hits they keep on comin’:

Enjoy!

February 19, 2007 tools

Lutz Roeder’s Reflector 5.0

February 14, 2007 tools

Detailed Time Zone Data

A long time ago (2000), I was fascinated with turning a phone number into a time zone so I could tell what time it would be somewhere before I called and woke anyone up (this happened too often : ).

As part of that work, I quickly realized that info in Windows for time zones wasn’t detailed enough, so I began looking elsewhere. I found the Time Zone Map Group, which maintains time zone data for all over the world backward through time. This is an amazing accomplishment, since they have to account for every law change as each tin pot dictator comes to power, e.g. George W.

At the time, they had a custom format for the data (and they probably still do, as far as I know), so I wrote a utility to translate the tz format into XML for easy parsing. I literally haven’t touched the tool since, but with the recent time zone law changes in the US, I thought folks might be interested. Enjoy.

February 8, 2007 fun

Slide your vote in for ScottH’s Podcast

I only listen to one podcast, so casting my vote for Hanselminutes on podcast alley’s list of top podcasts was a no-brainer.

Plus, when I voted, they had a free sample for K-Y Brand Intrigue, which is apparently the longest lasting premium personal lubricant. The opportunity for jokes here is boundless, so let’s start w/ some obvious ones and I’ll send a free copy of Programming WPF to the best one in the comments:

  • I hesitate to think where the folks at podcast alley think we stow our MP3 players…
  • I like Scott, but come on…
  • What kind of gadgets has Scott been reviewing lately?!?

Enjoy. : )

February 4, 2007 tools

.NET: Decompressing zip file entries into memory

I knew that the J# libraries in .NET had zip file support, but I couldn’t find any samples that showed how to decompress the files into memory. The hard part, of course, is that the J# stream objects aren’t the same as the .NET stream objects. If you’re a Java programmer looking for a familiar library, that’s great, but I’m not, so I had to do a little finagling.

The first thing you need to do is to add a reference to the vjslib assembly, which brings in .NET classes in Java namespaces, e.g. java.io. The one we care most about is java.uti.zip, which includes ZipFile and ZipEntry. We also need java.util for the Enumeration class and java.io for the InputStream class. With these in place, we can enumerate a zip file:

using java.util; // all from vjslib assembly
using java.util.zip;
using java.io;

static void Main(string[] args) {
  if( args.Length != 1 ) {
    Console.WriteLine(“Usage: dumpzipfileoftextfiles );
    return;
  }

  // we’re assuming a zip file full of ASCII text files here
  string filename = args[0];
  ZipFile zip = new ZipFile(filename);

  try {
    // enumerate entries in the zip file
    // NOTE: can’t enum via foreach — Java objects don’t support it
    Enumeration entries = zip.entries();
    while( entries.hasMoreElements() ) {
      ZipEntry entry = (ZipEntry)entries.nextElement();

      // read text bytes into an ASCII string
      byte[] bytes = ReadZipBytes(zip, entry);
      string s = ASCIIEncoding.ASCII.GetString(bytes);

      // do something w/ the text
      string entryname = entry.getName();
      Console.WriteLine(“{0}:\r\n{1}\r\n”, entryname, s);
    }
  }
  finally {
    if( zip != null ) { zip.close(); }
  }
}

Notice the use of the Enumeration object so we can enumerate in the Java style and the use of the ZipFile and ZipEntry types. This is all stuff you could find in readily available online samples (I did). The interesting bit is the ReadZipBytes method:

static byte[] ReadZipBytes(ZipFile zip, ZipEntry entry) {
  // read contents of text stream into bytes
  InputStream instream = zip.getInputStream(entry);
  int size = (int)entry.getSize();
  sbyte[] sbytes = new sbyte[size];

  // read all the bytes into memory
  int offset = 0;
  while( true ) {
    int read = instream.read(sbytes, offset, size - offset);
    if( read == -1 ) { break; }
    offset += read;
  }
  instream.close();

  // this is the magic method for converting signed bytes
  // in unsigned bytes for use with the rest of .NET, e.g.
  // Encoding.GetString(byte[]) or new MemoryStream(byte[])
  return (byte[])(object)sbytes;
}

For those of you familiar with Java, I’m just reading the zip file entry data into an array of signed bytes. However, most .NET APIs like unsigned bytes, e.g. Encoding.GetString(byte[])” or new MemoryStream(byte[])”, which means you’ve got to convert a signed array of bytes in .NET to an unsigned array of bytes. Unfortunately, just casting doesn’t work (the compiler complains). Even more unfortunately, I could find nothing in the Convert or BitConverter classes to perform this feat of magic and the code I wrote was dog slow, so I asked around internally.

Luckily, James Manning, an MS SDE, had the answer: cast the signed byte array to an object first and then to a unsigned byte array. Thank goodness James knew that, because I didn’t find anything on this topic. Hopefully future generations will find this missive.

You can download the sample if you like. Enjoy.

February 3, 2007 fun

Stange But Real Facts

I don’t know how many of these are actually real (my left-handed son was very disappointed to hear that he’d be dying 9 years before his right-handed brother), but they were very fun to read with the kids.

P.S. Can you lick your elbow? Tom claims to have a friend that can lick his. He’s going to be very popular when he grows up…

February 2, 2007

You Can Help Find Jim Gray

From Dan Rosenfeld of Microsoft Research:

As some of you may know, our colleague Jim Gray is currently missing, having failed to return from a sailing trip in Northern California. Here’s a NYT article discussing Jim’s contributions and the efforts to find him.

I learned from the article that there’s an effort on Amazon’s Mechanical Turk site which allows volunteers to search satellite imagery for Jim’s sailboat.

You can help by spending a few minutes on the task at this site.”

Please spent a few minutes. Thank you.


← Newer Entries Older Entries →