Scott Hanselman

ZEB (Zero Email Bounce) and a new Outlook Rule

March 10, '06 Comments [8] Posted in Musings | Tools
Sponsored By

I am always made uncomfortable when I see an email inbox with 1000's of emails. I wonder how folks can handle the psychic weight of all those emails. I continue to try to effectively implement Getting Thing Done as I've mentioned before in my systems of organization post.

I also try to get to ZEB (Zero Email Bounce) every day or so. This is when you "bounce" up against zero emails in your inbox. Omar reminded me of the importance of this. This doesn't mean that you've done all your tasks, instead it means you know what your tasks are.

The image at right is my Outlook this moment. I've got an Outlook Search Folder called "Email ZEB" that finds all my Red or Yellow Flagged emails, anywhere in Outlook. I've got four other folders, @Action, @WaitingFor, @Someday and @Snooze.

Right now I've got 16 Action Items to schedule. I've got 44 Red or Yellow Flagged items to watch, and a number of items that are waiting for action from other folks.

Remember that your inbox is not storage, it's a list of what hasn't been categorized yet. If you've got 5000 emails in your inbox, select all the ones that are older than one month and make a folder called Storage. Dump them all in there and you'll have a good start. Get yourself a nice Outlook Search tool like X1 or Google Desktop or MSN Desktop and don't worry, you WILL be able to find stuff again.

I think it's funny that we all know the human brain can't comfortably hold more than 7 digits at once (hence the length of a phone number) but we think that having 5000 emails in our inbox "makes sure things aren't dropped."

Do it, Drop it, Delegate it or Defer it. That's what you should be saying when you read an email.

Another great way I got my ever-increasing Inbox down to zero items (if only for a moment) was to make another Inbox, just for items that I was cc'ed on.

I hate the "Reply to all" culture, where folks cover their own butts by cc'ing others to make sure an item "doesn't get forgotten." I'm guilty of it as well, but 9 times out of 10, an email that I'm cc'ed on will not turn into an Action Item.

Notice that "Inbox - cc'ed" doesn't show up in my Favorite Folders. Again, this decreases its hold on me and the pressure one feels when they see a folder name go bold, indicating that more (potential) work has shown up.

I've found this technique, while always evolving, to be fairly effective in keeping me from stressing out TOO much.

What is your mail-handling style?

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 9

March 10, '06 Comments [0] Posted in Podcast | ASP.NET | Ruby | XML | Tools
Sponsored By

HanselminutesMy ninth Podcast is up. This episode is about ASP.NET, John Lam's Ruby CLR Bridge, and useful tools.

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 to my Podcast in iTunes

Our sponsors are Automated QA, PeterBlum and the .NET Dev Journal.

Do take a look at TestComplete from Automated QA. It integrates with Visual Studio 2005 and I'm going to try to get a formal review of their stuff probably next week, particularly their functional Web Testing and Recording.

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)

  • Each show will include a number of links, and all those links will be posted along with the show on the site. There were 15 sites mentioned in this ninth episode, some planned, some not. We're still using Shrinkster.com on this show.
  • 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?

Now playing: Ricky Gervais, Steve Merchant, and Karl Pilkington - Ricky Gervais Show: Season 2, Episode 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

Can't Upgrade a Blackberry 7290 to latest system software

March 8, '06 Comments [2] Posted in XML
Sponsored By

Sat_screenshotI had an older 7280 "Blue" BlackBerry that died, so our IT org pulled a "Black" BlackBerry out of a drawer. I went to http://www.cingular.com/bbdownloads for the latest firmware so I could run Google Local for Mobile 

(Which, BTW, is unbelievably brilliant. I wish I knew what flavor of Java they were using to allow them to have such vast phone support. Do check it out if you have a data plan.)

Anywho, when I launched the Crackberry's Desktop Manager after installing the System Software Upgrade Package, you are supposed to get a prompt telling you that your system is out of date and would you like the new stuff. Nothing. It was as if the Desktop Manager couldn't see the new package, or more likely, that it didn't realize that the new package supported this particular Blackberry.

Regmon and Filemon led me to a file called vendor.xml in C:\Program Files\Common Files\Research In Motion\AppLoader. It's got stuff like this:

<vendor id="0x66" Name="Cingular Wireless">
      <bundle id="System" version="4.0.0.201">
  <devicehwid>0x80000503 0x90000503 0x80000403 0x94000503 0x94000403 0x94000903</devicehwid>
      </bundle>
   </vendor>
...etc...

Now, in the registry, under HKEY_LOCAL_MACHINE\SOFTWARE\Research In Motion\AppLoader\SearchPaths\{54DF9FA9-C79E-4BFC-94DE-C56456F9452A} there's a HardwareID listed in decimal, 2617246979 which is 0x9C000503 in hex. It also notes that my BlackBerry is system software version 4.0.0.201.

I wanted to get to 4.0.2.93 and I could see that those files were over in C:\program files\common files\research in motion\shared\loader files.

So, I could go into the vendor.xml file and add the new version of the System software and the mapping to my Device's Hardware ID. Sigh.

Conclusion: Rather than add a new mapping I renamed the vendor.xml file to vendor.foo. Upgraded and everything's lovely. Who has the patience, really?

Elapsed (wasted) time: 9 mins. Damn BlackBerry and their -600 million dollars.

DISCLAIMER: It's your tuckus, not mine, if this violates your IT org's policies, or your ISP's policies. I'm just talking, you're the one who has to take responsibility for pressing buttons and turning dials.

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

Xml and the Nametable

March 7, '06 Comments [6] Posted in XmlSerializer
Sponsored By

I got a number (~dozen) of emails about by use of the Nametable in my XmlReader post recently. Charles Cook tried it out and noticed about a 10% speedup. I also received a number of poo-poo emails that said "use XPath" or "don't bother" and "the performance is good enough."

Sure, if that works for you, that's great. Of course, always measure before you make broad statements. That said, here's a broad statement. Using an XmlReader will always be faster than the DOM and/or XmlSerializer. Always.

Why? Because what do you think is underneath the DOM and inside of XmlSerialization? An XmlReader of course.

For documents larger than about 50k, you're looking at least one order of magnitude faster when plucking a single value out. When grabbing dozens, it increases.

Moshe is correct in his pointing out that a nice middle-place perf-wise is the XPathReader (for a certain subset of XPath). There's a number of nice XmlReader implementations that fill the space between XmlTextReader and XPathDocument by providing more-than-XmlReader functionality:

BTW, I would also point out that an XmlReader is what I call a "cursor-based pull implementation." While it's similar to the SAX parsers in that it exposes the infoset rather than the angle brackets, it's not SAX.

Now, all that said, what was the deal with my Nametable usage? Charles explains it well, but I will expand. You can do this if you like:

XmlTextReader tr =

   new XmlTextReader("http://feeds.feedburner.com/ScottHanselman");

while (tr.Read()) 

{

    if (tr.NodeType == XmlNodeType.Element && tr.LocalName == "enclosure")

    {

        while (tr.MoveToNextAttribute())

        {

            Console.WriteLine(String.Format("{0}:{1}",

               tr.LocalName, tr.Value));

        }

    }

}

The line in red does a string compare as you look at each element. Not a big deal, but it adds up over hundreds or thousands of executions when spinning through a large document.

The NameTable is used by XmlDocument, XmlReader(s), XPathNavigator, and XmlSchemaCollection. It's a table that maps a string to an object reference. This is called "atomization" - meaning we want to think about atom (think small). If they see "enclosure" more than once, they use the object reference rather than have n number of "enclosure" strings internally.

It's not exactly like a Hashtable, as the NameTable will return the object reference if the string has already been atomized.

XmlTextReader tr =

   new XmlTextReader("http://feeds.feedburner.com/ScottHanselman");

