<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11645564</id><updated>2011-04-21T18:58:35.003-04:00</updated><title type='text'>Brain.Reflection()</title><subtitle type='html'>Jason Langston's random thoughts on .NET, programming and other junk</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11645564.post-112802898556011683</id><published>2005-09-29T17:23:00.000-04:00</published><updated>2005-09-29T17:23:11.190-04:00</updated><title type='text'>Awesome ClientSide Syntax Highlighter.</title><content type='html'>For the two people subscribing to this blog, my apologies for the 8 million test posts.
&lt;p&gt;
Via &lt;a href="http://www.codinghorror.com/blog/"&gt;Jeff Atwood&lt;/a&gt; I stumbled upon &lt;a href="http://www.dreamprojections.com/SyntaxHighlighter/Default.aspx"&gt;this fantastic client side syntax highlighter&lt;/a&gt; for web pages/blogs. Here's a sample below:
&lt;/p&gt;
&lt;p&gt;&lt;textarea name="code" class="c#"&gt;
/***********************************
 ** My Class
 **********************************/
public class MyClass
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;private string _name = string.Empty;
&amp;nbsp;&amp;nbsp;&amp;nbsp;public MyClass(){ /* constructor */}
&amp;nbsp;&amp;nbsp;&amp;nbsp;public void DoSomething
&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;     if(true)
&amp;nbsp;&amp;nbsp;&amp;nbsp;     {
            // print the name
&amp;nbsp;&amp;nbsp;&amp;nbsp;         Console.WriteLine(_name);
&amp;nbsp;&amp;nbsp;&amp;nbsp;      }
}
&lt;/textarea&gt;&lt;/p&gt;
&lt;p&gt;I post a fair amount of code snippets so felt it was worth the effort to get this installed. It took a few trys though. First I needed to take the multiple files supplied and incorporate them directly into my Blogger template. Then via a ton of trial and error, I finally figured out that a) having any html tags (such as a &amp;lt;br&amp;gt;) within the textarea tag "shuts off" the formatting, and that b) by default both my blog editor (&lt;a href="http://wbloggar.com/"&gt;w.bloggar&lt;/a&gt;) and Blogger converted newlines into br tags. This latter feature is great when I'm being lazy about the html in my post, but it was killing my code samples. So I've turned off that feature, but now my previous posts look like crap since I was being lazy. Oh, well it'll give me something to do this weekend, cleaning those all up - but at least now my code samples will look really, really cool!&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-112802898556011683?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/112802898556011683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=112802898556011683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112802898556011683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112802898556011683'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/09/awesome-clientside-syntax-highlighter.html' title='Awesome ClientSide Syntax Highlighter.'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-112800905936892660</id><published>2005-09-29T11:50:00.000-04:00</published><updated>2005-09-29T11:57:35.350-04:00</updated><title type='text'>Test Code Highlighter 4</title><content type='html'>Testing a syntax highlighter 4 ...
&lt;br&gt;
&lt;textarea name="code" class="c#"&gt;
// single line comments
// second single line
override protected void OnLoad(EventArgs e)
{
 if(Attributes["class"] != null)
 {
  //_year.CssClass = _month.CssClass = _day.CssClass = Attributes["class"];
 }
// base.OnLoad(e);
}

/***********************************
 ** Multiline block comments
 **********************************/

