Scott Hanselman

Continuous Integration Screencast - Jay Flowers and I on DNRTV

April 29, '07 Comments [7] Posted in Nant | NUnit | Podcast | Programming | Screencasts
Sponsored By

Last week during lunch Jay Flowers and I recorded an episode of "DotNetRocks TV." We are Episode 64 of DNRTV. 

"In this episode of dnrTV, Carl has two guests (Jay Flowers and Scott Hanselman). Essentially Jay Flowers is an expert in Continuous Integration (CI), and the author of CI Factory, a helper application for setting up CI systems. Scott complements Jay as a user of CI Factory, and one who has had to set up CI without it! In this show Jay shows Scott and Carl how to set up a complete CI system with Subversion as the source control system. Jay uses SubText, a popular blog software package, as a demo source project that gets run through the CI system."

Play Flash Version in the Browser
Download zipped video
Download Torrent to Zip
Subscribe with PwopCatcher (read more below)

You remember Jay Flowers, maker of the free CI Factory, a Continuous Integration accelerator, from Hanselminutes show #54. We also talked about CI in February of 2006 on Show #4. Jay and I had said on the show that we really needed to do a visual show to help folks understand Continuous Integration and CI Factory, and this is it.

In this show, we (actually Jay) takes SubText, the popular ASP.NET/SQL Blogging Engine led by Phil Haack, and sets it up for Continuous Integration from a totally fresh machine. He walks us through the process step by step. Even though SubText already has a CI Build setup, we chose it as an example since most folks who want to do Continuous Integration likely have an existing project in mind. We wanted to show how even a fairly complex project like SubText that includes Unit Tests and many projects can be setup for CI in less than an hour. Setting up a build server (without asking your boss) can be a good way to sneak Continuous Integration processes into your company.

Jay worked very hard on preparation for this episode, on his own time, and I want to personally thank him for his work. I hope you enjoy the show.

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 61 - Inside the Mind of Chris Sells and The Last 15 Years of Programming - Part 1 of 2

April 29, '07 Comments [9] Posted in Podcast | Programming
Sponsored By

My sixty-first podcast is up. In this shocking episode, I visit the home of Chris Sells and we make up a topic for the show! I suggested we talk about what programming will look like in 15 years, and Chris countered with the suggestion that we chat about the LAST 15 years first, then the next 15. We have a blast when we chat, so this show went long, almost 50 minutes, so we cut it in half so as not to waste the listeners time. Chris had a bit of an allergy to me and coughed a few times and we weren't able to fix the sound, so forgive me (and Chris) ahead of time.

Part Two will be posted tomorrow so you don't have to wait a week.

Next week I'll be at Mix, and I'll have an interview with ScottGu about Silverlight as well as some other surprises.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Links from the Show

 Chris Sells Blog

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

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

Silverlight is Argentum in a Flash

April 27, '07 Comments [5] Posted in ASP.NET | Musings
Sponsored By

Doh! Silverlight! After the Silverlight podcast I kept asking myself, why are all the DLLs and Javascripts called things like aghost and agcore? Because Ag is the symbol for Silver. Silver in Latin is argentum. Thanks Alexey!

Download Silverlight for Windows here and Silverlight for Mac here. It's only a meg and is harmless.

Be sure to check out Alexy's blog post (via Mike Harsh where I stole the Silverlight Logo) with his WPF/e (Silverlight) 3D demo based on his Bubblemark 2D Benchmark that includes:

I got over under each demo. Things slowed down with 128 balls, but I greatly suspect that it's a JavaScript problem at that point, and not an animation engine problem.

ASIDE: On an unrelated note, if you ever wanted to get Windows Media working in FireFox, download the WMP Plugin for FireFox and you'll be on your merry way.

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

Removing Security from Downloaded PowerShell Scripts with Alternative Data Streams

April 25, '07 Comments [7] Posted in PowerShell
Sponsored By

I was trying to run a PowerShell script that I downloaded from the Internet today and got this security warning:

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your
computer. Do you want to run foo.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):

I've written about Signing PowerShell Scripts before, but not about totally unsigned, totally un-trusted scripts. When a script is downloaded via Internet Explorer from the Internet or an Intranet, an NTFS Alternative Data Stream is added to the file with a Zone Identifier, indicating the file's origin.

You can use the free streams.exe from SysInternals to see the Alternate Data Stream for each file/script.

C:\>streams foo.ps1 

Streams v1.5 - Enumerate alternate NTFS data streams
Copyright (C) 1999-2003 Mark Russinovich
Sysinternals - www.sysinternals.com

C:\foo.ps1:
:Zone.Identifier:$DATA 26

You can see clearly that there's a Zone.Identifier stream attached alongside this foo.ps1 script.

It can be easily opened in notepad like this:

notepad foo.ps1:Zone.Identifier

And see the hidden ini file with a Zone Identifier. There's six possible values

public enum SecurityZone
{
NoZone = -1,
MyComputer = 0,
Intranet = 1,
Trusted = 2,
Internet = 3,
Untrusted = 4,
}

Notepad is kind of a coarse, but effective, way to access these streams. The PowerShell Guy has created an extension method for System.IO.FileInfo called GetStreams that lets you get at these streams from PowerShell.

In Vista, you can use the new /R switch to DIR as in DIR /R.

Personally, I like to just use the built-in (have you see this?) support in Explorer's General Property Pages for the file. You can just select Properties and under Security click "Unblock." Clicking Unblock completely removes  the Zone.Identifier Alternative Data Stream and makes scripts (and other things) executable again.

To summarize, there's lots of ways to manipulate Alternative Data Streams:

SECURITY NOTE: Firefox doesn't appear to know about zones at all, so PowerShell scripts that are downloaded from the Internet with Firefox are not marked with this Alternative Data Stream, and are therefore immediately executable, so take care. Firefox on Windows could fix this by calling IAttachmentExecute (MSDN).

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

Leaving Comcast for Verizon Fios - Upgrading the Home Network to Fiber Optic

April 21, '07 Comments [37] Posted in Reviews
Sponsored By

I've been increasingly disappointed with Comcast's Internet Service of late. Even though I pay a monthly premium on top of the regular rate for Internet Access, I'm rarely getting good throughput. This makes downloading big stuff like Orcas Beta 1 VMs more than a little irritating.

(Yes, I know American's are spoiled by good bandwidth at cheap prices. I realize this more than you might know. See my post on Bandwidth in the Bush.)

UPDATE: I forgot to mention that I'm paying US$50 a month for the 15/2 service.

I got fed up recently and decided to move over to Verizon Fios as I'd had it with Comcast and Verizon had already torn up my yard a few months back to get Fiber Optic Cable to my neighbor.

TIP: A Verizon Employee confirmed to me that the online database and an internal database of "Is FIOs available in my neighborhood" is NOT in sync. Be sure to call and ask them if it's available where you are. My house was not available when checking online, but WAS available when I called and talked to a human.

Installation

I called and made the appointment. The day came (today) and the guy showed up. He absolutely knew his stuff. He was careful not to bad-mouth Comcast, which was classy, but he was clear to express Fio's culture. His feeling was "massive bandwidth, reasonable price, do what you like." That's nice, because I didn't like hearing from Comcast when they think I'm using too much.

My neighbor had the fiber come to his house, then a box attached to the side of his house, then a battery backup in his garage. Then the Verizon guy installed Verizon's Wireless Router on the wall in his garage and put in a bunch of small PCI 802.11 cards. So his whole house is wireless. No hub, no closet. Great for him, not acceptable for me. There's a lot of traffic flowing on my network and I want both the throughput and comparative security of wires.

TIP: Plan your network layout before the installer arrives. I had, fortunately, three contingency plans.

Initially I was quite concerned, thinking that there'd be no way for the Verizon guy to get the Internet Service into my second floor where the wiring closet and punchdown block is. This is when he dropped this surprise on me. A few months back, he says, they got the OK and hardware to run their service over the last 100 or so feet inside your house using the existing Coax Cable you've likely already got strung. This was perfect for me, as I already went to the work of getting Cable into my computer room.

See the diagram below. Now the fiber comes in from the street, into the optical converter, then under my house and into my walls on 75Ohm Cable Coax then out of the wall in my computer area and into the Verizon Router. The router converts that one Coax Run into RJ-45 Ethernet, that I plug back into the the house, which in turn, lights the house up - exactly as it was - for Internet. I was VERY pleased with his installation and the process.

Router Software

When I heard that Verizon insists (you can change it when they leave, but they lower-case-i "insist") that you use their ActionTec MI424WR Router as your first level router, I was thinking "I'll be damned if I'm going to give up my DD-WRT LinkSys Router after all the work I put into the whole network topology, QoS, and what-not.

The installer dude was sympathetic, and we chained the two with the Verizon Router basically neutered and just forwarding traffic along. This allowed Verizon to do whatever diagnostic magic probing they want and I could keep my existing stuff exactly as it was.

However, after he left, I started poking around the Actiontec's Web Interface, and upgraded its firmware to 4.0.16.1.45.160. I must say, it's really quite powerful once you get into the deeper parts of the system, bypassing all the safety warnings.

TIP: Make a hard-copy report of all your networked devices and their MAC addresses. It'll be easier to figure out who got what address later if those devices don't have names.

I decided to copy (manually) all my DHCP lease settings, uPnP stuff, QoS rules, Port Forwarding (for Windows Home Server, etc) and some other things over to the new router. Not only was I able to get it all up and working in about 90 minutes, but it actually feels quite a bit snappier than the LinkSys. The LinkSys would get really sluggish when the network was working overtime. This ActionTek one works great. I was pleasantly surprised. Now I've got two LinkSys Wireless Routers that need a home.

Current Network Map

Here's how things look currently. I consolidated inside the wiring closet, and while there's two RJ-45 ports in each room in the house, for now I'm getting away with one 8-port hub into the closet, and the built-in 4-port hub on the ActionTek Router.

TIP: Just as it's useful to have a Family Backup Strategy and accompanying diagram, it's useful to have a Current Network Map for your spouse in case you get hit by a bus. If you've got knowledge that exists only in your head, write it down.

Conclusion

I'm off to cancel Comcast Internet next week. Personally, I'd completely given up on Verizon many years ago and had long left them for dead. I'm completely surprised with the smoothness of the whole experience. Hopefully the uptime for FIOs will turn out good as well. I may also switch away from Vonage, given the current lawsuit, and move over to Verizon using this same network.

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 60 - Silverlight and Web 2.5

April 20, '07 Comments [4] Posted in ASP.NET | Podcast | XML | Mix | Silverlight
Sponsored By

My sixtieth podcast is up. We discuss "Web 2.5" as Silverlight (ne WPF/E) is announced. Seems that Rich Cross-Platform Runtimes quickly approach from both Microsoft and Adobe. What does this mean to the average developer? We also try to make up for some misinformation we spread in Show 46 on WPF/E, and while we do it, we probably speculate wildly and spread more.

ACTION: Please vote for us on Podcast Alley ! Digg us at Digg Podcasts !

Links from the Show

WPF/E Show - Be sure to read the commments (o3p)
Ted Patrick, Flex Evangelist on Silverlight and Flash/Flex (o3u)
Keith Elder speculates on a Mobile Silverlight (o3z)
WPF/E Announced at Mix06 (o3q)
Scott Barnes says "Stay Agnostic" (o3v)
Tools for developing Silverlight (o40)
Paul Wilson's Analysis of the Silverlight Announcement (o3r)
Adobe Flex (see the screencast on creating Flex apps also) (o3w)
MSDN Silverlight SDK (o41)
Silverlight Home Page (o3s)
Adobe Apollo - Next Gen RIAs (o3x)
Silverlight Architectural Overview (o42)
Tim Sneath on Silverlight (o3t)
Developing Flex Screencast (o3y)

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik  is our sponsor for this show.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET . It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support  while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com/.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

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

The (Programming) Language Explosion

April 20, '07 Comments [33] Posted in Musings | Programming
Sponsored By

I couldn't be prouder. My little sixteen-month-old Z said "Mommy Bathing in the Water" while my wife was in the shower. He said it with American Sign Language (ASL), a language we've been teaching Z. I think it's a big deal because he independently strung these words together, one after another, and made a declaration.

The Language Explosion has begun with my little man. He's starting to speak more and more (verbally) and my wife is continuing to (try) to speak to him in her language. When he starts school he'll (hopefully) be in an Spanish immersion program, so he'll theoretically have four languages going forward. (ASL qualifies as a foreign language in college and has a different sentence structure than English.)

The "language events" of the last few weeks got me thinking about choosing Programming Languages.

(No, not for Z, hopefully he'll be much more well-rounded than I, and will NOT be a programmer.)

There are many folks who study linguistic learning in young people and the conventional wisdom says that learning between 4 and 5 languages is quite reasonable, even easy, if some basic rules are followed. Things like one language per care-giver, consistency, etc.

If a theoretical child (not mine) was to get "good language coverage" from a population perspective - trying to pick a set of languages that would enable the child to communicate with the largest number of people - they might want to learn English, Chinese, Spanish, Hindi, Russian and maybe Arabic. If a theoretical person wanted to learn a set of programming languages that would enable them to write code today with a good chance of getting a job they might want to learn Java, C, C#, PHP, Ruby, maybe Javascript and possibly Python.

However, if a theoretical child wanted to get a good set of solid languages that would enable them to more easily learn other languages, they might want to learn English and Spanish (Indo-European Family), Chinese (Sino-Tibetan Family), Arabic (Afro-Asiatic Family), Swahili (Niger-Congo Family) and maybe Japanese or Turkish (Altaic Family). These languages would give the child very broad exposure to different structures and tones.

What programming languages would a new Student of Programming want to learn in order to get good coverage and enable them, at an early age (or stage in their career) to not only learn other languages but also solve problems in non-traditional ways.

An parallel could be drawn between an older life-long English speaker having trouble learning a language because the sentence structure of the new language is so very different from English, or a tonal language like Mandarin where the English speaker's brain simply can't hear the tones.

Studies have show that children who are exposed to tonal languages at some length, like Mandarin, before their second year can lay the pathways to recognize and distinguish between "similar" tones years later. But they have to hear the tones early in life.

What programming languages should a New Programmer experience early so that they might be more able to "hear the tones later" when a new languages comes along? What language should a new programmer be exposed to first?

Should we make selections from the major Programming Language "families"?

  • Imperative - statements that contain a sequence of commands
    • Fortran, C, Pascal, VB, LISP
    • Object-Oriented
      • Smalltalk, Java, C#, Ruby, LISP
  • Declarative - "It's like this, figure it out"
    • XSLT, SQL (kinda)
  • Logical - describe some theoretical state and the steps it implies, and work backwards to solve
    • Prolog
  • Functional - Keep it stateless and create functions, often recursive
    • ML, Haskell, Common LISP

Should young (or new) programmers be taught many languages and philosophies, or just ones that will get them a job? Should we optimize for language coverage or language diversity?

If there are benefits in teaching young children Chinese because of the language's complexity and tonal qualities, is there a benefit in teaching new programmers Lisp for the (mostly) same reasons?

Speaking only to Basic's comparative "linguistic" value, to be clear. if Lisp is comparable to Chinese then should Basic considered on par with English Slang?

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

New Release of Notepad2 - Updated (again) with Ruby Support

April 19, '07 Comments [18] Posted in Programming | Tools
Sponsored By

I'm a big fan of Notepad2. I have used a ton of text editors, but I keep coming back to Notepad2. Partially because it's one better than Notepad, but mostly just because it feels very natural. Notepad++ is nice, but still, I'm drawn to Notepad2.

After nearly three years of silence, Florian Balmer of Flo's Freeware has updated Notepad2! You can get the latest version here directly from Flo, as well as the C++ source.

There's some cool changes in this version, including the removal of settings from the Registry. They're stored in a .ini file now, which makes Notepad2 more appropriate as a Portable App.

Here's a few of the changes that I'm enjoying (full list of changes here):

  • "Insert HTML/XML Tag" helper tool (Alt+X)
  • Rectangular selection (Alt+Mouse)
  • BSD License for Notepad2 and source code (see License.txt)
  • Multiline find and replace
  • Find and replace dialogs are now modeless
  • File change notification (optional)
  • "Duplicate Selection" command (Alt+D)

And dozens and dozens more small improvements. Let's all congratulate Flo on his triumphant return!

Unfortunately, Ruby as a syntax highlighting scheme still isn't included in this distribution, and while I want the new Notepad2, I can't give up the Ruby support added before by Wesner. So, I took the source of the New Notepad2 used Beyond Compare and Rubyified it, again. If you want to build it yourself, you have to get the source for Scintilla first, then modify it to change some Lexer linking stuff (see the Notepad2 readme.txt).

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

FIX: Missing Thumbnails for Videos (WMV, AVI, MPG) in Windows Explorer

April 19, '07 Comments [9] Posted in Tools
Sponsored By

Some time last months all the Thumbnails in Explorer disappeared for me. It might have coincided with me installing VLC Player on Vista. Either way, it sucked because I had family photos with thumbnails next to videos taken with the same camera with no thumbnails. It's no fun to lose functionality.

While poking around in the Registry trying to fix this issue, I noticed that Thumbnails for AVI files worked, while no others did. The only difference with that extension was this registry key:

[HKEY_CLASSES_ROOT\.avi\ShellEx\
{BB2E617C-0920-11D1-9A0B-00C04FC2D6C1}]
@="{c5a40261-cd64-4ccf-84cb-c394da41d590}"

So, I made a registry file with this entry for each extension I wanted thumbnails for. Merged it into the registry and, lo and behold, I have thumbnails again. The file is below.

As an aside, while I was trying to fix this, I also picked up a codec pack called the CCCP (Combined Community Codec Pack) and noticed while running through its settings that it had an option to "fix perceived types." I wish I'd known this last week when I fixed THAT problem with missing Media Center Thumbnails.

Switching over to the CCCP also had the added benefit of letting me watch my MP4 encoded PSP (Playstation Portable) files in Windows Media Player, and added Thumbnails in Explorer for MP4s as well via their settings dialog. Once I got MP4 working I exported those settings and appended to them to this file.

Also, by the way, did you know that the new location of the Explorer Thumbnail Cache is down here?

C:\Users\Scott\AppData\Local\Microsoft\Windows\Explorer>dir
Volume in drive C is 70 GIGS SYSTEM
Volume Serial Number is 98A2-64B2

Directory of C:\Users\Scott\AppData\Local\Microsoft\Windows\Explorer

04/18/2007 10:29 PM <DIR> .
04/18/2007 10:29 PM <DIR> ..
04/18/2007 10:29 PM <DIR> ThumbCacheToDelete
04/18/2007 10:29 PM 24 thumbcache_1024.db
04/18/2007 10:29 PM 1,048,576 thumbcache_256.db
04/18/2007 10:29 PM 24 thumbcache_32.db
04/18/2007 10:29 PM 1,048,576 thumbcache_96.db
04/18/2007 10:29 PM 4,064 thumbcache_idx.db
04/18/2007 10:29 PM 24 thumbcache_sr.db
6 File(s) 2,101,288 bytes
3 Dir(s) 21,871,742,976 bytes free

Crazy new stuff this Vista, eh?

No warranty or support, express or implied. YMMV. Backup your Registry before you do this and please don't come to me if your world is destroyed. You have been warned.

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

Network Connections: Using Verizon Broadband Access Wireless Internet without VZAccess Manager

April 18, '07 Comments [4] Posted in Musings | Tools
Sponsored By

I was talking to Juval Löwy today about wireless broadband access. We both use Verizon's VZAccess Rev0 network for Nationwide Wireless Broadband. I get decent results and have blogged about the service before, last year.

UPDATE: Some folks have reported that the Username and Password aren't needed. Some have reported it IS needed. Your Mileage May Vary.

One thing that irritates me and Juval is the VZAccess Manager application that Verizon provides to access the service. Fortunately , Juval figured out how to connect to Verizon's Wireless Broadband using Network Connections in Vista bypassing the VZAccess Manager. As Juval doesn't have a blog, I'm posting his instructions here with his blessing.

First, you need to manually create a new connection.

  1. Open VZAccess Manager, go to Help, about.
  2. Copy the phone number:

  1. In the Windows Control Panel, bring up the Network and Sharing Center.
  2. Click Set up a Connection or Network.

 

  1. Click Set up a dial-up connection

  1. Select the modem:

 

  1. Enter #777 for the number. For user name, plug your number from Step 2  plus "@vzw3com.com." For password use "vzw" (all lower case). Be sure to name the connection.

  1. Connect and run. Select public location for network type you are all set.

You can now use the connection without VZA.

Thanks Juval!

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

Automating Adding iTunes Album Art to MP3 ID3 tags from the Command Line in C#

April 17, '07 Comments [6] Posted in Podcast | Programming | Tools
Sponsored By

It's been bugging me that the album art for my podcast doesn't appear in Windows Media Player, iTunes, or in iPods.

I assumed, incorrectly, that this was an iTunes meta-tagging problem, but then I realized that this was an MP3 problem, not an AAC or WMA problem, although both formats support adding art to the file.

The ID3 format is pretty extensive. You can put a great deal of meta-information into an MP3. The Attached picture or APIC "Frame" in ID lets you embed in PNGs or JPGs, along with their respective mime/types. 

I googled around over lunch and couldn't find a simple, free, command-line program that would let me easily add pictures to not only the existing MP3s for our show on the server-side, but also could be integrated into our existing audio file production workflow.

I ended up finding this great little library from 2004 called the tagnetlib project source was offered for free from the Nancy Street Blog. I converted it to .NET 2.0.

Now, note that the tagnetlib project is currently deprecated in lieu of the NTag product that Greg Keogh started in 2005 and released in May of 2006. The NTag project is much more interesting and appears to be well thought-out. He intends to support WMA and OGG and turn the project info a "Meta Tag Tagging" project that would support all popular audio formats.

I used the Tagnetlib because it was quick, incredibly easy, and I only had my lunch hour to do this. However, he's pretty clear that Tagnetlib is, again, totally deprecated and unsupported. Perhaps one day I'll get to spend more time with the NTag library. For now, my little hack is used like this:

embedid3.exe file.mp3 file.jpg [optionally "mime/type", default is "image/jpeg"]

Disclaimer: This app does one thing. It adds images to MP3 files that don't have them. It has no error handling or checking and it doesn't care about you or your MP3 collection. Don't even think about running it over your collection or using it for any purpose. It's useful for one thing. It's useful to me. Your Mileage WILL Vary. You have been warned.

Do make sure you checkout NTag and what Greg's working on over there. It's really pretty fun code to read.

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

Expose and Vista-specific Alt-Tab Task Switchers

April 17, '07 Comments [11] Posted in Reviews | Tools
Sponsored By

I love the Exposé feature of Mac OSX. On Windows XP I ran TopDesk, an Exposé clone for a few years. Now that I'm on Vista and I find Flip3D to be a virtually useless way to switch tasks, I'm looking for a better task switcher again. I hope TopDesk jumps back into the party with new DWM support for Vista.

I still like TaskSwitchXP, but it's needed less with Vista's default ALT-TAB behavior.

When Vista runs Aero, the new Desktop Composition Engine, the possibilities for new Task Switchers becomes virtually unlimited. Early entries into the fray include:

  • My Exposé (Source Available!)- Released a CTP last November, and he's meaning to get a new one out, but has been busy. It's a LOT like Mac Exposé but it's got a LOT of screen-flickering and doesn't work well when your secondary monitor is taller (has coordinates ABOVE) than the primary monitor. Still, it's working good considering it was written BEFORE Vista RTM'ed
  • Switcher (Switcher Blog)- I was initially disappointed by this Task Switcher because its default mode is a strange "dock all running thumbnails to the top of the screen" place. And, there's no initial animation or transition. Then, I RTFM'ed, and noticed that you can switch between "dock" mode and "Exposé" mode using Page Down. Doh! After that, the choice is ssticky and you have the best Exposé in Vista I've seen. Brilliant and recommended. I hope he keeps developing it. I'm definitely using this one all day long.

With these two apps to choose from, and more, no doubt, on the way, the micro-market of Task Switching Software for Vista is looking pretty sweet.

If you're not sure if your TaskSwitcher is really using the Vista Aero DesktopComposition Engine, do a little test. Find a web page with a video or animated graphic or flash. Do a task switch and while in that "task switching mode" see if the animation is running inside the thumbnail. If it is, and running smoothly, that TaskSwitcher is using the DWM rather than static screenshots.

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

XmlSerializing a Generic List<>

April 17, '07 Comments [10] Posted in Programming | XmlSerializer
Sponsored By

There's lots of good techniques out there for using the XmlSerializer to serialize a Generic List<> type. You can implement IXmlSerializable and some other trickiness.

Here's the simplest possible thing I could do to make it work while working on a hobby project over lunch today with a friend.

UPDATE: I'm a dork and didn't see the forest for the trees on this one. I don't need a parallel array at all. That's my old 1.1 brain creeping in. Thanks to folks in the comments. It works fine just like this. I'm not sure why I thought it didn't work when I tried it before. Thanks folks!

namespace Poo
{
    public class Foo
    {
        public Foo() { FooReadings = new List(); }

        [XmlArray("FooReadings")] //Even this attribute isn't really needed if you accept the default.
public List<FooReading> FooReadings; } public class FooReading { public FooReading() { } public FooReading(DateTime date, decimal thing2) { this.Thing2 = thing2; this.Date = date; } public decimal Thing2; public DateTime Date; } }

The technique below is useful for other things, but not in this instance.

namespace Poo
{
    public class Foo
    {
        public Foo() { FooReadings = new List(); }

        [XmlIgnore]
        public List<FooReading> FooReadings;

        [XmlArray("FooReadings")]
        public FooReading[] ArrayFooReadings
        {
            get { return FooReadings.ToArray(); }
            set { FooReadings = new List(value); }
        }
    }

    public class FooReading
    {
        public FooReading() { }

        public FooReading(DateTime date, decimal thing2)
        {
            this.Thing2 = thing2;
            this.Date = date;
        }

        public decimal Thing2;
        public DateTime Date;
    }
}

The "Real List<>" is ignored and the "fake" one is presented as an Array in the Getters/Setter. Not pretty, to be sure.

What better ways are there that you prefer?

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

Speeding up a Slow Outlook 2007

April 15, '07 Comments [10] Posted in Tools
Sponsored By

Outlook 2007 has been pretty slow for me since I installed it. If you've got RSS Feeds Enabled and/or if you're a packrat, Outlook 2007 can be a downright performance pig. I've got internal contacts that say that the Office team is hot on the tail of a number of really interesting issues.

What can you do today? A patch KB933493 went live yesterday to help speed up access to large PSTs and OSTs. For now, you have to go get it. We'll see what the future holds for this, but I suspect that Office SP1, whenever it comes out, is going to be a very snappy performer.

Initial reports on this patch are positive. Searches are faster, Undos are faster, moving messages is faster, and moving quickly while reading in the preview pane is faster. The future bright on this one...I was really starting to get bummed about Outlook's performance.

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

Custom Cultures - WinForms Font Embedding Code with Ethiopian Amharic for Vista and XP

April 14, '07 Comments [4] Posted in Africa | Internationalization
Sponsored By

Even though my wife is Ndebele (Zulu) and we are trying to teach Z that particular Bantu Language, my first Linguistic African Love was Ethiopian Amharic. I almost majored in this stuff and I actually met my wife while I was speaking Amharic to one of her longtime college friends. Here's a small primer on Amharic I did in 2005 and there's a good basic Amharic Dictionary online here, that will exercise your fonts and mind as well. If you want to hear the languages, there's an Amharic audio dictionary here, or if you know me in person, I'll teach you some. Heck, if you know me, you know that'll be a long conversation because I love this stuff.

If you're running Windows Vista, you already have the Amharic Unicode Font "Nyala" and Input Method Editor installed! You can visit this test page to see that the Amharic support is quite complete on Vista. Here's my name in Amharic: ስካተ. If you aren't running Vista then you'll likely see black squares.

If you're running Vista, try this out. Go to the Control Panel and run the Regional and Language Options. Go to the Keyboards and Languages tab and click Change Keyboards. Don't worry, I won't break anything on your system, promise. Amharic is am-ET, by the way, compared to en-US or en-GB.

Click over to the Language Bar tab and make sure that Docked in the Taskbar or Floating on the Desktop is checked. You'll see your existing culture appear in the Language Bar - mine is in the tray.

Run Notepad, then go back to this menu and click Amharic.

You can always remove this by going BACK to the Control Panel and just Removing the Amharic Language.

While you're in Notepad, you're going to type "Thank You" in Amharic, which is pronounced (roughly) "Amäsägnalähu." Amharic is an "abugida" አቡጊዳ (not quite a syllabary) kind of like Katakana in Japanese, and with most Input Method Editors for languages with a lot of characters that are entered with an English keyboard, there's a mapping. You type and English Transliteration, and the IME gives you possible characters.

Amharic has no official transliteration, so this IME is kind of the standard, but there's always been arguments about the best way to describe the vowels. There are more vowels than in English, including a non-vowel-vowel.

Back to the point. In Notepad, type, using an English Keyboard:

  1. a-downarrow-space (this is a special character, that I can't see how to type without the down-arrow)
  2. m-e
  3. s-e
  4. g-'
  5. n-a
  6. l-e (the "e" is pronounced like "ay," by the way.
  7. h-u-space

You've just typed አመሰግናለሁ (ameseg'nalehu) which is one of the ways to say Thank You in Amharic. If you speak Japanese or another Asian languages you're likely used to using an IME like this. Notice how Notepad's support for Unicode means that it doesn't care about this new languages. It's just rolling with it.

Evil Black Squares

Be sure to know the details in Joel's classic Unicode post if you're doing international work and check out my Internationalization (i18n) Category. This "black square" issue is common when the system doesn't have a font available to render a Unicode code point, and since it's not legal to distribute that Ethiopian Nyala Vista Font outside the operating system by just copying it, how would an Ethiopian write and application and have it work on Windows XP. Surely a company in Ethiopia might want to defer upgrading to Vista (even though it includes all this great support for Amharic, including the custom IME (Input Method Editor)) for a while to save costs. This issue of course, applies to many languages beyond Amharic, and that's why I'm interested.

I've been bugging Michael Kaplan about this for as long as I've known him. It should be easier to create WinForms applications with cultures that don't include as much support as the Asian Languages. Plus, when a new OS like Vista comes out, how can we pass on the benefits to XP?

 At my urging Michael has created a great multi-part series on Font Embedding such that a person could develop on Vista and a downlevel OS could still work - even without the font installed, without violating the EULA.

In the screenshot above, we see a WinForms app running on XP. The OS doesn't have the font, but the font HAS come along for the ride as the app was built on Vista using this Font Embedding Technique.

 This will allow folks to develop Amharic Language (and other language) applications under Windows Vista and run them elsewhere. This is a huge accomplishment, in my opinion. Thanks Michael for your work!

I hope that folks tell Michael and Microsoft that this is a significant business scenario and encourage them to advance Michael's Sample Code into a full-fledge and supported feature in WinForms.

NOTE: You'll have to build the sample on Vista first in order to get the font. To get this sample running on XP, build it on Vista - note the creating of the font .bin file - and then run it on an XP box.

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

Managing Change with .NET Assembly Diff Tools

April 14, '07 Comments [1] Posted in Programming
Sponsored By

Sometimes you find yourself wanting to compare two versions of a .NET assembly as a way getting your head around all the changes that might be happening a your project. Perhaps you're writing a Framework for consumption by other developers.

There's a few different kinds of change you want to concern yourself with.

First is the "public face" of your assembly - the interface or 'linking' contract it makes with other assemblies that might choose to reference it.

Second is the semantic contract that is made. Most folks expect certain things of your assembly. They give you two "1's" and they expect a "2" in return. Sometimes people start to rely on bugs and you have to make breaking changes.

Breaking changes like deletion or modification of existing assemblies can, of course, wreak havoc.

One word to describe the changes that happen between versions - and many versions over time - is "churn." What percentage of the "surface area" of your assembly has changed? If a large number of things change it implies that the assembly is still being actively designed, or that the problem area isn't well understood. If very few things change and/or what does change is only additive, it implies that the assembly is fairly stable and can be counted on.

Here's some tools I use to get an understanding of what's changed between binary versions of an assembly, without resorting to source-level diffs.

  • LibCheck - The Standard. And oldie and a goodie. We use this tool to create reports that can be generated as part of your Continuous Integration build. The reports can be given to Project Owners (non-developers) and downstream consuming developers and gives them a very clear picture of what's changed; what should we worried about, test harder, and what should we worry less about. It also helps catch inadvertent breaking changes.
    • "This tool allows you to compare two versions of an assembly, and determine the differences. The tool reports the differences as a combination of 'removed' and 'added' APIs. The tool is limited to looking only at APIs (i.e., it can't check for behavioral changes), and only compares public differences, or changes which are deemed to be 'breaking.' The tool can be used to quickly determine what has changed between one version of your assembly and another, and can help ensure that you won't introduce any breaking changes to clients of your assembly. Instructions and intended use of the tool are described in the 'libcheck tool specification' document with the zip file"
  • Reflector Diff Add-In (a member of the Reflector Add-Ins Family with source available) - This tool by Sean Hederman plugs into Reflector and shows you the differences between two binary assemblies. More low-level than LIbCheck, but again, useful when you don't have source lying around.
  • NDepend - A must-have tool for Lead Developers and those who have to manage large numbers of projects and seek to understand the big picture. Version 2.1 added a Build Comparison feature and extended the already powerful CQL (Code Query Language) to support queries across features. You can see what code metrics have changed between two versions, and answer questions like "did this project get more complicated in this version, or did our recent refactoring actually reduce complexity. Check out the screencast here and download here. It also integrates nicely with source level diffs, so you can jump from the macro-view to a micro-view and back.

Being acutely aware of what's changed and avoiding the surprise of a breaking change can greatly reduce the stress level of your whole team as you deliver. I use all three of these tools and I encourage you to check them out.

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 59 - Hanselminutiae #3

April 13, '07 Comments [3] Posted in Podcast
Sponsored By

My fifty-ninth podcast is up. Carl and Scott discuss the weeks events in their technology lives, in this 3rd Hanselminutiae. Who are the Spyware People? Is the AppleTV any good? What's your backup strategy? And Scott's Dad gets a Mac.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

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

Fusion Loader Contexts - Unable to cast object of type 'Whatever' to type 'Whatever'

April 13, '07 Comments [2] Posted in Learning .NET | Programming
Sponsored By

It's funny how things you don't think about for a long time appear in twos or threes. This issue came up at work twice recently, and once via an email from a blog reader.

I blogged about part of this in 2004 when we were dealing with a lot of the icky complexities of the Loader (Fusion) in .NET. We used Mike Gunderloy's 2003 Binding Policy Article an a lot of testing to figure out how Fusion worked for us. We also are HUGE fans of Richard Grimes' amazing Fusion Workshop as a resource. Also, I just keep Fusion logging (FORCELOG) turned on all the time and logging to c:\fusionlogs.

Anyway, the issue was this error message about an InvalidCastException: 

System.InvalidCastException was unhandled
Message="Unable to cast object of type 'Plugin.Person' to type 'Plugin.Person'."
Source="LoaderContextSample"
StackTrace:
at LoaderContextSample.Program.Main(String[] args) in C:\LoaderContextSample\Program.cs:line 29
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

This can be initially very confusing because it says it's trying to cast type Person to type Person. Why aren't Person and Person the same, eh, Person?

Suzanne Cook puts it best, emphasis mine:

For example, path matters when determining whether a type is castable to another type. Even if the assemblies containing the types are identical, if they're loaded from different paths, they're considered different assemblies and therefore their types are different. This is one reason why using contexts other than the Load context is risky. You can get into situations where the same assembly is loaded multiple times in the same appdomain (once in the Load context, once in the LoadFrom context, and even several times in neither context), and their corresponding types won't be castable.

If you have an assembly you reference, but you also have a plugin that you've loaded, perhaps via LoadFrom (bad), if you intend for the types to be the same but they are loaded from different paths, they are effectively different types.

In this sample, I create a Person object via an assembly I've referenced the usual way, via Add Reference. Works great.

Then I load Person using Assembly.Load and create a Person via Reflection, then cast the object instance to the first kind of Person. Because I used Assembly.Load - usually the most appropriate Binding Context - the Loader (Fusion) finds the same assembly, and the Person Type created via Reflection is the same kind of Person as before. Works great. Note that Assembly.Load takes an Assembly Qualified Name like "Person" - not "Person.dll." Remember that Assembly QNs NEVER have .dll in their names.

Then I load the Person from a different path. In this example I've copied Person.dll to Person2.dll via a Post-Build-Event to illustrate this, but the most common way this would happen is that you've got a static reference to an assembly in the GAC, but your Plugin design uses LoadFrom to load a DLL from another path. Then you try to cast them. LoadFrom will almost always lead you astray.

If I was really serious I should have used the complete Assembly QN: Person, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, and I would have strong named it for Assembly verification purposes, but that's another post.

Here's part of the sample:

Person p = new Person("Franklin", "Ajaye");

//Use the Load Context...almost ALWAYS the right thing to do...
Assembly a = Assembly.Load("Person"); 
Type t = a.GetType("Plugin.Person");
object instance = t.InvokeMember(String.Empty,BindingFlags.CreateInstance, null, null, null);
Person p1 = (Person)instance;

//Use the LoadFrom...almost ALWAYS the *WRONG* thing to do...
Assembly a2 = Assembly.LoadFrom(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Person2.dll"));
Type t2 = a2.GetType("Plugin.Person");
object instance2 = t2.InvokeMember(String.Empty,BindingFlags.CreateInstance, null, null, null);
Person p2 = (Person)instance2; //BOOM!

Lucky Line 13 is where the InvalidCastException happens and I see the dialog pictured at the top of this post. Boom.

The Loader has a  lot of nuance, and it's helpful if you're building a large system with plugins and many points of extensibility to ask yourself - Where are my plugins on disks? What Types are shared? How are my plugins getting into memory?

Here's what we documented a long time ago. This only applies to dynamically loaded assemblies:

  • Assemblies will only EVER be loaded from the GAC based on a full bind (name, version, and public key token).  A partial bind with name and public key token only WON’T load from the GAC. 
    • If you reference an assembly with VS.NET you're asking for a full bind. If you say Assembly.Load("foo") you're asking for a partial bind.
  • However, the way this usually works is…
    • You do a partial bind on assembly name, or name and public key token with Assembly.Load
    • Fusion (the code name for the Assembly Loader/Binder) starts walking the probing path looking for an assembly that matches the partial bind.
    • Counter Intuitive: If it finds one while probing (the first one) it will then attempt to use the strong name of the one it found to do a full bind against the GAC.
    • If it’s in the GAC, that’s the one that gets loaded.
    • Any of that loaded assemblies will try to load from the GAC first without going to the probing path, since the embedded references constitute a full bind.
    • If they aren’t found in the GAC, then it will start probing.
    • It’ll grab the first one it finds in the probing path.  If the versions don’t match, Fusion fails.  If they do match, Fusion loads that one.
    • So, if you specify a partial name, and the file is in the GAC, but not the probing path, the load fails, since there’s no way to do a full bind.  

Here's the complete sample code from above if you like.

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

Team Hanselman and Diabetes Walk 2007

April 12, '07 Comments [18] Posted in Diabetes
Sponsored By

I'm here to ask you a personal favor, Dear Reader.

Please Donate to Team Hanselman and help us reach our Goal of raising $50,000 to Fight Diabetes...

...during this year's Step Out to Fight Diabetes by the American Diabetes Association.

This is a technical blog, but I'm not just a technical person full of source code and pomposity.

Two months before my 21st birthday I started peeing a lot. A LOT. Like I was drinking four 2-liter bottles of Sprite a day and was still thirsty beyond belief. We'd just had a family photo taken and I was 130lbs on a 5'11" frame (for those of you outside the US, that's thin.) I was wasting away and looked like death. My father, a Portland Firefighter and Paramedic for thirty years smelled the sugar on my breath and sent me right away to the hospital where my blood glucose level was higher than the meter could read...and it's supposed to be under 100mg/dl.

I spent that spring learning how to give myself shots, four a day, along with a regiment of pills. Twelve years later I have no side effects, knock on wood. Not everyone is that lucky. I recently went to a funeral of a high-school friend who was the exact same age and succumbed to Type 1 Diabetes.

I currently take three shots a day of Symlin while also wearing an Insulin Pump 24-hours a day, even while I sleep. The pump saves me from an additional six shots a day, which I took for 8 years before the pump. I test my blood sugar by pricking my finger between 8 and 10 times a day - that's about 46,500 finger pricks so far, and miles to go before I sleep.

I consider myself lucky though. My 91-year old grandmother's neighbor friend in the 1920's, before Insulin was widely used (it was discovered in 1921) ate nothing but lettuce and eventually died in childhood. I have friends who have been diabetic for nearly 50 years and had to boil large-gauge needles on the stove before injecting themselves with Pork-derived insulin, basing their decisions on a once-a-day urine check to check their blood glucose level.

Diabetes is endemic. Here's some stats from the NIH:

  • Total: 20.8 million people—7 percent of the population—have diabetes.
    • Diagnosed: 14.6 million people
    • Un-diagnosed: 6.2 million people
  • 1.5 million new cases of diabetes were diagnosed in people aged 20 years or older in 2005.
    • Diabetes was the sixth leading cause of death listed on U.S. death certificates in 2002.
  • Diabetes is the leading cause of new cases of blindness among adults aged 20 to 74 years.
  • Diabetes is the leading cause of kidney failure, accounting for 44 percent of new cases in 2002.
  • About 60 to 70 percent of people with diabetes have mild to severe forms of nervous system damage.

I tell you this not to scare you, or ask for pity. I tell you this because it's the painful truth. It sucks, and it sucks big time. I am constantly and consistently afraid that my son will face this disease in his lifetime. God help the children who get Type 1 diabetes. I was hardly prepared at 21, I can just now begin to imagine what a parent of a 2 or 3 year old would go through after a diagnosis like that. I'm even afraid to say it out loud, it's that unspeakable.

If you aren't familiar with Diabetes, perhaps my explanation on how Diabetes works using an analogy of an Airplane and the above statistics will help you understand how personally painful this disease is.

The Goal

This year Team Hanselman, led by myself and my wife, Mo, who had this whole idea, will be walking to fight diabetes on Oct 20h, 2007. We have set a goal of raising US$50,000. Crazy, huh?

If only 2500 of you, dear readers, gave US$20 to this cause, we've met our Team Goal. If only 1000 give US$50, well, you get the idea. If you can't donate, that's OK. Post about this on your blog, spread the URL http://www.hanselman.com/fightdiabetes or put some of our Diabetes "Flair" on your site!

Last year this time, there were over 5000 people subscribing to this blog (for the technical content, I assume) - this year there are over 14,000.

A Personal Favor to Me

Perhaps you've Googled and found my blog useful in the past or you've seen me speak at a conference or local user's group. Or, you've hung out here for years (this blog started in April 2002!). Maybe you're a blogger yourself and use DasBlog. Perhaps you've visited my Blog Archives and found them useful, or you read the ASP.NET 2.0 book.

If you've ever thought about giving a 'tip' to this blog, here's your chance to make that tip tax-deductible! (if you're in the US) You can also paypal your donation to the email address that is "my first name at my last name .com" and I will personally deliver 100% of your money myself.

Donate Now

Donations are Tax-Deductible and go directly to the ADA. If you like, you can PayPal me and I'll deliver the money myself.

Team Hanselman Diabetes "Blog Flair" and Badges

Please feel free to spread this flair or post them on your blog, and link them to this easy to remember link: http://www.hanselman.com/fightdiabetes. It'll bring folks right here to this site.

 

If you want to create a better flair, like the one that Jon Galloway created, send it to me, or put a link in the comments and I'll add it to this page for others to use!

LINKING NOTE: http://www.hanselman.com/fightdiabetes brings you here, and http://www.hanselman.com/fightdiabetes/donate takes you straight to the donation site.

Thanks for your patient attention, we now return you to our regular blogging schedule.

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

New Technology Podcast - RunAs Radio with Greg Hughes and Richard Campbell

April 11, '07 Comments [1] Posted in Podcast
Sponsored By

Happy 40th Birthday to Greg Hughes.

To celebrate his birthday, go checkout his new Podcast with Richard Campbell called RunAs Radio.

As with all Pwop shows, the audio quality will be excellent. Richard says:

I did get a fancy new recording rig to make all this work. My broadcast mike plugs into a MOTU Traveller that uses Firewire into Terrance, my 4960x1600 x64 XP beast. Also plugged into the MOTU is a Telos ONE+ONE for capture two telephone lines: one for Greg, and one for the guest. So I record my channel, Greg's phone track and the guest. Greg also does a local recording of himself (maximum quality, of course) and then all that is combined to make a show.

And Greg used my Samson Mic, Stand and Spit Pop Filter. Greg says:

It's a weekly IT podcast with a Microsoft technologies focus. Richard and I will discuss all sorts of relevant topics with a variety of smart and interesting people.

I have a great deal of respect for both Greg and Richard. They are both deeply technical and well-versed on a huge number of topics that the IT community cares about, and Greg also has a very strong security focus as our Chief Security Executive here at Corillian. I'll definitely be listening to this show on my drive home.

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

Fix: "General Failure" while launching FireFox URLs from Outlook

April 11, '07 Comments [9] Posted in Musings
Sponsored By

There seems to be an ongoing chaotic series of bugs, or bug, around "Set as Default Browser" and FireFox. Recently I updated my FireFox to 2.0.0.3 and suddenly whenever I click on a URL in Outlook I get a message box with "General Failure." Occasionally I'll get a "Locate Link Browser" message as well.

The issue seems to be some of the old Windows DDE stuff where a DDE message is sent to an application after it started up to pass information - in this case, the URL. Today, we prefer to pass the URL on the command line. It also makes for a faster launch.

Even though this was a problem with FireFox 0.9, it's still happening today. (I'm not the only one). John Haller has a fix in the form of a Registry File.

You can also make the change yourself in the Explorer UI via Tools|Options|FileTypes. Go to the ones marked (NONE) and start with URL:HyperText...and go to Advanced, then Edit the Open action and clear out the DDE Message TextBox.

Unrelated Aside: John's even got a theme and tools and hacks to make FireFox 2 look like IE. Stunning.

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

Adding PNGOUT to the Explorer Right Click Context Menu

April 11, '07 Comments [6] Posted in Musings | PowerShell | Programming
Sponsored By

I've been creating more PNGs lately on the blog. However, the default PNGs created by most tools are fat fat fat. PNGOUT to the rescue.

So, now I use PNGOUT to compress all PNGs before they are uploaded to the blog now. It's wonderful. It looks like Rick "Paint.NET Guy" Brewster is also enamored with PNGOUT and is considering integrating support directly into PAINT.NET although there might be legal issues. I'd be happy with a simple "call PNGOUT when you're done" option. Poof, we've avoided any legal trouble.

I know there's lots of Windows Apps that front PNGOUT and other PNG apps, but I like my things integrated and automatic.

Thoughts:

  • I wonder if someone could write a Windows Live Writer Plugin to run PNG out on files created by WLW before they are posted?
  • Since I'm using Kenny Kerr's Window Clippings to create the PNGs, it'd be more expedient to ask him to add the "Call PNGOUT when you're done"-feature to his tool.
  • I think I'll just integrate PNGOUT with the shell, it'll be faster...

Create PNGOUT.reg file that looks like this:

Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT]
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT\command]
@="\"C:\\Utils\\pngout.exe\" \"%1\""

Make sure you change your path to PNGOUT to match reality. Now you have this available in Explorer:

Optimizing all existing PNGs on my blog

Ah, but I also need to tidy up the EXISTING PNGs from my site. First I'll download all the PNGs to my local drive, then fire up PowerShell and run this command that will recurse everywhere in the current directory and below and run PNGOUT on all the PNGs, replacing them in place:

get-childitem . -include *.png -recurse | foreach ($_) { pngout "$_"}

Uploaded, and now I've taken my total PNG size (of all PNGs in all posts on the blog) from 40,004,166 bytes to 23,004,247 bytes a savings of about 42%. That'll add up in bandwidth costs.

You can also optimize the autogenerated PNG files within Windows Live Writer by running that same PowerShell command on the files in

%APPDATA%\Windows Live Writer\PostSupportingFilesWriter\PostSupportingFiles

It's a shame that most default libraries for PNG make such large PNGs, considering that this is the "picture format design for the web." Thanks PNGOUT!

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

Blogging to DasBlog from Word 2007

April 11, '07 Comments [13] Posted in DasBlog | Musings
Sponsored By

If this works, I've blogged to DasBlog from Word 2007. Why would I want to do this?

Looks like it works fine except for pictures. According to Ken (a developer on the DasBlog team) the Word 2007 implementation of the metaWebLog API's "newMediaObject" method is broken. They are passing a string but calling it an int, and DasBlog is pretty strict.

I can see where I might find myself on a computer that had only Word 2007, and rather than using the Web Interface I might want to blog from Word.

There's also the comfort level - that seems to me to be the most compelling reason. Word is comfortable, and being able to post to one's blog here would be very natural for most writers who live in Word already.

I might set this up for my wife as she's already comfortable with Word and Office. We'll get the picture/media thing worked out and I'll have Mo give it a try.

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

Accessing Mapped Network Drives via ASP.NET in IIS 6

April 11, '07 Comments [2] Posted in ASP.NET
Sponsored By

A question came up at work today, "How do I access mapped network drives in ASP.NET under IIS 6? It worked before I got IIS 6 and Windows 2003."

IIS 6 and Windows 2003 are considerably more locked down versus previous versions. Additionally, accessing drives via mapped drive letters is frowned upon, likely the layer of redirection, as drives can be REMAPPED by evil-doers.

The preferred way to access network shares is via UNC.If you really wanna use Mapped Drives, there's KB257174.

There's also KB207671 on "How to access network files from IIS applications." This is a pretty funny KB, specifically because of it's first suggestion:

Following are ways to avoid problems when you access network resources from your IIS application:

  • Keep files on the local computer.

This is the equivalent of the classic "Doctor, it hurts when I do this." "Well, don't do that."

The most useful tip in that KB article is the one about Auditing Logons. Rather than guessing or treating IIS as a black box, turn on Login Auditing:

If you cannot determine what kind of logon is occurring on your IIS server to handle requests, you can turn on auditing for Logons and Logoffs. Follow these steps:

1. Click Start, click Settings, click Control Panel, click Administrative Tools, and then click Local Security Policy.

2. After you open Local Security Policy, in the left Tree View pane, click Security Settings, click Local Policies, and then click Audit Policy.

3. Double-click Audit Logon Event and then click Success and Failure. Event Log entries are added under the Security log. You can determine the kind of logon by looking at the event details under the Logon Type:

  2=Interactive, 3=Network, 4=Batch, 5=Service

 No matter how you choose to accomplish your goal, always be aware of the Identity of your Worker Process. That might be ASPNET_WP or W3WP and it might be NETWORKSERVICE, or IUSR_MACHINE Name. Always use the weakest possible user, and make sure the files and the share have the minimal access needed. Don't run your Worker Process as anyone with any power or Administrator to solve file access problems.

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

A Call for Good Design - One Guy, an Insulin Pump, 8 PDAs and an iPod

April 10, '07 Comments [7] Posted in Diabetes
Sponsored By

Six years ago, my wife and I went on a wireless trip across the country with my new (at the time) Insulin Pump and 8 PDAs. The pictures from this Planes, Trains and Automobiles across the country are still around.

The trip was written up, lo these many years ago, at The Feature.com and is still available in their archives as "One Guy, an Insulin Pump, and 8 PDAs".

Here's a few bits of that article that I thought were significant or interesting with new emphasis mine:

Now I've got three devices in my pocket -- each with screens, batteries, and buttons, but all alone in the world. Three devices, each with a distinct purpose, provide me with a little bit of information that I give my doctor. It's quite a mess, especially when it's time to change the batteries.

Of course, each of these devices has some interface to the outside world, but each comes with an interoperability catch. The pump has infrared, but it only communicates with proprietary software. The blood sugar meter has a serial port, but it only works with a custom cable and software. My cell phone has some kind of interface on its bottom, but no standard way to hook it up to any of these devices. The PalmPilot has a serial connector and infrared, but doesn't have support from the notoriously slow-moving healthcare industry. [Scott Hanselman writing for TheFeature.com in 2001]

The trip was fun - it was my wife and my first date, and she and I were married three months later, but from a technology perspective it was a huge failure. The technology wasn't ready.

Today, Amy Tenderich has a great Open Letter to Steve Jobs (Mental Note: Write an Open Letter to Someone) up on her blog, DiabetesMine.com and TechCrunch is helping spread the good word.

Apple has sold 100 million iPods, and she points out that 20 million diabetics are using Glucose Meters and Insulin Pumps that smell of 1997.

There's a few issues here that are a problem, Amy's interested in better design and User Experience. She says:

In short, medical device manufacturers are stuck in a bygone era; they continue to design these products in an engineering-driven, physician-centered bubble. They have not yet grasped the concept that medical devices are also life devices, and therefore need to feel good and look good for the patients using them 24/7, in addition to keeping us alive.

Clearly, we need a visionary to champion this disconnect. We need an organization on the cutting edge of consumer design to get vocal about this issue. Ideally, we need a “gadget guru” like Jonathan Ive to show the medical device industry what is possible. [Amy Tenderich]

She's right on. Additionally for me, as an engineer, I want to know where's the iTunes Killer App for my Insulin Pump and Meter? Plugin and sync. Is that so far? I'm personally interested in the other side of the User Experience - getting at the data locked in these little devices. Well, we're working on it, but getting the data out of these meters is like pulling teeth.

Attention: Diabetes Device Manufacturers - Release my Data!

You can download the LifeScan OneTouch Ultra RS-232 Serial Protocol up at the LifeScan site, but the protocol for their flagship device, the UltraSmart (a now FOUR YEAR OLD meter) is hidden, encoded and proprietary. Kind of makes our ClickOnce Diabetes Downloader a little hard to implement, wouldn't you think?

It's very frustrating as we, the technical Diabetic community, try to move things forward that:

  • There's no standard XML format for Diabetes Management.
  • Most meters have a proprietary format.
    • Only the FreeStyle is truly open with all their formats. More companies are slowly following suit. Here's a news flash, meter companies - your meter protocol is not the key to your success. Let it go.
  • There's no standard interface cable.
    • The closest we can get is a headphone jack to serial with a serial to USB interface. Again, only the FreeStyle works brilliantly.

Even my brand new, this year, insulin pump uses a cobbled together cable along with proprietary RF to dump it's data. And where does it dump the data to? A proprietary java-based Applet online that I have yet to get to work.

Maybe future meters will change this, or maybe someone from LifeScan will read this and release the UltraSmart meter protocol.

In the comments on TechCrunch, a Diabetes Technologist teases us with this tantalizing tidbit:

I’m a firmware engineer on a blood glucose meter at a very large, well known company. I agree that this is a great idea. I’d be much more excited if our product wasn’t a solid 5 years behind in design for a handheld device. We do have a product coming out in a couple years and the preliminary designs could possibly be the best looking meter I’ve seen to date. Sorry, I can’t disclose anything else about it!

Here's what I was hoping, in 2001, would have happened by now:

I imagine a world of true digital convergence -- assuming that I won't be cured of diabetes by some biological means in my lifetime -- an implanted pump and glucose sensor, an advanced artificial pancreas. A closed system for diabetics that automatically senses sugar levels and delivers insulin has been the diabetics' holy grail for years. But with the advent of wireless technology and the Internet, my already optimistic vision has brightened. If I had an implanted device with wireless capabilities, it could be in constant contact with my doctor. If the pump failed, it could simultaneously alert me, my doctor, and the local emergency room, downloading my health history in preparation for my visit. If it was running low on insulin, the pump could report its status to my insurance company, and I'd have new insulin delivered to my doorstep the next day.

We're not there yet. Thanks, Amy, for helping move the ball forward and cast some light on this problem. Medical devices lack 5 to 10 years in usability. We need updated UIs and updated and open Protocol Specs.

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

Email Signature Etiquette with Outlook 2007 - Appropriate Flair

April 10, '07 Comments [9] Posted in Musings
Sponsored By

A while back we had a nice discussion about Email Signature Netiquette. How much flair was too much?

I talked about creating more dynamic and customized signatures in Outlook 2007...

Getting HTML (or FeedBurner) Dynamic Email Signatures in Outlook 2007

My signature is generated by FeedBurner, using their Headline Animator feature (that I love).

<a href="http://feeds.feedburner.com/ScottHanselman">
<img border="0" alt="Scott Hanselman's Blog"
src="http://feeds.feedburner.com/ScottHanselman.gif">
</a>

This works great, except in Outlook 2007, which no longer lets you edit your email signatures directly in HTML in their UI. Plus, because there's three kinds of email in Outlook, text, RTF, and HTML, they autogenerate all three formats for you and put the files deep in the bowels in:

C:\Documents and Settings\Scott\Application Data\Microsoft\Signatures\

I don't use txt or rtf-based email if I can avoid it, so I just open the named html file in that folder and edit the part in their auto generated section '<div class="Section1">' like this:

<div class=Section1>
<p class=MsoAutoSig>Scott Hanselman<o:p></o:p></p>
<p class=MsoAutoSig>Chief Architect - Corillian Corporation<o:p></o:p></p>
<p class=MsoAutoSig>
<a href="http://feeds.feedburner.com/ScottHanselman">
<img src="http://feeds.feedburner.com/ScottHanselman.gif"
style="border:0" alt="Scott Hanselman's Blog"/></a>
</p>
</div>

I'll get a nice signature every time I start a message, and I can, of course, configure Outlook to include this signature on new emails and another, smaller one, on replies.

Making it Consistent

Barry Dorrans reminded me of the old USENET Standard for Signatures:

It's interesting to note you forget the "standard" signature prefix, two hyphens, a space and a newline which the better email clients (read "Not outlook") use to strip a signature when you hit reply. And of course there's the old usenet standard of no more than 4 lines (unless you're Biff). See http://en.wikipedia.org/wiki/Signature_block for details

And this whole thing got me thinking about which kinds of Signatures I would need. I came up with three.

First Message

This is my standard signature when it's the First Message in a thread. It includes the standard double hyphen, my Name, Title and Company, and currently an animated gif with my picture and my last few blog posts. As a public-facing person at my company with a largely work-appropriate blog, this is reasonable for me.

The picture, while it might seem self-serving, in my opinion makes work and personal email more personal. Folks like those we're currently merging with know my face before they meet me. I've started to notice others doing the same thing, especially in MSN Messenger.

--
Scott Hanselman - Chief Architect - Corillian Corporation

Scott Hanselman's Blog

All Replies

For replies, the picture is removed, and the standard sig is just two lines via the USENET de-facto standard.

--
Scott Hanselman - Chief Architect - Corillian Corporation

On my Blackberry the signature looks like

--
Scott Hanselman - Chief Architect - Corillian Corporation from my BlackBerry

...so folks know I'm on a mobile device and realize that I won't be able to see some embedded rich content.

Replies including Free/Busy Information

This FreeBusy signature is one I use optionally when folks are scheduling meetings or helping schedule meetings across companies.

--
Scott Hanselman - Chief Architect - Corillian Corporation
NOTE: My Calendar is at (small private URL here)

The "small private URL" is a redirect from my site to the Microsoft Office Free/Busy Service that lets folks see my availability for meetings.

 

You can easily publish just your Free/Busy information to any WebDAV server or to Office Free/Busy. Consumers, either publicly or invited, can subscribe to your ICS calendar (see my recent podcast on this subject) or just view the calendar and schedule appropriately.

The signatures are easily interchangeable using the new Signature dropdown in the Outlook New Message Ribbon. Signatures are actually swapped out rather than appended; that's a very nice usability touch by the Office team.

All of these things combined means considerably fewer headaches for me in my everyday Outlook life.

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

Windows Vista and the Uniden Win1200 Live Messenger Dual-Model Phone

April 9, '07 Comments [8] Posted in Reviews
Sponsored By

I've been trying to get the Uniden Win1200 Phone to work. FYI - It doesn't work on Vista. It so totally doesn't work on Vista that you need to email Uniden and exchange the phone. No firmware upgrades on this one. Bummer.

Uniden is aware of the problem, and they are willing to exchange your phone free of charge for one that does work with Vista. If you send email to Uniden at e-scanner@uniden.com and provide them with the following, they’ll email you a prepaid Fed-Ex voucher so that you can ship them your phone to be replaced.

  • Full name
  • Address
  • Phone number
  • Email address
  • Serial # of Win1200
  • Date of purchase

The serial number information can be found on a sticker inside the battery compartment of the handset and on the bottom of the charging base.

It does work pretty well, however, on Windows XP (while I wait for the RMA label to send in this one for a replacement).

When you plug it in, a quasi-familiar dialog pops up.

This is the kind of dialog I'm used to seeing when I put in a Removable Device. Other than the very poorly anti-aliased phone icon and the odd overlap with the text it seems straightforward, although I don't know what exactly I'm doing here. I'm granting the phone permission to call? OK. Granted.

Ah, another Tray Icon. That's all I needed. Even better, one with out a menu or right click option that serves no purpose at all. Good stuff.

Ok, let's dig. Looks like it shows up as it's own USB Controller? Odd. I was kind hoping it would show up as a standard audio device. Let's see if it does by running Skype - another phone calling service, one that I dig greatly.

Looks like the phone DOES show up, oddly enough, inside Skype as a device with the potential to send and receive audio...this could be promising if I can use this phone for multiple things.

But, alas, no. It doesn't work. Folks on the other end of the Skype call couldn't hear me. The phone didn't ring or grunt when a Skype call was placed or received.

As a Windows Messenger specific phone, it works exactly as advertised. Some nits - the screen is color, but very dim. No real reason for it to be color because it's not color with cool graphics, it's washed out color with, like, two graphics. As a regular phone - this IS a dual mode phone - it works just fine. It's a passable POTS phone. Nothing bad and nothing interesting.

As a messenger phone, for me, it's unusable. I have over 300 folks in my Messenger List, and no way to scroll down fast, so I ended up calling folks whose names start with "A" and "B" if you know what I mean. Sorry Yohannes and Zach, I can't call you. Takes too much time. This phone is a good attempt, but it isn't fast enough, isn't generic enough - it's a messenger phone, from what I can tell, and little else. It does seem to install a lot of drivers and appear all over the audio device sections within Windows so my gut tells me that it IS possible to get this to work with Skype or as a generic audio device, but I haven't figured it out.

For now, chalk this one up as a curiosity.

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 58 - Synchronizing Internet Calendars

April 9, '07 Comments [7] Posted in Podcast
Sponsored By

My fifty-eighth podcast is up. Scott and Carl chat about the pain of the DST change and how they manage their calendars over the Internet with things like SyncMyCal and Google Calendars, and the mysterious ICS file format.


UPDATE: An interesting comment in the comments of this post leads to me to add one little bit of extra info. The comment was:

"However I couldn't help thinking that you can purchase great calendars in Borders and other places which with a "version control" pencil and eraser you can write in all your important family events for the month / year and hang on the wall in the kitchen. Lets face it you can even create your own with some software and use family pictures for each month. No data corruption issue, no battery issues and no synchronization issues and its a pleasure to look at."

And I totally agree. We use the Boone "Week over Week" Rolling Whiteboard Calendar" for our kitchen refrigerator for most large-scale life planning. It's SO much more useful than a Monthly Whiteboard. You move each week - Week Over Week - so you don't have to update it every month. We have two, so we've got 8 weeks of life on our fridge.

To be clear, the electronic version works famously. Perfectly. We're always traveling and distributed, and being able to schedule each other with ICS Meeting Requests is a fantastic way to stay in touch. We've done more family events and visited more friends in the last month since we started this system than in the previous year. We each know when we're free and when we're not. It's brilliant.
The Boone board is for "big picture" stuff.


Links from the Show

SyncMyCal (nmz)
Sync Google and your Smart Phone (nn3)
The Holy Grail of Calendar Sync (nn6)
Google Calendar (nn0)
Another PocketPC to Google Calendar (nn4)
Outlook 2007 and iCal (nn7)
OggSync (nn1)
RemoteCalendar (Sync Outlook 2003 to iCal) (nn5)
Syncing Google and Outlook (nn8)
Plaxo (nn2)

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Our sponsors are Telerik and /n software.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

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

Vista BOOTMGR is Missing and the Importance of the UPS

April 7, '07 Comments [4] Posted in
Sponsored By

Some folks are passionate about Power. I know that Power Supplies for PCs vary greatly in quality and I could buy smoother/more powerful/quieter supplies, but that's more effort that I'm willing to expend. Now, Uninterruptible Power Supplies, that's a whole other things for me.

Mo's machine died last night, in the middle of a complete power outage that lasted about 1 minute. It apparently happened "between heartbeats" on her computer because now it says "BOOTMGR is Missing."

Hers was the only machine that didn't have a UPS connected. We were watching a show at the time and the HDTV and DVR - connected to a UPS - didn't blink. My mistake, and that's what I get, eh? Time for the every-3-years refresh of UPS's and Batteries for the Hanselman house. I like APC, they are inexpensive and have replaceable batteries. Off to Circuit City.

Now I've got a UPS for every computer in the house, our TV setup and DVR, and the Network Wiring Closet.

  • Mo's small computer and LCD - APC 550VA
  • My beefy computer along with the Cable Modem and Vonage Router - APC 750VA
  • Home Server running headless with 3 external drives - APC 550VA
  • Router and Wireless Router - APC350VA
  • LCD HDTV, DVR and Stereo in the Living Room - APC 750VA

I'm less interested in a super-powered UPS that will keep me running and working for hours, and more interested in one that will keep spikes down, clean up power dips (brown-outs) and deal with complete power outages that last less than 10 minutes.

Do yourself, and your parents, a favor, and go get UPS's for all.

Oh, how did I fixed that BOOTMGR thing? I booted off the original Vista DVD, selected Repair and was guided through a VERY slick and intensive repair process that worked famously. Kudos Vista FIXBOOT team.

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

Fix: Windows Vista Media Center missing photos and pictures

April 7, '07 Comments [2] Posted in Musings | Tools
Sponsored By

I was having a heck of a time. I had a freshly installed Vista system and I pointed the Pictures folder to my giant cache of family photos. The photos showed up fine in Windows Media Player and in Windows Photo Gallery, but when I opened up Windows Media Center, either locally or on the Xbox360 I could only see the folders but the images didn't appear!

Turns out the JPEG extensions got an important and Media Center-specific registry setting squashed, probably by some Paint program I installed.

If you go into the Registry via RegEdit and go into the .JPEG (and .JPG, and .JPG) keys under HKEY_CLASSES_ROOT and make a new String Value called "PerceivedType" and make it equal to "image" then things will magically work again!

Seems to me that Media Center was smart enough to install those keys initially, and should be smart enough to notice when they are gone. Smart defaults and all, you know?

If you're not THAT technical, download this Registry Fix File I've assembled and double-click on it. Right click on that link and save it with a .REG extension, or make sure you rename it before double clicking.

You can also set your MP4 files to PerceivedType="video" as well as PNGs, etc, if you like.

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

Naming a File a Reserved Name in the Windows Vista Operating System

April 6, '07 Comments [7] Posted in Musings | Programming
Sponsored By

Ah, the Compatibility Sins of the Father. Does anyone else think it's a hoot that you can't have a file called lpt1.png on your system? Or a folder called con?

There's a old story about the .NET CLR team - before they took over an entire Top-Level-Domain as their name, thereby effectively thwarting my own .ORG world domination strategy - where they wanted to call the successor to COM and COM++, "COM3."

Apparently it didn't take long for them to realize that this was a sub-optimal name. Probably about this long:

C:\Users\Scott>md com3
The directory name is invalid.

I'm still not clear, however, why this would be a problem in Vista. It's no doubt "compassionate conservative compatibilityism" (my new phrase of the day) on the part of Microsoft.

Of course, it's because the underlying Win32 APIs for opening a file STILL will accept "COM1" as a file name, as in:

portHandle = CreateFile("COM1",
                  EFileAccess.GenericWrite,
                  EFileShare.None,
                  IntPtr.Zero,
                  ECreationDisposition.OpenExisting,
                  EFileAttributes.Device | EFileAttributes.Overlapped, IntPtr.Zero);

There's even a special way in Windows to refer to Serial Ports larger than COM9 in your code, like this -\\.\COM10.

You see, they only choose to oppress us 9 times, for COM1 to COM9. From then on, we can live footloose and fancy-free.

C:\Users\Scott>md com9
The directory name is invalid.

C:\Users\Scott>md com10

C:\Users\Scott>dir com10
Volume in drive C is 70 GIGS SYSTEM
Volume Serial Number is 98A2-64B2

Directory of C:\Users\Scott\com10

From MSDN:

Do not use the following reserved device names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed by an extension, for example, NUL.tx7.

CLOCK$ is also a reserved device name.

Good times.

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

Are Blog URLs important?

April 6, '07 Comments [16] Posted in ASP.NET | Musings
Sponsored By

I had an interesting e-conversation with Rob Howard and Scott Watermasysk today. I had noticed recently that a number of blogs I'd visited had things like _2D00_  and similar codes in their URLs. There was a forum post a while back (July of 2006) that asked about things like hyphens getting encoded in some builds of CS2.1.

There were a bunch of posts on http://www.asp.net that had URLs like: .../2006/09/07/Startup-doesn_2700_t-always-mean-venture-capital... where the 2700 was a single quote or .../2006/09/05/Should-tags-be-moderated_3F00_... where 3F00 was a "?". The non-latin characters in these cases were being encoded in the URL with their Unicode Code Point. This was a bug in a beta of CS that was quickly fixed, but it got me thinking about URLs in blog engines and more generally. These particular URLs and their untidiness really irked me.

Different Ways to Get to the Same Place

Personally I like URLs that use Pascal Casing, like the one for this post, for example, is:

http://www.hanselman.com/blog/AreBlogURLsImportant.aspx

Although URLs are technically supposed to be case sensitive, and you used to see that a lot when URLs belied the underlying case -sensitivity of the file system, they aren't in our case. The only thing that would make it better, IMHO, is the removal of the .aspx extension. More on that later.

Years ago DasBlog had really lame URLs and Jeff Atwood picked on us. ;) These urls live on in some comments pages within DasBlog in some cases, unfortunately.

We started using the blog title to general the URL. This, of course, has problems when you change a title after a pile of folks link to the original URL, but unless you want the engine to keep track of every title a post has ever had and 301 to the "final URL," you've got a nasty problem. Anyway...

There's a number of options in DasBlog that affect your URLs, although DasBlog canonicalizes URLs internally and will always accept any of these formats without breaking your URLs. That is, you can change your URLs scheme and you won't be penalized.

There's options to use a + for a space, as well as including the date, so any of these are potentially valid:

Is One URL Format more Search Engine Friendly?

A number of folks have said they preferred hyphens over pluses, specifically that it helps Google. Rob mentioned during our email discussion:

The hyphens, however, are something you guys should investigate using for DasBlog. Search engines actually look at the URL for keywords. The hyphen is considered a word-break indicator, i.e. HelloWorld to Google appears as "HelloWorld" whereas Hello-World is "Hello" and "World". The underscore is also considered a word-break, but given less points.

I'm wasn't sure about this, and initially was skeptical, but it he's right - mostly. However, it seems to matter less and less, as Google seems to have added some smarts.

If you Google for "happybirthdaytomiiwiireview" all-one-word, you'll get my post on the Nintendo Wii with the URL highlighted. You'll also get that post if you Google for "Happy Birthday to Mii" as a list of words, or as a phrase with surrounding quotes because it also happens to be the title.

ASIDE: Oddly, if you Google for the phrase with hyphens (which is odd, in itself) as in happy-birthday-to-mii you'll get less results than if you do it with quotes. Not that there's any reason to do that.

Notice in the screenshot below how the word "Mii" appears bold in the URL. Not in the title, in the URL. That implies to me that Google either cares about casing, in this case the Pascal Casing of my blog's URL, or that it picked "Mii" up as a fragment and really cares about fragments of things in URLs.

Let's see which it is. If we search for "Happy Birthday to Mi" with just one i in "Mii" - where "Mi" is a fragment of "Mii" - we don't see my post anywhere at all, which implies, to me at least, that Pascal Casing in a Blog Post is likely as effective from Google's perspective in delimiting spaces as is a hyphen, so from a Search Engine Optimization (SEO) perspective, hyphens versus Pascal Casing versus whatever is pretty much a moo point.

Not moot, rather, "moo" like a cow's opinion. It just doesn't matter. It's moo.

So, pick the URL style that makes you feel good, I say.

Many Options for URLs

Scott Water has used ISAPI_Rewrite to completely remove the .aspx extension from his site, and he has nice clean URLs like http://scottwater.com/blog/archive/url-rewriting-via-isapi-rewrite/. He also has nice "hackable" URLs like http://scottwater.com/blog/search/hanselman/ which is pretty sweet. You too can remove the .ASPX extension from your ASP.NET site using ISAPI_Rewrite.

Here's some example URL styles I've seen out there in Blog Land:

  • Subtext .../blog/archive/2007/02/11/Subtext_v1.9.4_quotWindwardquot_Edition_Released.aspx
  • CS with ISAPI_Rewrite .../blog/archive/twitter-for-windows/
  • Typo - .../articles/2007/03/27/microsoft-technical-summit
  • DasBlog .../weblog/StringFormattingFun.aspx
  • DasBlog with Dates - .../2007/03/27/Abschlussbericht+Zum+NET+Wintercamp+2007.aspx
  • Radio Userland .../2007/04/05/itsNotTheCoverOfRollingSto.html
  • MovableType - .../blog/archives/000093.html
  • Blogger - .../2007/04/mulan.html
  • Drupal - .../node/133257
  • Blogware - .../blog/_archives/2006/8/18/2242665.html

Yes, there's 1,000 blogging engines out there, each with its own URL style, and yes, this is not an exhaustive list.

The Trailing Slash in a/an URL and removing Technology from your URL

Note that in ScottWater's case, the URLs are lower-case and include the trailing /.

There's a lot of controversy about the Trailing Slash. I've always felt that the trailing slash implied we were visiting a directory, while no slash implied we were visiting a page. Simon Willison seems to advocate for the trailing slash as in his comment at http://jessey.net/archive/2004/05/31/rewritten/.

Personally, I like the trailing slash only for the home page of this blog and set it up that way earlier this year. At least I picked one, as these things matter.

What I'd really like to do is remove the Technology from my URLs. I could remove the .aspx extension from my blog's URLs by:

  • Making it output Permalink URLs with out .aspx
  • Adding a ISAPI_Rewrite rule to add the .aspx before the request gets to ASP.NET
  • Add some magic dust in ASP.NET 1.1 or A Form Control Adapter in ASP.NET 2.0 to change the HTML FORM Action in the case of a Post Back.

Of course, I'd need to do this without invalidating all the existing permalinks out there. The idea being that once you've put a permalink out there, it's out there. Forever. Only Feed Readers and Search Bots will respect a 301 and update their record of those links. All that static HTML out there cares not about your pretty URLs.

It's probably too late for me, Dear Reader, but perhaps not for you and your URLs. Pick a scheme and be excited about it, for these are religious issues that will never be solved.

Conclusion

I don't think ScottWater will mind me quoting him directly from a private email, in this case, to end this blog post:

What I meant is that if the goal is SEO, nice URLs are well…nice, but there are way better things you can do, such as writing relevant content. - Scott Watermasysk

It's true! I should stop now.

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

Dance Dance Revolution and the need for Alternate Human Computer Interaction

April 5, '07 Comments [8] Posted in
Sponsored By

Z and I went over to my buddy John's yesterday to borrow his XBox360 copy of Dance Dance Revolution. I've been avoiding this game for nearly ten years. Partially because I can actually dance in real life (my wife can attest to this, and as she's an African, it's high praise, let me tell you) and DDR doesn't seem like dancing to me, but also because I know I'd get too into it.

But, John talked me into it and I talked my wife, begrudgingly, into playing it once. We didn't stop until 30 songs later. To quote my wife, "I won't stop until I get an 'A'!" She did, on Rapper's Delight, by the way.

I think that we took to this game for the same reason we took to the Wii - it's so physically interactive. After twenty years of twitch-gaming with a controller and my thumbs, and fifteen years of typing for a living, the last thing I want to do is come home and use a controller.

What so funny to me about Dance Dance Revolution to me is that it's just another version of Simon - a frenetic real-time psycho game of Simon set to house music while dancing with much gnashing of teeth - but Simon nonetheless.

Really immersive gaming (computing) requires one of two things. Either...

...a controller that mirrors something in reality...

Guitar Hero, another game I played at John's (loan that to me also, John!), is basically the same thing - it's Dance Dance Revolution with a fret. Addictive, surely, and I'm sure the wife will get a kick out of it, but it's a little too close to typing for these hands.

The original Xbox had an amazing (and VERY expensive) game called Steel Battalion that included a custom controller with over 40 buttons. It was brilliant. We played it at work (at lunch) for months. It was the most immersive gaming experience I'd had short of going to an arcade and getting into one of those $100K flight simulators. Of course, the controller was $200 - as much as an Xbox.

We've got to break out of this Mouse and Keyboard rut we're in as a culture (this includes you Quake and Unreal Tournament folks who insist a mouse and keyboard is the Only Way to Play - you're not helping!) and move into the Minority Report Multi-Touch Interaction world that folks like Jeff Han are pioneering.

...or intuiting intent via hand gestures

Now, $30k for something like Jeff Han's solution is (currently) untenable, but surely with all these Web Cams along with the brilliance of folks like Ashish and his Gesture Recognition stuff or the amazing uMouse stuff that Larry Lart (seriously, rush over there, now and read what he's doing) is working on (Hopefully I'll get a review of his stuff and he'll get a download link up soon. He said it'll be in beta the next week or so.) should give us some reliable moving of windows using our hands.

I figure it can't be that hard to watch a hand with a webcam, and that combined with the fact that there's only so many windows at a time on the screen - that lowers/narrows the number of things you'd want to do. Fine control of the mouse via gestures is a start, but a REALLY compelling solution would augment the mouse by using the web cam to track your hands and allow the push windows from monitor to monitor in a multimon scenario, minimize windows, launch Google, etc.

Certainly we could make it even easier by putting things on our hands (video of Atlas Gloves and Google Earth) and making the functionality very specialized.

Frankly I'm surprised that BillG would put so much work into Voice Recognition and Tablet but miss out on the opportunity to revolutionize User eXperience via a simple webcam. I don't need my webcam or computer to tell me if I'm sad - I'd like it to recognize my intent and act on it.

There's lots of Alternative Pointing Devices to choose from, but they all fall into the same tired metaphors. As mice go, personally I really like the Evoluent Vertical Mouse (it doesn't turn your hand unnaturally) and I also have Tablets for all my computers. I love my Ergodex, but I don't use it for coding like I used to.  I'm convinced that gestures are the next big thing - and no, I don't mean mouse gestures. It's a huge shame that the Fingerworks guys went out of business. Their pad was brilliant. I know Rory is a huge fan of their iGesture pad. It was just too expensive. All these mechanisms are tired shadows of what a good gesture system could do.

Making cheap webcams recognize our hand gestures - even if I have to point the camera at my hand on the mouse - has huge potential. This is a 100% solvable software problem.

Of course, the real tragedy in all this? I'll never dance (or, "Dance Dance" rather) as well as this five-year-old.

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

Programmers, keep your wits about you and Code Mindfully

April 3, '07 Comments [19] Posted in Programming
Sponsored By

I was talking with Patrick Cauldwell the other day about what makes a "Good Developer." We talked about a number of different characteristics.

My intent was to write up a list of good personality characteristics that describe effective programmers, but Patrick said, "The real problem with most developers is that they don't keep their wits about themselves."

This was like a slap in the face to me. I realized when I was going through the Programmer Phases of Grief that I hadn't kept my wits about me.

You ever have the very frightening experience when you're driving along, perhaps lost in thought, and next thing you know, you've driven two miles and you don't remember the driving process that got you there?

Many of us who've been programming for a long time, or folks who are very gifted and take get from A to C while skipping B, can have these fugue states while programming. I don't literally mean that one blacks out while coding, but rather one goes "running down a one-way dead-end street." A lot of time is wasted before we realize that some original assumption was wrong.

I think one can be a more effective programmer if they can avoid not-thinking. Call it Mindful Coding if you will. The act of actually thinking while writing code is challenging, especially when your mind is jumping to the next idea or if you're writing code you've written a dozen times before.

Sometimes I'll catch myself asking a question of someone around here, and halfway though the question I'll realize that I haven't really THOUGHT about the problem space. For me, and my learning style, this might involve explaining it to someone (often my wife, who nods in all the right places, but cares not about such things) or drawing a picture.

For many, analytical thinking isn't a passive thing. Often just making the decision to "sleep on it" can be all that's needed to break through a hard problem.

"If you can keep your wits about you while all others are losing theirs, and blaming you. . . . The world will be yours and everything in it, what's more, you'll be a man, my son." - Rudyard Kipling

So, I say, programmers, keep your wits about you. Code Mindfully. I vow to try harder.

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 on Channel 9 - Video #2

April 3, '07 Comments [0] Posted in Musings | Podcast | TechEd
Sponsored By

It's Video #2 in the Hanselminutes on 9 series.

Rory and I did a few videos together a while back to promote TechEd 2005. (Baby Carrots, Designing Software) They kind of worked, but were perhaps a bit forced. We thought they'd be cool at the time because when Rory and I hang out and just riff, we're a hoot. A hoot and a half, even. So, the Rawdawg got the idea for he and I to wander around Microsoft's Building 42 (Developer Division or "DevDiv") and simply pop in to folks offices and ask them "What are you working on?"

For me, I wanted to get back into the "Roots of Channel 9" - raw discussions, preferably with folks who know what they are talking about.

Here's video #2 in our travels through Building 42 on the Microsoft Campus. We didn't plan anything, nor did we warn folks we were coming.

In this short video, we interviewed Vance Morrison, an Architect on the .NET Runtime Team, specializing in performance issues with the runtime or managed code in general.

We actually stopped and bothered Vance because he had a trebuchet on his desk that we saw through the window. We had to stop.

Vance does some pretty amazing stuff around Managed Code Optimization. Take a look at the micro-optimizations around typeof() calls over at his blog. Vance is a busy guy so this video is only six minutes long. 

The first video in this series is still over here: Hanselminutes on 9 - #1.

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

Gamma Correction and Color Correction - PNG is still too hard

April 3, '07 Comments [27] Posted in ASP.NET | Musings
Sponsored By

If you're not reading this post in a feed aggregator you can tell that Alexander and I collaborated on a new design over the weekend. (Yes, he was paid.)

By "collaborated" I mean that Alexander is awesome and I learned a bunch of obscure browser-specific nonsense that I didn't know before. I thought that at least some of these problems were fixed by 2007. Oy, what a mess.

I was looking forward to using PNG on this site, and it's the One True Format, right? You'd thing it'd be a no-brainer.

We put that brown background in the header in a div, as a background-image.

<style type="text/css">
#header1 {
height: 79px;
background: url(header-background2-gamma.png) scroll no-repeat;
background-color: #5C4837;
background-position: right 50%;
}
</style>

The original design was fixed in width, so we made it fluid and stretchy. Because the header is a fixed weight, I wanted it to be right-aligned. It's aligned via background-position to the right.

In order to make it stretchy, I made the background color match the left edge of the graphic. This technique worked great in FireFox, but looked lousy in IE6 or IE7. You can see a rendition below or visit a sample page. If you're running IE, you'll see a graphic like the one seen below. If you're running Firefox, you'll see two identical bands.

Nutshell - PNGs look darker on IE than anywhere else. Even IE7 Release!

What different is that, as you probably know, IE doesn't seem support the Gamma Correction data that is added by most PNG-producing applications. Or, it supports it too well! :)

Not only is there crappy PNG support out there, as most don't completely implement other very interesting parts of the spec, like Color Correction, but the spec itself was apparently ambiguous for a number of years.

I went around and collected this bunch of links...

The real frustration for me here, is why should I still care about this stuff? It should be WAY easier...I wonder when the larger problem of color on the web will be solved. I'm really frustrated and a little shocked that I'm still having to sweat this kind of detail these days.

Big thanks to Jon Galloway for helping me figure this out and remove the Gamma Correction from my PNG.

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

Rescuing the Tiny OS in C#

April 2, '07 Comments [15] Posted in Learning .NET | Programming
Sponsored By

About four years ago (in the middle of the last fifteen years of writing software for money) I graduated from college. I took a round-about way through school at OIT - my four-year degree took eleven years (I actually had to make deals with four different deans to allow me to keep my credits from expiring) but it turned out OK.

Some where in the middle of going to school at night we were asked in an Operating Systems class to write a "Virtual CPU and OS." More of an interpreter, we were given a description of the OS, some op-codes and an ASM-like machine language. We were to write the OS, and feed test programs into the system. It was a fun exercise and a good way to teach folks how virtual memory and memory mapping works, threads vs. processes, etc. I was the only student who chose to write it in managed code. Quite the coup for 2002.

I turned in the project and threw it up on GotDotNet (this link will be dead in July of 2007), but of course, GDN will be gone soon. Just so it wouldn't be lost, it's now available here in C#. It's actually kind of fun, I think, as I put in some "jokes" - funny to me at least. For example, the OS pages it's virtual memory to XML files when it runs out of "physical" memory. It behaves like a real little OS. It'll thrash with low memory, and get fragmented if a lot is going on.

A tiny virtual CPU and OS written entirely in C#. The TinyOS simulates the scheduling, memory management (including paging and virtual memory) and other operations of theoretical Operating System. You’ll see many Framework classes and techniques in use including Regular Expressions, XML Serialization, generated Strongly Typed Collections, XML Comments and a generated Help file. You won’t get much useful work out of the TinyOS itself, but the techniques you’ll learn can be applied to real life.

Since this little ditty, others who really know what they are doing have written more serious OS's in C# that are worth looking at.

I presented on my little CPU/OS at TechEd Malaysia 2002, and the PPT slides are available as well. I also did it again in VB.NET if you like with a little trouble.

I looked at this code in 2005 and was shocked and offended with myself - well, not really, but it was enlightening to say the least. 

Go find some code that you wrote at LEAST FIVE years ago and tell me how it looks today...

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 57 - Polita Paulus and The Minutes on Nine #1

April 1, '07 Comments [1] Posted in ASP.NET | Podcast
Sponsored By

My fifty-seventh podcast is up. This episode is the audio portion of the Channel 9 cooperative cross-over video with Rory.

(Disclaimer: To be clear, no one at C9 is paying anyone anything. There's no money involved, but Microsoft DOES have free Diet Coke, and I did take some home with me.)

This podcast is, ahem, audibly-improved (Carl's audio team did the magic) and is the interview we had with actual-ASP.NET developer Polita Paulus from Building 42, along with her boss Matt Gibbs. We literally wandered into their office unplanned and unscripted and had a fine chat. They were both very good sports considering that we pounced on them.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Our sponsors are Telerik and /n software.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

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.