Marquee de Sells: Chris's insight outlet via ATOM 1.0 csells on twitter

You've reached the internet home of Chris Sells, who has a long history as a contributing member of the Windows developer community. He enjoys long walks on the beach and various computer technologies.




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. 4 is "four:"

To drive home the point (of which there wasn't any because the sample had nothing whatever to do with number to English phrase conversions), I spent some time polishing the algorithm so that it handled decimal points:

and when that didn't satisfy me, I added large numbers and negative numbers:

Before writing this code, I searched the net and didn't find any algorithms that handled both negative numbers and decimal points, let alone for .NET or in the number of lines of code to which I cut it down (93, including comments). I know it's not useful, but it was fun. If you want the code, you can get it by downloading the .NET 3.0 Cross Technology samples and checking out the WinSDK_Samples\CrossTechnology\WpfDataBindingToWcfResults\service\NumberUtility.cs file. I built the file to be dropped into any .NET 2.0+ project (and even .NET 1.x projects, if you remove the "using System.Collections.Generic" statement at the top of the file -- I don't actually use generics), regardless of whether you're using Avalon or Indigo or not.

Enjoy.

Discuss

0 comments




RegistrySettingsProvider2

I updated the SDK RegistrySettingsProvider to implement IApplicationSettings and built a sample to demonstrate how to integrate it (or any .NET 2.0 custom settings provider) with the settings designer-generated code. Enjoy.

Discuss

0 comments




Laura Foy makes on10.net for me

I had my first on 10 experience today (I was following the links to the PhotoSynth stuff) and I have to say, I instantly fell in love with Laura Foy. I know that Erica Wiechers (of The .NET Show and MSDN TV) has a huge geekboy fan base (and it was fun to work with her @ MSDN), but Laura's interviewing style and her personality made me subscribe to her interviewer-specific RSS feed on 10.

In fact, Laura makes me wish I did something besides developer-related stuff. What do I have to do to be interviewed by Laura Foy?!?

P.S. I wanted to title this blog entry "Laura Foy is a major babe," but Laura is a fellow Microsoft employee and that would be inappropriate. Also, the whistling and cat calls would be way out...

0 comments




MS Live Labs PhotoSynth: building the photo web

Imagine your vacation photos displayed in 3D and linked together, both around a space and zooming in and out. Now imagine everyone's photos linked together in this way. What you get is PhotoSynth:

Worth checking out.

0 comments




Phones are just little PCs and should be treated as such

Folks are having enough issues with their Qtek 8500 phones that they're starting to want to trade them in on IMate Smartphones, which are the same HTC hardware but different software. Issues include (for me):

Yesterday, I used Stork's instructions to turn my Qtek into a Smartflip and have not had any of the problems except for the bluetooth interference.

The real problem is that, unlike with PCs, phone hardware manufacturers don't actually support their phones. If I buy a Dell, they'll provide BIOS and driver upgrades. If I buy an Qtek, they send me to the cell provider for a fix who, of course, doesn't have the Qtek 8500 on their list.

With the flexibility of phones these days, they're just like pocket-sized PCs and there's a lot more innovation going on with them then with my PC right now. I used to get excited about my new laptop; now I get excited about my new phone. However, this situation about who you're supposed to buy phones from and get support from is completely messed up and needs to change.

0 comments




Ed Helms on Microsoft Recruiting

This spoof on Microsoft's college recruiting practices was recorded long ago (back with the XBox was new), but it has recently surfaced again, so I thought I'd share. Enjoy.

0 comments




An Embarrassment of WPF Riches

I just realized that Avalon is getting a book treatment unlike any other topic in my memory:

User and GDI had Petzold. Win32 had Rector. MFC had Prosise. COM had Box. Indigo's got no big names I've yet seen, but Avalon gets Anderson, Petzold, Nathan *and* Griffiths?!? It's going to be a bloodbath in the market, but the readers are going to benefit. Why couldn't I have picked a lightweight topic, like, oh, I don't know, ASP.NET 2.0? : )

0 comments




Portland Code Camp: Wow!

I have to say, I was very surprised at how much I enjoyed Portland Code Camp yesterday. I had planned on skipping the sessions (except my own), instead monkeying for Rory as my entertainment, but that went out the window when I got there and saw the session list. I very much enjoyed Scott's PowerShell presentation (Tab completion and PowerShell Analyst -- wahoo!), as well as the RoR meta-programming and IronRuby sessions, but easily the best talk I saw was Jeff Berkowitz's Poker Bots for Fun and Profit. The set of legal, ethical, technical and algorithmic issues he covered as awesome. The coolest thing I learned about was the Poker Academy, which is a poker tutorial program that lets me build my own poker bots to test my strategies. Fabulous!

My own session was co-delivered by Chris Tavares (recently of the Patterns and Practices group), and we spent 90 minutes pumping the audience for their feedback about building distributed applications under Windows, including what their scenarios are, what sucks and should be fixed, what's good and should be kept and what solutions they propose. I have to say, it was fun to be on the receiving end of the heat instead of the giving end for the change and to be in a group that hopes to solve such problems (the Connected Systems Division owns Indigo, BizTalk and Workflow). Thanks, attendees, for the great list and for not throwing anything but insults (and so politely, too! : ).

In addition to the free sessions, there was free food, free entertainment, free wireless and free air conditioning. I miss the single-track benefits that you get with the DevCons, but other than that, the Portland Code Camp is now in the very short list of conferences I won't be missing in the future. Thanks to Jason, Rich, Stuart and the rest of the organizers. Highly recommended!

0 comments




DVD Wars. Huh. What is it good for?

Here’s the thing I don’t get about the next-gen "DVD Wars." When I moved from VHS to DVD, I got much higher quality output and random access to content. Given that DVDs are already letterbox, what do I get moving to an HD DVD format? Is the quality that much better? Are there other features I get that I’m going to really want? The only feature I wish I had was the ability to easily burn the main content of my DVDs to my computer for random access like I get w/ music today. Will the next-gen formats support that?

0 comments




ATL Internals: Working with ATL 8, 2e

The Book

Welcome to the home page for "ATL Internals: Working with ATL 8 (2nd Edition)," by Christopher Tavares, Kirk Fertitta, Brent Rector and Chris Sells, available from Amazon.

The Source

The code samples for this book is available here.

The Errata

Soon you'll be able to see and report errata for this book, which will help us improve future printings.

The Table of Contents

0 comments




I'm on MySpace now

I'm on MySpace. Now what?

0 comments




Functional Language Summary

I've been hearing a lot about functional programming lately (and the circle of life continues); I found Functional Programming For The Rest of Us to be a nice summary. Here's what I got from it:

Atoms of FP:

Implications:

FP sounds great! Why do we mess around w/ anything else?!?

0 comments




This blog entry cost me $113.70

So, I'm loving my t-mobile cell phone account (I get unlimited HotSpot access at Starbucks and lots of other places, too). However, I just learned that one service I don't have is free text messaging. Normally, that's not a problem because I'm a middle-aged white guy and "texting" is for young kids cheating on tests and looking for sex partners (at least, that's what I get from the news : ).

Anyway, I just got my t-mobile bill and my phone has been receiving text messages to the tune of 54/day for a total of 1137 in the first 21 days. At $0.10/message, that doubled my bill and confused the hell out of me, because I only ever see a text message on my phone when I miss a call from my wife or when my European friends text me, i.e. about 10/month. Where have all of these text messages come from?

Apparently, they come from Exchange using AUTD (Always Up To Date) to notify my phone that new messages are available. I didn't know that's how this worked; I was just happy to get it to work at all. Luckily, this is no longer a problem. AUTD was apparently a Windows Mobile 2003 Second Edition thing that my old Audiovox 5600 used (I must have had free text messaging on my AT&T Wireless account and not noticed how young and hip my phone was).

Luckily, my text message traffic has fallen back to near zero because of my Qtek 8500, which uses "push email." Apparently push email keeps an HTTP session open to Exchange using my unlimited data access instead of using my (very!) limited text message access.

I sure wish there'd been some way of knowing this before the first bill arrived, of course, but it's nice to know my Qtek is actually saving me money (at least, that's what I'll tell the wife : ).

0 comments




Struggling with NUnit (2.2)

The one where I get System.IO.FileNotFoundException in NUnit in a bunch of different ways and suggest some possible solutions.

0 comments




Struggling with NUnit (2.2)

I had a very unpleasant afternoon trying to get NUnit working, so I thought I'd share my troubles and my solutions (such as they are). A search revealed a lot of folks with the same troubles, but precious few explanations or solutions. The NUnit Quick Start documentation does a wonderful job telling you how to write a simple TestFixture class with one or more Test methods (and even an optional SetUp method). However, as far as I could tell, there wasn't any part of that tutorial that said "Hey! Add a reference to 'nunit.core.dll' as well as 'nunit.framework.dll' to your project or neither nunit-gui nor nunit-console will work;" you'll get a System.IO.FileNotFoundException when you don't have nunit.core.dll (the Exceptions Details menu item doesn't help):

Also, when you start up nunit-console, you better darn well be in the current working directory of the test assembly as well as nunit.core or you're going to get the same message in the console. Likewise, if you start nunit-gui. Further, if you just run nunit-gui, create a new project and then add an assembly, you better have known to save the .nunit project file in the same directory as the assemblies you add, or you'll be getting the same message again.

And, as if that weren't enough, you'll get this message again if you add nunit integration as an external tool to VS05 (via the Tools | External Tools menu item) using the instructions in the docs. The docs say to use $(TargetPath) and $(TargetDir), but those variables expand to the obj directory on my machine (although that seems wrong to me), not the bin directory, and the obj directory doesn't contain the referenced assemblies. I never was able to get a VS05 external NUnit tool to work.

Luckily, it's very cool that nunit-gui doesn't keep test assemblies locked and notices when an assembly has changed from underneath it, so that once I do get it started with the appropriate working directory, it works nicely.

As it turned out, there were a lot of ways to get that FileNotFoundException message and I'm pretty sure I found them all before finding any ways to actually make nunit work. None of these things are NUnit's fault it's damn hard to do dynamic assembly loading in .NET but it's still on you to make sure NUnit is configured properly.

Finally, the tutorial shows but doesn't say that you better make your test methods public. Since NUnit uses Reflection, it doesn't need the classes or the methods to be public, but I guess they decided that was an interesting knob to let the developer turn. I'd have preferred to let the default permissions work (internal) to save myself typing, but that's just a nit.

0 comments




2245 older posts       390 newer posts