<?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>Look alive. Here comes a buzzard. &#187; Software Development</title>
	<atom:link href="http://blog.glenc.net/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.glenc.net</link>
	<description>Treading water in a sea of man-made confusion.</description>
	<lastBuildDate>Fri, 10 Jun 2011 05:10:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Document Database / NoSQL Fears</title>
		<link>http://blog.glenc.net/2011/06/09/document-database-nosql-fears/</link>
		<comments>http://blog.glenc.net/2011/06/09/document-database-nosql-fears/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 05:10:35 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[RavenDb]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=164</guid>
		<description><![CDATA[I&#8217;ve been having a lot of fun recently learning about and playing with RavenDb.  It&#8217;s a great document database solution for .NET.  The thing that immediately blew me away is how little friction there is getting up and going.  I am writing simple POCO objects and persisting them without having to deal with ORM mapping [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having a lot of fun recently learning about and playing with RavenDb.  It&#8217;s a great document database solution for .NET.  The thing that immediately blew me away is how little friction there is getting up and going.  I am writing simple POCO objects and persisting them without having to deal with ORM mapping and other headaches.</p>
<p>However, there are a lot of naysayers out there spreading FUD about document databases.  Why would you need to move away from a relational model that enforces relationship constraints, allows for joins, and supports advanced querying and reporting??</p>
<p>Now, it&#8217;s perfectly valid to point those issues out.  If you are thinking of moving to a document database you need to know what you are sacrificing.  BUT &#8211; let&#8217;s talk about the benefits for just a moment.</p>
<p><strong>Document databases tend to be a closer map to your domain model than relational databases.</strong></p>
<p>Consider the scenario of persisting a customer:</p>
<p><code>public class Customer {<br />
&nbsp;&nbsp;public string Name { get; set; }<br />
&nbsp;&nbsp;public Address ShippingAddress { get; set; }<br />
&nbsp;&nbsp;public Address BillingAddress { get; set; }<br />
}</code></p>
<p>In a relational model you will likely have a Customers table and a CustomerAddresses table with references between the two for the addresses.  In the DB you will need to make sure the foreign keys are set up correctly and you will probably want deletes from the Customers table to cascade to the CustomerAddresses table.  Then you will probably want to use an ORM like NHibernate to map those tables to the customer entity itself.</p>
<p>Think about that for a moment &#8211; how much work did we just have to do just to persist a simple customer??  And the reason we had to do that work is because we have to transform our data from the format WE want it in &#8211; the domain model &#8211; to a format that our relational database understands &#8211; tables and columns.  That transformation takes real effort and thought.  And it continually bites us in the ass with select n+1 scenarios.</p>
<p>I think if we step back for a moment and forget all our history with relational databases and really look at the problems we are trying to solve, it will be easier to choose the best solution for our system.  Just because we&#8217;ve been building applications with relational databases for the past 20+ years doesn&#8217;t mean it&#8217;s the only way &#8211; or even the best way to go.</p>
<p>Sure with a document database we lose some of the relational power that something like SQL provides.  But I believe the gains in many systems could overshadow those losses.  And if we are designing our documents well then we won&#8217;t need as many relationships as we might have needed in a relational model.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2011/06/09/document-database-nosql-fears/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Noobie Thoughts on FubuMVC</title>
		<link>http://blog.glenc.net/2011/01/23/noobie-thoughts-on-fubumvc/</link>
		<comments>http://blog.glenc.net/2011/01/23/noobie-thoughts-on-fubumvc/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 19:02:14 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[FubuMVC]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=141</guid>
		<description><![CDATA[I&#8217;ve been playing with FubuMVC for about a week for a new project I&#8217;m working on (more to come on that soon).  So far I really like it, but it&#8217;s definitely not for everyone.  I thought I would start blogging about some of my experiences learning the framework. There will probably be a few things [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with <a href="http://fubumvc.com" target="_blank">FubuMVC</a> for about a week for a new project I&#8217;m working on (more to come on that soon).  So far I really like it, but it&#8217;s definitely not for everyone.  I thought I would start blogging about some of my experiences learning the framework.</p>
<p>There will probably be a few things I&#8217;m wrong about or don&#8217;t understand because I&#8217;m still new to FubuMVC.  But I want to capture my thoughts and impressions as somebody just starting out to help others who may be in a similar situation, or are evaluating the framework for their own projects.</p>
<h2>Good: Conventions Everywhere</h2>
<p>I think this is where FubuMVC really shines.  If you can define the conventions for your application up front then FubuMVC is going to save you a lot of time.  For example, FubuMVC lets you define an HTTP Method convention which can automatically apply to all of your controller actions.  You could define this convention based on method name (e.g. all Create, Update, or Delete methods only accept POST), input model type, or just about anything you want.</p>
<p>Here&#8217;s a snippet of code from my current application.  It specifies that all controller methods which accept an input model ending with &#8220;Command&#8221; require the POST HTTP method.<br />
<script src="https://gist.github.com/792235.js?file=gistfile1.cs"></script></p>
<p>This is a bit like Aspect Oriented Programming in that you can define cross-cutting rules which are defined once and applied everywhere by the framework.</p>
<p><b>Routing/URL Conventions</b><br />
I really love the way routing/URL conventions are defined in FubuMVC.  When working in ASP.NET MVC I find myself hard-coding a lot of routes to get them looking how I want.  Defining routes in Fubu is quite a bit different from ASP.NET MVC, but I was able to configure my routing very quickly.  FubuMVC also has a really nice diagnostics application that lets you see all routes you have defined for the entire application.</p>
<p><b>HTML Conventions</b><br />
I haven&#8217;t dug into the HTML conventions yet but on the surface they seem very powerful.  For example, you can define a convention where CSS classes are automatically added to lists for even/odd items.  This is the kind of thing that should make it easy to apply cross-application UI changes easily.  </p>
<p>In practice I think this will be a bit like CSS where as long as you create consistent HTML, style sheet can save you a lot of time in layout and formatting.</p>
<h2>Bad: Sooooo many Models!</h2>
<p>Okay this one took some getting used to.  FubuMVC uses a &#8220;One Model In, One Model Out&#8221; (OMIOMO) approach for controller actions.  That means that each controller action can only accept one model as a parameter, and returns a single model back to the framework.  In ASP.NET MVC you might have a controller action that takes one or more simple parameters and returns an ActionResult, but in Fubu you must encapsulate everything into models.<br />
<script src="https://gist.github.com/792273.js?file=FubuMVC_OMIOMO.cs"></script></p>
<p>This is the kind of thing that will turn off a lot of potential users.  It looks &#8220;enterprisey&#8221; and feels like overkill at first.  I didn&#8217;t want to create a ton of view and input models for my controllers so I tried creating generic models that would be used by many actions.  For example, I created an EntityRequest model which had a single Id property that I could pass into all of my View, Edit, and Delete controller actions.<br />
<script src="https://gist.github.com/792280.js?file=FubuMVC_SharedModel.cs"></script></p>
<p>This worked at first, but in the long run it made the UI code a lot harder and more complicated.  Creating links or form targets in FubuMVC is really easy if you can just give it a model.  Honestly I&#8217;m not even sure how to construct a link to a controller action method.<br />
<script src="https://gist.github.com/792267.js?file=FubuMVCLink.html"></script></p>
<p>In the long run I decided to simply create models for my different types of actions.  And although this is quite a bit different from classic ASP.NET MVC, I actually like it better.  It lets me de-couple the UI from the back-end.  The UI simply says &#8220;give me the link to some model&#8221; and Fubu gets to figure out what actually handles that model.</p>
<h2>Good: Moving away from Controllers</h2>
<p>Once I accepted the OMIOMO approach I decided to make another change and do away with my controllers.  Instead I will be adopting a Command/Query approach with Handlers on the back end to handle each command or query.  I like this because my handlers can be a bit more generic and not tied so much to the UI.</p>
<p>Now even if you don&#8217;t want to move away from a Controller model, I think the real power here is that FubuMVC will still work just fine even if you want to adopt a different architecture.</p>
<h2>Bad: Limited support for other view engines</h2>
<p>Unfortunately the choice of view engines is limited to ASP.NET Web Forms and Spark.  That being said, the ASP.NET view engine is pretty close to standard ASP.NET MVC.  But I&#8217;d really like support for Razor or NHaml.  I&#8217;m sticking with ASP.NET for now and it&#8217;s not that bad.</p>
<h2>Bad: Documentation is still sparse</h2>
<p>This comes with any open source project to a certain extent.  But FubuMVC is pretty lacking in documentation at the moment.  The <a href="http://guides.fubumvc.com/" target="_blank">getting started guides</a> will only take you so far.  Once you start trying to build your own application you will likely hit the limits of what you can learn from the guides themselves.</p>
<p>Another thing that complicates things is that FubuMVC went through a reboot a while back so there are some blog entries out there that are out of date with the current version.  Many of the ideas in those posts are still valid, but syntax is slightly different in many cases.</p>
<p>Ultimately I&#8217;ve relied heavily on the FubuMVC source itself to figure out how to do things.  For anyone trying to build a non-trivial application with Fubu it&#8217;s probably a requirement.</p>
<h2>Final Thoughts</h2>
<p>Lastly I thought I would compare FubuMVC to other frameworks/approaches out there.  In many ways FubuMVC can feel quite a bit heavier and more &#8220;enterprisey&#8221; than other frameworks.  But I really think it depends on the type of application you are building and what point in the application lifecycle you are at.</p>
<p>When you are just starting out, FubuMVC can feel very heavy getting everything set up.  If you are building a small application with little functionality, you are probably better off with WebMatrix or ASP.NET MVC.  WebMatrix especially gets you up and running very very fast.</p>
<p>But as your application grows and becomes more complex, FubuMVC should actually start to feel lighter and more flexible than those other frameworks.  I&#8217;ve had many experiences with ASP.NET MVC where a change in design requires you to touch many different controllers, views, etc.  If you are following your conventions these kinds of changes should be much faster and lighter in FubuMVC.  At least that&#8217;s my impression at this point.</p>
<p>Perhaps a good approach is to start with something super light like WebMatrix and get a fast prototype up and running.  Once your application starts to take shape and you can better visualize your conventions it might make sense to jump over to FubuMVC for the final implementation.</p>
<p>So far I am really enjoying FubuMVC even with all of the ups and downs.  I&#8217;ll keep blogging about my experience building a non-trivial application with Fubu.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2011/01/23/noobie-thoughts-on-fubumvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nu &#8211; Package Management for .NET Open Source</title>
		<link>http://blog.glenc.net/2010/08/31/nu-package-management-for-net-open-source/</link>
		<comments>http://blog.glenc.net/2010/08/31/nu-package-management-for-net-open-source/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 02:34:54 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=135</guid>
		<description><![CDATA[I heard about Nu on the Herding Code podcast and was immediately interested.  Ruby Gems is a great way to distribute open source libraries and manage dependencies.  The .NET scene has been struggling with this issue for quite a while so it&#8217;s great to see somebody take on this issue. Not only does Nu make [...]]]></description>
			<content:encoded><![CDATA[<p>I heard about <a href="http://groups.google.com/group/nu-net" target="_blank">Nu</a> on the <a href="http://herdingcode.com/?p=272" target="_blank">Herding Code</a> podcast and was immediately interested.  Ruby Gems is a great way to distribute open source libraries and manage dependencies.  The .NET scene has been struggling with this issue for quite a while so it&#8217;s great to see somebody take on this issue.</p>
<p>Not only does Nu make it super simple to add existing libraries to your project, but it&#8217;s also a great resource for finding <a href="http://nu.wikispot.org/Current_Packages" target="_blank">existing open source projects</a> out there.</p>
<p>I just happened to be building a brand new system so I&#8217;ll go through the steps I took to get Nu up and running.</p>
<ol>
<li>Installed Ruby for Windows using the latest <a href="http://rubyinstaller.org/" target="_blank">Ruby Installer</a></li>
<li>Opened a command prompt and ran the following commands:<br />
<code><br />
c:\gem update --system<br />
c:\gem update<br />
c:\gem install activesupport<br />
c:\gem install nu</p>
<p></code></li>
<li>Next I navigated to a new project folder and typed the following commands to add NHibernate and FluentNHibernate:<br />
<code><br />
nu install nhibernate<br />
nu install fluentnhibernate<br />
</code></li>
</ol>
<p>That&#8217;s it &#8211; super simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2010/08/31/nu-package-management-for-net-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking forward to SharePoint 2010</title>
		<link>http://blog.glenc.net/2009/08/14/looking-forward-to-sharepoint-2010/</link>
		<comments>http://blog.glenc.net/2009/08/14/looking-forward-to-sharepoint-2010/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 22:42:04 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Office System]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=122</guid>
		<description><![CDATA[One of my biggest complaints about SharePoint 2007 is that as a developer, it is virtually impossible to employ professional development techniques when building SharePoint solutions.  I&#8217;m talking about source control, continuous integration, test driven development, etc.  Obviously you can use these techniques when it comes to custom web parts, event receivers, and other &#8220;code [...]]]></description>
			<content:encoded><![CDATA[<p>One of my biggest complaints about SharePoint 2007 is that as a developer, it is virtually impossible to employ professional development techniques when building SharePoint solutions.  I&#8217;m talking about source control, continuous integration, test driven development, etc.  Obviously you can use these techniques when it comes to custom web parts, event receivers, and other &#8220;code only&#8221; solutions, but when you&#8217;re talking about larger projects that include content types, SharePoint Designer workflows, custom lists, in addition to custom code, it simply isn&#8217;t practical to try and cram everything into source control.  It&#8217;s just too much effort.</p>
<p>From what I&#8217;ve seen so far, many of these issues will be resolved with SharePoint 2010 and Visual Studio 2010.  I&#8217;m looking forward to digging into a real project so I can find out where the &#8220;gotchas&#8221; are (and I&#8217;m sure there will be plenty), but so far I&#8217;m optimistic.  I am hopeful that as a developer, I will be able to bring professional development techniques to all areas of a SharePoint project.</p>
<p>In my opinion this is critical if Microsoft wants to make SharePoint a true application development platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2009/08/14/looking-forward-to-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to use source control &#8211; treat it like a video game</title>
		<link>http://blog.glenc.net/2008/11/15/how-to-use-source-control-treat-it-like-a-video-game/</link>
		<comments>http://blog.glenc.net/2008/11/15/how-to-use-source-control-treat-it-like-a-video-game/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 08:26:23 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=108</guid>
		<description><![CDATA[It struck me the other day that the way I use source control is very similar to how I play video games &#8211; specifically, when and how I save my game.  I like to use source control as a safety net &#8211; it&#8217;s a way to keep track of a place I may need to [...]]]></description>
			<content:encoded><![CDATA[<p>It struck me the other day that the way I use source control is very similar to how I play video games &#8211; specifically, when and how I save my game.  I like to use source control as a safety net &#8211; it&#8217;s a way to keep track of a place I may need to return to.  It allows me to continue on with my work and not be worried if I go down a wrong path.  I can always revert and be right back where I started.</p>
<p>Taking this one step further, we might say that the quick save in a video game is like a commit in source control.  Saving your game with a specific name is like creating a branch.</p>
<p>Let&#8217;s say I just finish taking out a whole horde of zombies (<a href="http://www.l4d.com/">Left 4 Dead</a> anticipation is infiltrating my blog).  I&#8217;ll probably do a quick-save to make sure I don&#8217;t have to re-play the same encounter again.  This is just like committing some code you just finished.  You&#8217;re saving your current progress to make sure you don&#8217;t have to re-write the same code twice.</p>
<p>Now, back to my game, what if I come to a fork in the road.  I can go left through the ominous looking sewer, or I can go right through the abandoned city.  Well at this point I&#8217;ll go and save my game with some sort of name like &#8220;Taking the sewer&#8221;.  That way I can continue playing, quick-saving as I go, but I can always get back to that fork if it turns out I made a mistake.</p>
<p>This is very similar to creating a branch in source control.  You want to start working on something new, or something experimental, and you need to be able to save your progress as you go, but you always may need to go back to that original point.</p>
<p>I find that many developers wait too long to commit their changes.  The more frequently you commit, and the more organized you are about it, the less you have to worry about keeping track of every change you make.  This means you have left cruft floating around in your mind to remember and you can concentrate on writing good code.  I think if developers think about source control the same way they think about saving their game progress, it would help them get into the habit of committing frequently and branching appropriately.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/11/15/how-to-use-source-control-treat-it-like-a-video-game/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>sp.py &#8211; SharePoint Scripting with Python</title>
		<link>http://blog.glenc.net/2008/05/18/sppy-sharepoint-scripting-with-python/</link>
		<comments>http://blog.glenc.net/2008/05/18/sppy-sharepoint-scripting-with-python/#comments</comments>
		<pubDate>Mon, 19 May 2008 06:23:32 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Office System]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/?p=70</guid>
		<description><![CDATA[I wrote a small introduction to SharePoint scripting with Python a while back and this weekend I didn&#8217;t have anything better to do (well actually I did, but I&#8217;m an addict &#8211; what can I say) so I decided to expand on it.  I&#8217;ve started putting together a small Python library for working with SharePoint [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a small <a href="http://blog.glenc.net/2007/08/12/sharepoint-meet-python/" target="_blank">introduction</a> to SharePoint scripting with Python a while back and this weekend I didn&#8217;t have anything better to do (well actually I did, but I&#8217;m an addict &#8211; what can I say) so I decided to expand on it.  I&#8217;ve started putting together a small Python library for working with SharePoint using <a href="http://www.codeplex.com/IronPython" target="_blank">IronPython</a>.  It&#8217;s called &#8211; amazingly &#8211; <a href="http://github.com/glenc/sp.py/tree/master/README" target="_blank">sp.py</a>.</p>
<p>So far the library if pretty small &#8211; although it does include a nice little module for workign with stsadm commands.  I&#8217;ll be adding to it as necessary.  I&#8217;ve decided that although adding <a href="http://stsadm.blogspot.com/" target="_blank">custom stsadm extensions</a> is nice and does fit into the &#8220;way to do things in SharePoint&#8221;, it&#8217;s just too much overhead when you want to do something simple.  So at this point when things come up that need automation, I&#8217;ll be adding new sp.py scripts.</p>
<p>In addition to the sp.py library I&#8217;ve added three scripts:</p>
<ul>
<li style="text-align: left;"><a href="http://github.com/glenc/sp.py/tree/master/src/applytheme.py" target="_blank">applytheme.py</a> &#8211; apply a theme to all webs in a web application</li>
<li><a href="http://github.com/glenc/sp.py/tree/master/src/backupsites.py" target="_blank">backupsites.py</a> &#8211; backup all site collections in a web application</li>
<li><a href="http://github.com/glenc/sp.py/tree/master/src/setprofileprop.py" target="_blank">setprofileprop.py</a> &#8211; set a property on all user profiles based on a dynamic pattern</li>
</ul>
<p>So where can you get this awesomeness?  Well, actually you can get it on <a href="http://github.com/glenc/sp.py/" target="_blank">github</a>.  Github???  You mean that totally web 2.0 site for hosting Git repositories?  Yeah &#8211; that&#8217;s the place.  If you&#8217;re wondering why I&#8217;m using git for source control, well I guess Subversion just wasn&#8217;t &#8220;edge&#8221; enough anymore.  Git&#8217;s actually pretty cool &#8211; and if you need to use Windows you can <a href="http://git.or.cz/#download" target="_blank">download a Windows version here</a>.</p>
<p>At some point I&#8217;ll figure out how to post it as a zip or something instead of a tarball.  But until that point, you can grab the <a href="http://github.com/glenc/sp.py/tarball/master">tarball here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/05/18/sppy-sharepoint-scripting-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Region Folding in Textmate</title>
		<link>http://blog.glenc.net/2008/04/20/region-folding-in-textmate/</link>
		<comments>http://blog.glenc.net/2008/04/20/region-folding-in-textmate/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 15:27:36 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.glenc.net/2008/04/20/region-folding-in-textmate/</guid>
		<description><![CDATA[As a long time Microsoft developer who is in the progress of branching out and learning new things, I sometimes find it hard to give up certain features I&#8217;ve grown accustom to.  When it comes to writing code, one feature of Visual Studio I have learned to rely on is folding sections of code using [...]]]></description>
			<content:encoded><![CDATA[<p>As a long time Microsoft developer who is in the progress of branching out and learning new things, I sometimes find it hard to give up certain features I&#8217;ve grown accustom to.  When it comes to writing code, one feature of Visual Studio I have learned to rely on is folding sections of code using #region and #endregion.  I find regions to be a great way to organize code around different subjects, activities, etc.  For me it&#8217;s a way to reduce the visual clutter and immediately jump to the section of code I need to work on.</p>
<p>On the Mac, TextMate does a great job of code folding based on syntax.  I&#8217;m doing a fair amount of work with Ruby these days and TextMate is an excellent tool.  Unfortunately for me however all folding is based on the syntax of the code, and not extra non-code markers like #region.  Luckily TextMate&#8217;s bundle system is completely extensible and customizable.  Folding is based on regular expressions so with a fairly simple change I was able to get #region folding in TextMate.</p>
<p>The first step is to figure out the regular expression.  The core regex for #region folding would be this:</p>
<p><code>^\s*\#region<br />
^\s*\#endregion</code></p>
<p>Next open up TextMate&#8217;s Bundle editor, open the Ruby language, and locate  the foldingStartMarker and foldingStopMarker sections.  Below is the entire contents of my foldingStartMarker and foldingStopMarker sections.</p>
<p><code>foldingStartMarker = '(?x)^<br />
(\s*+<br />
(module|class|def<br />
|unless|if<br />
|case<br />
|begin<br />
|for|while|until<br />
|(  "(\\.|[^"])*+"          # eat a double quoted string<br />
| ''(\\.|[^''])*+''        # eat a single quoted string<br />
|   [^#"'']                # eat all but comments and strings<br />
)*<br />
(                 \s   (do|begin|case)<br />
| [-+=&amp;|*/~%^&lt;&gt;~] \s*+ (if|unless)<br />
)<br />
)\b<br />
(?! [^;]*+ ; .*? \bend\b )<br />
|(  "(\\.|[^"])*+"              # eat a double quoted string<br />
| ''(\\.|[^''])*+''            # eat a single quoted string<br />
|   [^#"'']                    # eat all but comments and strings<br />
)*<br />
( \{ (?!  [^}]*+ \} )<br />
| \[ (?! [^\]]*+ \] )<br />
)<br />
).*$<br />
|   [#] .*? \(fold\) \s*+ $         # Sune’s special marker<br />
|    ^\s*\#region<br />
';<br />
foldingStopMarker = '(?x)<br />
(   (^|;) \s*+ end   \s*+ ([#].*)? $<br />
|   ^     \s*+ [}\]] \s*+ ([#].*)? $<br />
|   [#] .*? \(end\) \s*+ $    # Sune’s special marker<br />
|   ^\s*\#endregion<br />
)';</code></p>
<p>You can see where my two regular expressions were added near the end of each section.</p>
<p>Once you do that, close the editor, reload your bundles, and you&#8217;re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2008/04/20/region-folding-in-textmate/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Motivation</title>
		<link>http://blog.glenc.net/2007/05/01/motivation/</link>
		<comments>http://blog.glenc.net/2007/05/01/motivation/#comments</comments>
		<pubDate>Wed, 02 May 2007 01:01:02 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blogtmp.glenc.net/2007/05/01/motivation/</guid>
		<description><![CDATA[I’ve got good news and bad news. First the good news: as a manager, having motivated employees is completely within your control. It doesn’t matter how big your budget is, how many employees you have, or how high in the corporate food chain you are. It is absolutely within your power to have motivated and [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve got good news and bad news. First the good news: as a manager, having motivated employees is completely within your control. It doesn’t matter how big your budget is, how many employees you have, or how high in the corporate food chain you are. It is absolutely within your power to have motivated and enthusiastic employees.</p>
<p>Now the bad news: having motivated employees is your responsibility – yours and yours alone. It’s not the responsibility of the HR department or some disconnected “Chief Culture Officer”. It is your responsibility. And it gets worse – if you want to motivate your employees, you have to mean it.</p>
<p>So, before you read any further you need to ask yourself a question: do you feel motivated? Do you want to motivate your employees? Do you want to motivate your employees because you want them to feel the same commitment and passion you do? Or because you want to squeeze a few more hours out of their already long work day?</p>
<p>Motivation is all about communication and vision. It’s about transferring your own motivation and drive to your employees. If you don’t believe in the vision, then no amount of “employee retreats” or “team building exercises” are going to make a difference.</p>
<p>So again, ask yourself if you really feel it. If you don’t, it might be a good idea to step aside so someone who is truly motivated can take the reins. On the other hand, if you are motivated and are looking for some tools to help you transfer that motivation to your team, please keep reading.</p>
<p>Still here? Okay well either you’re lying to yourself, you’re really bored and are reading anyway, or you really do feel enthusiastic and want to pass some of that along. Hopefully it’s the latter, but I’m not going to be picky.</p>
<p>I’ve broken this article into four parts:</p>
<ol>
<li><a href="/2007/05/01/motivation-part-1-being-available/">Being Available</a></li>
<li>Empathize, to a point</li>
<li>Commitments</li>
<li>General conduct</li>
</ol>
<p><a href="/2007/05/01/motivation-part-1-being-available/">Part 1 (Being Available)</a> is ready to go now. The other 3 parts will be posted as my time allows.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2007/05/01/motivation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Motivation &#8211; Part 1: Being Available</title>
		<link>http://blog.glenc.net/2007/05/01/motivation-part-1-being-available/</link>
		<comments>http://blog.glenc.net/2007/05/01/motivation-part-1-being-available/#comments</comments>
		<pubDate>Wed, 02 May 2007 01:00:44 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blogtmp.glenc.net/2007/05/01/motivation-part-1-being-available/</guid>
		<description><![CDATA[Being Available Or, how I learned to get up off my ass and walk around a lot As I said up front, motivation has a lot to do with transferring your enthusiasm to your employees. But in order to do this effectively you have to be genuine about it. If you aren’t feeling it, you’ll [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Being Available</strong><br />
<em>Or, how I learned to get up off my ass and walk around a lot</em></p>
<p>As I said up front, motivation has a lot to do with transferring your enthusiasm to your employees. But in order to do this effectively you have to be genuine about it. If you aren’t feeling it, you’ll end up doing more harm than good. Employees only need a few “fake” ra ra sessions to start seeing everything you do in that light. So the best thing to do if you aren’t feeling the enthusiasm is to do nothing. Doing nothing is much better than doing something in this case because that something is likely to cause damage that is very difficult to undo.<span id="more-61"></span></p>
<p>On the other hand, when you really are feeling it, you want to share it right then and there. When an employee has done great work, praise that work immediately. When the company just landed an awesome new opportunity, tell everyone right then and there.</p>
<p>I’ve always felt that transferring your enthusiasm is much more effective when done in a casual and spontaneous way. When employees see you being enthusiastic in non-orchestrated settings, it comes across as much more genuine. This is why I says be available – walk around a lot – maximize your in person time with your employees. The more time you have with them, the more opportunities you will have to communicate new ideas, be exposed to their great work, and generally check in on how they are doing.</p>
<p>This is such a small and easy thing it’s amazing to me how many people don’t do it. They think that managing people is sitting at their desk, reviewing reports, answering emails, and conducting one on ones. Why should you have to wait two weeks to have your appointed one on one when you can walk over to their desk and do it right now?</p>
<p>A few words on employee praise. Employees want to feel good about the work they are doing. When they feel like they are doing great work, they want to be recognized for that. However, many employees aren’t necessarily into the whole self-promotion thing and thus feel somewhat uncomfortable tooting their own horn. By walking around a lot and being generally available you put yourself in a position to see their great work first hand.</p>
<p>The most effective praise is tied directly to an individual accomplishment. Being able to walk up to someone and say “hey – what you’re doing right now is great” is so much more effective than a disconnected “you’re doing a great job here” comment. I think this is partially because the latter doesn’t really have any insight into what the employee is doing. It fosters comments and thoughts like “he doesn’t really know what I do” or “she has no idea how challenging this is”. When you praise an employee immediately for a specific accomplishment you have witnessed, it tells the employee you know exactly what they’re doing, have seen the great work, and think it’s great. It’s a much more genuine form of praise. And being genuine is what it’s all about.</p>
<p>Another extremely valuable insight you gain from walking around and being available is the pulse of the organization. Are people heads down working with little or no communication? Not necessarily a healthy organization. Are they whispering in groups? Lookout for turnover. Are they happy and joking around but generally focused? Hooray for you! This is the kind of insight that is impossible to discern from reports, company meetings, etc. These insights require your intuition as a manager who knows his or her organization and knows when it’s running smooth on all 8 cylinders.</p>
<p>There is some risk here and you need to be aware of it. Employees should not see your presence as a signal to get back to work. “Uh oh, here comes the boss. If he sees us talking he’s gonna be pissed!” To a certain extent there will always be an element of that – it’s inevitable. But there are some things you can do to minimize this.</p>
<ol>
<li>Don’t publicly call people out when you see behavior you think should be addressed. Of course if you see something that is clearly wrong or unethical you must address it immediately. But for minor things like surfing the web, joking around the water cooler with colleagues, etc, let it slide. If you pick up a pattern and think it needs to be addressed, talk to people in private later. It is important to disassociate any criticism from your presence in the office. It is also important to avoid giving employees who are performing well the impression that they’re in the same boat with the slackers.</li>
<li>Join in the conversation. Not all manager/employee conversation needs to be about work. If you join in a non-work related conversation, or better yet initiate one yourself, you come off as non-threatening.</li>
</ol>
<p>Two quick pointes about item number two above. Like everything else we’ve talked about you must be genuine. Don’t try to be something you’re not. If you try and join in on a conversation that you have absolutely no background in, you’re going to come across phony. We’ve all seen The Office and it’s painful. You don’t want to be Steve Carrell in your own office. This can be tough when there is a significant age difference between you and your employees (oh please no stories about how it was in your day).</p>
<p>The second point is this. Keep it short and sweet. This is both for your sake and your employees. On your hand, you don’t want to foster a culture that regularly takes one hour digressions into the geo-political state of various 3rd world countries and the parallels between that and modern capitalist trends that will eventually result in our ultimate and utter demise.</p>
<p>And for your employees, remember that you are still their manager and to a certain extent they will feel compelled to participate with you in these discussions. They will feel obligated to laugh at your jokes, agree with your opinions, and continue the conversation until you indicate that it’s finished. From their point of view, there’s nothing worse than to have what used to be an interesting conversation crushed by some old guy who doesn’t “get it”, and then have that drag on for 20 agonizing minutes of hell. So like many things, this is a balancing act. Participate enough so as to be non-threatening, but don’t go overboard.</p>
<p>The funny thing about this is that too little of this will make people get back to work when they see you coming because they think you don’t want them socializing. Too much will have the same effect but because they want to avoid a 30 minute conversation about something they don’t care about <img src='http://blog.glenc.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>So in summary, making yourself regularly and informally available to your employees is an extremely powerful tool for motivation. By maximizing your face time with your employees you ensure that you will have as many opportunities as possible to genuinely transfer your own enthusiasm. You put yourself in a position to regularly and naturally praise them for their accomplishments, and you gain valuable insights into the overall temperament of your organization.</p>
<p>And all of this can be achieved by simply getting up off your ass, putting away those damn reports, and walking around saying “how’s it going?”</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2007/05/01/motivation-part-1-being-available/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>MicroISVs and their blogs</title>
		<link>http://blog.glenc.net/2007/02/04/microisvs-and-their-blogs/</link>
		<comments>http://blog.glenc.net/2007/02/04/microisvs-and-their-blogs/#comments</comments>
		<pubDate>Mon, 05 Feb 2007 04:48:28 +0000</pubDate>
		<dc:creator>glenc</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blogtmp.glenc.net/2007/02/04/microisvs-and-their-blogs/</guid>
		<description><![CDATA[It seems like every small software company out there has a blog these days. It&#8217;s become a requirement. In fact, most times these days the blog shows up before the actual product. But if you ask me, by and large it&#8217;s a waste of time. If you&#8217;re blogging in the hopes that it will attract [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like every small software company out there has a blog these days.  It&#8217;s become a requirement.  In fact, most times these days the blog shows up before the actual product.  But if you ask me, by and large it&#8217;s a waste of time.  If you&#8217;re blogging in the hopes that it will attract potential customers or keep customers interested then you need to look long and hard at the kind of content you&#8217;re publishing.</p>
<p>Look, marketing is important &#8211; critically important to the success of your company.  But if your blog is going to be a marketing tool, it&#8217;s got to be targeted at your potential customers.  Your customers don&#8217;t care that you really liked some Joel on Software post.  Your customers don&#8217;t care that you&#8217;re putting the finishing touches on some feature or that you contributed to some open source project over the weekend.  Your customers want to read things <em>they </em>care about &#8211; not things you care about.</p>
<p>The key to a successful blog for a software company is one that truly provides value and connects with your customer base.  If you are passionate about the subject of your software, then you have a good chance of writing a compelling blog which adds value on top of the software you sell.  If you&#8217;re not that passionate, or if you suck at writing, a better approach would be to try and aggregate news articles or other industry/subject related blog postings.</p>
<p>At the end of the day, look at everything you do through the eyes of your customer.  Is it valuable to them?  If not, then you should stop and put that valuable time into something else.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.glenc.net/2007/02/04/microisvs-and-their-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

