Scott Hanselman

Standing on their shoulders and paying it forward

January 22, '08 Comments [34] Posted in Musings
Sponsored By

It's my birthday! I turn 0x22 today, beginning the downward slide to 0x28, and then death. ;) Seriously, it's an interesting birthday because I'm definitely not a "young hotshot" any more. (It's possible I haven't been for 10 years, but I can dream, right?)

It's funny how these things happen. I didn't think I'd be a Computer Person. In high school I was into Theatre, doing a number of plays, a few as the lead or co-lead, and I'd always assumed I'd be on TV by now. Of course, Ryan Reynolds has my career, so I can't do much about that. Heh, maybe I'm still in theater and I don't realize it?

Anyway, before high school, my 5th grade teacher called a meeting with the superintendent and principal and said "if we don't challenge this kid, we're going to lose him." This is teacher-speak indicating that I was a bit of a rambunctious child, likely to be convicted at some point of a white-collar crime.

The idea they came up with changed my life. They agree to let me and my dad "steal" the school's computer (there was only one at the time) on Friday nights by backing my dad's truck up to the school, so I could use it over the weekend, as long as I got it back before Monday morning. Mind you we're talking about $2500 in the early 80s here, so this was a significant risk she was taking. That risk started me on the road I am today. If she hadn't taken that chance, who knows what would have happened?

I think about the chances that various people took with me over the years and the trust they placed in me, without which I wouldn't be here. I think of the people, like my parents, who love me unconditionally, and for that I am grateful.

I remember when I was 15, in a particularly nasty teenage phase when my father said to me "Son, I love you dearly, but I don't like you very much right now." What a powerful statement that is and nearly 20 years later I remember it. It's important to be able to make a statement like that, and it's a testament to one's love to be that honest.

I'm sure my parents wanted to throttle me (and still do) a number of times, but they stuck with me and my brother - their two boys, now men with families of our own.

And now, at 34, I have two boys of my own. These tiny men who put their trust in me and my wife to do the right thing, stick with them, and take some chances in order to give them the very best opportunities and propel them to heights we haven't dreamed of.

I think about my wife, and the ridiculous decision she made in marrying me. We had a date on July and were married that October. That's a three month-long courtship, talk about taking a chance. That was over 7 years ago. I hope she renews me for another seven! ;)

All these people have helped and continue to help me, and only now as a man of 34 am I mature enough to look down and realize that I've been standing on their shoulders all these years. For this, I thank you all. I will repay you all the best I can by paying it forward.

If you have a blog, Dear Reader, why not take a moment at the beginning of this new year to write a post about the people that helped you get where you are? Parents? Teachers? First bosses? Friend? Spouse? Whose shoulders are you standing on?

Related Posts

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Verizon FIOS TV - Review and Photo Gallery

January 18, '08 Comments [30] Posted in Musings | Reviews
Sponsored By

CIMG8065We are finally out from under Comcast Cable and have just hooked up Verizon's new Fiber-Optic based FIOS TV. There's a long waiting list in my state, so I signed up in October and had it installed just this last week. We already had FIOS internet, with 15 megabits downstream and upstream (a premium service that costs an extra $10 a month) and have been very happy with it.

