<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>/usr/local.com &#187; DevDog</title>
	<atom:link href="http://usrlocal.com/topics/devdog/feed/" rel="self" type="application/rss+xml" />
	<link>http://usrlocal.com</link>
	<description>half true, half interesting, mostly BS</description>
	<lastBuildDate>Fri, 20 Apr 2012 05:28:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Powershell Error checking</title>
		<link>http://usrlocal.com/2012/03/powershell-error-checking/</link>
		<comments>http://usrlocal.com/2012/03/powershell-error-checking/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 15:36:38 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1666</guid>
		<description><![CDATA[Being a programmer by trade, I get thrown into many projects that aren&#8217;t always my forte, but I can figure them out and get them working the way that I want. I&#8217;ve been messing with powershell for a while now with VMware, but never really getting into big time scripting with it. Its mainly be [...]]]></description>
			<content:encoded><![CDATA[<p>Being a programmer by trade, I get thrown into many projects that aren&#8217;t always my forte, but I can figure them out and get them working the way that I want.  </p>
<p>I&#8217;ve been messing with powershell for a while now with VMware, but never really getting into big time scripting with it.  Its mainly be something to use to accomplish some various tasks on mutliple hosts.  Very little error checking in the scripts since I&#8217;m watching them was they run.  If I want to put them into a scheduled task or automate them from a web page, more error checking is needed.</p>
<p>Recently, we starting messing around with automation of Exchange 2010 provisioning using Powershell.  There are some great cmdlets to accomplish this, but I ran into a particular issue that really bothered me as a programmer and since I spent more than 5 minutes unsuccessfully googling the answer, I figured I&#8217;d write this post.</p>
<p>My issue was this, I was attempting to put some wrappers around certain cmdlets to get back whether or not they completed successfully.  I hate to be the bearer of bad news, but shit doesn&#8217;t always run as you think it would.<br />
I think I found a good way of handling the powershell scripts that do not return a true or false and were causing some false positives.</p>
<p>The issue occurred in the functions such as remove-mailcontact where I would have something along the lines of:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">if(remove-mailcontact -identity $ID -Confirm:$false)<br />
{<br />
&nbsp; &nbsp; &quot;+OK Contact Removed&quot;<br />
}<br />
else<br />
{<br />
&nbsp; &nbsp; &quot;-ERR Unable to remove contact.&quot;<br />
}</div></div>
<p>This would alway return the -ERR statement.</p>
<p>So now I have expanded upon that and have the following:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Remove-Mailcontact -Identity $ID -Confirm:$false -DomainController $DC -ErrorVariable:err<br />
if($err)<br />
{<br />
&nbsp; &nbsp; &quot;-ERR Unable to remove contact&quot;<br />
}<br />
else<br />
{<br />
&nbsp; &nbsp; &quot;+OK Contact Removed&quot;<br />
}</div></div>
<p>This second method seems to be doing what I want and goes to the appropriate domain controller so I think I&#8217;m on the right track…we just need to update the various scripts now.  For a little more information on the errorVariable adn other default switches you can pass a cmdlet, check out <a href="http://blogs.msdn.com/b/powershell/archive/2006/11/03/erroraction-and-errorvariable.aspx">this blog post</a> from the <a href="http://blogs.msdn.com/b/powershell/">Microsoft PowerShell Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/03/powershell-error-checking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HMC CreateFolder</title>
		<link>http://usrlocal.com/2011/09/hmc-createfolder/</link>
		<comments>http://usrlocal.com/2011/09/hmc-createfolder/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 20:38:39 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Micro$oft]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[HMC 4.5]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1507</guid>
		<description><![CDATA[Today I had the chance to get back to some code for CreateFolder which creates a public folder within our Exchange 2007 environment support by Microsoft&#8217;s Hosted Messaging and Collaboration frame work. I&#8217;ve been highly critical of Microsoft&#8217;s code before, and today has taken that to a new level. Here is what I&#8217;m dealing with. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had the chance to get back to some code for CreateFolder which creates a public folder within our Exchange 2007 environment support by Microsoft&#8217;s Hosted Messaging and Collaboration frame work.   I&#8217;ve been highly critical of Microsoft&#8217;s code before, and today has taken that to a new level. </p>
<p>Here is what I&#8217;m dealing with.  First, let&#8217;s go to the <a href="http://technet.microsoft.com/en-us/library/dd278530.aspx">documentation on TechNet</a>: </p>
<p>Pretty clear that we have a few required parameters and a few optional ones to set some quotas.  These optional parameters are what will soon drive me to uncontrollable rage.</p>
<p>Next, let&#8217;s look at the example directly from the web service.  Here&#8217;s what it states we can pass:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">POST /mpsws/ManagedEmail2007/Service.asmx HTTP/1.1<br />
Host: prov01.bacon.lightedge.com<br />
Content-Type: text/xml; charset=utf-8<br />
Content-Length: length<br />
SOAPAction: &amp;quot;http://provisioning.microsoft.com/webservice/managedemail2007/CreateFolder&amp;quot;<br />
<br />
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;<br />
&amp;lt;soap:Envelope xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/soap/envelope/&amp;quot;&amp;gt;<br />
&nbsp; &amp;lt;soap:Body&amp;gt;<br />
&nbsp; &nbsp; &amp;lt;CreateFolder xmlns=&amp;quot;http://provisioning.microsoft.com/webservice/managedemail2007&amp;quot;&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &amp;lt;CreateFolderRequest xmlns=&amp;quot;http://provisioning.microsoft.com/managedemail2007&amp;quot;&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;Data&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;organization&amp;gt;string&amp;lt;/organization&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;preferredDomainController&amp;gt;string&amp;lt;/preferredDomainController&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;name&amp;gt;string&amp;lt;/name&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;path&amp;gt;string&amp;lt;/path&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;server&amp;gt;string&amp;lt;/server&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;maxItemSize&amp;gt;string&amp;lt;/maxItemSize&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;postStorageQuota&amp;gt;string&amp;lt;/postStorageQuota&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;storageQuota&amp;gt;string&amp;lt;/storageQuota&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;/Data&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &amp;lt;/CreateFolderRequest&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &amp;lt;sendCredentials&amp;gt;boolean&amp;lt;/sendCredentials&amp;gt;<br />
&nbsp; &nbsp; &amp;lt;/CreateFolder&amp;gt;<br />
&nbsp; &amp;lt;/soap:Body&amp;gt;<br />
&amp;lt;/soap:Envelope&amp;gt;</div></div>
<p>Again, everything looks great.  postStorageQuota and storageQuota are both there and seem perfectly reasonable.  </p>
<p>So let&#8217;s actually SEND that command to the web service.  Here&#8217;s the error I get back:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">The element 'CreateFolder_Request' in namespace 'http://provisioning.microsoft.com/exchange2007provider' has invalid child<br />
element 'postStorageQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'. List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'.The element 'CreateFolder_Request' has invalid child element 'postStorageQuota' . List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' .</div></div>
<p>You get this is you change PostStorageQuota to prohibitPostQuota.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">The element 'CreateFolder_Request' in namespace 'http://provisioning.microsoft.com/exchange2007provider' has invalid child element 'storageQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'. List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' in namespace 'http://provisioning.microsoft.com/exchange2007provider'.The element 'CreateFolder_Request' has invalid child element 'storageQuota' . List of possible elements expected: 'prohibitPostQuota, server, issueWarningQuota' .</div></div>
<p>In case you missed it, they changed the variable with in the back end server code, and failed to tell anyone that they made this change.  Awesome!</p>
<p>This appeared only after we made the jump up to HMC 4.5 rollup 9.  Before the PostStorageQuota and StorageQuota worked as expected.  Needless to say, I&#8217;m less than impressed that they changed properties on me and failed to update the documentation OR the web service example.  I guess figuring this out with trial by fire is the way that Microsoft expects you to learn.  Thanks Microsoft!</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2011/09/hmc-createfolder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When to kill a product</title>
		<link>http://usrlocal.com/2011/07/when-to-kill-a-product/</link>
		<comments>http://usrlocal.com/2011/07/when-to-kill-a-product/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 13:00:50 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1288</guid>
		<description><![CDATA[I&#8217;ve been out of college now for more than a decade and have worked for only a handful of companies. For a lot of people my generation, I&#8217;m probably seen as a dinosaur by not changing jobs every year once my stock options were vested. But seeing as I&#8217;ve had a chance to move up [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been out of college now for more than a decade and have worked for only a handful of companies.  For a lot of people my generation, I&#8217;m probably seen as a dinosaur by not changing jobs every year once my stock options were vested.   </p>
<p>But seeing as I&#8217;ve had a chance to move up in companies and produce multiple products, I have a different appreciation for product lifespan and code rot.  </p>
<p>Product lifespan?  Code Rot?  What the hell is this loon talking about?</p>
<p>Software is much like owning a house,  you have to maintain it.  Issues (bugs) are found, new technology comes out that will make your product more stable and possibly cheaper to run.   New advances in design and layout require a fresh coat of paint from time to time.  </p>
<p>Eventually the software is a bit too much of a mess.  Sometimes you have to gut a room or two.  Sometimes, you just have to tear the whole damn thing down.  </p>
<h2>How do you know when its time?</h2>
<p>For me, there isn&#8217;t one question that clearly lets you know when its time.  For example: When was the last time you gave the product any love?  When was the last time you added a feature or fixed a bug?  When did you give it some marketing dollars?  Has it been so long that you can no longer remember?  Have you been distracted by other products?  When was the last time you had a signup?    </p>
<p>Its OK to admit that you have been ignoring a product.  But now you have to ask yourself, how much is this costing me a month?  How often is support getting calls on it?  What are my hosting costs for keeping this around? Am I still making money?  <em>Would I have a company if this was my only product?</em>  </p>
<p>It quickly becomes clear on what you should do.  We have a product at our company that hasn&#8217;t done as well as I would have liked.  To be honest, it has a lot of issues.  Most of which are out of our control.  Due to licensing, its priced too high and competes with &#8220;free&#8221; alternatives even if they are less secure.  It has maybe a couple hundred users on it and if it was our only product, we would have shut the doors a while ago.  Its time for it to go.</p>
<h2>Dealing with the breakup</h2>
<p>So the hard stuff now has to happen.  You have to either tell your customers to go away, or find an alternative that maybe you&#8217;re reselling, maybe not.  There is a good chance that they&#8217;re not going to like what you are going to tell them.  Break it to them easy, give them PLENTY of time to migrate away from your company if they choose.  Bend over backwards to any request that they have for getting their data.  After all, its THIER data!   Helping users move their one service will hopefully keep those customers on the other services that they have with you.  </p>
<p>In the end, this is best for the company.  Even if you lose a customer or two, its best in the end.  Even with the lost revenue, there is hopefully a huge reduction in expenses that can now be pushed to your money making products.   And yes, even with repeating this to yourself, it will still suck.  Good luck my friends.  </p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2011/07/when-to-kill-a-product/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shipping Code</title>
		<link>http://usrlocal.com/2011/02/shipping-code/</link>
		<comments>http://usrlocal.com/2011/02/shipping-code/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 12:00:40 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1231</guid>
		<description><![CDATA[As a programmer, I have had the joy of seeing a lot of my code ship with various projects in my career. One thing that I have found is, no matter how much I have tested, no matter how solid I feel about the code, there is always that moment of anxiety right before it [...]]]></description>
			<content:encoded><![CDATA[<p>As a programmer, I have had the joy of seeing a lot of my code ship with <a href="http://hostmail.com/">various</a> <a href="http://mailfoundry.com/">projects</a> in my career.   One thing that I have found is, no matter how much I have tested, no matter how solid I feel about the code, there is always that moment of anxiety right before it ships.     Its a natural feeling as a programmer to have these.   You constantly strive for perfection but in the back of your mind you know that you&#8217;re a human who makes mistakes.  </p>
<p>Today is one of those days.  We launch our revamped customer portal to our internal employees.   Let&#8217;s hope all goes as planned.</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2011/02/shipping-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 Rules</title>
		<link>http://usrlocal.com/2011/01/3-rules/</link>
		<comments>http://usrlocal.com/2011/01/3-rules/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 13:00:05 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Rule 3]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=236</guid>
		<description><![CDATA[There are 3 basic rules to software programming. Most people don&#8217;t know them. Or if they do, they probably don&#8217;t know how to properly articulate them. So I&#8217;m going to spell out the 3 rules for you. This was talked about a lot at my last job early on when dealing with problems and support [...]]]></description>
			<content:encoded><![CDATA[<p>There are 3 basic rules to software programming.  Most people don&#8217;t know them.  Or if they do, they probably don&#8217;t know how to properly articulate them.  So I&#8217;m going to spell out the 3 rules for you.  This was talked about a lot at my last job early on when dealing with problems and support issues.   Just about everything came back to one of these 3 rules, and unfortunately, rule 3 was more popular than even we believed.  </p>
<h3>Rule 1:  Computers are too hard to use.</h3>
<p>     Sounds simple, but its still true.  I&#8217;m in my early 30s and there are a lot of programmers that are younger than me that don&#8217;t understand this.  They&#8217;ve always been around computers so it makes sense to them.  Now, put that same computer that you have been flying around on in front of your parents or grandparents.  Suddenly, computers are hard to use.  This isn&#8217;t as big of a problem as it was 5 or 10 years ago.  But it is still very much a problem.  Especially when you are doing something that no one else has done before.</p>
<h3>Rule 2:  The internet is too hard to use.</h3>
<p>  The web changes at the blink of an eye and for the average user, this can be a scary thing.  Imagine a site that you have been using for a year or two.  You know where everything is, its clearly laid out, and its comfortable like an old pair of jeans.   Now, imagine you log into your computer and now it has been updated with the latest web 2.0 technologies.  All of a sudden, you have to relearn everything on the site.  Hopefully, they&#8217;ve done a good job and everything flows the way that it should and the users don&#8217;t revolt.   Intuitive design is not something that comes naturally to all developers.  For some sure, but for many they think about completing the tasks that they were assigned and it works for them because they developed it.  A/B testing, User Acceptance Testing, all foreign concepts to this type of programmer.</p>
<h3>Rule 3:  People are stupid.</h3>
<p>  Wow, I could go on this one for a while.  But unfortunately, there are certain users no matter how good your design is, how good the on screen help is, and how good the training / manual is, they will find a way to be confused or break your application.   Every day, the world is creating a better idiot. </p>
<p>Here&#8217;s one of my favorite examples:<br /><img src="/wp-content/uploads/2009/02/spam.gif" alt="aol report spam button" title="aol report spam button" width="264" height="156" class="aligncenter size-full wp-image-246" /></p>
<p>At my last job with our <a href="http://hostmail.com/">hosted email product</a>, we allowed users to forward their mail to an outside account.  Many of which forwarded to their <a href="http://www.aol.com">AOL</a> accounts.   Normally this wouldn&#8217;t be a huge deal except that many AOL users take the &#8220;report spam&#8221; button and the &#8220;delete&#8221; button to be the same thing and are located way too close together.  To the end user, it does the same thing.  The message goes away.  But to system administrators, this gets your servers blocked when the &#8220;report spam&#8221; link is used.    Could this be too many people mis-clicking?  Could this be people not reading?  Could this be people being stupid?  The answer may be all of the above.  But eventually, it comes down to, no matter how clearly the button is marked, how clearly it is laid out.  People will still surprise you with how stupid they can be.</p>
<p>Yes, it sounds mean and I&#8217;m not going to say that I haven&#8217;t done something stupid on a computer.   I have, I can admit that.  But even I can admit that I was stupid after I realized that I had done.  It happens to the best of us.      At the end of the day,  it all comes back to the developer/designer though. You failed to make your application intuitive and when someone does something that you weren&#8217;t expecting, you didn&#8217;t fail in a graceful way that got the user back on track.  </p>
<h3>Call to Action!</h3>
<p>So what can we do as programmers and designers?  Well, remember that the internet is a wonderful place and that 80% of your users will never have an issue.  Its the 20% that makes it hard and we will constantly be working to make the internet a better place.  </p>
<p>I follow this simple rule when programming:  <strong>How would my dad use this application? </strong>  He falls into rule #1 and rule #2 due to his age and his former career.   He&#8217;s a retired elementary gym teacher so he didn&#8217;t have to use a computer all that often.   He uses one now at home quite often and does well, but he&#8217;s still intimidated about messing something up.    So if I can put in graceful failures, useful dialogs and whatever other help I can give him along the way, this helps make my applications as usable as possible.   </p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2011/01/3-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptogram #1 &#8211; Solution</title>
		<link>http://usrlocal.com/2010/02/cryptogram-1-solution/</link>
		<comments>http://usrlocal.com/2010/02/cryptogram-1-solution/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 13:00:42 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Contests]]></category>
		<category><![CDATA[Cryptogram]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=854</guid>
		<description><![CDATA[So, its been a few days, did you figure out the solution to our first cryptogram? This one I thought was pretty easy if you are a geek. And seeing as my blog is pretty tech related, I figured that a lot of people would get this one. Maybe its just me, but when I [...]]]></description>
			<content:encoded><![CDATA[<p>So, its been a few days, did you figure out the solution to our <a href="http://usrlocal.com/2010/02/cryptogram-1/">first cryptogram?</a></p>
<p>This one I thought was pretty easy if you are a geek.   And seeing as my blog is pretty tech related, I figured that a lot of people would get this one.    Maybe its just me, but when I see certain encoded lines, I can pretty much guess that they are encoded with base64.  Maybe I&#8217;ve been around email too long.</p>
<p>So if you took our fabulous line and pasted it into any one of a million base64 decoders out there, you would get the following:</p>
<blockquote><p>With faith and hope, the dream begins anew</p></blockquote>
<p>It was also a somewhat recent facebook status of mine.  The new cryptogram will be coming out in a few days.  Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2010/02/cryptogram-1-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptogram #1</title>
		<link>http://usrlocal.com/2010/02/cryptogram-1/</link>
		<comments>http://usrlocal.com/2010/02/cryptogram-1/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 12:00:11 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Contests]]></category>
		<category><![CDATA[Cryptogram]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=830</guid>
		<description><![CDATA[So I&#8217;m experimenting with a little contest to see how smart my 3 readers actually are. Every couple of weeks I&#8217;m going to post a puzzle. They&#8217;ll be pretty easy to start off with and get increasingly more difficult as time goes by and I have time. Without further ado, here is the first cryptogram. [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m experimenting with a little contest to see how smart my 3 readers actually are.  Every couple of weeks I&#8217;m going to post a puzzle.  They&#8217;ll be pretty easy to start off with and get increasingly more difficult as time goes by and I have time.  </p>
<p>Without further ado, here is the first cryptogram.  </p>
<p>V2l0aCBmYWl0aCBhbmQgaG9wZSwgdGhlIGRyZWFtIGJlZ2lucyBhbmV3</p>
<p>Good luck!</p>
<p><em>For each cryptogram, the solution will be posted the following Monday</em>.</p>
<p><em>Update:  Answers are posted on Wednesday, not Mondays.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2010/02/cryptogram-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A device attached to the system is not functioning</title>
		<link>http://usrlocal.com/2009/08/a-device-attached-to-the-system-is-not-functioning/</link>
		<comments>http://usrlocal.com/2009/08/a-device-attached-to-the-system-is-not-functioning/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 04:19:02 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Micro$oft]]></category>
		<category><![CDATA[HMC 4.5]]></category>
		<category><![CDATA[Microsoft Bugs]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=630</guid>
		<description><![CDATA[As you&#8217;ve read before, I&#8217;ve had a variety of battles with the Hosted Messaging and Collaboration framework from Microsoft. Today was another day for battle. And an interesting battle it was. So here is the situation that I was running into. Within my code in the customer portal, I have a notification that is sent [...]]]></description>
			<content:encoded><![CDATA[<p>As you&#8217;ve <a href="http://usrlocal.com/tag/hmc-45/">read</a> <a href="http://usrlocal.com/tag/hmc/">before</a>, I&#8217;ve had a variety of battles with the <a href="http://www.microsoft.com/hosting/solutions/hostedmessaging.mspx">Hosted Messaging and Collaboration</a> framework from <a href="http://microsoft.com/">Microsoft</a>.</p>
<p>Today was another day for battle.    And an interesting battle it was.</p>
<p>So here is the situation that I was running into.  Within my code in the customer portal, I have a notification that is sent out that has a full back trace of what happened on the system, what was inputted and what was the error message that was returned.  I of coarse try to give the user a friendly version of the error message to the screen before sending off this plethora of valuable detail.    Out of this pile of data, I find the following error message has been returned:</p>
<p>&#8220;A device attached to the system is not functioning&#8221;</p>
<p>Really?  Let&#8217;s look at that again.  Because surely no one in their right mind would return such a generic error!</p>
<p>&#8220;A device attached to the system is not functioning&#8221;</p>
<p>Hmm, my clue-by-four hasn&#8217;t been brought out recently and plane tickets to Redmond aren&#8217;t <em>that</em> expensive right now.  I guess I could go out there and start handing out clues.    But why would I need to.   This error message is clear and concise.  A device attached to the system is not functioning.    What more could I possibly need from this error message.  It gives me everything I want!  There&#8217;s a device, its one of 30 or so devices in the system, that is not functioning.  </p>
<p>HOW ABOUT WHICH DEVICE YOU FUCKTARDS!!!!!!!</p>
<p>So we check out the domain controllers, the MPS servers, the web servers, OCS pools, exchange queues, look at SCOM alerts.  Nothing pops out at us.  Then I take a look a bit further at the error message.  here is the full error message that I get back:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Server was unable to process request. ---&amp;gt; Unable to create 'cn=user@domain.com'./A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)/Create Object -- &amp;gt;&amp;lt;response&amp;gt;&amp;lt;errorContext description=&quot;Unable to create'cn=user@domain.com'./Adevice attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)/Create Object&quot; code=&quot;0x8007001f&quot; executeSeqNo=&quot;58&quot;&amp;gt;&amp;lt;errorSourcenamespace=&quot;Error Provider&quot; procedure=&quot;SetError&quot;/&amp;gt;&amp;lt;errorSourcenamespace=&quot;Managed_Active_Directory&quot; procedure=&quot;RethrowError_&quot;/&amp;gt;&amp;lt;errorSourcenamespace=&quot;Managed_Active_Directory&quot;procedure=&quot;TryCreateSamObject_&quot;/&amp;gt;&amp;lt;errorSourcenamespace=&quot;Managed_Active_Directory&quot;<br />
procedure=&quot;CreateSamObject_&quot;/&amp;gt;&amp;lt;errorSourcenamespace=&quot;Managed_Active_Directory&quot; procedure=&quot;CreateUser_&quot;/&amp;gt;&amp;lt;errorSourcenamespace=&quot;Managed_Active_Directory&quot; procedure=&quot;CreateUser&quot;/&amp;gt;&amp;lt;errorSourcenamespace=&quot;Hosted Active Directory&quot;procedure=&quot;CreateUser&quot;/&amp;gt;&amp;lt;/errorContext&amp;gt;&amp;lt;/response&amp;gt;</div></div>
<p>The CreateSamObject_ raised a red flag to two.   If you search Google long enough you&#8217;ll eventually find something from MSDN stating the following:</p>
<p>From MSDN: </p>
<blockquote><p>User account names are limited to 20 characters and group names are limited to 256 characters. In addition, account names cannot be terminated by a period and they cannot include commas or any of the following printable characters: &#8220;, /, \, [, ], :, |, <, >, +, =, ;, ?, *. Names also cannot include characters in the range 1-31, which are nonprintable</p></blockquote>
<p>Eureka!  We have found the issue!!!</p>
<p>The sAMAccountName for our system is pretty generic.  Cut down the upn to 16 characters.  Add a period and a unique key that we keep for each of our domain names.  This way, the chances of you duplicating names both inside and outside of your OU is pretty limited.  However, in this case there was an error with retrieving the unique 3 letter key for the end of the name so the sAMAccountName that we were attempting to set looked something like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;property name='sAMAccountName' &amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &amp;lt;value&amp;gt;user_domain.&amp;lt;/value&amp;gt;<br />
&amp;lt;/property&amp;gt</div></div>
<p>This was an easy fix once we found the issue.  But man, could there be a crappier error message from HMC?  I mean seriously, how do you get from unable to create the sAMAccountName to a device attached to the system is not functioning?!?!?</p>
<p>Anyway, I figured that I would type this up, let the search engines find it and hopefully someone else can benefit from our digging through the depths of HMC.</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/08/a-device-attached-to-the-system-is-not-functioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Character == World of Suck</title>
		<link>http://usrlocal.com/2009/06/one-character-world-of-suck/</link>
		<comments>http://usrlocal.com/2009/06/one-character-world-of-suck/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 05:00:23 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[doh!]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=508</guid>
		<description><![CDATA[Ladies and Gentlemen, today you are going to learn a lesson on why you do NOT edit the active directory directly for exchange attributes. Background A long time ago, we had a very crappy provisioning system for our hosted Exchange 2003 platform. It worked ok, but missed a lot of things that we wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>Ladies and Gentlemen, today you are going to learn a lesson on why you do NOT edit the active directory directly for exchange attributes.  </p>
<p><strong>Background</strong><br />
A long time ago, we had a very crappy provisioning system for our hosted Exchange 2003 platform.  It worked ok, but missed a lot of things that we wanted to have set.  They also were kind of pricks when it came to licensing so making a ton of money on the platform was hard to do.   So, we decided to roll our own.  It wasn&#8217;t that hard to reverse engineer what was being set for users, groups and contacts.  There were a few obstacles of coarse but we were able to get a pretty good provisioning system setup.  However, this too had its faults.  Sure we had total control over the code and could update things as we needed.  But we were still working in a void.  We really didn&#8217;t know _everything_ that was happening on the system that needed to actually happen.  Plain and simple, we were missing things.  Not to mention future services would require the same amount of dev time reverse engineering what needed to be set.  That&#8217;s not a scalable solution.</p>
<p>So, when it came time to roll out our Exchange 2007 environment, we have moved over to <a href="http://www.microsoft.com/hosting/solutions/hostedmessaging.mspx">HMC</a> and for the most part, things have been a lot happier.  </p>
<p><strong>The Issue</strong><br />
Since we have this shiny new 2007 platform, we thought it was in our best interest to start migrating our users from the 2003 platform and away from the old clunky provisioning.    So far we have moved some smaller customers and everything has gone pretty smooth.   Certain customers have required the migration to happen in stages so we have come up with a decent solution to make this as smooth as possible.    We define the list of users to migrate, setup a temporary domain on the 2003 platform, add smtp aliases to the users on the 2007 platform and then enable forwarding on the 2003 platform to the 2007 temporary smtp alias.   All mail still flows as it did before, its just that some users happen to be on the 2007 platform getting their email.   Easy as can be right?</p>
<p>Well, the users that we have moved so far have been fairly small customers.  So the need for automating certain aspects of the move have been put off.  There is a lot of automation that happens, but some of the tasks were put off such as the setting of the forwarding address.</p>
<p>That is, until last week.  Last week we were starting to move one of the bigger customers so I setup a script that would take the users that were being moved and automatically set the forwarding address.  Here is the code that I had in place to figure out the forwarding address:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // need to add forwarding address here.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; list($tuname, $tdmn) = explode(&quot;@&quot;, $user['mail']);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // new address<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $fwd = &quot;{$tuname}@{$newdomain}\n&quot;;</div></div>
<p>Notice the $fwd variable.  This is where the trouble begins.  You can ignore the {} as those simply tell the parser that these are valid variables contained within the string.  </p>
<p>No, the real issue is at the end of the line.  Specifically, the \n.    Technically, you can set the AD object to whatever you want.  It will take this as a value. However, Exchange does <strong>not</strong> like this.  With forwarding in exchange, you set the forwarding to an object.  Typically another user, group of contact.  Since we allow for users to forward to multiple people, we create a group automatically and populate that with one or more users, groups or contacts.  </p>
<p>Now for the really bad part. I&#8217;m not sure if this is just Exchange 2003 or if others are affected as well.  But when you forward to a group that contains a single contact object that has invalid characters, your email message with be lost in the ether.  Gone, Kaput, Not even an NDR will be generated.  We were unable to even find logs that the message came in it failed that spectacularly.  </p>
<p><strong>Conclusion</strong><br />
So the moral of the story is, don&#8217;t do what we did.  <a href="http://microsoft.com">Microsoft</a> will tell you the exact same thing.  Its <strong>dumb</strong> to do what we did.  You should not be messing with the AD attributes directly in this instance.  There is a certain level of error checking that must take place at the upper levels which were missed by both my script, and the provisioning system.    But in the same breath,  I can&#8217;t say for sure that HMC was mature enough to use when we first rolled out the 2003 platform.   So whether it is you editing AD directly or someone else doing it, its just as bad.    It just depends on how much control you want over the gun pointed at your head.  </p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/06/one-character-world-of-suck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BESUserAdminClient.exe find issues</title>
		<link>http://usrlocal.com/2009/06/besuseradminclientexe-find-issues/</link>
		<comments>http://usrlocal.com/2009/06/besuseradminclientexe-find-issues/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 01:00:36 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Bugs]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=512</guid>
		<description><![CDATA[For our Hosted Exchange 2007 environment, we offer a BlackBerry Enterprise Server that allows users to connect their crackberries and have the full functionality that one expects with these devices. Various automation scripts have been put in place that make it easy for the user to see who has BlackBerry enabled for their account, add [...]]]></description>
			<content:encoded><![CDATA[<p>For our <a href="http://www.lightedge.com/productsservices/it/exchange_overview.html">Hosted Exchange 2007</a> environment, we offer a BlackBerry Enterprise Server that allows users to connect their crackberries and have the full functionality that one expects with these devices.</p>
<p>Various automation scripts have been put in place that make it easy for the user to see who has BlackBerry enabled for their account, add additional users and so on.   Today, we discovered a rather annoying feature that exposed a bug in our code.  Not a horrible bug, but one that did affect the user and their experience with the customer portal.</p>
<p>Here is the basics of the bug.  We use the BESUserAdminClient.exe program with the <em>find</em> option to find users.  We then search the results for something along the lines of &#8220;(bar@domain.com) 1 results found.&#8221;   Unfortunately, we were getting false positives on our searches.  bar@domain.com does not exist on our BES system.  However, foobar@domain.com does.   So if you search for bar@domain.com, what you are really search for is *bar@domain.com*   I can&#8217;t say the last wild card is there, but the first definitely is.   </p>
<p>What we found was that in order to improve our search, we needed to add a -v flag to the search string.  That returned our &#8220;(bar@domain.com) 1 results found.&#8221; as before.  But this time we found the results also returns a CSV result that had a whole bunch of information such as:  &#8220;User name,MailBoxDN,ServerDN,PIN,Device Type,State,Message Server,Forwarded,Sent,Pending,Filtered,Expired,&#8230;.&#8221;   This also exposed that the result that we were getting was actually foobar@domain.com!</p>
<p>The solution was to now search the verbose (-v) results for SMTP:user@domain.com and we would now get the desired result back.  We would no longer find foobar@domain.com when we really wanted to see if bar@domain.com exists.</p>
<p>I can&#8217;t really call this a bug per se.  But I consider it an over site in the documentation of the function.  It would be nice if there was a flag that I could pass it that would force it to only search for bar@domain.com and NOT *bar@domain.com*</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/06/besuseradminclientexe-find-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

