<?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, 23 Jul 2010 04:27:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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 [...]]]></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 [...]]]></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 [...]]]></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>
<p><code><br />
Server was unable to process request. ---&gt; Unable to create 'cn=user@domain.com'./A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)/Create Object -- &gt;&lt;response&gt;&lt;errorContext description="Unable to create'cn=user@domain.com'./Adevice attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)/Create Object" code="0x8007001f" executeSeqNo="58"&gt;&lt;errorSourcenamespace="Error Provider" procedure="SetError"/&gt;&lt;errorSourcenamespace="Managed_Active_Directory" procedure="RethrowError_"/&gt;&lt;errorSourcenamespace="Managed_Active_Directory"procedure="TryCreateSamObject_"/&gt;&lt;errorSourcenamespace="Managed_Active_Directory"<br />
procedure="CreateSamObject_"/&gt;&lt;errorSourcenamespace="Managed_Active_Directory" procedure="CreateUser_"/&gt;&lt;errorSourcenamespace="Managed_Active_Directory" procedure="CreateUser"/&gt;&lt;errorSourcenamespace="Hosted Active Directory"procedure="CreateUser"/&gt;&lt;/errorContext&gt;&lt;/response&gt;<br />
</code></p>
<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>
<p><code>&lt;property name='sAMAccountName' &gt;<br />
        &lt;value&gt;user_domain.&lt;/value&gt;<br />
&lt;/property&#038;gt</code></p>
<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 [...]]]></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>
<p><code>            // need to add forwarding address here.<br />
            list($tuname, $tdmn) = explode("@", $user['mail']);<br />
            // new address<br />
            $fwd = "{$tuname}@{$newdomain}\n";</code></p>