&lt;/textarea&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-112800905936892660?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/112800905936892660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=112800905936892660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112800905936892660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112800905936892660'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/09/test-code-highlighter-4.html' title='Test Code Highlighter 4'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-112794400362600204</id><published>2005-09-28T17:46:00.000-04:00</published><updated>2005-09-29T10:28:01.023-04:00</updated><title type='text'>AppDomain.CurrentDomain.UnhandledException is *not* an exception handler (it's just an event)</title><content type='html'>To some the title of this post may be a no-brainer. But, until this afternoon I thought that AppDomain.CurrentDomain.UnhandledException was some sort of "global" exception handler (iow, a giant try ... catch around everything). Hook up a method, log the exception and you the coder decide whether to let the app continue on it's merry way. And never, ever see that standard .NET crash dialog (after all if I've "handled" the exception why is CLR stepping in?). Only it wasn't working that way at all. No matter what I did I was still seeing the crash dialog. (And some other weird behavior I can only attribute to the fact this was a Windows Service). I googled and googled and couldn't find anything. Then finally I found &lt;a href="http://www.codinghorror.com/blog/archives/000201.html"&gt;I wasn't alone&lt;/a&gt;. Thankfully, the final comment on that post by Jonathan Keljo (CLR Exception PM), kicked the lightbulb on.

In part Jonathan explained:

&lt;blockquote&gt;
The first thing to understand is that the UnhandledException event is not an unhandled exception "handler". Registering for the event, contrary to what the documentation says :-(, does not cause unhandled exceptions to be handled. (Since then they wouldn't be unhandled, but I'll stop with the circular reasoning already...) The UnhandledException event simply notifies you that an exception has gone unhandled, in case you want to try to save state before your thread or application dies.
&lt;/blockquote&gt;

So it's just an event handler, giving you one last chance to clean up or log, or whatever before the CLR handler kicks in. (Be sure to read the rest of his comments and &lt;a href="http://msdn.microsoft.com/msdnmag/issues/05/07/Bugslayer/"&gt;this article&lt;/a&gt; to understand how unhandled exceptions are "handled" by the CLR for various thread types. In some cases your app won't die at all in v1.0 and v1.1.)

Oh, and btw, if anyone has links to some decent articles on "hardening" a Windows Service please comment. At this point all I can come up with is a try catch in the .ctor, and the OnStart, OnStop, etc. methods. But, other than logging can't figure out what I should be doing in the catch block.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-112794400362600204?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/112794400362600204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=112794400362600204' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112794400362600204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112794400362600204'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/09/appdomaincurrentdomainunhandledexcepti.html' title='AppDomain.CurrentDomain.UnhandledException is *not* an exception handler (it&apos;s just an event)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-112008146846399057</id><published>2005-06-29T17:44:00.000-04:00</published><updated>2005-06-29T17:44:28.466-04:00</updated><title type='text'>Restraining your inner Colonel Jessup (You can't handle the truth!)</title><content type='html'>&lt;a href="http://blogs.msdn.com/ricom/archive/2005/06/09/427404.aspx"&gt;This&lt;/a&gt; was brilliant.

To be honest, there are days when I too wish I could just mandate some things and get the talking over with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-112008146846399057?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/112008146846399057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=112008146846399057' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112008146846399057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112008146846399057'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/06/restraining-your-inner-colonel-jessup.html' title='Restraining your inner Colonel Jessup (You can&apos;t handle the truth!)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-112008108541372202</id><published>2005-06-29T17:38:00.000-04:00</published><updated>2005-06-29T17:38:05.426-04:00</updated><title type='text'>Peel away the Abstractions - Reference Types, Value Types, ByRef, ByVal, where are my pointers?</title><content type='html'>Aaron &lt;a href="http://iceglue.com/tranqy/DidILeaveThatOnTheStackOrInTheHeap.aspx"&gt;pointed out&lt;/a&gt; &lt;a href="http://www.developerfusion.co.uk/show/4705/1/"&gt;this pretty decent article&lt;/a&gt; by Jon Skeet that describes the difference between value and reference types in .NET. In that article Jon points to &lt;a href="http://www.developerfusion.co.uk/show/4697/1/"&gt;another article&lt;/a&gt; of his that describes the difference of passing by value and passing by reference in .NET. I read both articles with interest because this question comes up at times at work, and I'm always grasping for a simple way to explain it.

As hard as I try, I still find the easiest way to understand these things is to reach back to C and understand pointers. That's what's really going on under the .NET covers. &lt;code&gt;MyCSharpMethod(ref Object o)&lt;/code&gt; is equivalent to &lt;code&gt;MyCMethod(Object** o)&lt;/code&gt;, it's as simple as that once you understand pointers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-112008108541372202?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/112008108541372202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=112008108541372202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112008108541372202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/112008108541372202'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/06/peel-away-abstractions-reference-types.html' title='Peel away the Abstractions - Reference Types, Value Types, ByRef, ByVal, where are my pointers?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111876028246017666</id><published>2005-06-14T10:44:00.000-04:00</published><updated>2005-06-14T10:44:42.480-04:00</updated><title type='text'>Other Languages: The return keyword - use it!!</title><content type='html'>In VB "classic" there is no return keyword, rather you assign the return value to the function name. So, that would look like something like this:

&lt;code&gt;
Public Sub SomeProcedure
    Dim result As Integer
    result = AddFunction(1,1)
    MsgBox(result)
End Sub

Public Function AddFunction(paramOne As Integer, paramTwo As Integer)
    AddFunction = paramOne + paramTwo
End Function
&lt;/code&gt;

Way back when I was first (re) learning programming the VB "classic" syntax for returning values from a method/function made perfect sense to me. Back then, to a hobbyist with no concept of stack frames and such, a function call looked an awful lot like a variable, so why not just assign to it? It's funny how quickly confusing syntax like this becomes a distant memory.

I'd completely forgotten that VB.NET, while providing a Return keyword, still supports the above syntax. Until yesterday. A coworker asked me to help him figure out a bug. We stepped into a property accessor only to be completely confused when we saw the code assigning to the property, and then using the Exit Property keyword to break out of the accessor. It took minutes for it to dawn on me that the assignment wasn't calling the property setter, and that Exit Property was legal syntax.

I'd just like to say, please don't use this syntax! It is confusing and misleading. In a property it looks downright wrong! (Can you say stack overflow!!) In the interest of readable code use the return keyword.

(I poked around to see if there was any other language that didn't use return. All of the C derivatives - C, C++, C# and Java use it. Python uses it. Interestingly, Ruby has the return keyword, but it isn't always required. If you don't explicitly return a value, Ruby returns the value of the last executed statement in the method. I still stand by my assertion that such "implicit" help from the interpreter/compiler makes code less readable.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111876028246017666?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111876028246017666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111876028246017666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111876028246017666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111876028246017666'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/06/other-languages-return-keyword-use-it.html' title='Other Languages: The return keyword - use it!!'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111720264123636850</id><published>2005-05-27T10:00:00.000-04:00</published><updated>2005-05-27T10:04:01.240-04:00</updated><title type='text'>No, really, who am I? (The video game character thing)</title><content type='html'>&lt;TABLE BORDER=0&gt;&lt;TR&gt;&lt;TD&gt;
&lt;A HREF="http://quiz.ravenblack.net/videogame.pl"&gt;&lt;IMG BORDER=0 ALIGN="LEFT" WIDTH=150 HEIGHT=80 SRC="http://quiz.ravenblack.net/videogame/6.png" ALT="What Video Game Character Are You? I am a Defender-ship." /&gt;&lt;/A&gt;I am &lt;B&gt;a Defender-ship&lt;/B&gt;.&lt;BR /&gt;&lt;BR /&gt;
I am fiercely protective of my friends and loved ones, and unforgiving of any who would hurt them. Speed and foresight are my strengths, at the cost of a little clumsiness. I'm most comfortable with a few friends, but sometimes particularly enjoy spending time in larger groups. &lt;A HREF="http://quiz.ravenblack.net/videogame.pl"&gt;What Video Game Character Are You?&lt;/A&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
Interestingly, the "fiercely protective ..." part is really true, as is the "I'm most comfortable with a few friends". The speedy, foresight, clumsy thing, not so sure about ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111720264123636850?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111720264123636850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111720264123636850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111720264123636850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111720264123636850'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/no-really-who-am-i-video-game.html' title='No, really, who am I? (The video game character thing)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111695519061242476</id><published>2005-05-24T13:19:00.000-04:00</published><updated>2005-05-24T13:19:50.636-04:00</updated><title type='text'>Sniffing out stinky code</title><content type='html'>Good naming conventions and practice can really help make code more readable, and even help prevent hard to find bugs.

Mike Clark gives a concise, yet thorough explanation of how well written code can be self-documenting, as well as when, why and how to comment your code in the article &lt;a href="http://www.stickyminds.com/testing.asp?Function=edetail&amp;ObjectType=ART&amp;ObjectId=9041&amp;tth=DYN&amp;tt=siteemail&amp;iDyn=3"&gt;Write Sweet-Smelling Comments&lt;/a&gt;. I particularly got a laugh out of his examples of good comments in the box "eye-popping comments". I had started feeling guilty about the "police tape" style comments I'd liberally sprinkled throughout a particular code base. Seeing Mike's example was extremely validating, and I now proudly stand by those comments.

In a completely different vein, but still on the topic of code clarity, Joel Spolsky makes a convincing argument for "Apps" Hungarian notation as a valuable tool for &lt;a href="http://www.joelonsoftware.com/articles/Wrong.html"&gt;"Making Wrong Code Look Wrong"&lt;/a&gt;, thus preventing hard to find bugs. I'll admit that early on in my programming career I succumbed to the "wrong" way of doing Hungarian, but even today in my not a bit of Hungarian anywhere .NET code, I rely heavily on certain conventions to make my code readable. For instance I'm a huge fan of "_" as a prefix for member variables, which makes them easy to recognize when reading code. Casing and other conventions are additional tools that I love to take advantage of. (This is a big reason I prefer case-sensitive languages. I like to be able to enforce that someVariable and SomeVariable are two different things, and hence be able to attach meaning to the different cases)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111695519061242476?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111695519061242476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111695519061242476' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111695519061242476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111695519061242476'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/sniffing-out-stinky-code.html' title='Sniffing out stinky code'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111686900000610847</id><published>2005-05-23T13:23:00.000-04:00</published><updated>2005-05-23T13:23:20.026-04:00</updated><title type='text'>To GAC or not to GAC</title><content type='html'>This question comes up at work from time to time, mostly in a rhetorical sense.

The GAC represents a great way to share and version assemblies across multiple applications. If you remember "DLL Hell", then you can understand, if not feel, the shudder that paralyzes me when I hear of that kind of functionality. Chris Sells summarized my feelings on the subject very well in his post &lt;a href="http://www.sellsbrothers.com/spout/#Avoid_the_GAC"&gt;Avoid the GAC&lt;/a&gt;.

On the other hand, Junfeng &lt;a href="http://blogs.msdn.com/junfeng/archive/2005/05/21/420808.aspx"&gt;points out&lt;/a&gt; that 'Avoid the GAC' is not official MS policy, and that the GAC should be used 'whenever it makes sense' for 'shared components'.

I agree, that like most decisions, you can't make a blanket statement to never use the GAC. However, personally this is one of those things where I would err on the side of just don't use it. If you think we do need it, you had better be prepared to convince me why- (hint: simply saying more than one app is going to use the assembly isn't going to cut it.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111686900000610847?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111686900000610847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111686900000610847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111686900000610847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111686900000610847'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/to-gac-or-not-to-gac.html' title='To GAC or not to GAC'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111565863558272423</id><published>2005-05-09T13:10:00.000-04:00</published><updated>2005-05-09T13:10:35.706-04:00</updated><title type='text'>Greasemonkey - the way the Web was meant to be</title><content type='html'>One of the reasons I switched to Firefox was Greasemonkey. I was going to write about what Greasemonkey is, but instead found this &lt;a href="http://www.nivi.com/blog/article/greasemonkey-and-business-models/"&gt;excellent description&lt;/a&gt;. Check it out.

For me the combination of Greasemonkey, Firefox, Bloglines, Delicious makes the web the way it ought to be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111565863558272423?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111565863558272423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111565863558272423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111565863558272423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111565863558272423'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/greasemonkey-way-web-was-meant-to-be.html' title='Greasemonkey - the way the Web was meant to be'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111517366014290863</id><published>2005-05-03T22:27:00.000-04:00</published><updated>2005-05-03T22:27:40.146-04:00</updated><title type='text'>The original CLI</title><content type='html'>Reading through the essays on Emacs and UIs I linked to earlier reminded me of the power that you can get from a command line.

In a previous life I worked as an engineer and so I spent many, many hours using AutoCAD. Over those years I developed the habit of almost never using the menus. This would allow me to keep the mouse positioned whereever I was in the drawing and with my left hand I would type commands, most of which were aliased to one or two characters, all characters easily accessed from the "home" position on the keyboard. It was truly an extension of me as I worked.

I used to get a chuckle watching new engineers as they struggled, wasting time moving their mouse all over the place searching through menus, clicking back on the drawing, clicking on popups and dialogs. Somedays it was downright frustrating to watch them struggle.

Day to day administration of your pc can also be &lt;a href="http://redmondmag.com/columns/article.asp?EditorialsID=802"&gt;revved up by using the CLI&lt;/a&gt;, and this is part of my motivation to learn to bash and related utilities.

And the same keyboard-centric approach can really improve productivity in using your IDE. In Peter Provost's confession of &lt;a href="http://www.peterprovost.org/archive/2005/03/23/3055.aspx"&gt;keyboard zealotry&lt;/a&gt; he explains that it was watching other developers amaze him with their ability to drive using the keyboard alone that made him a convert.

... now I just need to learn all those shortcuts!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111517366014290863?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111517366014290863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111517366014290863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111517366014290863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111517366014290863'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/original-cli.html' title='The original CLI'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111517324973916184</id><published>2005-05-03T22:20:00.000-04:00</published><updated>2005-05-03T22:20:49.773-04:00</updated><title type='text'>Other Languages: Indentation for block scope</title><content type='html'>Last fall on Channel 9 I was watching an &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=25915"&gt;interview on the upcoming MS command shell Monad,&lt;/a&gt; and while describing the syntax Jeffrey Snover made the most convincing argument for curly braces I've ever heard.

If you've been programming awhile you've undoubtedly stumbled across many ways to indicate block scope - curly braces, end [blah], etc. (Some of my personal favorites are the 'nix shells - if ... fi, case ... esac, etc. and VB classic's Wend.)

The argument made was that for a new user curly braces are easier to learn. You only need to learn the keyword, you already know the end block characters. Which means you have less keywords to learn, and you don't have to learn special and unintuitive rules (is that elihw, end while, or ... Wend?!). Makes a lot of sense to me.

Python does one better. Most of us agree that good indentation makes the code more readable, and so whatever our scope keywords/characters we tend to indent based on the scope. Python takes that convention and makes it law, and completely eliminates the curly braces versus end [blah] argument in the process. In Python to indicate block scope you must &lt;a href="http://docs.python.org/tut/node5.html#SECTION005200000000000000000"&gt;use indentation&lt;/a&gt;.

Personally I find this extremely readable and elegant. Plus one for Python (Ruby which I'm beginning to really like, uses begin and end which I don't like)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111517324973916184?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111517324973916184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111517324973916184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111517324973916184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111517324973916184'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/other-languages-indentation-for-block.html' title='Other Languages: Indentation for block scope'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111508399452570303</id><published>2005-05-02T21:33:00.000-04:00</published><updated>2005-05-02T21:33:14.526-04:00</updated><title type='text'>Doing IDisposable the "right" way</title><content type='html'>Joe Duffy posted some updated design guidelines for&lt;a href="http://www.bluebytesoftware.com/blog/PermaLink.aspx?guid=88e62cdf-5919-4ac7-bc33-20c06ae539ae"&gt; implementing IDisposable and dealing with resource management&lt;/a&gt; in general.

The length of the article alone should convince you that this isn't a subject that you want to approach as a &lt;a href="http://hyperthink.net/blog/PermaLink,guid,8d3b8fe6-259e-4514-b676-ade05dfc7bc0.aspx"&gt;"cargo cult" programmer.&lt;/a&gt; As Joe says in the intro:
&lt;blockquote&gt;
"Implementing this pattern correctly&amp;#8212;when appropriate&amp;#8212;is critical to ensuring proper, timely cleanup of resources, and also to provide users with a deterministic, familiar way of disposing of resources."
&lt;/blockquote&gt;

What's cool too, about the article is the added annotations. One jumped right out at me:
&lt;blockquote&gt;
(Krzysztof Cwalina): Many people who hear about the Dispose pattern for the first time complain that the GC isn&amp;rsquo;t doing its job. They think it should collect resources, and that this is just like having to manage resources as you did in the unmanaged world. The truth is that the GC was never meant to manage resources. It was designed to manage memory and it is excellent in doing just that.
&lt;/blockquote&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111508399452570303?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111508399452570303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111508399452570303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508399452570303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508399452570303'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/doing-idisposable-right-way.html' title='Doing IDisposable the &quot;right&quot; way'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111508381533440422</id><published>2005-05-02T21:30:00.000-04:00</published><updated>2005-05-02T21:30:15.333-04:00</updated><title type='text'>I want to learn to do that (Ruby is so cool)</title><content type='html'>As I &lt;a href="http://jasonlangston.blogspot.com/2005/04/other-languages-intro.html"&gt;mentioned&lt;/a&gt; I've been poking around with Python again as my foray into dynamic languages. A workmate is working his way through learning Ruby, and so we often compare the two. At first glance the two seem very similiar - both are dynamic, both have cool string handling (more on that in upcoming post), both are OOP-ish, etc.

I originally chose to learn Python because of it's Win32 library/support. But in the past few days John Lam has posted some of the cool things he's doing with Ruby, things like&lt;a href="http://www.iunknown.com/commentswithentry.aspx?entryid=f8053753-435a-47ad-a755-62386fd4a569"&gt; testing ASP.NET apps&lt;/a&gt;, and doing some &lt;a href="http://www.iunknown.com/commentswithentry.aspx?entryid=4e95ac83-c974-4318-a10c-92550a804f74"&gt;ADSI scripting&lt;/a&gt; which showcase it's Win32/COM support. I'm jealous! Those two posts alone are making me want to abandon Python and start learning Ruby. (Adding additional weight to this desire is the Ruby references in things I've been reading about continuations/closures - more on that soon, too.)

So I decided to do some poking around to find out what the true differences are between the two languages and found this &lt;a href="http://64.233.161.104/search?q=cache:hkHwxn5QimsJ:www.cs.washington.edu/homes/kd/courses/pythonruby.pdf+Ruby+Python+comparison&amp;hl=en"&gt;excellent paper&lt;/a&gt;.

Me - I'm still undecided which I'll learn. But based on the few examples I've seen it just might have to be both. (and I'm still hearing lots about this cool thing called RAILS)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111508381533440422?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111508381533440422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111508381533440422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508381533440422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508381533440422'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/i-want-to-learn-to-do-that-ruby-is-so.html' title='I want to learn to do that (Ruby is so cool)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111508347269966277</id><published>2005-05-02T21:24:00.000-04:00</published><updated>2005-05-02T21:24:32.700-04:00</updated><title type='text'>Region Expando Macro</title><content type='html'>In one code base I spend a lot of time in, regions are used extensively to organize the code. I often like to scroll through a source file, and for this regions seriously get in the way. I quickly discovered that there is no easy way to expand all the regions in a source file from the IDE. So this &lt;a href="http://weblogs.asp.net/rweigelt/archive/2003/07/06/9741.aspx#31125"&gt;macro&lt;/a&gt; and the key binding 'ctl-shift-=' has become my new best friend. For more info, read the whole article, as well as the comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111508347269966277?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111508347269966277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111508347269966277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508347269966277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508347269966277'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/region-expando-macro.html' title='Region Expando Macro'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111508061573935198</id><published>2005-05-02T20:36:00.000-04:00</published><updated>2005-05-02T21:07:38.600-04:00</updated><title type='text'>Perception (and Language Wars)</title><content type='html'>I don't care if VB is better than C#. To be honest, that ridiculous war was over a long time ago - and the answer is that by and large the two languages are equal. But what I do care about is the perception of the community in general and how that might impact my career.

For the record, as my coworkers will testify, I'm a pretty big C# fan. I personally prefer case-sensitivity and curly braces. I prefer keywords that closely approximate commonly accepted terminology (see abstract versus MustInherit). I prefer a compiler that will catch common (at least for me) programming mistakes (and therefore am thrilled to see the new warnings in VB 2005). I prefer clarity and expressiveness (see out/ref versus ByRef). Nonetheless, I have nothing against VB. I still spend large portions of my time programming in VB.

However, I am concerned that if my resume includes years of VB.NET and classic VB, am I going to be lumped into a sub-standard "group" of programmers? Sadly, in some minds the answer is yes.

A few weeks ago I was talking with a friend of a friend who is the tech lead for a medium-sized .NET shop. We talked shop for awhile, but one comment stuck with me. He claimed that they simply don't hire someone who doesn't have at least some C# experience. Why not consider VB.NET experience? They feel that VB programmers just don't grasp OOP, or more complex programming. I could spend hours poking holes in that theory, and a quick look at the DailyWTF will help provide many counter-examples. But I realized later that it doesn't matter. The truth is that language makes little difference, but as long as the perception is that VB programmers are somehow deficient in comparison to C# programmers, people are going to lose job opportunities.

Is this perception entirely by accident? Check out &lt;a href="http://msdn.microsoft.com/msdnmag/issues/04/05/"&gt;this cover &lt;/a&gt;of a magazine that I regularly read and enjoy. Now check out this &lt;a href="http://www.ftponline.com/weblogger/forum.aspx?ID=6&amp;DATE=02/15/2005&amp;blog=#323"&gt;editor's note&lt;/a&gt; in the latest issue of Visual Studio Magazine. As you read through notice what is emphasized as important new features of C# and contrast that with VB. From MSDN in regards to C# "Create elegant code with Anonymous Methods, Iterators, and Partial Classes". What can we look forward to in VB? The "My" namespace. Not to take anything away from My. It looks like it will be helpful. But the impression is that VB is getting features to make the framework more accessible for people who couldn't figure it out before, while C# is getting features to create elegant, more powerful code. Sadly, every time I read anything about VB 2005 all I hear about is the My namespace, and maybe some footnote about how it will have generics too. In the blog community I'm reading all kinds of cool posts about closures and continuations, and in those discussions I'm seeing references to C#, Ruby, Python, Java, Scheme, Lisp - but not a whisper about VB.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111508061573935198?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111508061573935198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111508061573935198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508061573935198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111508061573935198'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/perception.html' title='Perception (and Language Wars)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111507920358521695</id><published>2005-05-02T20:13:00.000-04:00</published><updated>2005-05-02T20:13:23.586-04:00</updated><title type='text'>Flying the User Interface</title><content type='html'>Like &lt;a href="http://www.randsinrepose.com/archives/2005/04/25/rands_version_4.html"&gt;Rands&lt;/a&gt;, the first time I read Joel's &lt;a href="http://www.joelonsoftware.com/navLinks/BuytheBooks.html"&gt;User Interface Design for Programmers&lt;/a&gt; I thought I could actually design user interfaces. Despite quickly coming back to reality (one of my favorite Dilbert series follows the chaos and mayhem that ensues when an engineer designs a UI - translation engineers can't/shouldn't do UI design it's just not in our nature), I still love the topic.

&lt;a href="http://www.surfaceeffect.com/essays/unconscious.html"&gt;Flying the user interface&lt;/a&gt; describes how our brain works when doing tasks like driving a car (ever been so deep in thought during the commute home that when you break out of your reverie you don't know how you got to where you are?), and what this should teach us about how to design our applications and their user interfaces.

In a seperate &lt;a href="http://www.surfaceeffect.com/essays/emacs.html"&gt;essay&lt;/a&gt;, &lt;a href="http://www.surfaceeffect.com/"&gt;Peter&lt;/a&gt; uses emacs as a concrete example of some of the lessons described in Flying the User Interface, and gives some of the pros and cons of that power user's tool. The way he describes it I actually want to learn e-macs!

If you have any interest in UI design (or API design for that matter) check out all of Peter's &lt;a href="http://www.surfaceeffect.com/essays/"&gt;essays&lt;/a&gt; - highly recommended.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111507920358521695?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111507920358521695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111507920358521695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111507920358521695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111507920358521695'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/flying-user-interface.html' title='Flying the User Interface'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111506893333345801</id><published>2005-05-02T17:22:00.000-04:00</published><updated>2005-05-02T17:22:13.333-04:00</updated><title type='text'>SQL 2005 First Impressions</title><content type='html'>Last week I installed the VS2005/.NET2.0 Beta and the SQL 2005 April CTP.

To be honest my first impressions of SQL2K5 are entirely IDE focused. I haven't had time to play with any of the new relational engine or CLR integration features, but I have been using SQL Server Management Studio to do my SQL work for the last few days.

&lt;b&gt;Some things I like&lt;/b&gt;
Having SQL Solutions, Projects and version control builtin to make this a powerful IDE for SQL development. I've started using that feature right away and love it. Finally I have a workable way to organize all those operational scripts and data-centric projects, and keep everything easily ascessible from the IDE. (There is a caveat below). I do like too that I can work in the IDE, with syntax coloring, etc. without actually being connected to a database.

Having Enterprise Manager and Query Analyzer merged into one tool makes sense. I like having everything at my finger tips. That said, there was a lot going for having seperate tools. At one job we used to give Query Analyzer, but not Enterprise Manager to the data analysts. They had all they needed for their job, but were kept out of trouble by not having EM. There's also the size consideration. Doing development and operational work I typically have one to three instances of QA open, but almost never EM. Those three instances would cost roughly 30MB RAM combined. SQL Management Studio is taking about 70-80MB.

&lt;b&gt;Some things I hope get better!&lt;/b&gt;

I'm relearning ctl-Q, instead of ctl-N and I can live with that. But what is a pain is that opening a file (from File-Open or from the solution explorer) forces me to make a new connection to the database. I do a lot of work with a production database where I need to connect with a SQL login which has a strong password. I miss doing ctl-N (new window) in Query Analyzer which would use the same connection properties of the current window where I'm already logged in, and then opening a file into that Window, keeping the connection properties.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111506893333345801?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111506893333345801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111506893333345801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111506893333345801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111506893333345801'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/05/sql-2005-first-impressions.html' title='SQL 2005 First Impressions'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111396106288203514</id><published>2005-04-19T21:37:00.000-04:00</published><updated>2005-04-19T21:37:42.883-04:00</updated><title type='text'>Power Browsing (or why you should switch to FireFox)</title><content type='html'>A few years ago I stumbled upon Firefox and loved it. Tabbed browsing is very convenient, and works well with my browsing habits. It quickly became my browser of choice, except in those cases where IE was needed.

About 9 months ago I got a new laptop, and being in the middle of a crazy push, I couldn't be bothered to download and install it, so I stuck with IE. I found that XP's grouping of taskbar items kept all of my browser windows semi-organized, and definitely out of my way so I had little motivation to go back to Firefox. A coworker finally convinced me to overcome my laziness and make the switch (again). 

Some reasons why you might want to switch.

&lt;b&gt;Developer Tools:&lt;/b&gt;

A few months ago a co-worker was neck deep in some new UI work which depended heavily on CSS, and he switched to Firefox for it's awesome developer support. For instance he extensively used the Add-in &lt;a href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&amp;version=1.0&amp;os=Linux&amp;category=Developer%20Tools&amp;numpg=10&amp;id=179"&gt;CSSEdit&lt;/a&gt; to interactively verify and expirement with the CSS.

&lt;b&gt;Browser Features:&lt;/b&gt;

Highlight a word or phrases on a page in Firefox and a right click brings up a context menu that will allow you to search the web on that word or phrases.

&lt;b&gt;Tabbed browsing is just plain awesome. &lt;/b&gt;

I often will find myself researching some subject and have 5-15 browser windows open just on that subject. In my usual &lt;a href="http://www.randsinrepose.com/archives/2003/07/10/nadd.html"&gt;NADD&lt;/a&gt; manner, I'll be researching 3-4 subjects each with their own set of browser windows. In IE there was no way to organize this mess. In Firefox I'll have a session open for each research area (plus one for my daily stuff like BlogLines, e-mail, news sites), and the tabs can be used to organize the 5-15 sites I'm on at that time.

When I hit my limit and decide that either my pc is crawling, or I've lost interest in a particular subject I can save away the state of that research by bookmarking all the tabs into one bookmark folder (with a single menu selection!), and then later restore the whole thing, again with a single menu selection: Bookmarks&gt;Folder&gt;Open in tabs.

Do you want to see all pages in a particular &lt;a href="http://del.icio.us/"&gt;del.icio.us&lt;/a&gt; tag - navigate to the tag, add active link, and open the active link in tabs.

The next Firefox add-in I need (or maybe should write?) is a way to dump a set of bookmarks to my del.icio.us.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111396106288203514?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111396106288203514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111396106288203514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111396106288203514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111396106288203514'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/power-browsing-or-why-you-should.html' title='Power Browsing (or why you should switch to FireFox)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111396051163643676</id><published>2005-04-19T21:28:00.000-04:00</published><updated>2005-04-19T21:28:31.636-04:00</updated><title type='text'>"Other" Languages : OOP without encapsulation?</title><content type='html'>Having programmed in VB "classic" for years, I've grown used to a warped view of what an OO language looks like. Sure most people will say that there are *three* pillars of object orientation (encapsulation, inheritance, and polymorphism), but any die-hard VB programmer 'back in the day' would quickly point out that VB was object oriented even though it didn't support inheritance. Supporting arguments would be hair-splitting arguments like the fact that VB supports "interface" inheritance, and that technically you could achieve implementation inheritance via &lt;a href="http://vb.mvps.org/hardcore/html/reusability.htm"&gt;containment/delegation&lt;/a&gt;.

Well, as if my brain was warped enough, now I'm learning that Python, like VB claims that object orientation is only built upon two pillars, just a different two. Unlike VB "classic" Python does support inheritance, the documentation even goes so far as to say that a feature would not be worthy the name "class" without supporting inheritance. However, Python completely and proudly throws out encapsulation. That's right, there is no notion of private or protected or anything resembling encapsulation (ok, there's a naming convention that 'kind of' hides members, but it hardly counts). 

But, but, but you're encapsulation wired brain is stuttering. Never fear. The following from the documentation should put your mind at ease 'Clients should use data attributes with care - clients may mess up invariants maintained by the methods [if] they stamp on their data structures'. Oh, good, glad that's cleared up, we don't need encapsulation - our clients will tread with care.

If the sarcasm in wasn't obvious, let me just say that although I love many of the features of Python, I just can't come to grips with the lack of encapsulation. I still have hope for dynamic languages though, since a friend of mine pointed out that although Ruby and Python are very simliar in many ways, they differ here. Ruby fully supports encapsulation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111396051163643676?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111396051163643676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111396051163643676' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111396051163643676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111396051163643676'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/other-languages-oop-without.html' title='&quot;Other&quot; Languages : OOP without encapsulation?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111393013538473670</id><published>2005-04-19T13:02:00.000-04:00</published><updated>2005-04-19T13:02:15.383-04:00</updated><title type='text'>Properties or getter Methods?</title><content type='html'>Did I mention that I like code which is self documenting? This is often much more than an aesthetic consideration - it can lead to developers &lt;a href="http://blogs.gotdotnet.com/BradA/PermaLink.aspx/b7a0cf5c-a283-4f95-a508-819102d2feae"&gt;succeeding (or miserably failing)&lt;/a&gt; in using your code.

During a design session today the question came up about using properties or methods. The attribute in question was a simple boolean, and at first glance seemed to obviously be a Property. However, calling the attribute would result in a database call(s) and some involved logic. Which should it be?

A few of the guidelines I try to follow are cited below.

From &lt;a href="http://geekswithblogs.net/ewright/archive/2004/05/02/4537.aspx"&gt;Eron Wright&lt;/a&gt;:
&lt;blockquote&gt;
A good practice is for property access to be computationally cheap; client code should not be forced to place the property value into a local variable - it's premature optimization.  Expensive code should be placed in methods - client code is sure to store and reuse the result.  The exception is if the property getter method caches the result in a private field, which can be a challenge as the class instance is mutated.

The property syntax in .NET languages is not syntactic sugar.  It adds considerable richness to classes.
&lt;/blockquote&gt;

&lt;a href="http://blogs.msdn.com/brada/archive/2003/11/13/50672.aspx"&gt;Brad Abrams&lt;/a&gt; points out that this explicitness might be invaluable during a good code review.

And of course MSDN Design Guidelines for Class Library Developers, &lt;a href="http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconPropertyUsageGuidelines.asp?frame=true#cpconpropertyusageguidelinesanchor1"&gt;Properties vs. Methods&lt;/a&gt;
&lt;blockquote&gt;
Use a method when:
&lt;ul&gt;&lt;li&gt;The operation is a conversion, such as Object.ToString.&lt;/li&gt;
&lt;li&gt;The operation is expensive enough that you want to communicate to the user that they should consider caching the result.&lt;/li&gt;
&lt;li&gt;Obtaining a property value using the get accessor would have an observable side effect.&lt;/li&gt;
&lt;li&gt;Calling the member twice in succession produces different results.&lt;/li&gt;
&lt;li&gt;The order of execution is important. Note that a type's properties should be able to be set and retrieved in any order.&lt;/li&gt;
&lt;li&gt;The member is static but returns a value that can be changed.&lt;/li&gt;
&lt;li&gt;The member returns an array.&lt;/li&gt;&lt;/ul&gt;
&lt;/quote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111393013538473670?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111393013538473670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111393013538473670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111393013538473670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111393013538473670'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/properties-or-getter-methods.html' title='Properties or getter Methods?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111335675698778310</id><published>2005-04-12T21:45:00.000-04:00</published><updated>2005-04-12T21:49:04.410-04:00</updated><title type='text'>"Other Languages": Painless Polymorphism without (explicit) interfaces</title><content type='html'>I'm still undecided on static v. dynamic typing, but I have to say that I love how dynamic typing allows for polymorphism without having to declare or implement interfaces. Polymorphism is a powerful tool, but without good refactoring tools, designing and implementing interfaces in a static language like C# can be a bit of a pain. In Python however, it is completely painless, perfectly natural.

Take these classes defined in Python:
&lt;code&gt;
&gt;&gt;&gt;class Person:
...     Name = ""

&lt;/code&gt;&lt;code&gt;&gt;&gt;&gt;&lt;/code&gt;&lt;code&gt;class Employee(Person):  #Employee is derived from Person
&lt;/code&gt;&lt;code&gt;...     &lt;/code&gt;&lt;code&gt;     JobTitle = ""

&gt;&gt;&gt;class Animal:
&lt;/code&gt;&lt;code&gt;...     &lt;/code&gt;&lt;code&gt;     Type = ""
&lt;/code&gt;&lt;code&gt;...     &lt;/code&gt;&lt;code&gt;     Name = ""
&lt;/code&gt;
Now create a function that prints Names:
&lt;code&gt;
&gt;&gt;&gt;def PrintSomethingWithAName(theNamedThing):
&lt;/code&gt;&lt;code&gt;...     &lt;/code&gt;&lt;code&gt;    print theNamedThing.Name
&lt;/code&gt;
At first the lack of any type specification in that function definition might be a little disconcerting, it certainly is for me. But the key part - which of the above classes do you think you can pass to the function PrintSomethingWithAName?

The answer is all three! If you think about it this makes perfect sense. All three classes do share a common interface - the Name attribute. It just doesn't have to be explicitly declared and implemented. What could be more natural or intuitive?!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111335675698778310?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111335675698778310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111335675698778310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111335675698778310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111335675698778310'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/other-languages-painless-polymorphism.html' title='&quot;Other Languages&quot;: Painless Polymorphism without (explicit) interfaces'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111334250922170834</id><published>2005-04-12T17:48:00.000-04:00</published><updated>2005-04-12T17:51:18.226-04:00</updated><title type='text'>Using the right (scripting) tool for the job</title><content type='html'>One of the toughest things about being a weekend-warrior type do-it-yourselfer around the house is all of the time spent getting ready to do the actual work. More often than not it seems I spend more time running to the store for materials (and some new tool), setting up my work area and cleaning up than I do the actual work itself.

I was talking about this with a friend of mine who is a carpenter by trade. Too my surprise, he said the same thing happens to him. As a matter of fact, he said, he usually gets more done in his house when he leaves his tool trailer on a job - far from home! Most small jobs don't need all of the power tools and gadgets. Usually, you can get by with just a few simple tools if you know how to use them well. My mom is proof. She definitely is not a carpenter, but give her a small hammer and a cordless drill and look out!

When it comes to simple, small tasks on my computer I find that all too often I'm like my friend. No matter how small the job, I tend to reach for the power tools. Need a batch program for selectively moving and renaming files? Fire up VS.NET, new-&gt;C# project. Before I know it I've spent way too much time building forms, lining up controls, trapping events, yadda, yadda, yadda - all to do one simple task, one that I'll probably never do again.

&lt;span style="font-weight: bold;"&gt;Failed Attempts&lt;/span&gt;

I know that C# is overkill for these types of projects, so why do I keep going back?

Because I've never learned to be effective with the right tools. I've flirted with bash, (and grep, gawk, etc., etc.), DOS batch, various windows command line tools and wscript, but never become effective with any. Every time I swear that I'm going to master one of them, and then I'm done with the task and move on.

&lt;span style="font-weight: bold;"&gt;The right tool?&lt;/span&gt;

Enter scripting, er, um, I mean &lt;a href="http://www.activestate.com/Company/NewsRoom/whitepapers.plex"&gt;dynamic &lt;/a&gt;languages. All the power of the 'nix shell script and tools (maybe?), but one consistent syntax and environment. So now I'm re-tackling Python, with the hopes that this time I can stick with it by finding useful things to do with it. And according to &lt;a href="http://www.devsource.com/article2/0,1759,1778141,00.asp"&gt;some pretty smart guys&lt;/a&gt;, dynamic languages may yet take over the world.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111334250922170834?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111334250922170834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111334250922170834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111334250922170834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111334250922170834'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/using-right-scripting-tool-for-job.html' title='Using the right (scripting) tool for the job'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111299294372902123</id><published>2005-04-08T16:03:00.000-04:00</published><updated>2005-04-08T16:42:23.733-04:00</updated><title type='text'>"Other" Languages: The C++ "pure virtual" keyword</title><content type='html'>If you know C++ you're scratching your head, asking "What in the world is he talking about?" If you aren't familiar with C++, I lied in the title of this post. There is no "pure virtual" keyword in C++ - but there should be.

I was sitting at lunch today re-reading &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0201924889?v=glance"&gt;Effective C++&lt;/a&gt; (some great stuff on when to use inheritance v containment v interfaces), when it hit me. For a language that is so often elegant, the declaration of pure virtual functions is down right ugly. A pure virtual function is equivalent to a C# abstract method. In C++ you declare it like this "&lt;code&gt;virtual void foo() = 0;&lt;/code&gt;". The weird "&lt;code&gt;=0&lt;/code&gt;" is what differentiates a pure virtual (abstract in C#) from a simple virtual (virtual in C#). Not only is the syntax ugly and beyond counter-intuitive, but it's called a pure virtual method. So the keyword ought to be "pure" or "pure_virtual" or something along those lines. Gotta' give the point to C# on this one for the abstract keyword.

The whole reason I was even prompted to write this post was this bit of history via &lt;a href="http://apipes.blogspot.com/2005_03_01_apipes_archive.html"&gt;Tim Lesher&lt;/a&gt;:
&lt;blockquote&gt;
For example, in &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0201543303/qid=1110569081/sr=8-1/ref=pd_csp_1/002-2885755-9790462?v=glance&amp;s=books&amp;amp;n=507846"&gt;The Design and Evolution of C++&lt;/a&gt;, Bjarne Stroustrup explains why pure virtual methods use the awkward "&lt;code&gt;virtual foo() = 0;&lt;/code&gt;" syntax rather than a "&lt;code&gt;pure&lt;/code&gt;" keyword: the last standards committee meeting for release 2.0 of the spec was just around the corner, and if he'd suggested adding a "&lt;code&gt;pure&lt;/code&gt;" or "&lt;code&gt;abstract&lt;/code&gt;" keyword, the resulting debate would have delayed inclusion of abstract classes beyond the impeding release of the spec. In other words, a short-term hack, based on the fear of bureaucratic delays, has been enshrined in the language for all time.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111299294372902123?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111299294372902123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111299294372902123' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111299294372902123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111299294372902123'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/other-languages-c-pure-virtual-keyword.html' title='&quot;Other&quot; Languages: The C++ &quot;pure virtual&quot; keyword'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111297972819915558</id><published>2005-04-08T12:29:00.000-04:00</published><updated>2005-04-08T13:02:08.213-04:00</updated><title type='text'>"Other" Languages: The C++ const keyword</title><content type='html'>One of the things I highly value in programming is self-documenting code. Why write a comment if the code can be self-explanatory? In Code Complete, you're encouraged to ask yourself is my method's interface obvious and clear? Unfortunately, sometimes the language itself makes some parts of the interface ambiguous. In C++ the const keyword can greatly reduce such ambiguity.

The C++ const shouldn't be confused with the C# const keyword. In both C# and C++ you can apply this modifier to a local intrinsic type, and it works the same in both languages. But the C++ keyword goes much further. First C++ allows you to apply const to the equivalent of a reference type, effectively making that reference type readonly. This is useful at times, but for me not a showstopper. The real advantage for self-documenting code comes from the fact that you can apply const to method parameters (and return values). This allows you to specify that a method does not as a side effect of its invocation modify the class state. This is the kind of explicitness that makes code more self-documenting.

For example, say I have the following methods in C#:
&lt;code&gt;
static void CallingMethod()
{
Client myClient = new Client();
myClient.Name = “Jason”;
MethodThatTakesClient(myClient);
Console.WriteLine(myClient.Name);
}

//method in some library for which you don’t have the source
static void MethodThatTakesClient(Client someClient)
{
//does some stuff
}
&lt;/code&gt;
In this example, what is the Console.WriteLine in CallingMethod going to print? Chances are your answer is “I don’t know”, and you would be correct. Without pulling out your favorite disassembler you have no way of knowing whether MethodThatTakesClient has changed any of myClient’s state, .Name included. However imagine a C# that supported const parameters in the way C++ does:
&lt;code&gt;
//pseudo C#
static void MethodThatTakesConstClient(const Client someClient)
{
String localName = someClient.Name; // works all day long
//can’t modify someClient it’s const!!
//someClient.Name = “Joe”; &lt;- this won't compile! &lt;/code&gt;
&lt;code&gt;}&lt;/code&gt;
&lt;code&gt; &lt;/code&gt;
If I call MethodThatTakesConstClient I know exactly what is going to happen to myClient's state – nothing! Ahh, sweet bliss from using an explicit interface. Yeah, but what if you declare a method such that its parameter isn’t const? Again you’re still being explicit about your intentions – you intend to modify the parameter. Therefore I’m going to take necessary precautions (i.e. make a copy to pass to your method if I need to, or simply accept that I can’t assume anything about the state).

(Now, I do have to admit C++ does have a back door to this const-ness - you can cast the const parameter to a non-const variable. But to me there's a big difference between a language forcing you to jump through hoops to break a method's expressed contract and a language which forces you to jump through hoops to ever enforce such a contract in the first place. People generally follow the path of least resistance.)

&lt;strong&gt;So why don’t we have const parameter in C# if they’re so great?
&lt;/strong&gt;
There’s some thoughts &lt;a href="http://blogs.msdn.com/slippman/archive/2004/01/22/61712.aspx"&gt;here&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/ericgu/archive/2004/04/22/118238.aspx"&gt;here&lt;/a&gt; and in the links &lt;a href="http://samgentile.com/blog/archive/2002/05/23/925.aspx"&gt;here&lt;/a&gt;. Some argue that for const parameters to even make sense, the BCL would have to use it extensively. (The nature of const parameters is that either you use them from day one in your app, or you don’t. It’s not a good candidate for retro-fitting). Additionally, as one theory goes, MS probably didn’t think they could get the average VB programmer to do or accept something that some would say many C++ programmers fail to do correctly. Regardless, this would be a difficult concept to apply to many languages.

Personally, I tend to think that even a non-CLS compliant support for const parameters in C# would be really useful. A great deal of the applications I work with have large amounts of business and data layer code that have very little BCL interaction. So that argument doesn't stand up very well in my experience. CLS-compliance is important to me, but again it would have little effect on the internals of the business logic I work with everyday, yet this is a place where I could see some real benefits to using const parameters.

&lt;strong&gt;Is there anyway I can achieve the same level of explicitness in C# (or any .NET language)?
&lt;/strong&gt;
Yes, you can. However, it’s a bit of a pain. All you have to is have the class implement two interfaces – a read-only interface which only implements getters and another one that is read-write. (or you could use a base class). Then any method parameters would need to be one interface or the other, making everything explicit. Personally, the additional effort means I reserve this approach for rare occasions when readonly is vital - the rest of the time I just hope for the best.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111297972819915558?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111297972819915558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111297972819915558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111297972819915558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111297972819915558'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/other-languages-c-const-keyword.html' title='&quot;Other&quot; Languages: The C++ const keyword'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111297771953731734</id><published>2005-04-08T12:26:00.000-04:00</published><updated>2005-04-08T12:28:39.536-04:00</updated><title type='text'>"Other" Languages: An Intro</title><content type='html'>My professional work deals primarily with .NET, C# and VB.NET, T-SQL and a little client-side Jscript mixed in from time to time.

But I really enjoy learning other languages and platforms. Over the last few weeks I’ve been rekindling my interest in C++ and Python and decided to blog about the things that I really like about those (and other) languages. Hopefully along the way I’ll understand them better, and maybe some one else will benefit from a managed coder’s perspective on these languages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111297771953731734?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111297771953731734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111297771953731734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111297771953731734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111297771953731734'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/other-languages-intro.html' title='&quot;Other&quot; Languages: An Intro'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111239360685139325</id><published>2005-04-01T17:07:00.000-05:00</published><updated>2005-04-01T17:13:26.853-05:00</updated><title type='text'>C# Tops ComputerWorld Development Survey</title><content type='html'>Computerworld recently conducted a &lt;a href="http://www.computerworld.com/developmenttopics/development/story/0,10801,100542,00.html?source=x10"&gt;developer survey&lt;/a&gt; and found C# to be the leading language in use. The survey found 72% used C# compared to 66% Java, 62% Visual Basic and 54% C++.

To me this solidifies my feeling that .NET developers should be fluent in both VB.NET and C#. While there is still a ton of "classic" VB code out there, I wonder somedays about the future of VB.NET in the enterprise. I wouldn't be comfortable only knowing VB.NET, and certainly hope to keep my C# skills sharp.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111239360685139325?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111239360685139325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111239360685139325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111239360685139325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111239360685139325'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/c-tops-computerworld-development.html' title='C# Tops ComputerWorld Development Survey'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111239305660304655</id><published>2005-04-01T16:43:00.000-05:00</published><updated>2005-04-01T17:04:16.606-05:00</updated><title type='text'>Programming with Exceptions</title><content type='html'>When I first moved to .NET I spent a lot of time trying to understand programming with exceptions. I'll make a seperate post on this later, but I found that there's a lot more to exceptions than, "hey, look .NET has structured exception handling, everybody cheer at how easy it is to catch and throw exceptions". There are solid arguments against using them at all (sticking to the function returns error code model). And when you do use them, you need to be extremely careful - since any call at any time can throw an exception (more &lt;a href="http://blogs.msdn.com/oldnewthing/archive/2005/01/14/352949.aspx"&gt;here&lt;/a&gt;.)

However, since the error model in .NET is largely exceptions I thought &lt;a href="http://www.research.att.com/~bs/3rd_safe.pdf"&gt;this information&lt;/a&gt; from Strousop was excellent guidance for programming with exceptions. It's a bit of tough read at points if C++ is like greek to you, but the basic principles very much apply to .NET. (A briefer summary also by Strousop is &lt;a href="http://www.informit.com/articles/article.asp?p=21084"&gt;here &lt;/a&gt;on Informit, not sure if registration, etc. is required)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111239305660304655?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111239305660304655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111239305660304655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111239305660304655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111239305660304655'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/programming-with-exceptions.html' title='Programming with Exceptions'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111239179492937825</id><published>2005-04-01T16:22:00.000-05:00</published><updated>2005-04-01T16:43:14.930-05:00</updated><title type='text'>Why Crunch Time Doesn't Work</title><content type='html'>Found this great explanation of &lt;a href="http://www.igda.org/articles/erobinson_crunch.php"&gt;Why Crunch Time Doesn't Work &lt;/a&gt; via &lt;a href="http://www.jrothman.com/weblog/archive/2005_03_01_mpdarchive.html#111029561235338902"&gt;Johanna Rothman&lt;/a&gt;.

I've never been a through a true 'death march', but having been through my share of crunches I found that article very informative.

What was surprising to me is the number of studies that show that five eight hour workdays (a 40 hour week) is the only way to achieve sustainable, maximum productivity. I never knew that this number grew out of a great deal of study and research. (I actually never stopped to think where that number came from - that's just the way things are, right?)

Additionally, on 60 hour week, your additional productivity quickly disappears, within 8 weeks or so you're actually getting less productivity than if you had been working 40 hours a week all along. Studies even show that total output working 8 hour days is 16% - 20% higher than total output working 9 hour days.

This was surprising to me. I've always thought that the first week or two of a crunch are extremely productive for me. A 14 hour day of being totally in "the zone", sleeping and resting for 10 and doing it all over again the next day for a few days I can get a lot done. (Admittedly I'm a vegetable for the next two weeks while I try to recover.)  And I never would've imagined that an extra hour a day would have such a negative effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111239179492937825?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111239179492937825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111239179492937825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111239179492937825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111239179492937825'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/04/why-crunch-time-doesnt-work.html' title='Why Crunch Time Doesn&apos;t Work'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111222343627016074</id><published>2005-03-30T17:51:00.000-05:00</published><updated>2005-03-30T17:57:16.270-05:00</updated><title type='text'>.NET Tips: The "right" way to do a Managed entry point</title><content type='html'>Your .NET application's entry point (Sub Main/ static void Main() ) is pretty simple stuff, right? Something simple, like:
&lt;code&gt;
static void Main()
{
&amp;nbsp;&amp;nbsp;Application.Run(new MyMainForm());
}
&lt;/code&gt;
Think again!

Jason Clark does an excellent job of explaining &lt;a href="http://wintellect.com/WEBLOGS/wintellect/archive/2005/03/30/941.aspx"&gt;why the above code should be avoided&lt;/a&gt;, and provides some recommended boiler plate for your entry point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111222343627016074?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111222343627016074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111222343627016074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111222343627016074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111222343627016074'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/net-tips-right-way-to-do-managed-entry.html' title='.NET Tips: The &quot;right&quot; way to do a Managed entry point'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111211407007135689</id><published>2005-03-29T11:29:00.000-05:00</published><updated>2005-03-29T11:34:30.073-05:00</updated><title type='text'>Debugging Tip : ISOLATION</title><content type='html'>Fowler posted this fantastic &lt;a href="http://martinfowler.com/bliki/ErraticTestFailure.html"&gt;debugging tip&lt;/a&gt; on isolation:

&lt;blockquote&gt;
if you [] get [...] intermittent test failures, suspect any data that gets shared between tests&lt;/blockquote&gt;Read the whole post, it's reassuring to see that the "greats" sometimes make the same mistakes we all do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111211407007135689?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111211407007135689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111211407007135689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111211407007135689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111211407007135689'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/debugging-tip-isolation.html' title='Debugging Tip : ISOLATION'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111211314037679615</id><published>2005-03-29T09:54:00.000-05:00</published><updated>2005-03-29T11:19:00.393-05:00</updated><title type='text'>An Investment in Knowledge Always Pays the Best Interest</title><content type='html'>&lt;em&gt;- Ben Franklin.&lt;/em&gt;

A friend pointed me to this &lt;a href="http://www.scottcreynolds.com/PermaLink.aspx?guid=3bac7636-2de7-4046-8fc2-d98fe2afea1e"&gt;post&lt;/a&gt; by Scott Reynolds (actually it's a whole series, check it out), and that led me to this &lt;a href="http://dotnetjunkies.com/WebLog/jhaley/archive/2005/03/26/61428.aspx"&gt;post &lt;/a&gt;by Jason Haley. Both posts resonated deeply with me - not only is my story similiar, but I too feel that knowing what I'm doing is my most valuable asset. (Scott's thought's on knowing what you're doing closely mirror my &lt;a href="http://weblogs.threepines.net/taba/archive/2004/05/05/214.aspx"&gt;thoughts &lt;/a&gt;on the &lt;a href="http://weblogs.threepines.net/taba/archive/2004/05/20/222.aspx"&gt;subject&lt;/a&gt;.)

Both posts reminded me of tip #8 from "&lt;a href="http://www.amazon.com/exec/obidos/ASIN/020161622X/002-5173866-9216833"&gt;The Pragmatic Programmer&lt;/a&gt;". Like most of the tips from that book, it's one I try to follow regularly. Knowledge is our best asset as developers. We need to continually invest in it.

My professional work is entirely with Microsoft products (currently .NET), yet I've found that a great deal of my programming knowledge has come from regularly reading trade magazines and web articles from that &lt;a href="http://java.sun.com/"&gt;other VM based platform&lt;/a&gt;. Structured exception handling, OOP, design patterns, etc., etc., are all things that really are language neutral - and in this case the Java community often seems to have a bit of a head start on us .NET devs (or at least those of us coming from "classic" VB).

I never need to use pointers (or even know what they are) in my day to day VB.NET or C#, nor am I ever concerned with things like the heap or the stack. Yet knowing "just enough" assembly and C, in which such things are right in your face, helps me to have a much deeper understanding .NET. For instance, try understanding or explaining the difference between ByVal and ByRef (especially with regard to reference types), without including pointers, the stack and the heap.

My scant assembler knowledge has often proven invaluable during debugging.

So here's my goals for the year (in no particular order):
&lt;ul&gt;&lt;li&gt;.NET 2.0 (generics, anonymous methods, ASP.NET 2.0, etc.)&lt;/li&gt;&lt;li&gt;Finally get my MCAD&lt;/li&gt;&lt;li&gt;*nix - (&lt;a href="http://cygwin.com/"&gt;cygwin&lt;/a&gt; or &lt;a href="http://www.microsoft.com/windows/sfu/default.asp"&gt;SFU3.5&lt;/a&gt;), become semi-proficient with bash, grep and awk.&lt;/li&gt;&lt;li&gt;Python - actually be able do something useful with it&lt;/li&gt;&lt;li&gt;C++ - Get better with MFC (get beyond text boxes and list views, try some tree views, grids, ADO), with the long term goal of moving to WTL. (I'd like to tackle the STL and templates in general)&lt;/li&gt;&lt;li&gt;Get to know the GoF patterns better. (better == know 80% by name, and be able to create example code off the top of my head for 60%)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111211314037679615?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111211314037679615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111211314037679615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111211314037679615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111211314037679615'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/investment-in-knowledge-always-pays.html' title='An Investment in Knowledge Always Pays the Best Interest'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111188471408737153</id><published>2005-03-26T19:39:00.000-05:00</published><updated>2005-03-26T19:51:54.090-05:00</updated><title type='text'>Installing Access97 when you already have a newer version installed</title><content type='html'>About 9 years ago I developed an accounting app for a volunteer organization, which I've maintained off and on since. It's been about 2 years since I last touched that code, but they recently contacted me to ask for some enhancements.

What a trip down memory lane as I dug out a CD on which I'd archived the source, installed VB6 (boy does that IDE look downright archaic!) and then pulled out my Office97 CDs (the app's reporting and some forms are in Access97).

So the bottom line of this post. If I ever need to install Access97 again, there's a few tricks when you already have a newer version of Office on your pc. Here's the skinny from MS &lt;a href="http://support.microsoft.com/kb/q241141/"&gt;KB article 241141&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111188471408737153?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111188471408737153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111188471408737153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111188471408737153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111188471408737153'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/installing-access97-when-you-already.html' title='Installing Access97 when you already have a newer version installed'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111179051814425776</id><published>2005-03-25T17:25:00.000-05:00</published><updated>2005-03-25T17:41:58.146-05:00</updated><title type='text'>Learning a new (programming) language</title><content type='html'>&lt;a href="http://www.clarkware.com/cgi/blosxom"&gt;Mike Clark&lt;/a&gt; outlines an intriguing way to explore and learn a new language &lt;a href="http://www.clarkware.com/cgi/blosxom/2005/03/18#RLT1"&gt;here&lt;/a&gt;. I loved the idea. My "/code/tests/" directory is littered with little one off command line apps that were my attempt at "figuring out" a particular feature of some language (new or familiar). The idea of throwing all of those into one unit test project is awesome. Additionally I've always liked the idea of letting the language be the definitive reference on itself. Thanks for the tip Mike!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111179051814425776?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111179051814425776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111179051814425776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111179051814425776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111179051814425776'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/learning-new-programming-language.html' title='Learning a new (programming) language'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111178419872599434</id><published>2005-03-25T15:02:00.000-05:00</published><updated>2005-03-25T15:56:38.730-05:00</updated><title type='text'>SCM Best Practices</title><content type='html'>"A tool is only as good as you use it".

That's how the introduction to &lt;a href="http://www.perforce.com/perforce/bestpractices.html"&gt;High-level Best Practices in SCM&lt;/a&gt; begins. We've been having a great amount of discussion and thought here at work in regards to SCM. The move from VSS to SVN has really opened a lot of doors, and we're finding that the change is more than just using a new tool. It's really causing a mind- and process- shift (for the much, much better, IMO).

The recommendations in the above article will likely become part of our process here.

A few that really stood out:

Each codeline (the trunk, branches) should have
&lt;ul&gt;&lt;li&gt;a &lt;em&gt;policy&lt;/em&gt; specifying fair-use and permissible checkins and &lt;/li&gt;&lt;li&gt;an &lt;em&gt;owner&lt;/em&gt; who can interpret and resolve ambiguities in said policy&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Branching: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;branch on incompatible policy.  I found this very enlightening. The others I've read elsewhere, but this helped clarify in my mind what constitutes "necessary" in "branch only when necessary".&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Change propogation:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Make original changes in the most stable branch (the one which has evolved the least since branching)&lt;/li&gt;&lt;li&gt;Propogate early and often&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Builds:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Use common build tools. This really hit home. Currently our dev's "build", selectively building certain projects from within the VS.NET IDE. I was at first really puzzled when Mike Robert's &lt;a href="http://mikeroberts.thoughtworks.net/blog/archive/Tech/ArticlesandPapers/Howtosetupa.NETDevelopmentTree.html"&gt;suggested Dev Tree&lt;/a&gt; included NAnt and build scripts on the dev's machine. Now it makes sense. We should all have the same build, so there are no discrepancies between the build machine and our developer environments.&lt;/li&gt;&lt;li&gt;Source + tools = product. This too clarified greatly for me what our Dev Tree and version control repository should look like.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Process:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Track Change Packages&lt;/li&gt;&lt;li&gt;Track Change Package propogation. I can see the need for these two. I'm just really scared about how well we're going to do with this. I can see where tool help would invaluable. (And I'm assuming Perforce probably has tools for this!). I'll have to look into how SVN or SVN plug-ins might help us here.&lt;/li&gt;&lt;li&gt;Give everything an owner. I love the analogy of ants marching around an obstacle. I've seen this first hand with things like coding standards, etc.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111178419872599434?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111178419872599434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111178419872599434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111178419872599434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111178419872599434'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/scm-best-practices.html' title='SCM Best Practices'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111178076193565839</id><published>2005-03-25T14:41:00.000-05:00</published><updated>2005-03-25T14:59:21.936-05:00</updated><title type='text'>.NET Tips : Using External Config Files in .NET</title><content type='html'>I came across this little tidbit on &lt;a href="http://weblogs.asp.net/pwilson/archive/2003/04/09/5261.aspx"&gt;using External Config Files in .NET&lt;/a&gt; awhile ago, and simply thought, "hey, how cool is that".

Then the other day I came across a great use for it. In our source repository we have a "master" web.config for our project. It's a constant source of frustration though, since individual dev's often have a valid need to change some of the settings. One common example is the database connection string. During development you need it pointing at the Dev database, sometimes a local database, and often during QA bug fixing you'll want it pointed at the QA database. The trouble is when one dev modifies it, we all usually get the change. Hence, external configs to the rescue.

Since we're re-working our &lt;a href="http://mikeroberts.thoughtworks.net/blog/archive/Tech/ArticlesandPapers/Howtosetupa.NETDevelopmentTree.html"&gt;dev tree&lt;/a&gt;, what we're going to do now is have each configuration section in web.config point to an external config called [configSection].config.user. SVN is set to ignore .user files. Each dev can override settings by creating [configSection].config.user, but everyone can rest easy since these changes aren't propogated by the version control. Since these local copies should basically only be used for temporary local overrides, we don't worry that they're not versioned or backed up. And, yes, .NET gracefully handles it if the external doesn't actually exist, making the presence of the file completely optional.

There's a good caution &lt;a href="http://weblogs.asp.net/jgalloway/archive/2003/09/29/29648.aspx"&gt;here &lt;/a&gt; and &lt;a href="http://www.peterprovost.org/archive/2003/04/13/366.aspx"&gt;here &lt;/a&gt;if you use externals in your production environment (ASP.NET monitors web.config, not any externals).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111178076193565839?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111178076193565839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111178076193565839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111178076193565839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111178076193565839'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/net-tips-using-external-config-files.html' title='.NET Tips : Using External Config Files in .NET'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111161242058468722</id><published>2005-03-23T15:51:00.000-05:00</published><updated>2005-03-23T16:13:40.586-05:00</updated><title type='text'>Is there coding life after 40?</title><content type='html'>I'm still a few years from that life milestone, but &lt;a href="http://www.red-gate.com/other/coder_opinion.htm"&gt;The value of experienced coders&lt;/a&gt; was still extremely thought provoking. If you enjoy coding, check it out.

In short, the author (who's over 40) has noted a general feeling in our industry that developer/coder is the bottom rung of a career ladder, a rung to be populated by young, energetic and inexperienced people, and one to be quickly left behind by those who are getting older and more experienced.

I have to say that it's a bit disturbing to me. I've given a lot of thought to my overall career direction. About five years ago I made the jump from professional engineer/hobbyist programmer to professional developer. I love being a developer. I am deeply interested in the architecure space, enjoy mulling on the software development process, and try to keep up with trends in requirements gathering. But right now I love writing code. Now, I can't say that I *never* want to move into management or another non-code space, but it's scary to think that I might have no choice - that there is a limit to how long I can enjoy a career as a developer.

Hmm. Food for thought.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111161242058468722?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111161242058468722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111161242058468722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111161242058468722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111161242058468722'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/is-there-coding-life-after-40.html' title='Is there coding life after 40?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111159983784968370</id><published>2005-03-23T12:07:00.000-05:00</published><updated>2005-03-23T12:43:57.850-05:00</updated><title type='text'>VSTO (CommandBar) problems?</title><content type='html'>The other day I was goofing around with a VSTO solution and kept having problems with Microsoft.Office.Core assembly. Basically, any reference to an object in that namespace (specifically CommandBars in my case) resulted in a null reference exception.

I tore my hair out for awhile, then came across &lt;a href="http://dotnet247.com/247reference/msgs/44/223996.aspx"&gt;this&lt;/a&gt;. Basically my problem was twofold.

1. When using VSTO with Office2K3 never, ever create a reference to the C:\Windows\Microsoft.NET\Framework\v1.1.4322\office.dll. This is an OfficeXP IA.
2. You actually shouldn't normally have to manually reference an Office PIA. There's more detail in the above link, but basically needing a manual reference likely indicates that your PIA's aren't installed correctly. (You should be able to find the following in your GAC - C:\WINDOWS\assembly\GAC\Office\11.0.0.0__71e9bce111e9429c\Office.dl). This is either because you did a default install of Office (which didn't include the PIA's), or you installed Office before the .NET Framework, in which case it won't install the PIA's. (This is what happened to me). The solution is to do a repair of the Office install, being sure to install ".NET programability support" under each piece of Office (Word, Excel, Shared, etc.).
3. There is also a potential for problems when installing an Office hotfix. More &lt;a href="http://dotnet247.com/247reference/a.aspx?u=http://weblogs.asp.net/vsto/archive/2004/01/05/47741.aspx"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111159983784968370?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111159983784968370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111159983784968370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159983784968370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159983784968370'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/vsto-commandbar-problems.html' title='VSTO (CommandBar) problems?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111159683225399474</id><published>2005-03-23T10:50:00.000-05:00</published><updated>2005-03-23T11:53:52.256-05:00</updated><title type='text'>Subversion resources and thoughts</title><content type='html'>As I mentioned Subversion is my latest technology love. The copy-modify-merge mindset took a day or so to sink in, but it's benefits over lock-modify-unlock are easy to see.

We're using the HTTP server (apache) since this gives us NTLM security integration (a huge win), and great accessibility. Locally, I'm using the file based repository and I'm working on moving all of my personal code into this local repository.

IMO, you won't live without &lt;a href="http://tortoisesvn.tigris.org/"&gt;TortoiseSVN &lt;/a&gt;- it's a subversion GUI that integrates with Windows Explorer.

There is a Visual Studio plug-in, called &lt;a href="http://ankhsvn.tigris.org/"&gt;Ankh &lt;/a&gt;. At first I thought this would be a must have. For the last year or so on VSS I've come to rely heavily on the Solution Explorer VSS integration to tell me which files are checked out, and the Pending Check-ins window was the only way to discipline myself to not lock a file too long. But honestly neither of those things is important in the copy-modify-merge style of version control. With those objections aside, I still thought it'd be easier to do my updates and commits from within the IDE, instead of having to switch to Windows Explorer to use Tortoise. The only problem is that Ankh doesn't provide all the features that Tortoise does for resolving merge conflicts. Basically, Ankh will show you via icons next to the files that there are merge conflicts, but it's up to you to fire up your favorite tool to resolve them. Tortoise on the other hand will provide you with a dialog listing all of the conflict files, and allows a double-click on the filename in that list to launch the configured merge tool. So for now, I'm going to pass on Ankh.

Speaking of merge tools  - a great review of various merge/diff tools that integrate with subversion and tortoise can be found &lt;a href="http://iceglue.com/tranqy/PermaLink,guid,28782948-f1de-4094-a4d0-f329987b7de6.aspx"&gt;here&lt;/a&gt;. Having played with most of those that are reviewed, I'd say &lt;a href="http://www.araxis.com/merge/"&gt;Araxis merge&lt;/a&gt; is by far my favorite. I understand Aaron's initial frustration, but I would not characterize the Araxis merge interface as 'clumsy'. The difference between Araxis and say &lt;a href="http://kdiff3.sourceforge.net/"&gt;KDiff3&lt;/a&gt;, is that it's feature set is much greater, so I found that I needed to actually read through the overview in the help file. Once I had done so (and it only took about a few minutes), I found the interface very intuitive - and powerful. To Araxis' credit, when you first run the software a dialog prompts you to read said overview, with a link that will take you to it. I will admit though, that if you're looking to dive in without reading any manuals, the other tools are pretty easy to use. KDiff3 would probably by my recommendation out of the list. It has a pretty full feature set, and you can't beat the price (it's free), whereas Araxis is a commercial offering with an enterprise shop pricetag. One of the things we've bounced around here at work is having one copy of Araxis for heavy duty merging (i.e. bringing a long running dev branch back into the trunk), and as dev's use KDiff3 locally for day-to-day merging.

If you're not very familiar with version control, I'd highly recommend the following books.

&lt;a href="http://svnbook.red-bean.com/"&gt;Version Control with Subversion&lt;/a&gt; is online and free (there are links on the home page to also buy the hardcopy from O'Reilly). Not only is it a great reference manual for subversion itself, but it's full of good theory on version control - &lt;a href="http://svnbook.red-bean.com/en/1.1/ch02s02.html#svn-ch-2-sect-2.3"&gt;copy-modify-merge&lt;/a&gt;, &lt;a href="http://svnbook.red-bean.com/en/1.1/ch04.html#svn-ch-4-sect-1"&gt;branching&lt;/a&gt;, &lt;a href="http://svnbook.red-bean.com/en/1.1/ch04s03.html#svn-ch-4-sect-3.2"&gt;merging&lt;/a&gt;, and much more.

&lt;a href="http://www.pragmaticprogrammer.com/titles/svn/"&gt;Pragmatic Version Control&lt;/a&gt; is a must read. What I loved about it was the balance of the theory and best practices suggestions (the why) and the how. We've passed it around at work, and it's really helped us to "get" the key concepts of version control. On the other hand, all the theory aside, it's been an indispensable reference as well.

I've just recently gotten interested in version control, so I will undoubtedly have more to post as time goes on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111159683225399474?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111159683225399474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111159683225399474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159683225399474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159683225399474'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/subversion-resources-and-thoughts.html' title='Subversion resources and thoughts'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111159272227776967</id><published>2005-03-23T10:29:00.000-05:00</published><updated>2005-03-23T13:12:58.393-05:00</updated><title type='text'>Subversion Tip : Externals URL must be URL encoded</title><content type='html'>A recent do or die need for branching finally pushed us over the edge here at work, and we're dumping VSS. The leading replacement candidate is &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt;. We've been experimenting with it for about two weeks now and I have to say I love it. We're using it with &lt;a href="http://tortoisesvn.tigris.org/"&gt;TortoiseSVN&lt;/a&gt;, which is a fantastic GUI for it.

One gotcha to look out for. The Tortoise GUI nicely handles the repository URLs for you, allowing and displaying special characters. So this means that if your local repository resides at "file:///C:/Documents and Settings/you/My Documents/svn" Tortoise will display this as your URL spaces and all. No problems here, except that underneath the covers svn is storing that URL in it's &lt;a href="http://www.rfc-editor.org/rfc/rfc1738.txt"&gt;RFC 1738&lt;/a&gt; compliant format: "file:///C:/Documents%20and%20Settings/you/My%20Documents". As I mentioned this almost never poses any problems when you're using Tortoise, but it bit me when adding an &lt;a href="http://svnbook.red-bean.com/en/1.1/ch07s03.html"&gt;Externals Definition&lt;/a&gt; to a folder. (An external is similiar to a share in VSS). The URL in the Externals Definition must be &lt;a href="http://www.blooberry.com/indexdot/html/topics/urlencoding.htm"&gt;URL encoded&lt;/a&gt;, if it isn't you'll receive an error "error parsing URL". I spent about 1/2 an hour scratching my head over this one until I went to the svn command line, started poking around and noticed that it displayed the URLs encoded.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111159272227776967?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111159272227776967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111159272227776967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159272227776967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159272227776967'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/subversion-tip-externals-url-must-be.html' title='Subversion Tip : Externals URL must be URL encoded'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111159165559263435</id><published>2005-03-23T10:12:00.000-05:00</published><updated>2005-03-23T10:27:35.593-05:00</updated><title type='text'>.NET Tips : Favor System.Convert over ValueType.ToXxxx()</title><content type='html'>Just read the &lt;a href="http://blogs.msdn.com/bclteam/archive/2005/03/15/395961.aspx"&gt;System.Convert SLAR&lt;/a&gt; by &lt;a href="http://blogs.msdn.com/brada/"&gt;Brad Abrams&lt;/a&gt;. Until now I've often liked the ValueType.ToXxx methods for conversion since they're easy to find. However, as Brad points out the purpose for the System.Convert() class is that it improves maintainability.

To plagerize Brad's example if we have this bit of code
&lt;code&gt;
int i = 10;
double d = Convert.ToDouble(i);
&lt;/code&gt;
A maintenance programmer can later change the type of i to a long and the conversion will still work. Whereas &lt;code&gt;double d = Int32.ToDouble(i);&lt;/code&gt; would need to be modified.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111159165559263435?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111159165559263435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111159165559263435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159165559263435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159165559263435'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/net-tips-favor-systemconvert-over.html' title='.NET Tips : Favor System.Convert over ValueType.ToXxxx()'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111158967628845237</id><published>2005-03-23T09:51:00.000-05:00</published><updated>2005-03-23T09:54:36.290-05:00</updated><title type='text'>Hello Blogger</title><content type='html'>Hello Blogger. Was having some trouble easily posting to my old blog host, so I thought I'd give Blogger a try.

For now I'll leave my old blog up (it can be found &lt;a href="http://weblogs.threepines.net/taba"&gt;here&lt;/a&gt;). When/if I get "comfy" over here, I'll move over.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111158967628845237?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111158967628845237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111158967628845237' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111158967628845237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111158967628845237'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/hello-blogger.html' title='Hello Blogger'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11645564.post-111159747773560455</id><published>2005-03-22T12:04:00.000-05:00</published><updated>2005-03-23T12:04:37.736-05:00</updated><title type='text'>Test Previous date</title><content type='html'>This is just a test.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11645564-111159747773560455?l=jasonlangston.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jasonlangston.blogspot.com/feeds/111159747773560455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11645564&amp;postID=111159747773560455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159747773560455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11645564/posts/default/111159747773560455'/><link rel='alternate' type='text/html' href='http://jasonlangston.blogspot.com/2005/03/test-previous-date.html' title='Test Previous date'/><author><name>Jason</name><uri>http://www.blogger.com/profile/05507889824152048497</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
