Scott Hanselman

PowerShell CMDLET Visual Studio 2005 Item Template

October 20, '06 Comments [7] Posted in PowerShell
Sponsored By

Jason Scheuerman from my company has created a PowerShell Cmdlet Visual Studio 2005 Template so you can create PowerShell Cmdlets using File|Add New Item.

In the screenshot at right, I've select File|Add New Item and entered get-thing.cs as the name of my new Cmdlet.

If you want to use this Item Template, drop this zip file into your C:\Documents and Settings\<YourUserNameHere>\My Documents\Visual Studio 2005\Templates\ItemTemplates.

Don't unzip it, just put the ZIP itself in that folder.

You can learn more about creating Cmdlets (they're different from PowerShell Scripts (PS1 files) in that they can integrate more tightly with the pipeline and they can use parameter binding) at MSDN.

There's more about the difference between Cmdlets and scripts in my interview with Jeffrey Snover at

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

Onkyo TX-SR674 HDMI Upconverting Receiver

October 19, '06 Comments [10] Posted in Reviews
Sponsored By

Our Home Theater, er, Living Room, has consisted of the same Sony Receiver and random collection of goo since I worked at Since we got HDTV it got really difficult to manage the system because the Sharp LCD has 5 inputs and the older Sony Receiver has 5 inputs and we had to do all this video + audio switching. "Put the TV/Video on Component 1 and the Audio on Optical 2" - you get the idea.

The Harmony Remote made a huge difference, and I still love it, but the receiver has been showing its age and every once in a while it will just stop making sound. Then 15 minutes later, it'll make a loud click and start up again. The Sony 925 Receiver isn't a "video switching receiver" for anything other than composite analog signals, of which I have none.

I started doing research on a new receiver using the kitchen remodel and living room repainting as an excuse. I figured since I'd have the whole thing ripped up anyway, why not put it back together right.

I decided on the Onkyo TX-SR674S (S for Silver) for a number of reasons.

  • It offers decent price/performance balance. I'm not an audiophile, nor do I care to be, so I'll never buy a $1000 receiver, and I will continue to use the same speakers I have had for the last 10 years until they burn up. I would like a receiver that can utilize what I have though.
  • It does video switching, but also HDMI video upconversion. That's not upscaling, now. Meaning, if a 480p signal comes in the Component Connector, it'll just go out to the HDMI as 480p. This means that I have one wire going to my Sharp LCD, and that's HDMI. This means I can set my TV's input and forget about it. It's also clearer than using Component Cables. Additionally my Replay TV that outputs via S-Video is also upconverted to HDMI and looks very clear. It will however deinterlace 480i and output 480p.
  • XM Satellite Radio (it's ready for it). I have XM in my car (actually Greg has mine as he's driving across the country and I pressured him to take it for a whirl) and I love it.  While we do listen to XM via the Media Center via the XBox, I would like it to be more integrated. It also has Radio Disney and XM Kids that I'd rather Z listen to over TV. (No TV for the baby) All I had to do was get an XM Antenna and it just worked. Slick.
  •  Audyssey 2EQ™ room acoustics correction. This is a fancy equalizer that includes a microphone and runs your speakers and room through a 12-step series of tests. In the process it learns the distance of your speakers to your ears and adjusts the dB level of each speaker individually to make up for crappy acoustics. It nailed the distances of my speakers and noticed that my Center Speaker is 2 feed farther back than my front speakers and added +1dB to the Center's level to compensate. Very nice, and I understand the Audyssey is well thought of amongst folks more into this stuff than I.
  • 1080p ready - It'll handle 1080p if need be, although I'm pretty much standardized on 720p. However, I've gotten rid of my Sony DVD/VCR combo (or, rather, I'd like to - $50OBO in Portland, you pick up) and I'm using the Xbox 360 as my only DVD player. The recent updates to the Xbox have pumped up the video quality and it's now absolutely better than the Sony Progressive. I'm looking forward to the HD-DVD player this holiday season.
  • Powered Zone 2 - If I ever want to run audio upstairs or outside, the receiver has a separately powered second zone.

