Scott Hanselman

Getting the little RSS Orange Badge to show up in the Status Bar on Firefox 1.0

September 15, '04 Comments [5] Posted in ASP.NET | DasBlog | XML
Sponsored By

I run dasBlog as you likely have noticed.  I also am a FireFox fan fo rmy personal browser, and there's a nice new RSS feature in FireFox 1.0PR.  It shows the RSS Orange badge in the status bar, and when you click on it, you can subscribe to a "smart bookmark" that will appear as a folder with each RSS item as an item.  Very slick, and makes RSS reading easy for someone like my Mom.

Additionally it's nice for a browser to FIND the RSS/Atom feed rather than hunting for the badge on the web page.

The way you let Mozilla know about these features is with the <link> tag like this. I added these lines to my dasBlog homeTemplate.blogtemplate file.  You should too. 

<link rel="alternate" type="application/rss+xml" title="RSS" href="http://...">
<link rel="alternate" type="application/atom+xml" title="Atom" href="http://...">

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

Performance in General

September 14, '04 Comments [2] Posted in ASP.NET
Sponsored By

While reading EricGu’s post on Performance of Generics, I was struck by this sentence which expresses perfectly what I was trying to express to a group of programmers earlier today who were arguing about the :? operators in C# being “faster” than explicit if statements.  I called B.S. on the whole topic. Thanks Eric!

Performance is rarely dominated by small decisions, such as whether you use an ArrayList or a List<int> to store your data. It's usually dominated by algorithmic concerns - how you process data, how much redundant processing you're doing, etc. My experience is that the ability to be able to address these concerns is fairly well correlated with the resiliency of your code to change, which usually comes down to how clean and understandable the code is. If you have clean code and good tests, it is probably feasible to refactor your code to improve performance once you find out where the performance issues are.

Note that I'm not saying that you should put performance off until the end - that rarely works, as time at the end is fairly precious. I think you should focus on macro performance rather than micro performance. [EricGu]

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

Back to your regularly scheduled technology blog: ASP.NET ClientSide JavaScript Fix for Validation Problems in .NET Framework 1.1 SP1 and ASPNET_REGIIS -c

September 14, '04 Comments [2] Posted in ASP.NET | Bugs
Sponsored By

OK, back to programming, as this is not a political blog.  Apparently there's some trouble with the .NET Framework Service Pack 1.  I personally have not experienced this problem, and I have to admin that it's so obviously weird that I am suspicious that it is in fact a bug.  Lots of stuff should/could never have worked if it is.  It's likely an install/permissions related bug.  That said, here's the details from a recent series of posts on Channel9.

Symptoms

  • ASP.NET Forms stop posting back when they have validators on them
  • Errors in Event Viewer like "Failed while copying the ASP.NET client side script files to directories under D:\Whatever. Error code: 80070005"

Fix/Potential Fix

  • Copy a PRE-SP1 version of WebUiValidation.js over the one you have in aspnet_client.
    • Certainly make sure you HAVE an aspnet_client folder either in that directory or mapped in another VDIR. (This is a common and unrelated problem.)

I'll get the details/diffs on the changes in this file and post them soon.

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

Forged Bush Memos - Someone used Word and had AutoCorrect turned on.

September 13, '04 Comments [23] Posted in Musings
Sponsored By

There's a lot of talk on the blogosphere today about the Bush Memos being forged.  I looked at the memos (pdf) and it takes all of one minute to see that it's true.  The kerning is obviously a Times New Roman class.

BIG UPDATE: Turns out they ARE fake. "The man who gave CBS News disputed documents describes how he obtained them; in television interview, he admits he deliberately misled a CBS News producer."

UPDATE: This from Little Green Footballs - an animated gif showing the Word version and the Memo itself.

This fellow OWNS one of the TypeWriters in question and says he doesn't buy it either.  His site http://ibmcomposer.org/ is the only site dedicated to this typewriter.

Chris Brooks, my boss, had the most damning comment: Look at the superscript for crying out loud.  I gasped. It's the "autocorrect" feature in Word creating a "th" after a number.  Oy.  Someone needs to lose their job.  It's a shame, as I liked Dan Rather.

Here's IBM Composser guy's thoughts on making a "th" in 1973:

A: Yes, but not in one keystroke. To type 111th, you would first type "111", then remove the 11pt font element, and replace it with an 8pt element, then change the escapement (horizontal spacing) to the narrowest setting, half reverse index the paper, type "th". Then, you have to reverse that process by half indexing the paper back down, replacing the 8pt font element with an 11pt font element,...

Here's the Word version, compare yourself.

Steve Richter had a lot of links to bloggers who are following the story:

 

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 better way to get an XmlDocument or XPathDocument from FOR XML AUTO without using SqlXmlCommand?

September 12, '04 Comments [2] Posted in XML
Sponsored By

When you use SqlCommand.ExecuteXmlReader() you get an XML fragment - you get no root node.  What's a good (clean, elegant, performant, etc.) way to get an XmlDocument or XPathDocument (for XSLT purposes) populated with the data returned - without using the SQLXML 3.0 SqlXmlCommand stuff?  Secondary question - what good is ExecuteXmlReader() anyway?

Is this gross? It feels odd:

        using (SqlConnection conn = new SqlConnection(connStr))
        {
            conn.Open();
            SqlCommand command = new SqlCommand("select * from Customers as Customer for XML AUTO, ELEMENTS", conn);
            XPathDocument xp = new XPathDocument();
            XPathEditableNavigator xpathnav = xp.CreateEditor();
            XmlWriter xw = xpathnav.PrependChild();
            xw.WriteStartElement("Customers");
            using(XmlReader xr = command.ExecuteXmlReader())
            {
                xw.WriteNode(xr,true);
            }
            xw.WriteEndElement();
            xw.Close();
            xp.WriteXml(XmlWriter.Create(Response.Output));
        }

It works though, and produces this.  Of course I wouldn't output it like this, I'd style the XPathDocument.

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.