Marquee de Sells: Chris's insight outlet for category 'tools' via OData 2.0 Marquee de Sells: Chris's insight outlet for category 'tools' via ATOM 1.0 csells on twitter

You've reached the internet home of Chris Sells, Program Manager in the Distributed Systems Group at Microsoft. This site is targeted at the Windows developer. Enjoy.




Updated the CsvFileTester for Jet 4.0

I was playing around building a tool to let me edit a database table in Excel, so I updated my CvsFileTester project to work in a modern world, including the 32-bit only Jet 4.0 driver you've probably go lying around on your HD.

Enjoy.

7 comments




Entity Designer Database Generation Power Pack

If you like Model-First design in Entity Framework, you're going to love the Entity Designer Database Generation Power Pack. The original Database Generation feature in the Entity Designer in VS 2010 is extensible via Windows Workflows and T4 Templates. This Power Pack builds on these extensibility mechanisms and introduces the following:

Highly recommended. Enjoy!

2 comments




LINQPad updated to support Data Services!

Joe Albahari, the author of LINQPad, has added support for WCF Data Services to the 1.37.1 version beta of LINQPad. This means that you can point LINQPad at any Open Data (OData) endpoint and do queries interactively just like any other LINQ data source. He even supports HTTP security, in case the endpoint in question requires it. Further, if you have your own custom LINQ to Whatever and you'd like to plug a connection to it into LINQPad, Joe has already added the ability to create a custom data context provider. It is, as they say, a thing of beauty. Enjoy!

0 comments




Add "Search the Internet" Back to the Win7 Start Menu

Windows 7 took away a feature I use all the time, as shown on the right: Search the Internet.

Here's what I did all day, every day in Windows Vista: Ctrl+Esc to bring up the Start menu, then I start typing. If I'm searching on my HD, I immediately get matches and I can choose one with just the arrows and the Enter key. If I'm typing in the name of a program in the Start menu, I get those matches and choose one. If I want "calc" or "notepad" I can just type those and those work.

However, 80% of the time, I want to search the internet, so enter my search term, optionally including attributes like "site:", I press, down-arrow once, highlight "Search the Internet" and press Enter. This brings up my default browser with my search results in my default search engine without me having to move the mouse or open the browser and wait for the home page or even decide where I want the search results to come from until after I've entered my search phrase.

And we took it out of Windows 7. : (

But, Shawn VanNess has shown me how to put it back! : )

Download this zip file, execute the .reg file, press Yes and OK a bunch, kill and restart the explorer.exe process and the next time you do the Ctrl+Esc+type+something dance, you'll see your old friend "Search the Internet" right back on the Start menu where Bill intended it to be. Thanks, Shawn!

9 comments




Tired of writing unit tests yourself? Try Pex!

From the Pex site:

"Pex (Program EXploration) produces a traditional unit test suite with high code coverage. ... To do so, Pex performs a systematic white box program analysis. Pex learns the program behavior by monitoring execution traces, and uses a constraint solver to produce new test cases with different behavior. At Microsoft, this technique has proven highly effective in testing even an extremely well-tested component." [ed: emphasis mine]

So, Pex will produce a parameterized set of unit tests for your classes and does all of this integrated with Visual Studio and the unit testing built into VS. I've seen the demo and it blew me away. Nikolai Tillmann, a developer at MSR (Microsoft Research), has a nice write-up that discusses his work and when you're done with that, go download Pex!

2 comments




Custom Window Chrome in WPF

Joe Castro, a developer on the WPF product team, has written a very cool article about how to do custom chrome in your WPF applications. But, what makes it even cooler is that he dissects the various ways that shipping apps do custom chrome on various versions of Windows. It's amazing the number of techniques there are. Very nicely done, Joe.

0 comments




On Beyond Unit Testing

Quetzal Bradley is a software development engineer (SDE) on my team with *tons* of experience in all manner of infrastructure stuff including the requirements of real-world software testing from the trenches at Microsoft.

Q gave a talk about what comes after unit testing to my team and I was blown away, so I sent him to tell Scott about it so that you could hear it, too.

Enjoy.