All in all, I'm VERY happy with the receiver and how much cleaner the whole system works now and I recommend this receiver highly.

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 37 - Interview with ScottGu

October 18, '06 Comments [4] Posted in
Sponsored By

My thirty-seventh Podcast is up. This one is a surprise interview with Scott Guthrie or "ScottGu", General Mananger within the Microsoft Developer Division (DevDiv) or as I like to call him, "He from which all good things flow." ScottGu took time out of his busy schedule to talk to me about Ajax, Ajax Extender controls, CSS adapters and more.

I hope enjoy this additional interview-format show. When I get the opportunity to interview folks that I've always wanted to chat with I assume you've always wanted to chat with them too! I'm striving to avoid wasting your time, so I'll include interview shows like this one interspersed with the 'standard' Hanselminutes format, so don't worry, we're always trying to improve the show and your requests for show topics are all put in a big queue. :)

We're listed in the iTunes Podcast Directory, so I encourage you to subscribe with a single click (two in Firefox) with the button below. For those of you on slower connections there are lo-fi and torrent-based versions as well.

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

Links from the show are also always on the show site, although this show had no links to speak of. 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 XCeed/nsoftware, CodeSmith Tools and the .NET Dev Journal.

There's a $100 off CodeSmith coupon for Hanselminutes listeners - it's coupon code HM100. Spread the word, now's the time to buy. This coupon is good for the CodeSmith Professional With 1 Year Premier Support option.

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
  • 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 First 12 Hours - The Medtronic Minimed Paradigm REAL-time Continuous Glucose Monitor

October 18, '06 Comments [14] Posted in Diabetes | Reviews
Sponsored By

It's finally here and I'm using it.  The Continuous Glucose System that I blogged about six months ago arrived today. Yes, I tend to be an Early Adopter and I've gotten nailed in the past (the Glucowatch sucked) but this one may just be a winner.

It's called the MiniMed REAL-Time System. It is an add-on (D in the picture at right) that "sips" intersitial fluid and reports an estimate of my current blood sugar to a pump that is exactly the same form factor as my existing pump. In fact, it's the same housing. I swapped my existing Paradigm 512 Pump out for this one, the controls are identical.

