Scott Hanselman

TechEd 2006 In Conclusion

June 22, '06 Comments [4] Posted in TechEd | PowerShell | Ruby | Speaking | CodeRush
Sponsored By

And a lovely time was had by all at TechEd 2006 this year. I did two talks, one with Patrick Cauldwell, who I've been speaking with for darn near ten years now, and one with Keith Pleas, this being my first time with Keith. Both talks went over pretty well considering the hard drive crashes and laptop LCDs dying that the audience didn't see. Thanks so very much to Simon Guest and Marty Collins for having us and for the privilege of speaking in the Architecture Track.

See you next year!

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 ORCS Web

NUnit Expansion Templates in CodeRush

March 1, '06 Comments [3] Posted in NUnit | XML | CodeRush
Sponsored By

CodeRushNunitTemplatesI noticed via Larkware that Scott Bellware had created a series of Visual Studio 2005 Code Snippets for NUnit. Very cool, I said. However, we're not all using Visual Studio 2005 at my company. Much of our bread and butter is 2003/.NET 1.1. But, many of us have CodeRush. Ah! I said, I should duplicate ScottB's work as Code Rush templates!

I rushed into the Templates section of CodeRush only to notice that they are already there! Damn you, Mark Miller and your forethought!

Anyway, I looked at Scott's List and added a few from his, and there's a few built into Mark's that aren't in Scott's, blah blah blah, union, blah blah, intersection, and here's the Code Rush Templates file if you're a Rushie and want to import them. This file includes the whole NUnit folder with my few changes.
File Attachment: CSharp_NUnit.xml (100 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 ORCS Web

Leaning on the Language and Leaning on the Libraries

February 23, '06 Comments [2] Posted in ASP.NET | Web Services | XmlSerializer | NCover | CodeRush | HttpHandler | Tools
Sponsored By

Coderush2What fun I'm having. I'm collaborating on a project for work. We're still using Visual Studio 2003 and .NET 1.1, but we're still wildly productive.

One interesting thing I've learned is that I lean on the libraries, while Paul, my counter-part leans on the language. He knows what language constructs to use and I know what BCL methods to use. Together we make an effective pair, but this realization helped us both better understand our weak areas. One can write lots of C in C#, if you know what I mean.

Do you lean on the language or the libraries?

We've been doing some fun stuff with XML lately, you might have noticed. We've used:

Also. we're using:

class KindOfPartialSgmlButMoreOfAnOfxXmlWriter : XmlWriter

{

    public KindOfPartialSgmlButMoreOfAnOfxXmlWriter(TextWriter w)

    {

        _htmlWriter = new HtmlTextWriter(w);

    }

 

    public override void Close()

    {

        _htmlWriter.Close();

    }

 

    private Stack _tags = new Stack();

    private HtmlTextWriter _htmlWriter = null;

    private bool _suppressNextEndElement = false;

    private bool _suppressNextText = false;

    private string _previousElement = null;

 

    public override void WriteStartElement(string prefix, string localName, string ns)

    {

        _htmlWriter.WriteFullBeginTag(localName);

        _previousElement = localName;

        _tags.Push(localName);

    }

 

    public override void WriteString(string text)

    {

        if (_suppressNextText == false)

        {

            _htmlWriter.Write(text);

            _suppressNextEndElement = true;

        }

    }

 

    public override void WriteEndElement()

    {

        string endtag = _tags.Pop() as string;

        if (_suppressNextEndElement && endtag == _previousElement)

        {

            _suppressNextEndElement = false;

        }

        else

        {

            _htmlWriter.WriteEndTag(endtag);

        }

    }

 

    public override void Flush()

    {

        _htmlWriter.Flush();

    }

 

    public override void WriteWhitespace(string ws)

    {

        _htmlWriter.Write(ws);

    }

 

    public override void WriteRaw(string data)

    {

        _htmlWriter.Write(data);

    }

 

    public override void WriteChars(char[] buffer, int index, int count)

    {

        _htmlWriter.Write(buffer, index, count);

    }

 

    public override void WriteQualifiedName(string localName, string ns)

    {

        _htmlWriter.WriteBeginTag(localName);

    }

 

    public override void WriteEndAttribute()

    {

        _suppressNextText = false;

    }

 

    public override void WriteStartAttribute(string prefix, string localName, string ns)

    {

        _suppressNextText = true;

    }

 

    public override void WriteRaw(char[] buffer, int index, int count)

    {

        _htmlWriter.Write(buffer,index,count);

    }

 

    public override void WriteProcessingInstruction(string name, string text)

    {

        _htmlWriter.Write(text);

    }

  

    #region Stubs

 

    ...here are overriden versions of everything else from XmlWriter, stubbed and not used. Removed for tidiness

 

    #endregion

}

 

 

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 ORCS Web

New CodeRush Screencasts

December 8, '05 Comments [1] Posted in NUnit | XML | CodeRush
Sponsored By

If you've though about using CodeRush, or you've tried it and given up because it seems to complex, take a look at the new Screencasts that have been added to the CodeRush Training/Tutorial site. The Cool Templates screencast shows the basics of CodeRush, while the NUnit-specific one shows off how CodeRush can augment testing. One of the best, but least understood features is the Smart Clipboard that will dramatically change the number of arrow keys and shift-arrowing that you need to do. There's 900+ templates in CodeRush and it can be a little daunting unless you grok it.

Now playing: Jill Scott - Thickness

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 ORCS Web

CodeRush and Visual Studio 2005

November 2, '05 Comments [2] Posted in CodeRush
Sponsored By

You may notice, when installing VS.NET 2005 that it's a little "greedy" and automatically imports all of your VS.NET 2003 addins. This confuses CodeRush which uses different hooks into 2003 vs. 2005 but can be easily fixed by uninstalling and reinstalling CodeRush. CodeRush will then detect BOTH 2003 and 2005 and work with both.

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 ORCS Web
Page 1 of 5 in the CodeRush category Next Page

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