1 comment




Configuring VS08 to Debug .NET Framework Source

Shawn Burke has released the details to set up VS08 to debug into the .NET Framework source code, including the following assemblies:

Others are coming. Thanks, Shawn!

0 comments




Visual Studio 2008 Has Been Released!

From the Visual Studio home page:

Enjoy! I know I have been.

1 comment




Releasing the Source Code for the .NET Framework Libraries!

After programming with MFC (a lot!) and writing the ATL book, it was *very* difficult for me to live in a world without the source code to figure out how something was working. All of us have since moved over to Lutz's most excellent Reflector, but that's still no substitute for actually stepping in and now ScottGu has announced that we'll have the ability to browse and debug with the .NET library source code, integrated into VS2008:

Wahoo!

5 comments




Shawn has prepared Genghis v0.8

Shawn Wildermuth has prepared a v0.8 release of Genghis that includes a bunch of stuff that the folks that put the v0.6 release together dropped. The v0.8 release has all the good stuff from the v0.5 release and all the new stuff from the v0.6 release in a .NET 2.0 package.

Shawn's really done all the work for Genghis since I came to Microsoft. Thanks, Shawn.

0 comments




Genghis moved to CodePlex

Shawn Wildermuth has moved Genghis to CodePlex because GotDotNet Workspaces is going away. I actually really like CodePlex, but not the state those pesky contractors left the Genghis bits in, so we'll be following up with another release in early July to bring sanity back. Thanks, Shawn!

3 comments




Show Me The Templates!

Show Me The Template is a tool for exploring the templates, be their data, control or items panel, that comes with the controls built into WPF for all 6 themes.

Show Me The Template screenshot

Enjoy.

2 comments




Visual Studio Orcas March 2007 CTP

And the hits they keep on comin':

Enjoy!

3 comments




Lutz Roeder's Reflector 5.0

Need I say more?

7 comments




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.

1 comment




.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 <file>");
    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.

17 comments




Windows Servers for the rest of us

Charlie Kindel of COM fame (he's wrote the foreword to Don's seminal work "Essential COM") is the Product Unit Manager (softie-speak for "butt on the line") for the new Windows Home Server team. If you haven't heard about it, Home Server is a Windows server box for the rest of us. I don't know about you, but I've got file, print and media servers all over the house in a confusing mess and I look forward to being able to consolidate it. According to the enthusiastic beta tester I talked to, Windows Home Server is the way to do that.

Yesterday, Charlie announced the Windows Home Server Blog. Enjoy.

4 comments




Window Clippings 1.5

Capturing screenshots for a book used to be a piece of cake. Alt+PrintScreent and you were golden. However, sometimes I wanted to get the cursor, too, and neither Alt+PrintScreen nor PrintScreen does that, so I got myself a copy of SnagIt. Unfortunately, if I wanted to capture multiple screens, I was putting a maximized copy of Notepad in the backgrand, using PrintScreen and PBrush to do the cropping (although SnagIt has slightly more seamless multi-window selection).

Still, this all worked 'til Vista came along and Alt+PrintScreen left the shadows out! I was fine with that, but Ian correctly pointed out that the screenshots with the shadows looks *so* much better that I could hardly say "no." And I discovered the Snipping Tool in Vista, which let me do a selection on any part of the screen I wanted to, except that now instead of just doing Alt+PrintScreen, even for a single window, now everything is a selection, which means that somebody (hopefully not me!) has to trim the extra whitespace to make sure the pictures layout OK in the book.

I told you all of that so you could know that I envy folks that don't have to do screenshots! It's hard to make it look right, although, for visual technologies, I really can't imagine not having them. Anyway, I was definately open to another screen capturing technology and that's when someone turned me on to Windows Clippings.

When I found Kenny Kerr's most excellent screen capture tool, it was so close to what I wanted (it did Vista shadows with no guesswork!), that I sent Kenny an email with my feature request (easy child+parent capturing support), fully expecting not to hear back (it's clear from his web site that he's a busy guy!). Not only did he reply, but he'd implemented my feature!