object enclosure = tr.NameTable.Add("enclosure");

while (tr.Read())

{

    if (tr.NodeType == XmlNodeType.Element &&

        Object.ReferenceEquals(tr.LocalName, enclosure))

    {

        while (tr.MoveToNextAttribute())

        {

            Console.WriteLine(String.Format("{0}:{1}",

               tr.LocalName, tr.Value));

        }

    }

}

The easiest way, IMHO, to think about it is this:

  • If you know that you're going to look for an element or attribute with a specific name within any System.Xml class that has an XmlNameTable, preload or warn the parser that you'll be watching for these names.
  • When you do a comparison between the current element or attribute and your target, use Object.ReferenceEquals. Instead of a string comparison, you'll just be asking "are these the same object" - which is about the fastest thing that the CLR can do.
    • Yes, you can use == rather than Object.ReferenceEquals, but the later makes it totally clear what your intent is, while the former is more vague.

This kind of optimization makes a big perf difference (~10% depending) when using an XmlReader. It makes less of one when using an XPathDocument because you are using Select(ing)Nodes in a loop.

Stealing Charles' words: "...because it involves very little extra code it is perhaps an optimization worth making prematurely."

Even the designers agree: "...using the XmlNameTable gives you enough of a performance benefit to make it worthwhile especially if your processing starts to spans multiple XML components in a piplelining scenario and the XmlNameTable is shared across them i.e. XmlTextReader->XmlDocument->XslTransform."

Oleg laments: "...that something needs to be done to fix this particular usage pattern of XmlReader to not ignore great NameTable idea."

Conclusion: The NameTable is there for a reason, no matter what System.Xml solution you use. This is a the correct and useful pattern and not using it is just silly. If you're going to develop a habit, why not make it a best-practice-habit?

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

Continous Glucose Monitoring

March 4, '06 Comments [7] Posted in Diabetes
Sponsored By

CGM InsertionSometimes my diabetes really gets to me. This is year twelve for me and I have no (known) complications and I'd like to keep it that way. I do pretty well, with blood sugars averaging around 130-160. Ideal is 100, but I'm not doing to bad. However, I had some Indian food last night and I was up until 4AM "chasing blood sugars." I even took an intra-muscular insulin shot in an attempt to bring it down. It can be very tedious.

TGMS_unit_RTCH_thThe insulin pump is nice, but folks often forget that it's just a delivery device. It pumps insulin through a tube into me, and that's it. All the input comes from the blood sugar meter via a finger stick.

However, very soon I should be able to get a Continuous Glucose Monitoring System. This would be yet another device that'd be 'implanted/stuck' to me, but it would talk wirelessly and continuously to the pump.

This device is rolled out in seven cities; they are apparently taking it slow. I can't wait. I have no words to explain to you, dear reader, what it feels like to prick your finger 6 to 10 times a day for 365 days a year for over a decade. You get so addicted (in a necessary way) to the feedback provided by the number that is your blood sugar. Your blood sugar's current level becomes a sixth sense that is as important as any of the other five.

Every time I prick my finger it costs about 80 US cents. It gets spendy. Sometimes I get a little Mulderesque and wonder if they will ever cure diabetes as it's so profitable. Getting my blood sugar reader 10 times a day isn't enough. If you refer back to my Diabetes Airplane Analogy, you wouldn't want to check the altimeter in your airplane only ten times. you'd want to check it continuously.

This continuous meter will connect to me on the other side of my body - the opposite side than the pump - and talk to the pump wirelessly. I'd still have to make the decisions and "close the loop." NONE of this happens automatically. Insulin is never delivered without me deciding. Getting the BG (Blood Glucose) reading continuously will make my life easier.

Here's a little (I think) exclusive. I got this from a "source"...it's a PDF version of the training manual for the new Continuous Meter:

File Attachment: Paradigm Real teaching 1.pdf (999 KB)

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.