<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 additional [...]]]></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>
		<item>
		<title>No server restart?</title>
		<link>http://usrlocal.com/2009/03/no-server-restart/</link>
		<comments>http://usrlocal.com/2009/03/no-server-restart/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 13:00:23 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=366</guid>
		<description><![CDATA[I follow quite a few blogs of various people that make headlines and have a coding background.  One person in particular that somehow made the list many moons ago that I have failed to remove is Leah Culver.  I think it was her ties to the midwest and the fact that she seems [...]]]></description>
			<content:encoded><![CDATA[<p>I follow quite a few blogs of various people that make headlines and have a coding background.  One person in particular that somehow made the list many moons ago that I have failed to remove is <a href="http://leahculver.com">Leah Culver</a>.  I think it was her ties to the midwest and the fact that she seems to be putting her ass out there with <a href="http://pownce.com/">Pownce</a> (which has since had to close its doors).</p>
<p>In her <a href="http://leahculver.com/2009/03/20/this-data-format-feels-wrong/">latest post</a>, she talks about writing a plugin for <a href="http://www.djangoproject.com/">Django</a>.   If you are unfamiliar with django, it is a web framework written in python which loosely follows the model-view-controller design pattern (<a href="http://en.wikipedia.org/wiki/Django_(web_framework)">source</a>).  </p>
<p>Before I go on trashing the comments in the post, I&#8217;d like to note, I&#8217;m not a django developer and never have been.   But I think that my overall points come back to good design and practices.</p>
<p>Ok,  May I direct your attention to <a href="http://github.com/leah/django-elsewhere/commit/b97a88ab770d4d69b899728b9f244f319cd95500#comment_17088">this comment</a> made by Leah.     </p>
<p>Let&#8217;s take the only advantage first, &#8220;can update on the fly, no server restart&#8221;.    This is a web framework correct?  Why the hell are you restarting!?!?!  I&#8217;m clearly missing something here but for all the web apps that I have created, a restart isn&#8217;t required.   A reload of my web browser is, but I&#8217;ve never had to restart my application or web server.  I&#8217;m really not sure what she is referring to here exactly so I&#8217;m guessing I&#8217;m missing something major here.  Maybe the application she is developing for requires an application server that needs to be restarted in which case it would make sense.    But for some reason, I&#8217;m not thinking that is the case.  Someone please explain this one to me in the comments.  </p>
<p>In the disadvantages of using a DB, I have a big problem with #1, &#8220;slooooow&#8221;.  If your database is slow, it is usually one of four issues:</p>
<ol>
<li><strong>Bad Code/Database Design</strong> &#8211; This is usually where people screw up.  Maybe they have never run an application where there are several million inserts in a day.  Or maybe they&#8217;ve never seen the affects of table vs row level locking on updates.   Maybe they don&#8217;t understand why their query doesn&#8217;t match any of the indexes that they have setup.  The developer may not understand what an index even is!  This is why developers and DBAs need to be on the same page in the database / code design.  Even if you don&#8217;t have a DBA, there are plenty of web sites out there that can help you figure out how to tune your application and find slow points in your database code.</li>
<li><strong>Improper Database Tuning</strong> &#8211; This is where a skilled DBA can save your ass.  If you don&#8217;t have one on staff, contract this out.  There are consultants out there that are worth it.  Find a good one, pay him his price and you will be amazed at what they can do.   If you happen to have a development crew that is fanatical on code optimization and speed, they will probably make up for having a DBA on staff.  But it never hurts even to bring a DBA in for a day or two, have him look at the DB, make some suggestions and turn it into a training session to help your developers grow.</li>
<li><strong>Database Load</strong> &#8211; Let&#8217;s face it, some databases are very large and have grown to the point where it is time to expand the design.</li>
<li><strong>Slow/Old DB Server</strong> &#8211; At a certain point, its not worth your time to spend weeks tweaking every query on a server that is 2-3 years old.  Throw new hardware at it and let the improvements there increase your performance.</li>
</ol>
<p>I don&#8217;t really have a major issue with the rest of her list, they all seem to be fairly logical.  But I just didn&#8217;t understand the advantages fully and the first disadvantage, well, as you can tell it drove me up the freaking wall.   If the database is slow, there is a good reason for it all of which are fixable.  </p>
<p>Now, with all that being said, I do kind of agree with her.  IF the data is not going to change, why store it in a database.  Having a flat config file is not the end of the world people.  Its fast, saves a query, and never changes!    But that last part is pretty critical.  If the data <em>may</em> expand which very well could in this instance, it proabably makes sense to put it in the database even though it doesn&#8217;t fully seem like it needs to go there.   if you have your database design in order, you should be fine and never notice a performance hit getting this data.</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/03/no-server-restart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7 things you didn&#8217;t know you could do with OpenOffice 3</title>
		<link>http://usrlocal.com/2009/02/7-things-you-didnt-know-you-could-do-with-openoffice-3/</link>
		<comments>http://usrlocal.com/2009/02/7-things-you-didnt-know-you-could-do-with-openoffice-3/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 04:18:17 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Easter Eggs]]></category>
		<category><![CDATA[OpenOffice]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=298</guid>
		<description><![CDATA[Recently, PC Mag ran an article titled OpenOffice.org: 7 Things You Didn&#8217;t Know You Could Do.  I&#8217;ve always been a big fan of Open Office and have found it a nice alternative to shelling out the major bucks for the Office suite from Microsoft.
Here&#8217;s the run down of the list.

Edit two or more parts [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, <a href="http://www.pcmag.com/">PC Mag</a> ran an article titled <a href="http://www.pcmag.com/article2/0,2817,2341228,00.asp">OpenOffice.org: 7 Things You Didn&#8217;t Know You Could Do</a>.  I&#8217;ve always been a big fan of <a href="http://www.openoffice.org/">Open Office</a> and have found it a nice alternative to shelling out the major bucks for the Office suite from <a href="http://microsoft.com/">Microsoft</a>.</p>
<p>Here&#8217;s the run down of the list.</p>
<ol>
<li>Edit two or more parts of a document at the same time.</li>
<li>Use OpenOffice.org to open legacy documents.</li>
<li>Play a vintage Space Invaders game.</li>
<li>Turn off the blinking light bulb.</li>
<li>Save files in Office formats by default.</li>
<li>Automate actions easily.</li>
<li>Fix those single quotes.</li>
</ol>
<p>Looking through the list,  #1 seems like a good one, #2 is very useful when digging through old files, #3 wait&#8230;what the f*ck?!?</p>
<p>Why is #3 there?  Why is that released code?  I know that some developers think it is cute to hide easter eggs in their code.  I&#8217;m not one of them.  I believe that code should be lightening fast and this extra crap just annoys the crap out of me.  You&#8217;re taking up hard drive space and resources.   Oh sure, everyone has several terabytes of data on their PCs&#8230;not true jackass!</p>
<p>OpenOffice needs to be a serious tool and start leading the word processing, excel, presentation fight.  Apple is making a good stab at the Microsoft juggernaut.   But the <a href="http://www.openoffice.org/">OpenOffice</a> developers need to cut out the crap,  optimize the hell out of their code and start kicking ass and taking names!    </p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/02/7-things-you-didnt-know-you-could-do-with-openoffice-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ugly Code</title>
		<link>http://usrlocal.com/2009/02/ugly-code/</link>
		<comments>http://usrlocal.com/2009/02/ugly-code/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 21:49:58 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Dumb People]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[HMC 4.5]]></category>
		<category><![CDATA[OCS]]></category>
		<category><![CDATA[Stupid People]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=285</guid>
		<description><![CDATA[With my recent project, I had to do some research for the bits that make up the msRTCSIP-OptionFlags field in Active Directory for OCS users.   There were certain operations that are not 100% supported by HMC so often times you have to fill in the gaps.  The definition of this field is [...]]]></description>
			<content:encoded><![CDATA[<p>With my <a href="http://usrlocal.com/2009/02/10/first/">recent project</a>, I had to do some research for the bits that make up the msRTCSIP-OptionFlags field in Active Directory for OCS users.   There were certain operations that are not 100% supported by HMC so often times you have to fill in the gaps.  The definition of this field is as follows:  </p>
<blockquote><p>This attribute specifies the different options that are enabled for the user or contact object. This attribute is a bit-mask value of type integer. Each option is represented by a bit. This attribute is marked for Global Catalog replication.</p></blockquote>
<p><a href="http://technet.microsoft.com/en-us/library/bb663647.aspx">source</a></p>
<p>Unfortunately, in my searching I found not only the technet article, but I also found <a href="http://mscomms.wordpress.com/2008/10/05/finally-the-rcc-enabling-script-for-ocs2007-users/">this</a></p>
<p>Here a sample of some of the code that you&#8217;ll find&#8230;.</p>
<p><code>if strOptionFlag = "" then<br />
objUser.Put "msRTCSIP-OptionFlags", "16"</p>
<p>else</p>
<p>‘If user not enabled then do not enable OCS<br />
if strOptionFlag = "0" then<br />
objUser.Put "msRTCSIP-OptionFlags", "0"<br />
‘If user is enabled for Public IM then keep Public IM enabled and enable RCC<br />
elseif strOptionFlag = "1" then<br />
objUser.Put "msRTCSIP-OptionFlags", "257"<br />
‘If user is enabled for RCC then keep RCC enabled and enable Enhanced Presence<br />
elseif strOptionFlag = "16" then<br />
objUser.Put "msRTCSIP-OptionFlags", "272"<br />
‘If user is enabled for RCC and Public IM then keep RCC &#038; PIM enabled and enable Enhanced Presence<br />
elseif strOptionFlag = "17" then<br />
objUser.Put "msRTCSIP-OptionFlags", "273"<br />
‘If user is already enabled for RCC and Enhanced Presence then keep settings<br />
elseif strOptionFlag = "272" then<br />
objUser.Put "msRTCSIP-OptionFlags", "272"<br />
‘If user is already enabled for RCC, PIM and Enhanced Presence then keep settings<br />
elseif strOptionFlag = "273" then<br />
objUser.Put "msRTCSIP-OptionFlags", "273"<br />
end if<br />
end if</code></p>
<p>All I have to say is wow!  You&#8217;ve got to be freaking kidding me.  Are there programmers out there that don&#8217;t understand what a <a href="http://en.wikipedia.org/wiki/Bitfield">bitfield</a> is supposed to be or how to do<a href="http://en.wikipedia.org/wiki/Bitwise_operations"> bitwise operations</a>?  That&#8217;s like the first freaking class in a Computer Science degree.  This is where you learn about Big 0, Binary numbers, loops, variables.  If you are a programmer reading this blog and you don&#8217;t know what a bit field is and how to us it.  Google it, read up, and rid the world of ugly ass code like what I found above.  </p>
<p>Now technically what this person is doing would &#8220;work&#8221; since it is setting the integer with an appropriate number.   But wow is this the <b>WRONG</b> way to do it.    I&#8217;m afraid to see this persons code for when they need to check and see if the RCC bit is set for the user.   Technically, they should be able to do a simple bitwise operation and check it something along the lines of:</p>
<p><code>if(($msRTCSIP-OptionFlags &#038; 0x0010) != 0)<br />
{<br />
// RCC is set<br />
}</code></p>
<p>I have a feeling that this person is doing for the following: </p>
<p><code>if(value == 273)<br />
{<br />
X is set<br />
Y is set<br />
Z is set<br />
}<br />
else if(value == 257)<br />
{<br />
Y is set<br />
Z is set<br />
}</code></p>
<p>This is a very simplistic psuedo-code example.  But wow&#8230;I&#8217;m still in shock that this type of code is out there&#8230;and posted somewhat recently in October of 2008!  </p>
<p>I really hope I run into this guy some day so I can beat him with the clue-by-4.  </p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/02/ugly-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The need for speed</title>
		<link>http://usrlocal.com/2009/01/the-need-for-speed/</link>
		<comments>http://usrlocal.com/2009/01/the-need-for-speed/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 13:00:16 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Micro$oft]]></category>
		<category><![CDATA[HMC 4.5]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=238</guid>
		<description><![CDATA[As I&#8217;ve written before, the main engine that we are using to provision users on our Exchange system is Microsoft&#8217;s Hosted Messaging and Collaboration (HMC) framework.  
I&#8217;ve had a few issues with it and various hoops that I have had to jump through.  Many of which I have not had a chance to [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve<a href="http://usrlocal.com/2008/10/07/adventures-in-hmc/"> written before</a>, the main engine that we are using to provision users on our Exchange system is <a href="http://www.microsoft.com/">Microsoft</a>&#8217;s <a href="http://www.microsoft.com/hosting/solutions/hostedmessaging.mspx">Hosted Messaging and Collaboration (HMC) framework</a>.  </p>
<p>I&#8217;ve had a few issues with it and various hoops that I have had to jump through.  Many of which I have not had a chance to document on this blog.  Those will hopefully come out in the coming months.  </p>
<p>Today, I was dealing with a speed issue that we have been having in our customer portal that hits HMC.  The page is pretty basic, it gives a listing of all the users, the name, login address, what package they are assigned and then some actions that can be taken on the user such as edit, delete, disable.  This is all in house code that shows this information with calls being made to HMC to get the data.</p>
<p>Unfortunately, I made a mistake in my initial development.  Originally, I got a listing of all the users and had 90% of the information that I needed. Another call was needed to get the assigned package for each user.   If you have 5-10 users, this isn&#8217;t a huge deal.  Try it with 100, or 1000.  It gets really ugly really fast.  </p>
<p>On one particular customer that I was looking at, they have 120 users.  Their page was loading in 41 seconds.  41 freaking seconds!!!  7 seconds for the AD search to grab the users with mailboxes.  Then somewhere between .1 and .3 seconds per user to equal 34 seconds of the page load.  </p>
<p>The solution, remove the package display code.  </p>
<p>What?  But doesn&#8217;t the user want to see this data?!?!  Maybe.  But seeing as they have to go to the edit page anyway to change the package, it really isn&#8217;t needed on the account listing page.  So why display it there.   It slows down the user experience which is more of a negative than having it on the page.</p>
<p>It wasn&#8217;t an easy decision to remove this information. I thought of a whole bunch of ways where I could tuck that data away so I could grab it more efficiently.  But in the end, less is less.  Removing that data cleaned up the look of the page and vastly improved the load times.    Its only been in the wild for a for hours so we&#8217;ll see what the users have to say about the change.</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/01/the-need-for-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Wordpress</title>
		<link>http://usrlocal.com/2009/01/hacking-wordpress/</link>
		<comments>http://usrlocal.com/2009/01/hacking-wordpress/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 13:32:31 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[idiots]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=213</guid>
		<description><![CDATA[I&#8217;ve been doing quite a bit of side work for friends and family putting together some low traffic &#8216;business card&#8217; sites.  I used to do a lot of custom programming for each of these where I would put up the site and then have a CMS on the back end so they could log [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing quite a bit of side work for friends and family putting together some low traffic &#8216;business card&#8217; sites.  I used to do a lot of custom programming for each of these where I would put up the site and then have a CMS on the back end so they could log in and update the content. </p>
<p>This worked out for a while and I had a pretty basic CMS built that I could plug in where needed.  But, as with everything, the feature set that I needed kept growing and I was pretty short on time to implement the features that I needed.  </p>
<p>To solve this, I started looking at the various blogging engines that were out there.  The one that seemed the easiest to pick up, was pretty popular, and had a ton of plugins for the things that I was looking for was <a href="http://wordpress.org/">Wordpress</a>.</p>
<p>As a blog engine, it does great!  It is actually what is powering the site that you are reading now.  As a CMS, it does OK.  I can create static pages, setup some assemlance of structure with sub pages and decent navigation.   There are a ton of themes out there and a lot of people have tutorials that can tell you how to hack them up to make them look the way that you want.   But there is one major thing that is bugging me.  The code!</p>
<p>Seriously, have you looked at it?   Maybe I&#8217;m anal retentive.  But there is html and PHP mixed together all over the place.    The code looks like it tries to implement some sort of MVC where the view is in the theme.  But good god, do not go looking through that pile of poo.  </p>
<p>Here is an example of what I am talking about:<br />
<code></p>
<p> &lt;p&gt;<br />
    &lt;label&gt;&lt;?php _e('Username or E-mail:') ?&gt;&lt;br /&gt;<br />
    &lt;input type="text" name="user_login" id="user_login" class="input" value="<?php echo attribute_escape(stripslashes($_POST['user_login'])); ?>" size="20" tabindex="10" /></label><br />
  &lt;/p><br />
&lt;?php fake_do_action('lostpassword_form'); ?></p>
<p class="submit">&lt;input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Get New Password'); ?>" tabindex="100" /&gt;</p>
<p></code></p>
<p>I couldn&#8217;t even do that big of a snippet due to all the hell it causes when you post wordpress code on a wordpress site.  But the &lt;?php  ?&gt; tags are scattered all over the code base.  Its a royal mess.</p>
<p>What Wordpress needs to do is come up with some sort of code standard or guideline.  Then reject anything that doesn&#8217;t meet that criteria that they have linked up on their site.  This is a full review of all the plugins and themes that they have.  </p>
<p><i>Yes, I&#8217;m serious about this!</i></p>
<p>It will take a long time to do.  It will take a lot of man hours to complete.  But in the long run, the code will be easier to maintain, extend, and quickly allow users to join the rank and file wordpress developers.   It will also allow the hacks out there to become better programmers.  Which is something that the code base desperately needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2009/01/hacking-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
