Why Are Code Snippets XML?

Today I was going to write my first code snippet. I was tired of writing out the null argument check code in constructors. I figured it would be as easy as just taking some working code, replacing the variable name with a variable, and saving this somewhere. When I open the help….which takes forever and defaults to going on-line which makes me wish I had just googled what I was interested in except that the first link would probably have been a site wanting me to register before showing me the answer…I see that code snippets are effing XML. WHYYYYYY????? If there was ever a case of the misuse of XML to overcomplicate and obfuscate something simple. So my simple little code snippet which should have been something like:

if ($variableName == null)
throw new ArgumentNullException(“$variableName”);

Is this ridiculous XML monstrosity which I won’t even bother to list. It has the big long namespace and the oh-so-familiar overly verbose XML layout that completely sucks for authoring a code snippet. The XML is such a tedious pain in the ass I’m not even going to bother to create the snippet. Instead I spent the time posting this rant. :)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: