<?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>Half-Baked Bits&#187; Software Engineering</title>
	<atom:link href="http://halfbakedbits.com/category/software-engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://halfbakedbits.com</link>
	<description>Small Ideas Factory</description>
	<lastBuildDate>Fri, 09 Jan 2009 12:43:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Greenfield Already!  When is enough enough?</title>
		<link>http://halfbakedbits.com/2009/01/greenfield-already-when-is-enough-enough/</link>
		<comments>http://halfbakedbits.com/2009/01/greenfield-already-when-is-enough-enough/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 12:43:57 +0000</pubDate>
		<dc:creator>Brett Veenstra</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[coding life]]></category>
		<category><![CDATA[greenfield]]></category>

		<guid isPermaLink="false">http://halfbakedbits.com/?p=204</guid>
		<description><![CDATA[What is the best part about software development? Greenfield projects. You have none of the baggage of the bad decisions you made in the past, and you can create some code and see something new. That&#8217;s the attractiveness of this business. What we get &#8220;paid for&#8221; is actually dealing with a lot of crap code, [...]]]></description>
			<content:encoded><![CDATA[<p>What is the best part about software development?  <strong><a href="http://en.wikipedia.org/wiki/Greenfield_project">Greenfield projects</a></strong>.  You have none of the baggage of the bad decisions you made in the past, and you can create some code and see something new.  That&#8217;s the attractiveness of this business.</p>

<p>What we get &#8220;paid for&#8221; is actually dealing with a lot of crap code, some written by us, the rest written by others.  <a href="http://ayende.com/Blog/archive/2008/07/29/There-is-no-such-thing-as-a-single-developer-project.aspx">Ayende has a great quote, broken English and all</a>:</p>

<blockquote>
  <p>There are always at least two people in any software project:</p>
  
  <ul>
  <li><p>The developer who wrote the code.</p></li>
  <li><p>The developer who read the code.</p></li>
  </ul>
  
  <p>They are never the same person, even if just by temporal dissonance.</p>
</blockquote>

<p>In other words, we will generally have a thought of <a href="http://twitter.com/brettveenstra/status/1049133055">&#8220;who wrote this crap&#8221;</a>, and most of the time, it is our past self.</p>

<p>As tempting as it is, we cannot simply try to create new projects whenever we encounter difficulties or better ways of doing things.  <strong>We would never get things done.</strong></p>

<p>There are however instances that demand a new project.  Here are a few that come to mind:</p>

<ul>
<li>Platform is not actively supported or vendor&#8217;s development has reached a sunset.</li>
<li>Another major technology has supplanted the one your using in the marketplace, one that would reduce your codebase significantly.</li>
<li>You have to re-read nearly the entire codebase to make any changes <em>or</em> you have limited tests, specs, documentation, etc. on a key application.  This is a special case, one that&#8217;s not very popular and easily ignored when we get busy, but in this event, you want to capture as much of the knowledge from the developers <strong>now</strong>, this is your &#8220;project&#8221;.</li>
<li>Your application is small (e.g. 1 developer, handful of function points), these are the perfect environments for learning new technologies, techniques, etc.</li>
</ul>

<p>Any others come to mind?  Let&#8217;s have them!</p>
]]></content:encoded>
			<wfw:commentRss>http://halfbakedbits.com/2009/01/greenfield-already-when-is-enough-enough/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cleaning up after ActiveX executables</title>
		<link>http://halfbakedbits.com/2008/09/cleaning-up-after-activex-executables/</link>
		<comments>http://halfbakedbits.com/2008/09/cleaning-up-after-activex-executables/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 15:29:10 +0000</pubDate>
		<dc:creator>Nathan Bedford</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[ActiveX]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://halfbakedbits.com/?p=139</guid>
		<description><![CDATA[There&#8217;s a good chance most .NET developers don&#8217;t have to deal with this much anymore, but for those stuck in VB6, you might know the pain of cleaning up after ActiveX executables and DLLS. If everything goes as planned, it&#8217;s trivial. For ActiveX DLLs, you can just use regsvr32 with the /u switch, like so: [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a good chance most .NET developers don&#8217;t have to deal with this much anymore, but for those stuck in VB6, you might know the pain of cleaning up after ActiveX executables and DLLS.</p>

<p>If everything goes as planned, it&#8217;s trivial.  For ActiveX DLLs, you can just use regsvr32 with the /u switch, like so:</p>

<p><code>regsvr32 /u dllFile.dll</code></p>

<p>For ActiveX executables, you use the /unregserver argument for EXE itself, like so:</p>

<p><code>ActiveXFile.exe /unregserver</code></p>

<p>Each ActiveX file has a class ID (CLSID) that uniquely identifies that file in the registry.  When you unregister the ActiveX library with one the previous commands, all references to the library are removed from the registry.  This is important if you&#8217;d like to update an ActiveX library that has had it&#8217;s CLSID changed.  Normally, you&#8217;d just unregister the old library (using the old file), remove the old file, then copy in the new file and register it.</p>

<h2>Lil&#8217; Orphan Annie</h2>

<p>So what happens if the old library file has been deleted?  You&#8217;re stuck with all those old keys in the registry, and often times that will prevent the <strong>new</strong> from registering properly!</p>

<p>It just so happens I was working with a company that had a problem like this.  Their product had several ActiveX exes and DLLS, and more often than not, when trying to update a client&#8217;s files, someone would forget to unregister the old libraries before removing them, so we found ourselves stuck in this mess quite often.</p>

<p>To figure out how to fix this, I decided to figure out exactly what happened when an ActiveX library is registered, so I could undo the changes.  I did some research and concluded that when an ActiveX library is registered, the only thing on the system that changes is that several keys are added to the registry.  There are several programs (mostly for installers) that will help you discover exactly how an installation has affected your system, but I wanted to try a free way.  This is where a simple but irreplaceable tool came into play: the diff tool.</p>

<h2>Visual diff tools rock!</h2>

<p>Diff tools compare two text-based files (or blocks of text) and visually show you how those files are different.  It&#8217;s an absolute must-have for programmers&#8230;when combined with a revision control software product like SVN, git, or Source Save, you can easily compare how a text file has changed since it was last &#8216;checked-in&#8217;.   There are plenty of good ones out there&#8230;I&#8217;d recommend checking out <a href="http://www.winmerge.org/">WinMerge</a>.  It&#8217;s fast, free, looks good, and integrates nicely with TortoiseSVN.</p>

<p>So how is WinMerge going to help us here?  Well, fortunately the Windows Registry Editor (regedit) provides an option to export the entire registry into a text file! So, discovering how your registry has changed after an operation is as simple as:</p>

<ol>
    <li>Taking a snapshot of your registry (export to text file)</li>
    <li>Applying the change (registering your ActiveX DLL)</li>
    <li>Taking another snapshot of your registry (export to different text file)</li>
    <li>Comparing the two text files to spot the differences (Use WinMerge or other diff tool)</li>
</ol>

<h2>On to the next adventure</h2>

<p>It&#8217;s ridiculously simple, but it works great, and it&#8217;s free. You&#8217;ll learn a lot about how much your registry is being used <strong>constantly </strong>by the OS and your running programs.</p>

<p>Now that we know which registry entries have changed, we can look for patterns and figure how to remove all traces of an ActiveX library from the registry just by knowing it&#8217;s original path.  I&#8217;ll cover that topic in a future post.</p>

<p>I hope this can help out some poor soul still using VB6 ActiveX libraries!</p>
]]></content:encoded>
			<wfw:commentRss>http://halfbakedbits.com/2008/09/cleaning-up-after-activex-executables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Pit of Flexibility</title>
		<link>http://halfbakedbits.com/2008/08/the-pit-of-flexibility/</link>
		<comments>http://halfbakedbits.com/2008/08/the-pit-of-flexibility/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 11:00:50 +0000</pubDate>
		<dc:creator>Brett Veenstra</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[flexibility]]></category>
		<category><![CDATA[problem solving]]></category>

		<guid isPermaLink="false">http://halfbakedbits.com/?p=14</guid>
		<description><![CDATA[As software creators, our passion (and livelihood) is to translate some human want or problem into CPU instructions. Often as the application matures and expands, regardless of architecture, there is a significant burden placed on the trainers and support staff as they work through inquiries by the user community. When an inquiry is strange enough, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://halfbakedbits.com/wp-content/uploads/2008/08/2538644176_8c46500004_m.jpg" alt="" title="Sarlacc Pit" width="240" height="181" class="alignleft size-medium wp-image-29" />As software creators, our passion (and livelihood) is to translate some human want or problem into CPU instructions.  Often as the application matures and expands, regardless of <a href="http://www.ibm.com/developerworks/library/ar-apparch4/">architecture</a>, there is a significant burden placed on the trainers and support staff as they work through inquiries by the user community.  When an inquiry is strange enough, it can finally make it back to the developers to handle (which will rank nearly as fun as writing documentation).  Sometimes your users will continue to demand additional options from the application, and as those are added, so does your support/training efforts.</p>

<h3>How Did We Fall</h3>

<p>Our applications usually <strong>start from a simple problem</strong> (something is costing someone money), but finish as masterpieces of problem solving.  There are many natural complicating factors that go into this finished solution, the principal among them being users require various ways of getting the answers they&#8217;re looking for.  Additionally, <strong>as a programmer, I rarely want to work on a problem that isn&#8217;t difficult.</strong>  All of these forces contribute to taking a once simple solution and creating a Pit of Flexibility.</p>

<h3>The Cost of Flexibility</h3>

<p>Martin Fowler had this <a href="http://www.artima.com/intv/flexplex2.html">comment about flexibility in software</a>:</p>

<blockquote>
  <p>The cost of flexibility is complexity. Every time you put extra stuff into your code to make it more flexible, you are usually adding more complexity.</p>
</blockquote>

<p>This complexity will directly affect your users&#8230; which in turn will load down your support staff.  You may have the brightest support staff, but problem solving a batch calculation system is a difficult and long business even for a few elements.  Once the support staff is spent, inquiries will be sitting on the your door as the developer.</p>

<p>Often these problems aren&#8217;t bugs, they&#8217;re just buried complexity.  Each element on even simple calculations can product a <a href="http://en.wikipedia.org/wiki/Big_O_notation">BigO</a> effect on the final complexity of the answer.  On applications written by different developers or teams, this problem solving can be compounded even further, taking the style and approach of each developer into account.  So how do we as programmers shift these efforts back where they belong, so we can <del datetime="2008-08-28T11:45:22+00:00">catchup on the latest 360 FPS</del> find something more productive to do?</p>

<h3>Jumping off the Treadmill</h3>

<p>The way off this treadmill is simple: let the people upstream see what your application does, let them be able to analyze how your application solves the problem.  Consider Wikipedia&#8217;s entry on problem solving, specifically the <a href="http://en.wikipedia.org/wiki/Problem_solving#Characteristics_of_difficult_problems">characteristics of difficult problems</a>:</p>

<blockquote>
  <ul>
  <li>Intransparency (lack of clarity of the situation)
  
  <ul>
  <li>commencement opacity</li>
  <li>continuation opacity</li>
  </ul></li>
  <li>Polytely (multiple goals)
  
  <ul>
  <li>inexpressiveness</li>
  <li>opposition</li>
  <li>transience</li>
  </ul></li>
  <li>Complexity (large numbers of items, interrelations, and decisions)
  
  <ul>
  <li>enumerability</li>
  <li>connectivity (hierarchy relation, communication relation, allocation relation)</li>
  <li>heterogeneity</li>
  </ul></li>
  <li>Dynamics (time considerations)
  
  <ul>
  <li>temporal constraints</li>
  <li>temporal sensitivity</li>
  <li>phase effects</li>
  <li>dynamic unpredictability</li>
  </ul></li>
  </ul>
</blockquote>

<p>The next time my application is stuck in the Pit of Flexibility, and I cannot reduce its flexibility, I&#8217;ll be building time into my estimates for additional interfaces that provide:</p>

<ul>
<li>Transparency: context of the solution and problem</li>
<li>Singularity: ability to find a specific example of a problem or work backwards from a solution</li>
<li>Simplicity: capability to filter elements of a solution, while offering the completeness of the full answer</li>
</ul>

<a href="http://www.dotnetkicks.com/kick/?url=http://halfbakedbits.com/2008/08/the-pit-of-flexibility/"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://halfbakedbits.com/2008/08/the-pit-of-flexibility/" border="0" alt="kick it on DotNetKicks.com" /></a>
]]></content:encoded>
			<wfw:commentRss>http://halfbakedbits.com/2008/08/the-pit-of-flexibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