There is an ONT (Optical Network Terminal) (here's a network diagram) that is a installed on the outside of your house. This device is the bridge between the fiber optic cable that comes right up to your house but not inside and whatever wiring you have in your house.

If you have basic needs, often Verizon will just put a wireless router in your garage and call it done, giving you wireless Internet access as far as that router reaches. In the last six months, however, Verizon has started using routers that include a Coax connector such that the FIOS signal(s) can run over 75OHM Coax cable, switching from Fiber to Coax at the ONT - using the cable you likely already have running through your house into each room. The installer should do a signal test to check for loss over long runs and through splitters. My installer was very happy with the professional splitter I'd preinstalled in my wiring closet, saying that he wasn't able to measure that any signal was lost at all. He said that this speaks to good wiring and a good splitter. He had a certain level that we couldn't certify below, so make sure you ask your installer if the signal is sufficient for a glitch-free installation.

Since I had Verizon FIOS Internet already, hooking up the TV was easy for the installer. He used my existing Coax spliter and split the wire before the router. So, the coax comes in from the outside then splits and heads into all the rooms in the house, with one of the downstream cables going into the Verizon Internet Router's Coax connector. From there the router speaks TCP/IP over RJ-45 and supplies the house, but it also can hand out IP addresses over Coax to the DVR (Digital Video Recorders) that you'll receive with the FIOS TV Package.

There is an optional Media DVR option that will let you watch pictures and share video between the DVRs using the router and TCP/IP for transport, but I decided against that option since my XBoxen already do that fine.

Set Top Box (DVR)

CIMG8056Verizon uses the Motorola QIP6416 set-top box, that looks exactly like the craptastic Comcast DCT6412, but runs a TOTALLY different UI.

Just to make myself totally understood here, there is no way I could assemble a sentence, much less a paragraph, using the English Language to express the utter magical poopiness of the Comcast DVR Software. I hate it with the heat of a thousand suns. Rest assured it's garbage. it is slow, buggy, and has a dozen subtle and horrible bugs that are well documented around the net.

Fortunately the software included with the Verizon box is completly different, written from scratch and it's a joy. It's really beautiful. It's got high-color (24bit?) graphics, very polished and curvy, a distinct contrast to the low-color blocky Comcast software.

The interface is very intuitive, but also includes a number of advanced shortcuts that you'll stumble on in the using. For example, when watching TV, selecting up, down, left, or right on the direction button will take you (as a shortcut) to different modes instantly. For example, up takes you to a TV Guide split-screen with TV on the left, down takes you to a half-screen floating guide. Hitting Guide once takes you to a full-screen guide, pressing twice goes to split-screen. Hitting info once gives you a small popup, hitting it again takes you to a full-screen info page.


CIMG8060The DVR will hold about 17 hours of HD or 60 hours of SD TV (Standard Defintion) or whatever mix of both you can manage. As with most DVRs you can set each recording to be "protected" (not automatically deleted) or to stick around in a queue with the last x recordings. You can select new shows only, or all shows including repeats.


There's also a few "in progress" features like Widgets, that run on the DVR. Currently the software includes Traffic and Weather, and Notes is coming soon so you'll be able to leave notes for family members. It'd be nice if they did a calendar as well. I suppose it comes down to how far Verizon wants to push the envelope. I hope they are more progressive than Comcast has been. I'll be watching the version numbers closely to see when upgrades happen.

As of this writing my Comcast 6416-P2 is on Verizon's Release 1.0.4 Build 05.68. If yours is different, post it in the comments!  The set-top DVR software has been very stable so far, easy to use and my Harmony 880 remote required no reprogramming as the IR codes are the same for all Motorola DVRs.

CIMG8061  CIMG8062


When watching Recorded programs they are sorted by Date Descending. This is the one place the aesthetic of the fancy interface kind of gets in the way. You can only see about 12 shows at a time because of the generous whitespace of the interface design. Additionally (this is my #1 and really only major gripe) the interface doesn't automatically take up the complete width of a 16:9 widescreen television. I wonder (and wondered before with Comcast) if this is a limitation of the hardware that overlays the graphics. It'd be nice if these interfaces scaled wider, particularly the TV Guide.


High-Def, Standard Def and Picture Quality

Each show that is High-Definition has a little "HD" icon by them, and if you press left while in the Full Screen Guide you can filter all channels to show just High-Def channels. On Verizon TV all the channels (currently) between 800 and 899 are Hi-Def.

In my neighborhood that makes for 26 high-def channels, including all the major US networks. I have no way to measure the sharpness or compression of the channels, but I've personally got an eye for these things (and I'm really irritated by motion artifacts) so you can take that for what it's worth.

I feel like the High-Def Channels on Verizon are re-compressed less than they are on Comcast. Most (every?) provider has to re-encode channels to get them to fit within their bandwidth. I don't know if Verizon has more bandwidth than Comcast, but I can say that I had Comcast Cable for 10 years, the last 4 with High-Def and that Verizon's FIOs High-Def streams seem to have fewer artifacts when viewed on the same TV. This might also be as a result of newer software or hardware in the Motorola Set-Top box.

Certainly the software interface is much nicer to look at as I mentioned before, above. The fonts anti-alias nicer, and the whole interface seems to be designed for high-def more than the Comcast DVR.

The box will push out 480p, 720p or 1080i. There's no 1080p option, but there's also no 1080p source media, so that's fine. I'm running over HDMI and it works great, even through an HDMI switching receiver like my Onkyo.

One thing I noticed was that Standard Definition television, like Jon Stewart on Comedy Central looks MUCH clearer than Cable. Like, I literally said, "wow." There is NO ghosting. This is the first TV experience I've ever had in a my adult life without ghosting on some channel somewhere. That said, the feeds for Standard Definition channels seems slightly more "digital" or "blocky" than Cable. It's subtle, but it's there. You know you're at 640x480, especially on a larger TV. Phrased another way, if there was a "smoothing" setting, it's set to sharp on standard definition on Verizon FIOS, while it seemed "smooth" on Comcast Cable. Your mileage may vary.

On-Demand Movies

FIOS TV has only been available for a month or so in my state, and the On-Demand selection is meager at best, and doesn't yet include HD movies. I had HD movies on Comcast and was happy with both the quality and selection, so I imagine that FIOS will step up in the coming months.

 CIMG8058 CIMG8053

I am heartened, however, by the "AppleTV-like" interface of Movie Posters. It's very friendly and easily navigated. The WAF (Wife Acceptance Factor) will be high on this feature.

Choice and Variety

There are also a number of International Premium Channels available, including:

  • Vietnam's SBTN
  • CCTV-4 and CTI in Chinese
  • TV Japan
  • ART in Arabic
  • MBC in Korean
  • TV 5 in French
  • Rang A Rang in Farsi
  • RTN and Channel 1 in Russian
  • TV Asia

There's also almost 100 Spanish Language channels available if you like, and over 45 movie channels. Now, before you tease me about having too many channels, these are just available ones. You can set your favorites, and we've picked <10 and filter the list to show those.

FIOS also includes almost 100 Music-only Channels from Urge and Music Choice. The wife likes this over the radio because it shows the name of the artist and album.


The Core Package is currently only $43 a month, and you can get a number of different DVR options, picking between standard, HD, standard DVR and HD DVR. We were paying upwards of $60 with Comcast and we just don't watch THAT much TV to feel good about that much money. The Premium Channels like HBO and Showtime cost the same as they do on Cable, likely because those channels set their cost, not a TV provider like Verizon.


All in all, we've been VERY happy. The picture quality is great, the set-top box just works, and I have high hopes that Verizon will keep updating the boxes with new software and more On-Demand Movies. This is just the first month Verizon FIOS TV has been available in my state, and I feel they are off to a good start. Recommended over local cable if you can get it.

Related Posts

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Get namespaces from an XML Document with XPathDocument and LINQ to XML

January 17, '08 Comments [9] Posted in ASP.NET | LINQ | Programming | XML
Sponsored By

A fellow emailed me earlier asking how to get the namespaces from an XML document, but he was having trouble because the XML had some XML declarations like <?foo?>.

A System.Xml Way

XPathDocument has two cool methods, GetNamespace(localName) and GetNamespaceInScope, but they need a currentNode to work with.

 string s = @"<?mso-infoPathSolution blah=""blah""?>
              <?mso-application progid=""InfoPath.Document"" versionProgid=""InfoPath.Document.2""?>
              <my:ICS203 xml:lang=""en-US"" xmlns:xsi=""  
xmlns:xd=""""> <my:HeaderData/></my:ICS203>"; XPathDocument x = new XPathDocument(new StringReader(s)); XPathNavigator foo = x.CreateNavigator(); foo.MoveToFollowing(XPathNodeType.Element); IDictionary<string, string> whatever = foo.GetNamespacesInScope(XmlNamespaceScope.All);

Once you're on the right note, in this case the first element, you can call GetNamespacesInScope and get a nice dictionary that has what you need inside it.


I really like the System.Xml APIs, they make me happy.

A System.Xml + LINQ to XML Bridge Methods Way

How could we do this with the LINQ to XML namespace? Well, pretty much the same way with a much nicer first line (yes, this could be made smaller).

 XDocument y = XDocument.Parse(s);
 XPathNavigator poo = y.CreateNavigator();
 IDictionary<string, string> dude = foo.GetNamespacesInScope(XmlNamespaceScope.All);

Notice that the CreateNavigator hanging off of XDocument is actually an extension method that is there because we included the System.Xml.XPath namespace. There are a whole series of "bridge" methods that make moving between LINQ to XML APIs and System.Xml APIs seamless.


See the (extension) there in the tooltip? There's also a different icon for extension methods when they show up in Intellisense. See the small blue-arrow added next to CreateNavigator?


These helper methods are "spot-welded" on to existing object instances when you import a namespace that defines them. They are also called 'mixins.'

A Purely LINQ to XML Way

I also wanted to see how this could be done using LINQ to XML proper.

 Disclaimer: We are comparing Apples and Oranges here, so say, "wow that query is not as terse or compact as GetNamespacesInScope." We're comparing one layer of abstraction to a lower one. We could certainly make a mixin for XElements called GetNamespacesInScope and we'd be back where we started. The System.Xml method GetNamespacesInScope is hiding all the hard work.

Big thanks to Ion Vasilian for setting me straight with this LINQ to XML Query!

First we load the XML into an XDocument and ask for the attributes hanging off the root, but we just want namespace declarations.

XDocument z = XDocument.Parse(s);
var result = z.Root.Attributes().
        Where(a => a.IsNamespaceDeclaration).
        GroupBy(a => a.Name.Namespace == XNamespace.None ? String.Empty : a.Name.LocalName,
                a => XNamespace.Get(a.Value)).
        ToDictionary(g => g.Key, 
                     g => g.First());

Then we group them by namespace. Note the ternary operator ?: that returns "" for no namespace, else the namespaces local name as the key selector, and then gets an actual XNamespace.

Update: Ion wrote me and pointed out a mistake. I was calling z.Root.AncestorsAndSelf.Attributes, and I only needed to call z.Root.Attributes, or if I wanted to get all namespaces, z.Root.DescendantsAndSelf(). Thanks Ion!

Ion says: "z.Root.AncestorsAndSelf() says: from the root element of the document find all ancestors and the element itself. In other words only the root element. If you want to find the in-scope namespace declarations for a given element ‘e’, then on that element you’ll do e.AncestorsAndSelf(). In other words, starting from the given element ‘e’ walking up the ancestors path and including the element itself look for attributes that are namespace declarations and build a dictionary … Note that the question for in-scope namespace declarations is answered by walking up a path in the tree and not by doing a full traversal of the tree starting from a given point (a la e.DescendantsAndSelf())."

It can be confusing to figure out the various types of these variables like "a" and "g". In this example, "a" is an XAttribute because the call to Attributes() is of IEnumerable<XAttribute> and g is of type IGrouping<string, XNamespace>, gleaned from the expression inside of GroupBy().

We finish it off by taking the IGrouping and turning it into a dictionary with ToDictionary, selecting an appropriate key and the first At runtime "g" is an instance of System.Linq.Lookup<string, XNamespace>.Grouping which implements IGrouping, containing the namespace as an (and the only) element, subsequently retrieved with a call to First() and becomes the value side of the dictionary item.


Do also note one subtle detail. The System.Xml call to GetNamespacesInScope always includes the xmlns:xml namespace, declared implicitly. The LINQ query doesn't include this implicit namespace. Note also that these were sourced from XML Attributes and that the order of attributes is undefined (another way to say this is that attributes have no order.)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Hanselminutes Podcast available on Zune

January 17, '08 Comments [7] Posted in ASP.NET | Microsoft | Podcast
Sponsored By

Finally, the Podcast is available in the Zune Marketplace. There's apparently a very long queue to get approved for the marketplace, so it's nice that it's finally done. We've increased the size of the logo graphic so it'll look optimal on players that support embedded hi-res cover art as well.

Click to subscribe to Hanselminutes with your Zune.

If you've got a Zune and/or the Zune Software installed on your machine you can subscribe with One Click with this link:

If you've got iTunes, you can subscribe with this link:

And if you're using a free Podcast downloader like FeedStation (and if not, why not?) then you can subscribe with the main URL:


About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

.NET Framework Library Source Code available for viewing

January 16, '08 Comments [15] Posted in ASP.NET | Learning .NET | Microsoft | Programming
Sponsored By

It's live and you can give it a try now! Ten minutes ago Shawn and Scott released the hounds. If you'd like to step through .NET Framework Source code, here's what you need to do.

  1. Install this QFE.
    • Note, if you're on 64-bit Windows, read the description as there is a single manual step for 64-bit folks like me.
  2. Go into Tools|Options|Debugging|General and turn off "Enable Just My Code" and turn on "Enable Source Server."
  3. Go to Symbols and add this URL and a local cache path. Make sure "search only when symbols are loaded manually" is checked.

That's it. Crazy. You can get more detail on Shawn's post if you need it. Here's me, just now, stepping into XPathNavigator's GetNamespacesInScope method.

Do note a few things.

  • Loading source the first time will be slow. There's lots of it. It'll be faster the second time.
  • If you can't right click and select Load Symbols from the Call Stack, try Ctrl-Alt-U and right click Load Symbols for the Module you want to step into.

ConsoleApplication1 (Debugging) - Microsoft Visual Studio (Administrator)

Fabulous. Enjoy.

Related Posts

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.