And it was such a time-saver, that I forwarded it along to Ian, who had his own feature request (keeping the transparency in the captured image w/o grabbing the stuff underneath), which Kenny promptly implemented (with some example code from Ian). Of course, that broke my feature (the constant animation of WPF apps + capturing transparency caused problems), so Kenny fixed that, too. By this point, Kenny's app itself was notifying me of updates faster than he could send the emails.

All of this is merely to say, I'm really loving my Windows Clippings experience. Thanks, Kenny!

7 comments




CodeFetch: Search Book Source Code

CodeFetch allows you to search in the source code associated with books (like the code I publish for my books). Plus, it lets you choose the language to search on and shows the book the results come from so you can read your favorites. Very cool.

4 comments




Point: Local Live Maps

When it comes to Web 2.0 apps, online maps are easily the thing I use the most. I don't go anywhere these days w/o first pulling up the map on MapQuest, Google maps or, for a coupla years now, local.live.com (starting back when it used to be called MapPoint). I generally use Google for my search engine, so don't think it's just the MS employee thing pushing me -- I genuinely like local.live.com better.

Google and MS have been in an arms race for years on the maps stuff, doing fancy stuff like 3D globes and other goo that looks good in demos, but that I don't need. However, in this war of the world (so to speak : ), today MS fired a decisive shot across the bow, I think -- the "Send" menu. This is huge for me, because I can send the directions to my phone, either via SMS or via email, and I get a great display clearly optimized for my smartphone. Not only does it have a great mini-map, but the directions are easy to read (saving me from printing the directions for just a single trip) and it has a link to reverse the directions (the one thing I never remember to do).

Oh sure, I can do the same thing with the Google maps "Email" menu, but when I follow the link on my phone, there's no map (although there is a handy link to reverse the directions). Also, the directions don't read as well and I swear it's faster to surf to the local.live.com directions (although this might just be the MS bias talkin' : ).

On the other hand, I just noticed that Google maps has a new "Add destination" link for multi-destination trips, which is the only thing I use AAA online TripTiks for and you have to be a member to access the feature (I am, but still it's kinda clunky...). Hey, local.live.com guys -- can I have that, too?!?

P.S. I think I've scared the most reactionary, close-minded folks away, so I think I'll cool it on the postscripts for a while ('til I feel like it again : ). BTW, my definition of "close-minded" is "those who don't think I have the right to express my opinion," not "those who disagree w/ me." Hopefully I managed to shake the former off my RSS feed while keeping the latter.

9 comments




VS2005 SP1

"Through further advancement and feedback, Service Pack 1 ... provides over 70 improvements for common development scenarios including:

For more information, see the Microsoft Download Center:

At the time of this posting, VS05SP1 update for Vista download wasn't available, but it should be directly.

P.S. I hope everyone is enjoying the holiday season with peace, love and understanding.

6 comments




XNA Game Studio Express Has Been Released!

Oh, man, I *so* want to write a game that runs on my Xbox 360! Now I can (and so can you). Enjoy!

P.S. Impeach!

3 comments




If it can be installed, Scott's installed it

and if it's any good, we hear about it. Really, I'm just posting this link to Scott Hanselman's 2006 Ultimate Developer and Power Users Tool List for Windows here so I can find it later, but feel free to browse the list yourself, broken up into several interesting categories:

Notice how just his list of categories is longer than most people's lists? Scott's a gem. Guaranteed you'll find something that makes your life better.

1 comment




Number to String Converter

To capture the work that Doug and I did to make Indigo (WCF) and Avalon (WPF) work together, I tore up our PDC sample application into a set of simpler technology samples. To make it fun for myself, as part of these samples, I built a little library for converting numbers into strings of English words, e.g.

Enjoy.

10 comments




203 older posts       No newer posts

Powered By ASP.NET

Hosted by SecureWebs

Microsoft

Mensa

IEEE


moving companies
addiction treatment
sunglasses
Kratom
How To Lose Weight Fast
cocktail dresses
Credit Card Balance Transfer
Add URL
Stock Trading
International Air Charter
Promotional Merchandise
Jet Privé
loans for bad credit
Forex Broker