(Check out my Diabetes Explanation: The Airplane Analogy if you're not familiar with how diabetes works IMHO)

Out of Box Experience

Note: You should talk to your Diabetes Doctor/Endocrinologist and take a training on how to use this device before jumping in or you could hurt yourself. I am NOT a doctor - this is just one guy's experience.

The package arrived at 10am this morning. The one containing the sensor tips said "perishable" and was packed with ice packs. I put it in the refrigerator immediately. Travelling with these will be a little tricky, as it's unclear how quickly they degrade. Presumably in about 72 hours.

I transfered my settings over from my existing pump manually. The pump, glucose meter (the finger stick device) and continuous meter/transmitter (the one taped to my belly) all have unique ids. You have to tell the pump the unique id of the transmitter, as well as the unique id of the finger stick meter.

After attaching the new transmitter (with a big ass needle/canula) I told the pump there was a new transmitter/sensor. It starts calibrating and says to wait for 2 hours and then it'll want a finger stick. This two hour warm up happens every time you put on a new sensor - about every 72 hours. At noon, it beeped, then I did a finger stick test. You want to put on a new sensor when your blood sugar is stable. I woke up at 110mg/dl and it stayed that way for the morning. I pushed lunch out a bit to make sure it stayed that way. After the first calibration I started getting updates every 5 minutes.

Aside: You truly can't conceive of what it's like to have this 6th sense, this 6th dimension where you need a number to really know how you're doing. It's like getting a GPS when you're lost. Like fixing a speedometer in a broken car.
My sense of how my blood sugar ebbs and flows was heightened and I literally had one of the best blood sugar days of my life (since I was diagnosed at 21). It enabled me to make better food decisions and even sneak in a short walk after lunch that had substantive benefits.

I'm loving this device. I'm sure there will be troubles and it'll be harder to get through airport security, but I suspect that this is going to change the way I manage my diabetes. There's a value called the hA1C, expressed as a percentage, that measures blood sugar control over the last 3 month period. Non-diabetics have a value between 4% and 6% indicating that their blood sugar was roughtly 100mg/dl over that period. Mine is currently between 6.3% and 6.5%, which is high normal. I believe this device, plus my use of Symlin, will get that number to the normal range, thereby limiting my chances of compliations like blindness.


I still will check my blood sugar via a finger stick between 4 and 10 times a day. The meter will wirelessly tell the pump that I checked. The fingerstick is considered more authoritative than the continuous meter. In fact, the continuous meter is calibrated by the fingerstick.

The continous transmitter's sensor last 72 hours then the tip needs to be replaced. The larger transmitter lasts at least six months, then it needs to be replaced. It has a sealed internal battery. Additionally, it's interesting to note that the transmitter has a version number. Mine is 1.6, which tells me that they can improve the transmitter at least every 6 months and I won't need to do anything to see improvements in accuracy. The pump holds all the data and history information and includes both a 3-hour and 24-hour graph view.

You shouldn't make insulin dosing decisions based on the continuous meter - it's just a trendline that gives you an idea of what happens the other 23.5 hours that you're not sticking your figer.

Scott's Diabetes FAQ
Everything You Always Wanted to Ask a Diabetic But Were Afraid to Ask

Q: When did you become diabetic? How did it happen?

A: I had the flu (or flu-like symptoms) in November of 1994. When it was over, I was peeing all day long, had lost 35 pounds (I was skin and bones) and my dad, a firefighter/paramedic said, you need to get to a doctor, ASAP. My blood sugar was clearly high and suddenly I was a Type 1 diabetic.

Q: So that's Juvenile Diabetes, right?

A: It's not called Juvenile Diabetes anymore, as it can happen to folks in their 30's and beyond. There are (basically) two types of Diabetics:

  • Type I – used to be called Juvenile Diabetes or Youth-Onset or Insulin Dependant (IDDM). These folks nearly ALWAYS use Insulin. Typically these folks don’t produce any (or much) of their own insulin. If I don’t make it, I need to get it somewhere.
  • Type II – also called Adult-Onset or Non-Insulin Dependant (NIDDM). They are so different, it’s a shame they are both called Diabetes. These folks typically have decreased responsiveness to their own insulin. If they aren’t using their own insulin well, they need to be made more sensitive to it.

"Worldwide, there are about 171 million diabetics, but only about 10 percent of those have Type 1 diabetes. The vast majority have Type 2 diabetes, which is linked to obesity. In the United States, about 900,000 to 1.8 million people have Type 1 diabetes, the American Diabetes Association says."

Q: The pump makes all the decisions for you?

A: No, the pump is just a delivery device. It pushes insulin through a tube into small plastic needle-thing called a canula that is 9mm into my belly. I move it every 72-96 hours. The pump has a screw-drive internally that pushes a head against a syringe's piston. It's got some wizards and calculators, but it never does anything automatically, other than deliver a small background (basal) dose that I have to set myself.

Q: Why not just stick with needles? My [uncle|sister|dad|butcher] does two shots a day and he's|she's all good...

A: Taking insulin twice a day is the equivalent of going for a flight but you're only allowed to touch the flight controls twice. Better make those two turns count. Same thing with checking your blood sugar. If you check it twice a day, imagine flying from LA to New York and only checking your altitude twice.

Q: What's so great about a pump?

A: I can make little adjustments on the order of a 1/10 of a Unit of insulin, while folks with needles can usually only managed 1/2 a Unit and they'd need to stick themselves each time!

Q: Do you sleep with the pump on? Shower? What about sex?

A: You can disconnect it for ~30-60mins without ill effects, but everyone is different. While it's not connected, it's not delivering, so you'll likely need to compensate. It's not waterproof. I sleep with it on and remove it at other times.

Q: Is it hereditary?

A: Some Type 1 diabetes is, and many Type 2's are, but it all depends. I'm the only Type 1 in my family going back many years, but I know a girl who's entire family, brothers and sisters are all Type 1. Z has a 2% chance of being a Type 1 Diabetic, which is roughly the chance anyone has with one Type 1 parent.

Q: Can you eat cake?

A: I can eat whatever I like, it's how long I want to chase my blood sugar afterwards that dictates what I eat. It's all about the Glycemic Index - the speed that the food hits you. For example, an apple with the skin on it will raise blood sugar slightly slower than an apple with the skin off. Brown rice is often slower than white. White bread is satan. Going back to the airplane analogy, a food with a high GI will "pull back harder on the stick, making it more difficult to steady the plane later."

Q: Does it suck?

A: Big time. But what other choice do I have?

Q: Will it kill you?

A: Very likely. Diabetic typically die of diabetes before other things. Disability insurance is hard to get, as is life insurance, although the latter is easier than the former. However, the key is maintaining as normal blood sugars as possible. I know diabetics who've been diabetic for 50 years, and they didn't have 1/10th the tools and knowledge we have today. I figure if I can stick it out another 10 years, maybe 20, there will be a cure.

Timeline of Diabetes Care

  • Before 1922 - Certain Death. A childhood friend of my 90 year old grandmother was diabetic, was fed only lettuce and quickly died.
  • 1944 - Insulin is derived from Beef and Pork. Standard insulin syrunge is developed. Folks boil and reuse their needles. Blood sugar is tested by peeing on a stick and matching colors. Accuracy is +/-100mg/dl.
  • 1959 - Diabetes is divided into Type 1 and Type 2.
  • 1974 - First Insulin Pump/Backpack
  • 1983 - Biosynthetic Human Insulin is created. (Ya, seriously, this just happened in '83)
  • 1990 - Digital Insulin Pumps the size of a pager, finger stick tests take 45 seconds.
  • 2006 - Finger stick tests take 5 seconds, insulin pump communicates wirelessly with continuous meter.
  • 2007 - ?

Soon I shall eat cake.

(If you have other questions, post them and I'll answer them in the comments)

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

Ohloh? Oo la la - Open Source Project Analysis

October 17, '06 Comments [5] Posted in ASP.NET | DasBlog
Sponsored By

What a stunningly fabulous idea so elegantly executed. Ohloh (blog) (Phil turned me on to it) analyzes open source software. Not deep source analysis like Fisheye, but broad analysis that answers so many of the questions being asked like: Is it actively developed? Is it just one guy or a bunch? Is it well commented?

It says that DasBlog is about 13 Man Years of effort and would cost about $726k to write from scratch.  It's about 54k lines of code.

Subtext, a Fork of .Text managed by my other arch-nemesis Phil (I have a baker's dozens arch-nemisi (nemisissies?) Just kidding.) has 81k lines of code and would cost $1.1M over 15 Man Years.

What's really interesting is looking at more important projects like FireFox. Looks like only 50k lines of code? I wonder if that counts the rendering engine or if it's really that tight?

One odd problem/artifact, there's two DasBlog's listed. I'm not sure if this is because we had a CVS repository then moved to SVN, or what. We'll get the older one deleted.

As an aside, the flash-based charts they are from and they are slick slick slick. A very inexpensive and permissive license and they consume a fairly intuitive XML format as their datasource. Hook those babies up to an HttpHandler and you've got great looking charts for your ASP.NET (or whatever) page.

Additional aside: There is a small transparency problem with the charts showing up with a gray background under Firefox 2 RC3, but I'm not sure if that's Flash's problem, Firefox's problem, or Ohloh's.

The real question that Ohloh may be able to shed some light on over the coming months is "Is Open Source a Crap Idea?" Seriously, though, it's interesting to see the levels of involvement, although there's no way to show the dozens of patches that were submitted to the DasBlog project by the community that were committed to the repository by me "glucopilot."

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.