<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MSDN Student Flash : Lab Rat</title><link>http://blogs.msdn.com/msdnstudentflash/archive/tags/Lab+Rat/default.aspx</link><description>Tags: Lab Rat</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>String Concatenation vs. StringBuilder.Append</title><link>http://blogs.msdn.com/msdnstudentflash/archive/2005/01/31/364217.aspx</link><pubDate>Tue, 01 Feb 2005 02:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:364217</guid><dc:creator>kevinbri</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/msdnstudentflash/comments/364217.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msdnstudentflash/commentrss.aspx?PostID=364217</wfw:commentRss><description>&lt;p&gt;I had a question the other day in an interview about the performance of StringBuilder and while I had run performance tests with StringBuilder in the past I had never really looked under the covers to determine why StringBuilder was or wasn't faster then string concatenation. So now I am going to ask you given the following code which function on the average is faster and why?&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; StringBuilderConcat(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; a, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; b)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;StringBuilder x = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; StringBuilder();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.Append(a);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.Append(b);&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;return&lt;/font&gt;&lt;font size="2"&gt; x.ToString();&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;p&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; StringConcat(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; a, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; b)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt; x = a + b;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt; x;&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Now what if we introduce this function? &lt;/p&gt; &lt;p dir="ltr"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; StringBuilderConcat2(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; a, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; b)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StringBuilder x = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; StringBuilder(a.Length + b.Length);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.Append(a);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.Append(b);&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/font&gt;&lt;font size="2"&gt; x.ToString();&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p dir="ltr"&gt;&lt;em&gt;--Eric (Grand Valley State University)&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/em&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=364217" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msdnstudentflash/archive/tags/Lab+Rat/default.aspx">Lab Rat</category></item><item><title>Running as a Power User</title><link>http://blogs.msdn.com/msdnstudentflash/archive/2005/01/17/354429.aspx</link><pubDate>Mon, 17 Jan 2005 16:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:354429</guid><dc:creator>kevinbri</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/msdnstudentflash/comments/354429.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msdnstudentflash/commentrss.aspx?PostID=354429</wfw:commentRss><description>&lt;p&gt;This past weekend I re-imaged my Tablet PC and vowed to run strictly as a power user. Thus far I have not had too many problems, but thought I would share the short list of issues I have encountered:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.microsoft.com/athome/security/spyware/software/default.mspx"&gt;Microsoft's AntiSpyware Beta&lt;/a&gt; does not appear to perform to well as a power user. It would not let me take the &lt;a title="" href="http://imagine.thespoke.net" &gt;Imagine Cup&lt;/a&gt; IT quiz last night and then it&amp;nbsp;also randomly displays ghost windows in the upper right hand corner of the screen. It also tends to leave ghost icons in the taskbar, earlier this morning there were 4 at one point in time.&lt;/li&gt; &lt;li&gt;AOL Instant Messenger will not install unless you are an administrator. (I think this is because of the spyware they now package with their installation. Yes you can opt not to install it.) AIM also would not run this morning as a power user. When I attempt to run it, a process starts but nothing ever comes of the process. I am not sure what is up with this, but will look into it.&lt;/li&gt; &lt;li&gt;I could not add a local printer earlier this morning. It turns out you need the, load and unload device drivers, rights to add a local printer. This was an easy fix.&lt;/li&gt; &lt;li&gt;Adobe Acrobat also requires you to be an administrator. They actually prompt you with the Run As screen which is pretty cool, but I wish you didn't have to be an admin to install it.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Other then these minor things running as a power user has been going well. I will keep everyone informed of other issues I run into.&lt;/p&gt; &lt;p&gt;&lt;em&gt;--Eric (Grand Valley State University)&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=354429" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msdnstudentflash/archive/tags/Lab+Rat/default.aspx">Lab Rat</category></item><item><title>Hardening IIS Using a Honeypot</title><link>http://blogs.msdn.com/msdnstudentflash/archive/2005/01/05/346897.aspx</link><pubDate>Wed, 05 Jan 2005 15:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:346897</guid><dc:creator>kevinbri</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/msdnstudentflash/comments/346897.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msdnstudentflash/commentrss.aspx?PostID=346897</wfw:commentRss><description>&lt;p&gt;Check out the latest issue of &lt;a href="http://www.microsoft.com/technet/technetmag/default.aspx"&gt;TechNet Magazine&lt;/a&gt; there are a ton of great articles including one about &lt;a href="http://www.microsoft.com/technet/technetmag/issues/2005/01/hackerbasher/default.aspx"&gt;setting up an IIS honeypot&lt;/a&gt; to help direct malicious traffic away from your production sites.&lt;/p&gt; &lt;p&gt;&lt;em&gt;--Eric (Grand Valley State University)&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=346897" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msdnstudentflash/archive/tags/Lab+Rat/default.aspx">Lab Rat</category></item><item><title>Get Express</title><link>http://blogs.msdn.com/msdnstudentflash/archive/2004/09/26/234612.aspx</link><pubDate>Mon, 27 Sep 2004 06:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:234612</guid><dc:creator>kevinbri</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/msdnstudentflash/comments/234612.aspx</comments><wfw:commentRss>http://blogs.msdn.com/msdnstudentflash/commentrss.aspx?PostID=234612</wfw:commentRss><description>&lt;p&gt;A reminder to download the beta of &lt;a href="http://lab.msdn.microsoft.com/express/"&gt;&lt;strong&gt;Visual Studio 2005 Express Products &lt;/strong&gt;&lt;/a&gt;- these are specifically designed as lightweight, simple, student-friendly applications. Expecially check out &lt;strong&gt;Visual Web Developer 2005&amp;nbsp;Express&lt;/strong&gt;, perfect for experimenting with ASP .NET 2.0 sites!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=234612" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/msdnstudentflash/archive/tags/Lab+Rat/default.aspx">Lab Rat</category></item></channel></rss>